Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::UIToolkit Class Reference

The UIToolkit is used to create instances of various peer's needed by the VCF, as well as providing certain low level services, such as modal and non-modal event loops, and getting at UI metrics. More...

#include <vcf/ApplicationKit/UIToolkit.h>

Inheritance diagram for VCF::UIToolkit:

VCF::ObjectWithCallbacks VCF::Object VCF::OSXUIToolkit VCF::Win32ToolKit VCF::XCBUIToolkit List of all members.

Public Types

enum  ModalReturnType {
  mrNone = 0, mrOK, mrCancel, mrYes,
  mrNo, mrRetry, mrIgnore, mrHelp,
  mrAbort, mrTrue, mrFalse
}
 These enum values specify the various return values that a modal loop can return. More...
enum  { defaultUpdateSpeed = 200 }

Public Member Functions

 UIToolkit ()
virtual ~UIToolkit ()
void init ()

Static Public Member Functions

static void initToolKit ()
 Initializes the toolkit.
static void closeToolkit ()
 cleans up the toolkit instance and deletes it
static ControlPeercreateControlPeer (Control *component, ComponentType componentType=CT_DEFAULT)
 creates a new instance of a ControlPeer the component passed in represents the component the implmenter will get attached to.
static ContextPeercreateContextPeer (Control *component)
 creates a context peer for a control
static ContextPeercreateContextPeer (OSHandleID contextID)
 creates a context peer given a windowing specific context id.
static ContextPeercreateContextPeer (const uint32 &width, const uint32 &height)
 creates a memory based context peer given a width and height.
static ListviewPeercreateListViewPeer (ListViewControl *component)
 This creates a peer that implements the ListviewPeer interface.
static TreePeercreateTreePeer (TreeControl *component)
 This creates a peer that implements the TreePeer interface.
static TextPeercreateTextPeer (const bool &autoWordWrap, const bool &multiLined)
 This creates a peer that implements the TextPeer interface.
static TextEditPeercreateTextEditPeer (TextControl *component, const bool &isMultiLineControl)
static ButtonPeercreateButtonPeer (CommandButton *component)
 This creates a peer that implements the ButtonPeer interface.
static DialogPeercreateDialogPeer (Control *owner, Dialog *component)
static DialogPeercreateDialogPeer ()
static WindowPeercreateWindowPeer (Control *component, Control *owner)
static PopupWindowPeercreatePopupWindowPeer (Frame *frame, Window *owner)
static TransparentWindowPeercreateTransparentWindowPeer (Frame *frame)
static DropDownPeercreateDropDownPeer (Control *control)
static ToolbarPeercreateToolbarPeer (Toolbar *toolbar)
static MenuItemPeercreateMenuItemPeer (MenuItem *item)
static MenuBarPeercreateMenuBarPeer (MenuBar *menuBar)
static PopupMenuPeercreatePopupMenuPeer (PopupMenu *popupMenu)
static ClipboardPeercreateClipboardPeer ()
static DragDropPeercreateDragDropPeer ()
static DataObjectPeercreateDataObjectPeer ()
static DropTargetPeercreateDropTargetPeer ()
static ApplicationPeercreateApplicationPeer ()
static ClipboardgetSystemClipboard ()
static CommonFileDialogPeercreateCommonFileOpenDialogPeer (Control *owner)
static CommonFolderBrowseDialogPeercreateCommonFolderBrowseDialogPeer (Control *owner)
static CommonFileDialogPeercreateCommonFileSaveDialogPeer (Control *owner)
static CommonColorDialogPeercreateCommonColorDialogPeer (Control *owner)
static CommonFontDialogPeercreateCommonFontDialogPeer (Control *owner)
static CommonPrintDialogPeercreateCommonPrintDialogPeer (Control *owner)
static UIShellPeercreateUIShellPeer (UIShell *shell)
static ScrollPeercreateScrollPeer (Control *control)
static CursorPeercreateCursorPeer (Cursor *cursor)
static SystemTrayPeercreateSystemTrayPeer ()
static MenuManagerPeercreateMenuManagerPeer ()
static GraphicsResourceBundlePeercreateGraphicsResourceBundlePeer (AbstractApplication *app)
static bool createCaret (Control *owningControl, Image *caretImage)
static bool destroyCaret (Control *owningControl)
static void setCaretVisible (const bool &caretVisible)
static void setCaretPos (Point *point)
static void postEvent (EventHandler *eventHandler, Event *event, const bool &deleteHandler=true)
 This method posts an event to the underlying platform's windowing system.
static void registerTimerHandler (Object *source, EventHandler *handler, const uint32 &timeoutInMilliSeconds)
static void unregisterTimerHandler (EventHandler *handler)
static void runEventLoop ()
static ModalReturnType runModalEventLoopFor (Control *control)
static void quitCurrentEventLoop ()
 this will attempt to send a message/event to the underlying windowing system's event loop (started due to a call to runEventLoop() or runModalEventLoopFor(.
static void quitModalEventLoop ()
static EventcreateEventFromNativeOSEventData (void *eventData)
 This method creates a new event from native windowing OS event data.
static Size getDragDropDelta ()
 Override this - this should return whatever the appropriate x/y deltas are for starting a drag drop operation are for the specific windowing system.
static const ImagegetStandardStopImage ()
static const ImagegetStandardWarningImage ()
static const ImagegetStandardQuestionImage ()
static const ImagegetStandardInformationImage ()
static void registerComponentInfo (const String &componentUUID, ComponentInfo *info)
static void removeComponentInfo (ComponentInfo *info)
static void registerAccelerator (AcceleratorKey *accelerator)
static void removeAccelerator (const VirtualKeyCode &keyCode, const uint32 &modifierMask, Object *src)
static ButtongetDefaultButton ()
static void setDefaultButton (Button *defaultButton)
static void removeDefaultButton (Button *defaultButton)
static AcceleratorKeygetAccelerator (const VirtualKeyCode &keyCode, const uint32 &modifierMask, Object *src)
static bool findMatchingAccelerators (AcceleratorKey *key, std::vector< AcceleratorKey * > &matchingAccelerators)
 Finds all the matching accelerators and store them in a list.
