
It provides access to the event dispatching and the focus subsystems as well as other management facilities.
The preferred way of changing the appearance and handling of GUI components is by implementing the LookAndFeel and UIDelegate interfaces and installing the LaF via the GuiManager::setLookAndFeel() function. However, properties, delegates and suchlike may also be changed manually by calling the provided setDelegate(), setProperty() etc. These may be used to specify settings for individual gui components or for all components of the specified type.
Public Types | |
| typedef DelegateID | ID |
| component type id | |
| typedef unsigned int | Key |
| property key | |
| typedef LazyValue< BrdDSP::Type, BrdDSP > | LazyBD |
lazy BorderDelegate | |
| typedef SmartPointer< LazyBD > | LazyBDSP |
smart pointer to lazy BorderDelegate | |
| typedef LazyValue< FntSP::Type, FntSP > | LazyFont |
lazy Font | |
| typedef SmartPointer< LazyFont > | LazyFontSP |
smart pointer to lazy Font | |
| typedef LazyValue< IconSP::Type, IconSP > | LazyIcon |
lazy Icon | |
| typedef SmartPointer< LazyIcon > | LazyIconSP |
smart pointer to lazy Icon | |
| typedef LazyValue< UIDSP::Type, UIDSP > | LazyUID |
lazy UIDelegate | |
| typedef SmartPointer< LazyUID > | LazyUIDSP |
smart pointer to lazy UIDelegate | |
| typedef unsigned int | Type |
| color type | |
Public Member Functions | |
| void | clearGeneralSettings () |
| clears all general settings | |
| void | clearIndividualSettings () |
| clears all individual settings | |
| const BrdSP & | getBorder (const Bordered *obj, const BrdSP &def=0) const |
accesses the border registered for obj | |
| Color | getColor (const Displayable *obj, const Type &type, const Color &def=Color()) const |
accesses the type color for obj | |
| ConsoleManager * | getConsoleManager () const |
accesses the ConsoleManager | |
| BrdDSP | getDelegate (const ID &borderType, const BrdDSP &def=0) const |
| accesses the delegate registered for the given border type | |
| UIDSP | getDelegate (const Displayable *obj, const UIDSP &def=0) const |
accesses the delegate registered for obj | |
| FocusManager * | getFocusManager () const |
accesses the FocusManager | |
| FntSP | getFont (const Displayable *obj, const FntSP &def=0) const |
accesses the font for obj | |
| IconSP | getIcon (const Displayable *obj, const IconID &iid, const IconSP &def=0) const |
accesses the icon for obj | |
| IMSP | getInputMap (const Displayable *obj, const IMSP &def=0) const |
accesses the input map for obj | |
| LaFSP | getLookAndFeel () const |
| accesses the currently active LaF | |
| EventMulticaster * | getMulticaster () const |
accesses the EventMulticaster | |
| Value | getProperty (const Displayable *obj, const Key &key, const Value &def=Value()) const |
accesses the value of obj 's key property | |
| RenderStub * | getRenderStub () const |
| provides access to the GUI render stub | |
| void | restoreLookAndFeel () |
| resets the general settings to the ones provided by the active LaF | |
| void | setBorder (const ID &did, const BrdSP &b) |
| installs a border for a class of objects | |
| void | setBorder (const Bordered *obj, const BrdSP &b) |
specifies a border for obj | |
| void | setColor (const ID &did, const Type &type, const Color &c) |
| specifies a color for a class of objects | |
| void | setColor (const Displayable *obj, const Type &type, const Color &c) |
specifies a color for obj | |
| void | setDelegate (const ID &borderType, const BrdDSP &del) |
| installs the delegate for a border type | |
| void | setDelegate (const ID &borderType, const LazyBDSP &del) |
| installs the delegate for a border type | |
| void | setDelegate (const ID &did, const UIDSP &del) |
| installs a delegate for a class of objects | |
| void | setDelegate (const ID &did, const LazyUIDSP &del) |
| installs a delegate for a class of objects | |
| void | setDelegate (const Displayable *obj, const UIDSP &del) |
| installs a delegate for an individual object | |
| void | setDelegate (const Displayable *obj, const LazyUIDSP &del) |
| installs a delegate for an individual object | |
| void | setFont (const ID &did, const FntSP &f) |
| installs a font for a class of objects | |
| void | setFont (const ID &did, const LazyFontSP &f) |
| installs a font for a class of objects | |
| void | setFont (const Displayable *obj, const FntSP &f) |
| installs a font for an individual object | |
| void | setFont (const Displayable *obj, const LazyFontSP &f) |
| installs a font for an individual object | |
| void | setIcon (const ID &did, const IconID &iid, const IconSP &icon) |
| installs an icon for a class of objects | |
| void | setIcon (const ID &did, const IconID &iid, const LazyIconSP &icon) |
| installs an icon for a class of objects | |
| void | setIcon (const Displayable *obj, const IconID &iid, const IconSP &icon) |
| installs an icon for an individual object | |
| void | setIcon (const Displayable *obj, const IconID &iid, const LazyIconSP &icon) |
| installs an icon for an individual object | |
| void | setInputMap (const ID &did, const IMSP &map) |
| specifies the input map for a class of objects. | |
| void | setInputMap (const Displayable *obj, const IMSP &map) |
specifies the input map for obj | |
| void | setLookAndFeel (const LaFSP &laf) |
| changes the look and feel | |
| void | setProperty (const ID &did, const Key &key, const Value &val) |
changes the key property of a class of objects | |
| void | setProperty (const Displayable *obj, const Key &key, const Value &val) |
changes obj 's key property | |
| void | updateUI () const |
| updates all user interface elements | |
Static Public Member Functions | |
| static void | destroyInstance () |
| may be used to manually destroy the singleton instance | |
| static GuiManager * | getInstance () |
| accesses the singleton instance | |
| static bool | isActive () |
| checks if the singleton is active | |
| static bool | isDestroyed () |
| checks if the singleton is destroyed | |
| static bool | isVirgin () |
| checks if the singleton has not been initialized | |
| static void | setPriority (unsigned short) |
| sets this singleton's shutdown priority | |
Static Public Attributes | |
| static const BrdSP | CLEAR_BORDER |
| used to remove border properties | |
| static const Value | CLEAR_VALUE |
| used to remove properties | |
| static FntSP | DEFAULT_FONT |
| the default font | |
Protected Member Functions | |
| Singleton () | |
Static Protected Member Functions | |
| static void | destroyedError () |
| static void | initInstance () |
Classes | |
| struct | Value |
|
|
component type id
|
|
|
property key
|
|
|
lazy
|
|
|
smart pointer to lazy
|
|
|
lazy
|
|
|
smart pointer to lazy
|
|
|
lazy
|
|
|
smart pointer to lazy
|
|
|
lazy
|
|
|
smart pointer to lazy
|
|
|
color type
|
|
|
clears all general settings This function should not be called by client code. |
|
|
clears all individual settings
This function leaves the general settings intact regardless of whether they were imposed by the LaF or the user. These settings may be restored to the LaF's defaults by calling |
|
|
|
|
|
may be used to manually destroy the singleton instance If this function is not called, the instance is destroyed automatically during shutdown. |
|
||||||||||||
|
accesses the border registered for
If an individual border is found for
|
|
||||||||||||||||
|
accesses the
If an individual color is set for
|
|
|
accesses the
|
|
||||||||||||
|
accesses the delegate registered for the given border type
This function returns the delegate registered for
|
|
||||||||||||
|
accesses the delegate registered for
If an individual delegate object is installed, that delegate is returned. Otherwise the delegate for
|
|
|
accesses the
|
|
||||||||||||
|
accesses the font for This function returns the first of the following values that is found:
|
|
||||||||||||||||
|
accesses the icon for This function returns the first of the following values that is found:
|
|
||||||||||||
|
accesses the input map for
This function returns the input map for
|
|
|
accesses the singleton instance The exact operation executed by calling this function is determined by the singleton policies.
|
|
|
accesses the currently active LaF
|
|
|
accesses the
|
|
||||||||||||||||
|
accesses the value of
If an individual property with the given name is specified for
|
|
|
provides access to the GUI render stub The stub is used to render the graphical user interface.
|
|
|
|
|
|
checks if the singleton is active
|
|
|
checks if the singleton is destroyed
This function returns
|
|
|
checks if the singleton has not been initialized A singleton is not initialized if no instance exists and no instance has been destroyed.
|
|
|
resets the general settings to the ones provided by the active LaF
Individual settings remain untouched by this function; they may be cleared by calling |
|
||||||||||||
|
installs a border for a class of objects
The setting may be cleared by passing a
|
|
||||||||||||
|
specifies a border for
Since components may explicitly be set to no border, this property may be cleared by passing
|
|
||||||||||||||||
|
specifies a color for a class of objects
The setting may be cleared by passing a
|
|
||||||||||||||||
|
specifies a color for
The setting may be cleared by passing a
|
|
||||||||||||
|
installs the delegate for a border type
This function calls
|
|
||||||||||||
|
installs the delegate for a border type
Since
This function may be used to clear a delegate setting by passing in
|
|
||||||||||||
|
installs a delegate for a class of objects
This function creates an initialized (i.e. non-lazy)
|
|
||||||||||||
|
installs a delegate for a class of objects
If not already initialized, the passed-in value will be instantiated when it is first requested. If a value for
|
|
||||||||||||
|
installs a delegate for an individual object
This function creates an initialized (i.e. non-lazy)
|
|
||||||||||||
|
installs a delegate for an individual object
If not already initialized, the passed-in value will be instantiated when it is first requested. If a value for
|
|
||||||||||||
|
installs a font for a class of objects
This function creates an initialized (i.e. non-lazy)
|
|
||||||||||||
|
installs a font for a class of objects
If not already initialized,
|
|
||||||||||||
|
installs a font for an individual object
This function creates an initialized (i.e. non-lazy)
|
|
||||||||||||
|
installs a font for an individual object
If not already initialized,
|
|
||||||||||||||||
|
installs an icon for a class of objects
This function creates an initialized (i.e. non-lazy)
|
|
||||||||||||||||
|
installs an icon for a class of objects
If not already initialized,
|
|
||||||||||||||||
|
installs an icon for an individual object
This function creates an initialized (i.e. non-lazy)
|
|
||||||||||||||||
|
installs an icon for an individual object
If not already initialized,
|
|
||||||||||||
|
specifies the input map for a class of objects.
The setting may be cleared by passing a
|
|
||||||||||||
|
specifies the input map for
The setting may be removed by passing a
|
|
|
changes the look and feel
This function installs
|
|
|
sets this singleton's shutdown priority The higher the priority, the earlier the instance will be destroyed during shutdown. If the priority is changed, the highest given priority will be used. |
|
||||||||||||||||
|
changes the The value may be of one of the following types:
If
|
|
||||||||||||||||
|
changes The value may be of one of the following types:
If
|
|
|
|
|
|
updates all user interface elements This function is comparatively slow and should only be called after all necessary changes have been made. Changes that need a call to this function in order to take effect include:
While calling this function works after calling the individual |
|
|
used to remove border properties
|
|
|
used to remove properties
|
|
|
the default font
|
1.4.3