Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
User Interface class. More...
#include <ilviews/dataccess/gcallbak.h>
Public Member Functions | |
IliGlobalGraphicCallback | getCallback (const IlvSymbol *callbackName) const |
Returns the function implementing the callback. More... | |
const IlvSymbol ** | getCallbackNames (IlUInt &count) const |
Returns the names of all currently registered global callbacks. More... | |
void | registerCallback (const IlvSymbol *callbackName, IliGlobalGraphicCallback cb) |
Registers a global callback. More... | |
void | unregisterCallback (const IlvSymbol *callbackName) |
Unregisters the global callback. More... | |
User Interface class.
Library: dbgadget
When a gadget (or a graphic) needs to trigger a named callback, it uses the callback manager. The callback manager is responsible for binding the callback name to an actual function. If the callback name designates a global callback (for example, ), the function implementing the global callback will be called. Otherwise, if a callback function with this name has been registered in the container holding the graphic object, this function will be called (see the
IlvContainer::registerCallback
member function). The callback manager is the unique instance of the IliCallbackManager
class and can be retrieved by calling the function IliGetCallbackManager
. For the callback manager to be active, the include file dataccess/gcallbak.h
has to be included in at least one of the modules of the application. If this is not the case, the global callbacks will not be available.
IliGlobalGraphicCallback IliCallbackManager::getCallback | ( | const IlvSymbol * | callbackName | ) | const |
Returns the function implementing the callback.
callbackName | The callback name. |
NULL
if no such global callback exists. Returns the names of all currently registered global callbacks.
Predefined Global Callbacks
()
(panelName)
(panelName)
(dataSourceName)
(dataSourceName)
(dataSourceName)
(dataSourceName)
(dataSourceName)
(sessionName)
(sessionName)
(sessionName)
(sessionName)
(sessionName)
The following example shows how to define a new global callback:
count | The callback count. |
void IliCallbackManager::registerCallback | ( | const IlvSymbol * | callbackName, |
IliGlobalGraphicCallback | cb | ||
) |
Registers a global callback.
callbackName | The callback name. |
cb | The callback. |
void IliCallbackManager::unregisterCallback | ( | const IlvSymbol * | callbackName | ) |
Unregisters the global callback.
callbackName | The callback name. |
© 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.