static void getAcceleratorKeysForControl (Control *control, std::vector< AcceleratorKey * > &matchingAccelerators)
static void getAcceleratorKeysForMenuItem (MenuItem *item, std::vector< AcceleratorKey * > &matchingAccelerators)
static void getAcceleratorKeysForObject (Object *src, std::vector< AcceleratorKey * > &matchingAccelerators)
static void removeAcceleratorKeysForControl (Control *control)
static void removeAcceleratorKeysForMenuItem (MenuItem *item)
static void removeAcceleratorKeysForObject (Object *src)
static void handleKeyboardEvent (KeyboardEvent *event)
static VirtualKeyCode findMnemonic (const String &caption)
static ComponentInfogetComponentInfo (const String &componentUUID)
static ComponentInfogetComponentInfo (Class *componentClass)
static UIMetricsManagergetUIMetricsManager ()
static double getUIMetricValue (const UIMetricsManager::MetricType &type, const String &text="", Font *alternateFont=NULL)
static Size getUIMetricSize (const UIMetricsManager::MetricType &type, const String &text="", Font *alternateFont=NULL)
static Rect getUIMetricRect (const UIMetricsManager::MetricType &type, Rect *rect=NULL, Font *alternateFont=NULL)
static UIPolicyManagergetUIPolicyManager ()
static void displayHelpContents ()
 This attempts to to display the help contents for the application.
static void displayHelpIndex ()
 This attempts to to display the help index for the application.
static void displayHelpSection (const String &helpSection, const String &helpBookName="", const String &helpDirectory="")
 This attempts to to display a specific help section for a given help book and help directory.
static void displayContextHelpForControl (Control *control)
 This attempts to display the context sensitive help for a control.
static UIToolkitinternal_getDefaultUIToolkit ()
 public so platform implementers can get at it easily
static void addToUpdateList (Component *component)
static void removeFromUpdateList (Component *component)
static void setUpdateTimerSpeed (const uint32 &milliseconds)
static void systemSettingsChanged ()

Protected Member Functions

void onAcceleratorMnemonic (KeyboardEvent *event)
void onDefaultButton (KeyboardEvent *event)
virtual ControlPeerinternal_createControlPeer (Control *component, ComponentType componentType=CT_DEFAULT)=0
 creates a new instance of a ControlPeer the component passed in represents the component the implmenter will get attached to.
virtual ContextPeerinternal_createContextPeer (Control *component)
virtual ContextPeerinternal_createContextPeer (OSHandleID contextID)
virtual ContextPeerinternal_createContextPeer (const uint32 &width, const uint32 &height)
virtual ListviewPeerinternal_createListViewPeer (ListViewControl *component)=0
virtual TreePeerinternal_createTreePeer (TreeControl *component)=0
virtual TextPeerinternal_createTextPeer (const bool &autoWordWrap, const bool &multiLined)=0
virtual TextEditPeerinternal_createTextEditPeer (TextControl *component, const bool &isMultiLineControl)=0
virtual ButtonPeerinternal_createButtonPeer (CommandButton *component)=0
virtual DialogPeerinternal_createDialogPeer (Control *owner, Dialog *component)=0
virtual DialogPeerinternal_createDialogPeer ()=0
virtual WindowPeerinternal_createWindowPeer (Control *component, Control *owner)=0
virtual PopupWindowPeerinternal_createPopupWindowPeer (Frame *frame, Window *owner)=0
virtual TransparentWindowPeerinternal_createTransparentWindowPeer (Frame *frame)=0
virtual DropDownPeerinternal_createDropDownPeer (Control *control)=0
virtual ToolbarPeerinternal_createToolbarPeer (Toolbar *toolbar)=0
virtual MenuItemPeerinternal_createMenuItemPeer (MenuItem *item)=0
virtual MenuBarPeerinternal_createMenuBarPeer (MenuBar *menuBar)=0
virtual PopupMenuPeerinternal_createPopupMenuPeer (PopupMenu *popupMenu)=0
virtual ClipboardPeerinternal_createClipboardPeer ()=0
virtual DragDropPeerinternal_createDragDropPeer ()=0
virtual DataObjectPeerinternal_createDataObjectPeer ()=0
virtual DropTargetPeerinternal_createDropTargetPeer ()=0
virtual ApplicationPeerinternal_createApplicationPeer ()=0
virtual Clipboardinternal_getSystemClipboard ()
virtual CommonFileDialogPeerinternal_createCommonFileOpenDialogPeer (Control *owner)=0
virtual CommonFolderBrowseDialogPeerinternal_createCommonFolderBrowseDialogPeer (Control *owner)=0
virtual CommonFileDialogPeerinternal_createCommonFileSaveDialogPeer (Control *owner)=0
virtual CommonColorDialogPeerinternal_createCommonColorDialogPeer (Control *owner)=0
virtual CommonFontDialogPeerinternal_createCommonFontDialogPeer (Control *owner)=0
virtual CommonPrintDialogPeerinternal_createCommonPrintDialogPeer (Control *owner)=0
virtual UIShellPeerinternal_createUIShellPeer (UIShell *shell)=0
virtual ScrollPeerinternal_createScrollPeer (Control *control)=0
virtual CursorPeerinternal_createCursorPeer (Cursor *cursor)=0
virtual SystemTrayPeerinternal_createSystemTrayPeer ()=0
virtual MenuManagerPeerinternal_createMenuManagerPeer ()=0
virtual GraphicsResourceBundlePeerinternal_createGraphicsResourceBundlePeer (AbstractApplication *app)=0
virtual bool internal_createCaret (Control *owningControl, Image *caretImage)=0
virtual bool internal_destroyCaret (Control *owningControl)=0
virtual void internal_setCaretVisible (const bool &caretVisible)=0
virtual void internal_setCaretPos (Point *point)=0
virtual void internal_postEvent (EventHandler *eventHandler, Event *event, const bool &deleteHandler=true)=0
virtual void internal_registerTimerHandler (Object *source, EventHandler *handler, const uint32 &timeoutInMilliSeconds)=0
virtual void internal_unregisterTimerHandler (EventHandler *handler)=0
virtual void internal_runEventLoop ()=0
virtual ModalReturnType internal_runModalEventLoopFor (Control *control)=0
virtual void internal_quitCurrentEventLoop ()=0
 this will attempt to send a message/event to the underlying windowing system's event loop (started due to a call to runEventLoop() or runModalEventLoopFor(.
