rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvApplication Class Reference

Application class. More...

#include <ilviews/gadgets/appli.h>

List of all members.

Public Member Functions

 IlvApplication (IlvDisplay *display, const char *name, IlBoolean owner=IlFalse)
 Constructor.
 IlvApplication (const char *name, const char *displayName, int argc=0, char **argv=0)
 Constructor.
void addPanel (IlvContainer *)
 Adds a panel to the list of panels.
virtual void beforeRunning ()
 Called before launching the event loop.
IlvDisplaygetDisplay () const
 Gets the display instance used to create the object.
const char * getName () const
 Gets the application name.
IlvContainergetPanel (const char *name) const
 Gets an application panel giving its name.
void hidePanel (const char *name)
 Closes a panel.
virtual void mainLoop ()
 The main loop of the application.
virtual void makePanels ()
 Creates the application panels.
void raisePanel (const char *name)
 Raises a panel.
void realize ()
 Initializes the application.
void removePanel (IlvContainer *, IlBoolean destroyIt=IlTrue)
 Removes a panel.
virtual void run ()
 Initializes the application.
void showPanel (const char *name)
 Opens a panel.

Static Public Member Functions

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

Detailed Description

Application class.

Library: ilvgadgt

Base class for applications generated with Rogue Wave Views Studio.

See also:
IlvContainer.

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  ) 

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.

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:
container The 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

Gets the application name.

Returns:
The application name.
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:
name The 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:
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 ,
IlBoolean  destroyIt = IlTrue 
)

Removes a panel.

Removes a panel from the application. If the optional parameter destroyIt is set to IlTrue, the panel is destroyed through a call to its destructor. A panel which is part of an application must not be deleted without being removed from the application.

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.

void IlvApplication::showPanel ( const char *  name  ) 

Opens a panel.

Opens a panel by using its name.

Parameters:
name The name of the panel.

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