Rogue Wave Views Gadgets Package API Reference Guide |
Rogue Wave Views Documentation Home |
Application class. More...
#include <ilviews/gadgets/appli.h>
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... | |
IlvDisplay * | getDisplay () const |
Gets the display instance used to create the object. More... | |
const char * | getName () const |
Gets the application name. More... | |
IlvContainer * | getPanel (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 IlvApplication * | GetApplication (const IlvContainer *container) |
Returns the application object connected to the specified container. More... | |
Application class.
Library: ilvgadgt
Base class for applications generated with Rogue Wave Views Studio.
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:
Name | Type | Equivalent methods |
---|---|---|
rootState | Object | getRootState() |
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() |
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.
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.
panel | The panel to add. |
|
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 |
Returns the application object connected to the specified container.
container | The container. |
0
if container is not connected to an application. IlvApplication::addPanel
. IlvDisplay* IlvApplication::getDisplay | ( | ) | const |
Gets the display instance used to create the object.
|
virtual |
IlvContainer* IlvApplication::getPanel | ( | const char * | name | ) | const |
Gets an application panel giving its name.
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.
name | The name of the panel. |
|
virtual |
The main loop of the application.
The default implementation calls the function IlvMainLoop
.
|
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.
name | The 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.
panel | The panel to remove from the application. |
destroyIt | If set to IlTrue , the panel is destroyed through a call to its destructor. |
|
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 |
Set the application to the state specified by its name.
stateName | The name of the state. |
void IlvApplication::showPanel | ( | const char * | name | ) |
Opens a panel.
Opens a panel by using its name.
name | The 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.