virtual Eventinternal_createEventFromNativeOSEventData (void *eventData)=0
 This method creates a new event from native windowing OS event data.
virtual Size internal_getDragDropDelta ()=0
 Override this - this should return whatever the appropriate x/y deltas are for starting a drag drop operation are for the specific windowing system.
virtual void internal_displayHelpContents (const String &helpBookName, const String &helpDirectory)=0
virtual void internal_displayHelpIndex (const String &helpBookName, const String &helpDirectory)=0
virtual void internal_displayHelpSection (const String &helpBookName, const String &helpDirectory, const String &helpSection)=0
virtual bool internal_displayContextHelpForControl (Control *control, const String &helpBookName, const String &helpDirectory)=0
 This should display the appropriate context sensitive infor for the control, and return true, or it should return false, indicating that the control didn't have any context help to display.
virtual void internal_systemSettingsChanged ()=0
virtual void internal_handleKeyboardEvent (KeyboardEvent *event)
virtual VirtualKeyCode internal_findMnemonic (const String &caption)
const Imageinternal_getStandardStopImage ()
const Imageinternal_getStandardWarningImage ()
const Imageinternal_getStandardQuestionImage ()
const Imageinternal_getStandardInformationImage ()
void internal_registerComponentInfo (const String &componentUUID, ComponentInfo *info)
void internal_removeComponentInfo (ComponentInfo *info)
void internal_registerAccelerator (AcceleratorKey *accelerator)
void internal_removeAccelerator (const VirtualKeyCode &keyCode, const uint32 &modifierMask, Object *src)
Buttoninternal_getDefaultButton ()
void internal_setDefaultButton (Button *defaultButton)
void internal_removeDefaultButton (Button *defaultButton)
AcceleratorKeyinternal_getAccelerator (const VirtualKeyCode &keyCode, const uint32 &modifierMask, Object *src)
void internal_removeAcceleratorKeysForControl (Control *control)
void internal_removeAcceleratorKeysForMenuItem (MenuItem *menuItem)
void internal_removeAcceleratorKeysForObject (Object *src)
bool internal_findMatchingAccelerators (AcceleratorKey *key, std::vector< AcceleratorKey * > &matchingAccelerators)
void internal_getAcceleratorKeysForControl (Control *control, std::vector< AcceleratorKey * > &matchingAccelerators)
void internal_getAcceleratorKeysForMenuItem (MenuItem *item, std::vector< AcceleratorKey * > &matchingAccelerators)
void internal_getAcceleratorKeysForObject (Object *src, std::vector< AcceleratorKey * > &matchingAccelerators)
virtual void internal_idleTime ()
ComponentInfointernal_getComponentInfo (const String &componentUUID)
ComponentInfointernal_getComponentInfo (Class *componentClass)
UIMetricsManagerinternal_getUIMetricsManager ()
UIPolicyManagerinternal_getUIPolicyManager ()
void internal_addToUpdateList (Component *component)
void internal_removeFromUpdateList (Component *component)
void internal_setUpdateTimerSpeed (const uint32 &milliseconds)
void onUpdateComponentsTimer (TimerEvent *e)
void handleTabKeyboardEvent (KeyboardEvent *event)

Static Protected Member Functions

static String getControlConstants (const String &name)

Protected Attributes

std::map< String, ComponentInfo * > componentInfoMap_
std::multimap< uint32, AcceleratorKey * > acceleratorMap_
std::vector< Control * > visitedContainers_
ClipboardsystemClipboard_
GraphicsToolkitgraphicsToolKit_
ImagestopImage_
ImagewarningImage_
ImageinformationImage_
ImagequestionImage_
KeyboardHandleracceleratorMnemonicHandler_
KeyboardHandlerdefaultButtonHandler_
UIMetricsManagermetricsMgr_
UIPolicyManagerpolicyMgr_
std::vector< Button * > defaultButtonList_
std::vector< Component * > componentsToUpdate_
bool quitModalLoop_

Static Protected Attributes

static UIToolkittoolKitInstance

Detailed Description

The UIToolkit is used to create instances of various peer's needed by the VCF, as well as providing certain low level services, such as modal and non-modal event loops, and getting at UI metrics.

Each system the VCF is ported to has a concrete implementation of the UIToolkit. The UIToolkit is a singleton, and there should only be one instance for a given process running the VCF libraries.

To work with the toolkit you just call it's static functions. These in turn forward the call to the toolkit instance.

The UIToolkit is a singleton, meaning there is only ever one single instance of it. Developers porting the VCF to another platform will have to create a derived class from UIToolkit and implement the various virtual functions.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
defaultUpdateSpeed 

enum VCF::UIToolkit::ModalReturnType
 

These enum values specify the various return values that a modal loop can return.

The most typical values are mrTrue or mrFalse. If used in conjuction with displaying a modal dialog then some of the other values may come into play ot indicate a common button that was clicked, such as OK, Cancel, Yes, No, etc.

Enumerator:
mrNone 
mrOK 
mrCancel 
mrYes 
mrNo 
mrRetry 
mrIgnore 
mrHelp 
mrAbort 
mrTrue 
mrFalse 


Constructor & Destructor Documentation

VCF::UIToolkit::UIToolkit  ) 
 

virtual VCF::UIToolkit::~UIToolkit  )  [virtual]
 


Member Function Documentation

static void VCF::UIToolkit::addToUpdateList Component component  )  [static]
 

static void VCF::UIToolkit::closeToolkit  )  [static]
 

cleans up the toolkit instance and deletes it

static ApplicationPeer* VCF::UIToolkit::createApplicationPeer  )  [static]
 

static ButtonPeer* VCF::UIToolkit::createButtonPeer CommandButton component  )  [static]
 

This creates a peer that implements the ButtonPeer interface.

