Public Member Functions | Public Attributes

FBMenuItem Class Reference

Search for all occurrences

Detailed Description

Menu Item.

Definition at line 691 of file fbcontrols.h.

#include <fbcontrols.h>

Inheritance diagram for FBMenuItem:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FBMenuItem ()
 Constructor.
void Set (FBMenuItemType pType, const char *pExtension, const char *pLabel, const char *pDescription)
 Initialization function.
bool IsActive ()
 Is menu item active?
void Activate (bool pState=true)
 Activate menu item.
virtual void OnItemSelectEvent (HIRegister pSender, HKEvent pEvent)
 Internal callback function for activated menu item.
virtual bool Execute (const char *pFilename=NULL)=0
 The callback function for when the menu item is selected.

Public Attributes

FBPropertyComponent Component
 Read Write Property: Component handle.
FBPropertyString Extension
 Read Write Property: Default extension.
FBPropertyString Label
 Read Write Property: Label of the menu item.
FBPropertyString Description
 Read Write Property: Description of the menu item.
FBPropertyMenuItemType Type
 Read Write Property: Type of menu item.
FBPropertyString Path
 Read Write Property: Default path to open file dialog to.

Constructor & Destructor Documentation

Constructor.


Member Function Documentation

void Set ( FBMenuItemType  pType,
const char *  pExtension,
const char *  pLabel,
const char *  pDescription 
)

Initialization function.

Parameters:
pTypeType of menu item to be set.
pExtensionFile extension to use as filter for popup.
pLabelShort description of file format (usually one word identifier)
pDescriptionLong description of file format
bool IsActive ( )

Is menu item active?

Returns:
true if menu item has been registered (activated).
void Activate ( bool  pState = true)

Activate menu item.

This will register the callback functions for the menu item, as well as make the item itself appear in the menu. Once activated, you have no more control over the menu item, seeing as it will be registered and cannot be activated twice. This function should be the last one you call when activating the menu item.

Parameters:
pStateActivate if true (default = true).
virtual void OnItemSelectEvent ( HIRegister  pSender,
HKEvent  pEvent 
) [virtual]

Internal callback function for activated menu item.

Registers internally the menu item.

Parameters:
pSenderSending register.
pEventEvent being sent.
virtual bool Execute ( const char *  pFilename = NULL) [pure virtual]

The callback function for when the menu item is selected.

In order to use this class correctly, you must create a class that inherits directly from this class, overloading this virtual function. This function will then be called when the menu item is selected.

Parameters:
pFilenameFilename from popup (default = NULL).
Returns:
Operation was successful (true or false).

Member Data Documentation

Read Write Property: Component handle.

Definition at line 729 of file fbcontrols.h.

Read Write Property: Default extension.

Definition at line 730 of file fbcontrols.h.

Read Write Property: Label of the menu item.

Definition at line 731 of file fbcontrols.h.

Read Write Property: Description of the menu item.

Definition at line 732 of file fbcontrols.h.

FBPropertyMenuItemType Type

Read Write Property: Type of menu item.

Definition at line 733 of file fbcontrols.h.

Read Write Property: Default path to open file dialog to.

Definition at line 735 of file fbcontrols.h.


The documentation for this class was generated from the following file:

FBMenuItem FBMenuItem FBMenuItem FBMenuItem FBMenuItem FBMenuItem FBMenuItem FBMenuItem FBMenuItem FBMenuItem
FBMenuItem FBMenuItem FBMenuItem FBMenuItem FBMenuItem FBMenuItem FBMenuItem FBMenuItem FBMenuItem FBMenuItem