Rogue Wave Views
Application Framework Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvDvApplicationStarter Class Reference

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...
 
IlvDvApplicationgetDvApplication () 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

§ IlvDvApplicationStarter()

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.

Member Function Documentation

§ execute()

virtual void IlvDvApplicationStarter::execute ( )
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.

§ getDvApplication()

IlvDvApplication* IlvDvApplicationStarter::getDvApplication ( ) const

Returns the application object contained by the application starter.

Returns
The application object contained by the application starter.

§ setCreateNewDocument()

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).

Parameters
createIf 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.
docTemplateNameThis 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.