This ensures that you have a button control that correctly implements ALL the look and feel requirements for the windowing system. Some windowing systems have a more complex button control than others, making it more complicated to try and emulate, as opposed to just providing a peer that creates a native button control. For Win32 systems this is equivalent to creating a window handle with the BUTTON window class name.

static bool VCF::UIToolkit::createCaret Control owningControl,
Image caretImage
[static]
 

static ClipboardPeer* VCF::UIToolkit::createClipboardPeer  )  [static]
 

static CommonColorDialogPeer* VCF::UIToolkit::createCommonColorDialogPeer Control owner  )  [static]
 

static CommonFileDialogPeer* VCF::UIToolkit::createCommonFileOpenDialogPeer Control owner  )  [static]
 

static CommonFileDialogPeer* VCF::UIToolkit::createCommonFileSaveDialogPeer Control owner  )  [static]
 

static CommonFolderBrowseDialogPeer* VCF::UIToolkit::createCommonFolderBrowseDialogPeer Control owner  )  [static]
 

static CommonFontDialogPeer* VCF::UIToolkit::createCommonFontDialogPeer Control owner  )  [static]
 

static CommonPrintDialogPeer* VCF::UIToolkit::createCommonPrintDialogPeer Control owner  )  [static]
 

static ContextPeer* VCF::UIToolkit::createContextPeer const uint32 width,
const uint32 height
[static]
 

creates a memory based context peer given a width and height.

This simply calls the GraphicsToolkit's createContextPeer().

See also:
GraphicsToolkit::createContextPeer

static ContextPeer* VCF::UIToolkit::createContextPeer OSHandleID  contextID  )  [static]
 

creates a context peer given a windowing specific context id.

This simply calls the GraphicsToolkit's createContextPeer().

See also:
GraphicsToolkit::createContextPeer

static ContextPeer* VCF::UIToolkit::createContextPeer Control component  )  [static]
 

creates a context peer for a control

static ControlPeer* VCF::UIToolkit::createControlPeer Control component,
ComponentType  componentType = CT_DEFAULT
[static]
 

creates a new instance of a ControlPeer the component passed in represents the component the implmenter will get attached to.

static CursorPeer* VCF::UIToolkit::createCursorPeer Cursor cursor  )  [static]
 

static DataObjectPeer* VCF::UIToolkit::createDataObjectPeer  )  [static]
 

static DialogPeer* VCF::UIToolkit::createDialogPeer  )  [static]
 

static DialogPeer* VCF::UIToolkit::createDialogPeer Control owner,
Dialog component
[static]
 

static DragDropPeer* VCF::UIToolkit::createDragDropPeer  )  [static]
 

static DropDownPeer* VCF::UIToolkit::createDropDownPeer Control control  )  [static]
 

static DropTargetPeer* VCF::UIToolkit::createDropTargetPeer  )  [static]
 

static Event* VCF::UIToolkit::createEventFromNativeOSEventData void *  eventData  )  [static]
 

This method creates a new event from native windowing OS event data.

Each UIToolkit implementation must implement this method and since we can't possibly know the event data at this point, we just specify a void*. The concrete implementation will have to typecast this to the specific datatype or structure.

static GraphicsResourceBundlePeer* VCF::UIToolkit::createGraphicsResourceBundlePeer AbstractApplication app  )  [static]
 

static ListviewPeer* VCF::UIToolkit::createListViewPeer ListViewControl component  )  [static]
 

This creates a peer that implements the ListviewPeer interface.

A ListviewPeer allows you to view a list of data in multiple ways. For Win32 systems this is equivalent to creating a window handle with the WC_LISTVIEW window class name.

static MenuBarPeer* VCF::UIToolkit::createMenuBarPeer MenuBar menuBar  )  [static]
 

static MenuItemPeer* VCF::UIToolkit::createMenuItemPeer MenuItem item  )  [static]
 

static MenuManagerPeer* VCF::UIToolkit::createMenuManagerPeer  )  [static]
 

static PopupMenuPeer* VCF::UIToolkit::createPopupMenuPeer PopupMenu popupMenu  )  [static]
 

static PopupWindowPeer* VCF::UIToolkit::createPopupWindowPeer Frame frame,
Window owner
[static]
 

static ScrollPeer* VCF::UIToolkit::createScrollPeer Control control  )  [static]
 

static SystemTrayPeer* VCF::UIToolkit::createSystemTrayPeer  )  [static]
 

static TextEditPeer* VCF::UIToolkit::createTextEditPeer TextControl component,
const bool &  isMultiLineControl
[static]
 

static TextPeer* VCF::UIToolkit::createTextPeer const bool &  autoWordWrap,
const bool &  multiLined
[static]
 

This creates a peer that implements the TextPeer interface.

A TextPeer allows you to view and edit text, either in a single line edit control, or a multiline edit control. For Win32 systems this is equivalent to creating a Richedit window handle.

static ToolbarPeer* VCF::UIToolkit::createToolbarPeer Toolbar toolbar  )  [static]
 

static TransparentWindowPeer* VCF::UIToolkit::createTransparentWindowPeer Frame frame  )  [static]
 

static TreePeer* VCF::UIToolkit::createTreePeer TreeControl component  )  [static]
 

This creates a peer that implements the TreePeer interface.

A TreePeer allows you to view a data in an outline or hierarchical style. For Win32 systems this is equivalent to creating a window handle with the WC_TREEVIEW window class name.

static UIShellPeer* VCF::UIToolkit::createUIShellPeer UIShell shell  )  [static]
 

static WindowPeer* VCF::UIToolkit::createWindowPeer Control component,
Control owner
[static]
 

static bool VCF::UIToolkit::destroyCaret Control owningControl  )  [static]
 

static void VCF::UIToolkit::displayContextHelpForControl Control control  )  [static]
 

This attempts to display the context sensitive help for a control.

