Rogue Wave Views
Gadgets Package API Reference Guide
Product Documentation:

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

Application class. More...

#include <ilviews/gadgets/appli.h>

Inheritance diagram for IlvApplication:
IlvValueInterface

Public Member Functions

 IlvApplication (const char *name, const char *displayName, int argc=0, char **argv=0)
 Constructor. More...
 
 IlvApplication (IlvDisplay *display, const char *name, IlBoolean owner=IlFalse)
 Constructor. More...
 
void addPanel (IlvContainer *panel)
 Adds a panel to the list of panels. More...
 
virtual void beforeRunning ()
 Called before launching the event loop. More...
 
IlvDisplaygetDisplay () const
 Gets the display instance used to create the object. More...
 
const char * getName () const
 Gets the application name. More...
 
IlvContainergetPanel (const char *name) const
 Gets an application panel giving its name. More...
 
virtual IlvStateManager * getRootState () const
 Returns the root state of the application.
 
void hidePanel (const char *name)
 Closes a panel. More...
 
virtual void mainLoop ()
 The main loop of the application. More...
 
virtual void makePanels ()
 Creates the application panels. More...
 
virtual void quit ()
 Deletes the application and exits with the return code 0.
 
void raisePanel (const char *name)
 Raises a panel. More...
 
void realize ()
 Initializes the application. More...
 
void removePanel (IlvContainer *panel, IlBoolean destroyIt=IlTrue)
 Removes a panel. More...
 
virtual void run ()
 Initializes the application. More...
 
virtual IlBoolean setState (const char *stateName)
 Set the application to the state specified by its name. More...
 
void showPanel (const char *name)
 Opens a panel. More...
 

Static Public Member Functions

static IlvApplicationGetApplication (const IlvContainer *container)
 Returns the application object connected to the specified container. More...
 

Detailed Description

Application class.

Library: ilvgadgt

Base class for applications generated with Rogue Wave Views Studio.

See also
IlvContainer.

Accessors

Accessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods IlvValueInterface::queryValue(), IlvValueInterface::queryValues(), IlvValueInterface::changeValue(), IlvValueInterface::changeValues(). This class inherits the accessors of its superclass IlvValueInterface and adds the following ones:

Data accessors

Name Type Equivalent methods
rootState Object getRootState()

Method accessors

Name Return type Equivalent methods
getPanel(String name) Object getPanel(const char* name) const
addPanel(IlvContainer panel) Void addPanel(IlvContainer* panel)
removePanel(IlvContainer panel) Void removePanel(IlvContainer* panel, IlBoolean)
setState(String name) Boolean setState(const char* name)
quit() Void quit()

Constructor & Destructor Documentation

IlvApplication::IlvApplication ( const char *  name,
const char *  displayName,
int  argc = 0,
char **  argv = 0 
)

Constructor.

This constructor creates an instance of IlvApplication, whose name is provided by the parameter name and whose display (IlvDisplay class) is created using the parameters displayName, argc, and argv.

IlvApplication::IlvApplication ( IlvDisplay display,
const char *  name,
IlBoolean  owner = IlFalse 
)

Constructor.

This constructor initializes a new IlvApplication using the display provided in the parameter display. The name of this new application is initialized to a copy of the string name. If the owner parameter is IlTrue, the display is deleted by the application destructor.

Member Function Documentation

void IlvApplication::addPanel ( IlvContainer panel)

Adds a panel to the list of panels.

Adds a panel to the internal list of panels. For classes generated by Rogue Wave Views Studio, each panel is added to the application immediately after its creation. Consequently, use this function only when adding a panel to an application that has not been created with Rogue Wave Views Studio.

Parameters
panelThe panel to add.
virtual void IlvApplication::beforeRunning ( )
virtual

Called before launching the event loop.

Can be redefined by deriving the class generated by Rogue Wave Views Studio. This method is called using the member function run() just before launching the event loop. The definition of this method within the IlvApplication class defaults to nothing.

static IlvApplication* IlvApplication::GetApplication ( const IlvContainer container)
static

Returns the application object connected to the specified container.

Parameters
containerThe container.
Returns
The application object connected to container, or 0 if container is not connected to an application.
See also
IlvApplication::addPanel.
IlvDisplay* IlvApplication::getDisplay ( ) const

Gets the display instance used to create the object.

Returns
A pointer to the display instance that was used to create this object.
const char* IlvApplication::getName ( ) const
virtual

Gets the application name.

Returns
The application name.

Reimplemented from IlvValueInterface.

IlvContainer* IlvApplication::getPanel ( const char *  name) const

Gets an application panel giving its name.

Returns
The application panel whose name is name, or 0 if there's no panel with this name in the application.
void IlvApplication::hidePanel ( const char *  name)

Closes a panel.

Closes a panel by using its name.

Parameters
nameThe name of the panel.
virtual void IlvApplication::mainLoop ( )
virtual

The main loop of the application.

The default implementation calls the function IlvMainLoop.

virtual void IlvApplication::makePanels ( )
virtual

Creates the application panels.

This function is called when the application is initialized and creates the application panels. As defined in the IlvApplication class, this method does nothing directly, but may be redefined in subclasses. For example, this method is redefined by the classes generated by Rogue Wave Views Studio.

void IlvApplication::raisePanel ( const char *  name)

Raises a panel.

Brings a panel to the foreground by using its name.

Parameters
nameThe name of the panel.
void IlvApplication::realize ( )

Initializes the application.

Initializes the application by creating its panels if the application is not yet initialized. This function has no effect if it is called more than once. It is called by the run member function. However, if you want to initialize your application before running it, you can call this function.

void IlvApplication::removePanel ( IlvContainer panel,
IlBoolean  destroyIt = IlTrue 
)

Removes a panel.

Removes a panel from the application and optionally delete it. A panel which is part of an application must not be deleted without being removed from the application.

Parameters
panelThe panel to remove from the application.
destroyItIf set to IlTrue, the panel is destroyed through a call to its destructor.
virtual void IlvApplication::run ( )
virtual

Initializes the application.

Initializes the application and launches the event loop through a call to IlvMainLoop. The application is initialized only once. run is the entry point for the application.

virtual IlBoolean IlvApplication::setState ( const char *  stateName)
virtual

Set the application to the state specified by its name.

Parameters
stateNameThe name of the state.
void IlvApplication::showPanel ( const char *  name)

Opens a panel.

Opens a panel by using its name.

Parameters
nameThe name of the panel.

© Copyright 2016, 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.