Rogue Wave Views Application Framework Package API Reference Guide |
Rogue Wave Views Documentation Home |
Object stored to execute actions. More...
#include <ilviews/appframe/app.h>
Inherited by IlvDvAppEditorStarter.
Public Member Functions | |
IlvDvApplicationStarter (IlvDvApplication *app, IlBoolean createDoc=IlFalse, const char *ndocTemplateName=0) | |
Constructs an IlvDvApplicationStarter object. More... | |
virtual void | execute () |
Executes the application starter. More... | |
IlvDvApplication * | getDvApplication () const |
Returns the application object contained by the application starter. More... | |
void | setCreateNewDocument (IlBoolean create=IlTrue, const char *docTemplateName=0) |
Specifies whether a new document is created when the command line has no program arguments. More... | |
Object stored to execute actions.
Library: ilvappframe
An application starter is an object that is stored by the application to execute some actions. By default, the application starter parses the application command line and opens a document for each extracted file name.
If no file name is found, it can be specified that the application creates a new document using a document template. This is specified in the constructor or in a call to the setCreateNewDocument
method.
IlvDvApplicationStarter::IlvDvApplicationStarter | ( | IlvDvApplication * | app, |
IlBoolean | createDoc = IlFalse , |
||
const char * | ndocTemplateName = 0 |
||
) |
Constructs an IlvDvApplicationStarter
object.
This constructor creates an instance of IlvDvApplicationStarter
that will be stored and executed by the application object app. Method setCreateNewDocumentName
is called with the parameters createDoc and docTemplateName to specify whether a new document is created when the application is launched without program arguments.
|
virtual |
Executes the application starter.
By default, it parses the application command line and opens a document for each extracted file name. If no file name is found in the application command line and if the method canCreateNewDocument()
returns IlTrue
, a new document is created following the rules explained in the description of the setCreateNewDocument
method.
IlvDvApplication* IlvDvApplicationStarter::getDvApplication | ( | ) | const |
Returns the application object contained by the application starter.
void IlvDvApplicationStarter::setCreateNewDocument | ( | IlBoolean | create = IlTrue , |
const char * | docTemplateName = 0 |
||
) |
Specifies whether a new document is created when the command line has no program arguments.
This method is used to specify whether a new document is created when the application is launched and the command line of the application has no program arguments (such as file names).
create | If IlTrue , a new document is created when the application is launched and the command line does not provide program arguments. If IlFalse , no documents are created. |
docTemplateName | This parameter is used only when the parameter create is IlTrue . It specifies the name of the document template used to create a new document. If it is NULL or if it is not a valid document template name, the new document is created with the document template returned by getDvApplication()->getDocTemplate((IlUInt)0) . Otherwise, the document template returned by the call to getDvApplication()->getDocTemplate(0) is used. |
© Copyright 2018, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.