It is triggered by the underlying windowing platform, usually as a result of the user hitting the F1 key. When this is called it first calls the toolkit's internal_displayContextHelpForControl(), this is turn will trigger the control's ControlHelpRequested delegate and fire and event. The WhatsThisHelpEvent has a member variable called helpString, and can be set to override the the value of the control's getWhatThisHelpString(). If the event's helpString member is not empty, or the controls getWhatThisHelpString() returns a non empty string, then the OS specific portion of the context help display should take place and the internal_displayContextHelpForControl() will return true. For Win32 systems this generally means the display of popup help.

However, if internal_displayContextHelpForControl() returns false, then the toolkit performs the following actions:

  • It first fires a HelpEvent on the control's HelpRequested delegate. When this returns if the event's helpSection value is an empty string, then the toolkit gets the control's parent and does the same thing, continuing to do so until it receives a NULL parent, or finds a non empty helpSection string.
  • if the helpSection from the event is not empty the toolkit will then call UIToolkit::displayHelpSection() passing in the values of the event's helpSection, helpBook, and helpDirectory.

static void VCF::UIToolkit::displayHelpContents  )  [static]
 

This attempts to to display the help contents for the application.

It first checks to see if there's a running Application instance. If there is, then it calls the Application's virtual displayHelpContents() which lets the application have first crack at this. If Application::displayHelpContents() returns true, then the function exits, if it does not then it attempts to determine the help book and help directory using this set of methods:

  • it checks for the running app instance, and if it finds it, then it requests the application to fill in the help book and help directory (these are virtual methods that can be overridden).
  • if no app is found or the help dir or help book entries are still empty, then the toolkit attempts to extract this from the resource bundle's book and help directory entries.
  • if the entries are still empty, then the help book becomes the applications name (Application::getName()) or the executables name ( without the extension), and the help directory is assumed to be "Help".
So if you do nothing all, provide no overridden functions, or resource bundle support for program info entries, then the default help would be look something like this, assuming the app is in c:/Program Files/MyApp/MyApp.exe, the help book would be "MyApp" and the the peers would look in the directory c:/Program Files/MyApp/Help/ for the help content.

See also:
Application::displayHelpContents()

Application::getHelpInfo()

static void VCF::UIToolkit::displayHelpIndex  )  [static]
 

This attempts to to display the help index for the application.

It first checks to see if there's a running Application instance. If there is, then it calls the Application's virtual displayHelpContents() which lets the application have first crack at this. If Application::displayHelpContents() returns true, then the function exits, if it does not then it attempts to determine the help book and help directory using this set of methods:

  • it checks for the running app instance, and if it finds it, then it requests the application to fill in the help book and help directory (these are virtual methods that can be overridden).
  • if no app is found or the help dir or help book entries are still empty, then the toolkit attempts to extract this from the resource bundle's book and help directory entries.
  • if the entries are still empty, then the help book becomes the applications name (Application::getName()) or the executables name ( without the extension), and the help directory is assumed to be "Help".
So if you do nothing all, provide no overridden functions, or resource bundle support for program info entries, then the default help would be look something like this, assuming the app is in c:/Program Files/MyApp/MyApp.exe, the help book would be "MyApp" and the the peers would look in the directory c:/Program Files/MyApp/Help/ for the help content.

See also:
Application::displayHelpContents()

Application::getHelpInfo()

static void VCF::UIToolkit::displayHelpSection const String helpSection,
const String helpBookName = "",
const String helpDirectory = ""
[static]
 

This attempts to to display a specific help section for a given help book and help directory.

The help section is normally assumed to be an anchor ref. This method allows you exact control over what gets loaded. The helpBookName and helpDirectory may be be empty strings.

If the helpBookName or helpDirectory are empty the toolkit first checks to see if there's a running Application instance. It then attempts to determine the help book and help directory using this set of methods:

  • it checks for the running app instance, and if it finds it, then it requests the application to fill in the help book and help directory (these are virtual methods that can be overridden).
  • if no app is found or the help dir or help book entries are still empty, then the toolkit attempts to extract this from the resource bundle's book and help directory entries.
  • if the entries are still empty, then the help book becomes the applications name (Application::getName()) or the executables name ( without the extension), and the help directory is assumed to be "Help".
So if you do nothing all, provide no overridden functions, or resource bundle support for program info entries, then the default help would be look something like this, assuming the app is in c:/Program Files/MyApp/MyApp.exe, the help book would be "MyApp" and the the peers would look in the directory c:/Program Files/MyApp/Help/ for the help content.

See also:
Application::displayHelpContents()

Application::getHelpInfo()

static bool VCF::UIToolkit::findMatchingAccelerators AcceleratorKey key,
std::vector< AcceleratorKey * > &  matchingAccelerators
[static]
 

Finds all the matching accelerators and store them in a list.

A matching accelerator is defined as an accelerator that has the same key code, modifier mask, and event handler. This let the synchronize the state of all the matching accelerators when one of them has its changed enabled/disabled state.

static VirtualKeyCode VCF::UIToolkit::findMnemonic const String caption  )  [static]
 

static AcceleratorKey* VCF::UIToolkit::getAccelerator const VirtualKeyCode keyCode,
const uint32 modifierMask,
Object src
[static]
 

static void VCF::UIToolkit::getAcceleratorKeysForControl Control control,
std::vector< AcceleratorKey * > &  matchingAccelerators
[static]
 

static void VCF::UIToolkit::getAcceleratorKeysForMenuItem MenuItem item,
std::vector< AcceleratorKey * > &  matchingAccelerators
[static]
 

static void VCF::UIToolkit::getAcceleratorKeysForObject Object src,
std::vector< AcceleratorKey * > &  matchingAccelerators
[static]
 

static ComponentInfo* VCF::UIToolkit::getComponentInfo Class componentClass  )  [static]
 

static ComponentInfo* VCF::UIToolkit::getComponentInfo const String componentUUID  )  [static]
 

static String VCF::UIToolkit::getControlConstants const String name  )  [static, protected]
 

static Button* VCF::UIToolkit::getDefaultButton  )  [static]
 

static Size VCF::UIToolkit::getDragDropDelta  )  [static]
 

Override this - this should return whatever the appropriate x/y deltas are for starting a drag drop operation are for the specific windowing system.

static const Image* VCF::UIToolkit::getStandardInformationImage  )  [static]
 

static const Image* VCF::UIToolkit::getStandardQuestionImage  )  [static]
 

static const Image* VCF::UIToolkit::getStandardStopImage  )  [static]
 

static const Image* VCF::UIToolkit::getStandardWarningImage  )  [static]
 

static Clipboard* VCF::UIToolkit::getSystemClipboard  )  [static]
 

static Rect VCF::UIToolkit::getUIMetricRect const UIMetricsManager::MetricType type,
Rect rect = NULL,
Font alternateFont = NULL
[static]
 

static Size VCF::UIToolkit::getUIMetricSize const UIMetricsManager::MetricType type,
const String text = "",
Font alternateFont = NULL
[static]
 

static UIMetricsManager* VCF::UIToolkit::getUIMetricsManager  )  [static]
 

static double VCF::UIToolkit::getUIMetricValue const UIMetricsManager::MetricType type,
const String text = "",
Font alternateFont = NULL
[static]
 

static UIPolicyManager* VCF::UIToolkit::getUIPolicyManager  )  [static]
 

static void VCF::UIToolkit::handleKeyboardEvent KeyboardEvent event  )  [static]
 

void VCF::UIToolkit::handleTabKeyboardEvent KeyboardEvent event  )  [protected]
 

void VCF::UIToolkit::init  ) 
 

static void VCF::UIToolkit::initToolKit  )  [static]
 

Initializes the toolkit.

the default toolkit is created and any other initialization functions called

void VCF::UIToolkit::internal_addToUpdateList Component component  )  [protected]
 

virtual ApplicationPeer* VCF::UIToolkit::internal_createApplicationPeer  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual ButtonPeer* VCF::UIToolkit::internal_createButtonPeer CommandButton component  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual bool VCF::UIToolkit::internal_createCaret Control owningControl,
Image caretImage
[protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual ClipboardPeer* VCF::UIToolkit::internal_createClipboardPeer  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual CommonColorDialogPeer* VCF::UIToolkit::internal_createCommonColorDialogPeer Control owner  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual CommonFileDialogPeer* VCF::UIToolkit::internal_createCommonFileOpenDialogPeer Control owner  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual CommonFileDialogPeer* VCF::UIToolkit::internal_createCommonFileSaveDialogPeer Control owner  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual CommonFolderBrowseDialogPeer* VCF::UIToolkit::internal_createCommonFolderBrowseDialogPeer Control owner  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual CommonFontDialogPeer* VCF::UIToolkit::internal_createCommonFontDialogPeer Control owner  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual CommonPrintDialogPeer* VCF::UIToolkit::internal_createCommonPrintDialogPeer Control owner  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual ContextPeer* VCF::UIToolkit::internal_createContextPeer const uint32 width,
const uint32 height
[protected, virtual]
 

virtual ContextPeer* VCF::UIToolkit::internal_createContextPeer OSHandleID  contextID  )  [protected, virtual]
 

virtual ContextPeer* VCF::UIToolkit::internal_createContextPeer Control component  )  [protected, virtual]
 

Reimplemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual ControlPeer* VCF::UIToolkit::internal_createControlPeer Control component,
ComponentType  componentType = CT_DEFAULT
[protected, pure virtual]
 

creates a new instance of a ControlPeer the component passed in represents the component the implmenter will get attached to.

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual CursorPeer* VCF::UIToolkit::internal_createCursorPeer Cursor cursor  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual DataObjectPeer* VCF::UIToolkit::internal_createDataObjectPeer  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual DialogPeer* VCF::UIToolkit::internal_createDialogPeer  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual DialogPeer* VCF::UIToolkit::internal_createDialogPeer Control owner,
Dialog component
[protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual DragDropPeer* VCF::UIToolkit::internal_createDragDropPeer  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual DropDownPeer* VCF::UIToolkit::internal_createDropDownPeer Control control  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, and VCF::Win32ToolKit.

virtual DropTargetPeer* VCF::UIToolkit::internal_createDropTargetPeer  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual Event* VCF::UIToolkit::internal_createEventFromNativeOSEventData void *  eventData  )  [protected, pure virtual]
 

This method creates a new event from native windowing OS event data.

Each UIToolkit implementation must implement this method and since we can't possibly know the event data at this point, we just specify a void*. The concrete implementation will have to typecast this to the specific datatype or structure.

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual GraphicsResourceBundlePeer* VCF::UIToolkit::internal_createGraphicsResourceBundlePeer AbstractApplication app  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual ListviewPeer* VCF::UIToolkit::internal_createListViewPeer ListViewControl component  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual MenuBarPeer* VCF::UIToolkit::internal_createMenuBarPeer MenuBar menuBar  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual MenuItemPeer* VCF::UIToolkit::internal_createMenuItemPeer MenuItem item  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual MenuManagerPeer* VCF::UIToolkit::internal_createMenuManagerPeer  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual PopupMenuPeer* VCF::UIToolkit::internal_createPopupMenuPeer PopupMenu popupMenu  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual PopupWindowPeer* VCF::UIToolkit::internal_createPopupWindowPeer Frame frame,
Window owner
[protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual ScrollPeer* VCF::UIToolkit::internal_createScrollPeer Control control  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual SystemTrayPeer* VCF::UIToolkit::internal_createSystemTrayPeer  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual TextEditPeer* VCF::UIToolkit::internal_createTextEditPeer TextControl component,
const bool &  isMultiLineControl
[protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual TextPeer* VCF::UIToolkit::internal_createTextPeer const bool &  autoWordWrap,
const bool &  multiLined
[protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual ToolbarPeer* VCF::UIToolkit::internal_createToolbarPeer Toolbar toolbar  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual TransparentWindowPeer* VCF::UIToolkit::internal_createTransparentWindowPeer Frame frame  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual TreePeer* VCF::UIToolkit::internal_createTreePeer TreeControl component  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual UIShellPeer* VCF::UIToolkit::internal_createUIShellPeer UIShell shell  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual WindowPeer* VCF::UIToolkit::internal_createWindowPeer Control component,
Control owner
[protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual bool VCF::UIToolkit::internal_destroyCaret Control owningControl  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual bool VCF::UIToolkit::internal_displayContextHelpForControl Control control,
const String helpBookName,
const String helpDirectory
[protected, pure virtual]
 

This should display the appropriate context sensitive infor for the control, and return true, or it should return false, indicating that the control didn't have any context help to display.

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual void VCF::UIToolkit::internal_displayHelpContents const String helpBookName,
const String helpDirectory
[protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual void VCF::UIToolkit::internal_displayHelpIndex const String helpBookName,
const String helpDirectory
[protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual void VCF::UIToolkit::internal_displayHelpSection const String helpBookName,
const String helpDirectory,
const String helpSection
[protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

bool VCF::UIToolkit::internal_findMatchingAccelerators AcceleratorKey key,
std::vector< AcceleratorKey * > &  matchingAccelerators
[protected]
 

virtual VirtualKeyCode VCF::UIToolkit::internal_findMnemonic const String caption  )  [protected, virtual]
 

AcceleratorKey* VCF::UIToolkit::internal_getAccelerator const VirtualKeyCode keyCode,
const uint32 modifierMask,
Object src
[protected]
 

void VCF::UIToolkit::internal_getAcceleratorKeysForControl Control control,
std::vector< AcceleratorKey * > &  matchingAccelerators
[protected]
 

void VCF::UIToolkit::internal_getAcceleratorKeysForMenuItem MenuItem item,
std::vector< AcceleratorKey * > &  matchingAccelerators
[protected]
 

void VCF::UIToolkit::internal_getAcceleratorKeysForObject Object src,
std::vector< AcceleratorKey * > &  matchingAccelerators
[protected]
 

ComponentInfo* VCF::UIToolkit::internal_getComponentInfo Class componentClass  )  [protected]
 

ComponentInfo* VCF::UIToolkit::internal_getComponentInfo const String componentUUID  )  [protected]
 

Button* VCF::UIToolkit::internal_getDefaultButton  )  [protected]
 

static UIToolkit* VCF::UIToolkit::internal_getDefaultUIToolkit  )  [static]
 

public so platform implementers can get at it easily

virtual Size VCF::UIToolkit::internal_getDragDropDelta  )  [protected, pure virtual]
 

Override this - this should return whatever the appropriate x/y deltas are for starting a drag drop operation are for the specific windowing system.

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

const Image* VCF::UIToolkit::internal_getStandardInformationImage  )  [protected]
 

const Image* VCF::UIToolkit::internal_getStandardQuestionImage  )  [protected]
 

const Image* VCF::UIToolkit::internal_getStandardStopImage  )  [protected]
 

const Image* VCF::UIToolkit::internal_getStandardWarningImage  )  [protected]
 

virtual Clipboard* VCF::UIToolkit::internal_getSystemClipboard  )  [protected, virtual]
 

UIMetricsManager* VCF::UIToolkit::internal_getUIMetricsManager  )  [inline, protected]
 

UIPolicyManager* VCF::UIToolkit::internal_getUIPolicyManager  )  [inline, protected]
 

virtual void VCF::UIToolkit::internal_handleKeyboardEvent KeyboardEvent event  )  [protected, virtual]
 

virtual void VCF::UIToolkit::internal_idleTime  )  [protected, virtual]
 

virtual void VCF::UIToolkit::internal_postEvent EventHandler eventHandler,
Event event,
const bool &  deleteHandler = true
[protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual void VCF::UIToolkit::internal_quitCurrentEventLoop  )  [protected, pure virtual]
 

this will attempt to send a message/event to the underlying windowing system's event loop (started due to a call to runEventLoop() or runModalEventLoopFor(.

..) ) and get it to quit running. It will not block and will return immediately. If an event loop ends, and there are no more event loops running then the application may quit cleanly.

On the Win32 system this is implemented with a PostQuitMessage(0)

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

void VCF::UIToolkit::internal_registerAccelerator AcceleratorKey accelerator  )  [protected]
 

void VCF::UIToolkit::internal_registerComponentInfo const String componentUUID,
ComponentInfo info
[protected]
 

virtual void VCF::UIToolkit::internal_registerTimerHandler Object source,
EventHandler handler,
const uint32 timeoutInMilliSeconds
[protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

void VCF::UIToolkit::internal_removeAccelerator const VirtualKeyCode keyCode,
const uint32 modifierMask,
Object src
[protected]
 

void VCF::UIToolkit::internal_removeAcceleratorKeysForControl Control control  )  [protected]
 

void VCF::UIToolkit::internal_removeAcceleratorKeysForMenuItem MenuItem menuItem  )  [protected]
 

void VCF::UIToolkit::internal_removeAcceleratorKeysForObject Object src  )  [protected]
 

void VCF::UIToolkit::internal_removeComponentInfo ComponentInfo info  )  [protected]
 

void VCF::UIToolkit::internal_removeDefaultButton Button defaultButton  )  [protected]
 

void VCF::UIToolkit::internal_removeFromUpdateList Component component  )  [protected]
 

virtual void VCF::UIToolkit::internal_runEventLoop  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual ModalReturnType VCF::UIToolkit::internal_runModalEventLoopFor Control control  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual void VCF::UIToolkit::internal_setCaretPos Point point  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual void VCF::UIToolkit::internal_setCaretVisible const bool &  caretVisible  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

void VCF::UIToolkit::internal_setDefaultButton Button defaultButton  )  [protected]
 

void VCF::UIToolkit::internal_setUpdateTimerSpeed const uint32 milliseconds  )  [protected]
 

virtual void VCF::UIToolkit::internal_systemSettingsChanged  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

virtual void VCF::UIToolkit::internal_unregisterTimerHandler EventHandler handler  )  [protected, pure virtual]
 

Implemented in VCF::OSXUIToolkit, VCF::Win32ToolKit, and VCF::XCBUIToolkit.

void VCF::UIToolkit::onAcceleratorMnemonic KeyboardEvent event  )  [protected]
 

void VCF::UIToolkit::onDefaultButton KeyboardEvent event  )  [protected]
 

void VCF::UIToolkit::onUpdateComponentsTimer TimerEvent e  )  [protected]
 

static void VCF::UIToolkit::postEvent EventHandler eventHandler,
Event event,
const bool &  deleteHandler = true
[static]
 

This method posts an event to the underlying platform's windowing system.

The event handler instance that is passed in is called when the event is processed later on in the event queue. Once this happens the handler's invoke() method is called and the event that was passed in to this method is passed into the EventHandler::invoke() method. Once invoke() returns, the event is deleted and the event handler is delete only if the deleteHandler parameter to postEvent() was true, otherwise it is left alone.

Parameters:
EventHandler the event handler instance to use when the event is retrieved off the event queue later on.
Event the event to pass to the eventHandler's invoke() method. This instance is managed by the UIToolkit, and must be created on the heap. If you create the event instance on the stack you'll corrupt memory and crash your program. Consider yourself warned.
bool this parameter tells the UIToolkit whether or not it should delete the event handler instance. This means that you have a choice when calling the postEvent function - you can either have the UIToolkit clean up the event handler instance for you (deleteHandler=true), or you can manage this instance yourself. If you choose to let the UIToolkit manage the event handler instance, then make sure you don't maintain ownership of the event handler. If you are using EventHandlerInstance classes ( like GenericEventHandler, etc) then you can do the following:
    //note that we don't pass in a name for the event handler
    EventHandler* ev = new GenericEventHandler<MyClass>( this, &MyClass::onMyEvent ); 
    Event* event = //create some event instance
    UIToolkit::postEvent( ev, event ); //defaults to deleting the event handler
Note that in our example above we did not give the event handler a name. This prevents the event handler from being added to it's source, and insures that it will not be owned, allowing the UIToolkit to safely delete it.
If we want to manage the event handler ourselves, then we might do the following:
    //assuming that we are in an object instance that derives from ObjectWithEvents.
    //all control classes do inherit from ObjectWithEvents.
    EventHandler* ev = getEventHandler( "MyClass::onMyEvent" );
    if ( NULL == ev ) {
        ev = new GenericEventHandler<MyClass>( this, &MyClass::onMyEvent ); 
    }
    Event* event = //create some event instance
    UIToolkit::postEvent( ev, event, false ); //defaults to deleting the event handler

See also:
Event

EventHandler

EventHandlerInstance

static void VCF::UIToolkit::quitCurrentEventLoop  )  [static]
 

this will attempt to send a message/event to the underlying windowing system's event loop (started due to a call to runEventLoop() or runModalEventLoopFor(.

..) ) and get it to quit running. It will not block and will return immediately. If an event loop ends, and there are no more event loops running then the application may quit cleanly.

On the Win32 system this is implemented with a PostQuitMessage(0)

static void VCF::UIToolkit::quitModalEventLoop  )  [static]
 

static void VCF::UIToolkit::registerAccelerator AcceleratorKey accelerator  )  [static]
 

static void VCF::UIToolkit::registerComponentInfo const String componentUUID,
ComponentInfo info
[static]
 

static void VCF::UIToolkit::registerTimerHandler Object source,
EventHandler handler,
const uint32 timeoutInMilliSeconds
[static]
 

static void VCF::UIToolkit::removeAccelerator const VirtualKeyCode keyCode,
const uint32 modifierMask,
Object src
[static]
 

static void VCF::UIToolkit::removeAcceleratorKeysForControl Control control  )  [static]
 

static void VCF::UIToolkit::removeAcceleratorKeysForMenuItem MenuItem item  )  [static]
 

static void VCF::UIToolkit::removeAcceleratorKeysForObject Object src  )  [static]
 

static void VCF::UIToolkit::removeComponentInfo ComponentInfo info  )  [static]
 

static void VCF::UIToolkit::removeDefaultButton Button defaultButton  )  [static]
 

static void VCF::UIToolkit::removeFromUpdateList Component component  )  [static]
 

static void VCF::UIToolkit::runEventLoop  )  [static]
 

static ModalReturnType VCF::UIToolkit::runModalEventLoopFor Control control  )  [static]
 

static void VCF::UIToolkit::setCaretPos Point point  )  [static]
 

static void VCF::UIToolkit::setCaretVisible const bool &  caretVisible  )  [static]
 

static void VCF::UIToolkit::setDefaultButton Button defaultButton  )  [static]
 

static void VCF::UIToolkit::setUpdateTimerSpeed const uint32 milliseconds  )  [static]
 

static void VCF::UIToolkit::systemSettingsChanged  )  [static]
 

static void VCF::UIToolkit::unregisterTimerHandler EventHandler handler  )  [static]
 


Member Data Documentation

std::multimap<uint32,AcceleratorKey*> VCF::UIToolkit::acceleratorMap_ [protected]
 

KeyboardHandler* VCF::UIToolkit::acceleratorMnemonicHandler_ [protected]
 

std::map<String,ComponentInfo*> VCF::UIToolkit::componentInfoMap_ [protected]
 

std::vector<Component*> VCF::UIToolkit::componentsToUpdate_ [protected]
 

KeyboardHandler* VCF::UIToolkit::defaultButtonHandler_ [protected]
 

std::vector<Button*> VCF::UIToolkit::defaultButtonList_ [protected]
 

GraphicsToolkit* VCF::UIToolkit::graphicsToolKit_ [protected]
 

Image* VCF::UIToolkit::informationImage_ [protected]
 

UIMetricsManager* VCF::UIToolkit::metricsMgr_ [protected]
 

UIPolicyManager* VCF::UIToolkit::policyMgr_ [protected]
 

Image* VCF::UIToolkit::questionImage_ [protected]
 

bool VCF::UIToolkit::quitModalLoop_ [protected]
 

Image* VCF::UIToolkit::stopImage_ [protected]
 

Clipboard* VCF::UIToolkit::systemClipboard_ [protected]
 

UIToolkit* VCF::UIToolkit::toolKitInstance [static, protected]
 

std::vector<Control*> VCF::UIToolkit::visitedContainers_ [protected]
 

Image* VCF::UIToolkit::warningImage_ [protected]
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information