a menu widget More...
#include <vtkKWMenu.h>


Public Types | |
| typedef vtkKWCoreWidget | Superclass |
Public Member Functions | |
| virtual const char * | GetClassName () |
| virtual int | IsA (const char *type) |
| void | PrintSelf (ostream &os, vtkIndent indent) |
| virtual int | GetIndexOfCommandItem (vtkObject *object, const char *method) |
| virtual void | PutItemInGroup (int index, int index_g) |
| virtual int | GetIndexOfCascadeItem (vtkKWMenu *menu) |
| virtual int | GetIndexOfItem (const char *label) |
| virtual int | HasItem (const char *label) |
| virtual void | InvokeItem (int index) |
| virtual int | GetNumberOfItems () |
| virtual void | SetState (int state) |
| virtual void | SetItemMarginVisibility (int index, int flag) |
| virtual void | SetItemIndicatorVisibility (int index, int flag) |
| virtual void | SetItemAccelerator (int index, const char *accelerator) |
| virtual void | SetItemUnderline (int index, int underline_index) |
| virtual void | SetItemColumnBreak (int index, int flag) |
| virtual void | PopUp (int x, int y) |
| virtual void | SetEnabled (int) |
| virtual void | UpdateEnableState () |
Static Public Member Functions | |
| static vtkKWMenu * | New () |
| static int | IsTypeOf (const char *type) |
| static vtkKWMenu * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
| vtkKWMenu () | |
| ~vtkKWMenu () | |
| virtual void | CreateWidget () |
| virtual int | GetIndexOfActiveItem (const char *widget_name) |
| const char * | GetSuffixOutOfCreatedItemVariableName (const char *varname) |
Protected Attributes | |
| int | TearOff |
| vtkKWMenuInternals * | Internals |
|
| |
| enum | { UnknownItemType = 0, RadioButtonItemType, CheckButtonItemType, CommandItemType, SeparatorItemType, CascadeItemType } |
| enum | { RadioButtonItemAddedEvent = 10000, CheckButtonItemAddedEvent, CommandItemAddedEvent, SeparatorItemAddedEvent, CascadeItemAddedEvent, MenuItemInvokedEvent } |
| virtual int | AddCommand (const char *label) |
| virtual int | AddCommand (const char *label, vtkObject *object, const char *method) |
| virtual int | InsertCommand (int index, const char *label) |
| virtual int | InsertCommand (int index, const char *label, vtkObject *object, const char *method) |
| virtual void | SetItemCommand (int index, vtkObject *object, const char *method) |
| virtual const char * | GetItemCommand (int index) |
| virtual int | AddCheckButton (const char *label) |
| virtual int | AddCheckButton (const char *label, vtkObject *object, const char *method) |
| virtual int | InsertCheckButton (int index, const char *label) |
| virtual int | InsertCheckButton (int index, const char *label, vtkObject *object, const char *method) |
| virtual void | SetItemSelectedState (int index, int state) |
| virtual void | SetItemSelectedState (const char *label, int state) |
| virtual int | GetItemSelectedState (int index) |
| virtual int | GetItemSelectedState (const char *label) |
| virtual void | SelectItem (int index) |
| virtual void | SelectItem (const char *label) |
| virtual void | DeselectItem (int index) |
| virtual void | DeselectItem (const char *label) |
| virtual int | AddRadioButton (const char *label) |
| virtual int | AddRadioButton (const char *label, vtkObject *object, const char *method) |
| virtual int | InsertRadioButton (int index, const char *label) |
| virtual int | InsertRadioButton (int index, const char *label, vtkObject *object, const char *method) |
| virtual int | AddRadioButtonImage (const char *imgname) |
| virtual int | AddRadioButtonImage (const char *imgname, vtkObject *object, const char *method) |
| virtual int | InsertRadioButtonImage (int index, const char *imgname) |
| virtual int | InsertRadioButtonImage (int index, const char *imgname, vtkObject *object, const char *method) |
| virtual const char * | GetItemGroupName (int index) |
| virtual void | SetItemGroupName (int index, const char *group_name) |
| virtual void | SetItemSelectedValue (int index, const char *value) |
| virtual const char * | GetItemSelectedValue (int index) |
| virtual void | SetItemSelectedValueAsInt (int index, int value) |
| virtual int | GetItemSelectedValueAsInt (int index) |
| virtual int | GetIndexOfItemWithSelectedValue (const char *value) |
| virtual int | GetIndexOfItemWithSelectedValueAsInt (int value) |
| virtual int | SelectItemWithSelectedValue (const char *value) |
| virtual int | SelectItemWithSelectedValueAsInt (int value) |
| virtual int | SelectItemInGroupWithSelectedValue (const char *group_name, const char *value) |
| virtual int | SelectItemInGroupWithSelectedValueAsInt (const char *group_name, int value) |
| virtual int | GetIndexOfSelectedItemInGroup (const char *group_name) |
| virtual int | GetIndexOfSelectedItem () |
| virtual void | SetItemDeselectedValue (int index, const char *value) |
| virtual void | SetItemDeselectedValueAsInt (int index, int value) |
| virtual int | GetItemDeselectedValueAsInt (int index) |
| virtual const char * | GetItemDeselectedValue (int index) |
| virtual int | AddSeparator () |
| virtual int | InsertSeparator (int index) |
| virtual int | AddCascade (const char *label, vtkKWMenu *menu) |
| virtual int | InsertCascade (int index, const char *label, vtkKWMenu *menu) |
| virtual void | SetItemCascade (int index, vtkKWMenu *) |
| virtual void | SetItemCascade (int index, const char *menu_name) |
| virtual vtkKWMenu * | GetItemCascade (int index) |
| virtual int | GetItemType (int index) |
| virtual int | SetItemLabel (int index, const char *label) |
| virtual const char * | GetItemLabel (int index) |
| virtual void | DeleteItem (int index) |
| virtual void | DeleteAllItems () |
| virtual void | SetItemState (int index, int state) |
| virtual void | SetItemStateToDisabled (int index) |
| virtual void | SetItemStateToNormal (int index) |
| virtual void | SetItemState (const char *label, int state) |
| virtual void | SetItemStateToDisabled (const char *label) |
| virtual void | SetItemStateToNormal (const char *label) |
| virtual int | GetItemState (int index) |
| virtual int | GetItemState (const char *label) |
| virtual void | SetItemImage (int index, const char *imgname) |
| virtual void | SetItemImageToPredefinedIcon (int index, int icon_index) |
| virtual void | SetItemImageToIcon (int index, vtkKWIcon *icon) |
| virtual void | SetItemSelectImage (int index, const char *imgname) |
| virtual void | SetItemSelectImageToPredefinedIcon (int index, int icon_index) |
| virtual void | SetItemSelectImageToIcon (int index, vtkKWIcon *icon) |
| virtual void | SetItemCompoundMode (int index, int mode) |
| virtual int | GetItemCompoundMode (int index) |
| virtual void | SetItemCompoundModeToNone (int index) |
| virtual void | SetItemCompoundModeToLeft (int index) |
| virtual void | SetItemCompoundModeToCenter (int index) |
| virtual void | SetItemCompoundModeToRight (int index) |
| virtual void | SetItemCompoundModeToTop (int index) |
| virtual void | SetItemCompoundModeToBottom (int index) |
| virtual void | SetBindingForItemAccelerator (int index, vtkKWWidget *) |
| virtual void | RemoveBindingForItemAccelerator (int index, vtkKWWidget *) |
| virtual void | SetItemHelpString (int index, const char *help) |
| virtual const char * | GetItemHelpString (int index) |
| virtual const char * | GetItemVariable (int index) |
| virtual void | SetItemVariable (int index, const char *varname) |
| virtual void | SetItemVariable (int index, vtkKWObject *object, const char *suffix) |
| virtual char * | CreateItemVariableName (vtkKWObject *object, const char *suffix) |
| virtual const char * | GetItemVariableValue (const char *varname) |
| virtual void | SetItemVariableValue (const char *varname, const char *value) |
| virtual int | GetItemVariableValueAsInt (const char *varname) |
| virtual void | SetItemVariableValueAsInt (const char *varname, int value) |
| virtual int | GetIndexOfItemWithVariableAndSelectedValue (const char *varname, const char *value) |
| virtual int | GetIndexOfItemWithVariableAndSelectedValueAsInt (const char *varname, int value) |
| virtual void | SetTearOff (int val) |
| virtual int | GetTearOff () |
| virtual void | TearOffOn () |
| virtual void | TearOffOff () |
| virtual int | HasItemOption (int index, const char *option) |
| virtual const char * | GetItemOption (int index, const char *option) |
| virtual void | GetBackgroundColor (double *r, double *g, double *b) |
| virtual double * | GetBackgroundColor () |
| virtual void | SetBackgroundColor (double r, double g, double b) |
| virtual void | SetBackgroundColor (double rgb[3]) |
| virtual void | GetForegroundColor (double *r, double *g, double *b) |
| virtual double * | GetForegroundColor () |
| virtual void | SetForegroundColor (double r, double g, double b) |
| virtual void | SetForegroundColor (double rgb[3]) |
| virtual void | GetActiveBackgroundColor (double *r, double *g, double *b) |
| virtual double * | GetActiveBackgroundColor () |
| virtual void | SetActiveBackgroundColor (double r, double g, double b) |
| virtual void | SetActiveBackgroundColor (double rgb[3]) |
| virtual void | GetActiveForegroundColor (double *r, double *g, double *b) |
| virtual double * | GetActiveForegroundColor () |
| virtual void | SetActiveForegroundColor (double r, double g, double b) |
| virtual void | SetActiveForegroundColor (double rgb[3]) |
| virtual void | GetDisabledForegroundColor (double *r, double *g, double *b) |
| virtual double * | GetDisabledForegroundColor () |
| virtual void | SetDisabledForegroundColor (double r, double g, double b) |
| virtual void | SetDisabledForegroundColor (double rgb[3]) |
| virtual void | GetSelectColor (double *r, double *g, double *b) |
| virtual double * | GetSelectColor () |
| virtual void | SetSelectColor (double r, double g, double b) |
| virtual void | SetSelectColor (double rgb[3]) |
| virtual void | SetBorderWidth (int) |
| virtual int | GetBorderWidth () |
| virtual void | SetRelief (int) |
| virtual int | GetRelief () |
| virtual void | SetReliefToRaised () |
| virtual void | SetReliefToSunken () |
| virtual void | SetReliefToFlat () |
| virtual void | SetReliefToRidge () |
| virtual void | SetReliefToSolid () |
| virtual void | SetReliefToGroove () |
| virtual void | SetFont (const char *font) |
| virtual const char * | GetFont () |
| virtual void | DisplayHelpCallback (const char *widget_name) |
| virtual void | CommandInvokedCallback (const char *command) |
| virtual int | AddGeneric (const char *type, const char *label, const char *extra) |
| virtual int | InsertGeneric (int index, const char *type, const char *label, const char *extra) |
| virtual int | GetLabelWithoutUnderline (const char *label, char **clean_label, int *underline_index) |
| virtual void | ConvertItemAcceleratorToKeyBinding (const char *accelerator, char **keybinding) |
a menu widget
This class is the Menu abstraction.
Definition at line 30 of file vtkKWMenu.h.
| typedef vtkKWCoreWidget vtkKWMenu::Superclass |
Reimplemented from vtkKWCoreWidget.
Definition at line 35 of file vtkKWMenu.h.
| anonymous enum |
Returns the type of a specific menu item. BTX
| UnknownItemType | |
| RadioButtonItemType | |
| CheckButtonItemType | |
| CommandItemType | |
| SeparatorItemType | |
| CascadeItemType |
Definition at line 281 of file vtkKWMenu.h.
| anonymous enum |
Events. The ItemAddedEvent events are generated when menu entries are addded or inserted (say, RadioButtonItemAddedEvent). The MenuItemInvokedEvent is sent when a menu entry is invoked (i.e., a mouse button is released over the entry). The following parameters are also passed as client data: - the index of the new menu item: int BTX
| RadioButtonItemAddedEvent | |
| CheckButtonItemAddedEvent | |
| CommandItemAddedEvent | |
| SeparatorItemAddedEvent | |
| CascadeItemAddedEvent | |
| MenuItemInvokedEvent |
Definition at line 529 of file vtkKWMenu.h.
| vtkKWMenu::vtkKWMenu | ( | ) | [protected] |
| vtkKWMenu::~vtkKWMenu | ( | ) | [protected] |
| static vtkKWMenu* vtkKWMenu::New | ( | ) | [static] |
Reimplemented from vtkKWCoreWidget.
| virtual const char* vtkKWMenu::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkKWCoreWidget.
| static int vtkKWMenu::IsTypeOf | ( | const char * | type | ) | [static] |
Reimplemented from vtkKWCoreWidget.
| virtual int vtkKWMenu::IsA | ( | const char * | type | ) | [virtual] |
Reimplemented from vtkKWCoreWidget.
Reimplemented from vtkKWCoreWidget.
| void vtkKWMenu::PrintSelf | ( | ostream & | os, | |
| vtkIndent | indent | |||
| ) | [virtual] |
Reimplemented from vtkKWCoreWidget.
| virtual int vtkKWMenu::AddCommand | ( | const char * | label | ) | [virtual] |
Append/Insert a standard command menu item to the menu. The 'object' argument is the object that will have the method called on it. The 'method' argument is the name of the method to be called and any arguments in string form. If the object is NULL, the method is still evaluated as a simple command. A vtkKWMenu::CommandItemAddedEvent event is generated as well. Return index of the menu item that was created/inserted, -1 on error
| virtual int vtkKWMenu::AddCommand | ( | const char * | label, | |
| vtkObject * | object, | |||
| const char * | method | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::InsertCommand | ( | int | index, | |
| const char * | label | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::InsertCommand | ( | int | index, | |
| const char * | label, | |||
| vtkObject * | object, | |||
| const char * | method | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemCommand | ( | int | index, | |
| vtkObject * | object, | |||
| const char * | method | |||
| ) | [virtual] |
Set/Get the command for an existing menu item. This can also be used on checkbutton and radiobutton entries (i.e. any menu item that was created with a command). Note that the output of GetItemCommand is a pointer to a temporary buffer that should be copied *immediately* to your own storage.
| virtual const char* vtkKWMenu::GetItemCommand | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetIndexOfCommandItem | ( | vtkObject * | object, | |
| const char * | method | |||
| ) | [virtual] |
Get the index of the first menu item that is using a specific command. You can also use GetIndexOfItem to retrieve the menu item using a specific label.
| virtual int vtkKWMenu::AddCheckButton | ( | const char * | label | ) | [virtual] |
Append/Insert a checkbutton menu item to the menu. A vtkKWMenu::CheckButtonItemAddedEvent event is generated as well. Return index of the menu item that was created/inserted, -1 on error
| virtual int vtkKWMenu::AddCheckButton | ( | const char * | label, | |
| vtkObject * | object, | |||
| const char * | method | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::InsertCheckButton | ( | int | index, | |
| const char * | label | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::InsertCheckButton | ( | int | index, | |
| const char * | label, | |||
| vtkObject * | object, | |||
| const char * | method | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemSelectedState | ( | int | index, | |
| int | state | |||
| ) | [virtual] |
Set/Get an checkbutton or radiobutton selected state (where 1 means selected, 0 means deselected). Note that you can *not* set the selected state of a radiobutton to 0; a radiobutton is part of a group, to deselect it one needs to select another radiobutton in that group (therefore, unselecting a radiobutton has no meaning). Items can be referred to by index or label.
| virtual void vtkKWMenu::SetItemSelectedState | ( | const char * | label, | |
| int | state | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetItemSelectedState | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetItemSelectedState | ( | const char * | label | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SelectItem | ( | int | index | ) | [virtual] |
Select/Deselect a checkbutton or radiobutton. These methods are just front-end to SetItemSelectedState. The same constraints apply, i.e. you can *not* deselect a radiobutton (but should select another radiobutton in the same group). Items can be referred to by index or label.
| virtual void vtkKWMenu::SelectItem | ( | const char * | label | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::DeselectItem | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::DeselectItem | ( | const char * | label | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::AddRadioButton | ( | const char * | label | ) | [virtual] |
Append/Insert a radiobutton menu item to the menu. Radiobuttons can be grouped together using either the PutItemInGroup method or the SetItemGroupName method. By default, each newly created radiobutton share the same group already. A vtkKWMenu::RadioButtonItemAddedEvent event is generated as well. Return index of the menu item that was created/inserted, -1 on error
| virtual int vtkKWMenu::AddRadioButton | ( | const char * | label, | |
| vtkObject * | object, | |||
| const char * | method | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::InsertRadioButton | ( | int | index, | |
| const char * | label | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::InsertRadioButton | ( | int | index, | |
| const char * | label, | |||
| vtkObject * | object, | |||
| const char * | method | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::AddRadioButtonImage | ( | const char * | imgname | ) | [virtual] |
Append/Insert a radiobutton menu item to the menu using an image instead of a label. The image name should be a valid Tk image name. Radiobuttons can be grouped together using either the PutItemInGroup method or the SetItemGroupName method. By default, each newly created radiobutton share the same group already. A vtkKWMenu::RadioButtonItemAddedEvent event is generated as well. Return index of the menu item that was created/inserted, -1 on error
| virtual int vtkKWMenu::AddRadioButtonImage | ( | const char * | imgname, | |
| vtkObject * | object, | |||
| const char * | method | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::InsertRadioButtonImage | ( | int | index, | |
| const char * | imgname | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::InsertRadioButtonImage | ( | int | index, | |
| const char * | imgname, | |||
| vtkObject * | object, | |||
| const char * | method | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::PutItemInGroup | ( | int | index, | |
| int | index_g | |||
| ) | [virtual] |
Group items together so that when one is selected, the other ones are automatically deselected. This makes sense for radiobutton items where each item should be assigned a different 'selected value' using the SetItemSelectedValue method. This method puts the item specified by 'index' in the group the item specificied by 'index_g' is already a member of. Note that put(index_a, index_g) and put(index_b, index_g) will put index_a and index_b in the same group as index_g, but put(index_a, index_g) and put(index_g, index_b) will put index_a in the same group as index_g, then put index_g in the same group as index_b, thus resulting as index_a being in a different group as index_g/index_b. Another way to group items together is to make sure they all share the same group name (see SetItemGroupName), which is what is really done by PutItemInGroup anyway. By default, each newly created radiobutton share the same group already, new checkbuttons are assigned to their own group, and other items type have no group.
| virtual const char* vtkKWMenu::GetItemGroupName | ( | int | index | ) | [virtual] |
Set/Get the *local* group name to use to group a set of items together (i.e. selecting one item in the group will deselect the others). This makes sense for radiobutton items where each item should be assigned a different 'selected value' using the SetItemSelectedValue method. Another way to group items together is to use the PutItemInGroup method, which at the end of the day will make sure items share the same group name. Note that the group name should be unique within *this* menu instance (if you need a global name that can be shared between menus, check the more advanced SetItemVariableName method). The group name should stick to the usual variable naming convention (no spaces, start with a letter, etc); note that it will be cleaned automatically anyway and stored that way. By default, each newly created radiobutton share the same group already, new checkbuttons are assigned to their own group, and other items type have no group.
| virtual void vtkKWMenu::SetItemGroupName | ( | int | index, | |
| const char * | group_name | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemSelectedValue | ( | int | index, | |
| const char * | value | |||
| ) | [virtual] |
Set/Get the value associated to the selected state of a checkbutton or radiobutton menu item. Convenience methods are provided to Set/Get that value as an integer. By default, checkbutton are assigned a selected value of 1. Radiobuttons are assigned a value corresponding to their own label (or image name). Note that the output of GetItemSelectedValue is a pointer to a temporary buffer that should be copied *immediately* to your own storage. Returns the value, or -1 if called on the wrong type of menu item
| virtual const char* vtkKWMenu::GetItemSelectedValue | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemSelectedValueAsInt | ( | int | index, | |
| int | value | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetItemSelectedValueAsInt | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetIndexOfItemWithSelectedValue | ( | const char * | value | ) | [virtual] |
Set/Get the index of an item given its selected value (as set by SetItemSelectedValue).
| virtual int vtkKWMenu::GetIndexOfItemWithSelectedValueAsInt | ( | int | value | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::SelectItemWithSelectedValue | ( | const char * | value | ) | [virtual] |
Select the item which selected value (as it was set per item using SetItemSelectedValue) matches a given value. Convenience method is provided to select the item using a value as an integer. Returns the item that was selected, -1 otherwise.
| virtual int vtkKWMenu::SelectItemWithSelectedValueAsInt | ( | int | value | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::SelectItemInGroupWithSelectedValue | ( | const char * | group_name, | |
| const char * | value | |||
| ) | [virtual] |
Select the item in a group which selected value (as it was set per item using SetItemSelectedValue) matches a given value. Convenience method is provided to select the item using a value as an integer. Returns the item that was selected, -1 otherwise.
| virtual int vtkKWMenu::SelectItemInGroupWithSelectedValueAsInt | ( | const char * | group_name, | |
| int | value | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetIndexOfSelectedItemInGroup | ( | const char * | group_name | ) | [virtual] |
Get the index of the selected item in a group. If group is not specified, use the group of the last entry; note that this will only work there is only one group in the menu. Return -1 on error.
| virtual int vtkKWMenu::GetIndexOfSelectedItem | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemDeselectedValue | ( | int | index, | |
| const char * | value | |||
| ) | [virtual] |
Set/Get the value associated to the de-selected state of a checkbutton menu item (no allowed for radiobuttons). Can be safely left as is most of the time, unless you want to store very specific selected and deselected values for a checkbutton and retrieve them later on. By default, checkbutton are assigned a selected value of 0. Radiobuttons do not have a deselected value: a radiobutton is part of a group, to deselect it one needs to select another radiobutton in that group (therefore, unselecting a radiobutton has no meaning). Note that the output of GetItemDeselectedValue is a pointer to a temporary buffer that should be copied *immediately* to your own storage. Returns the value, or -1 if called on the wrong type of menu item
| virtual void vtkKWMenu::SetItemDeselectedValueAsInt | ( | int | index, | |
| int | value | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetItemDeselectedValueAsInt | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual const char* vtkKWMenu::GetItemDeselectedValue | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::AddSeparator | ( | ) | [virtual] |
Append/Insert a separator to the menu. A vtkKWMenu::SeparatorItemAddedEvent event is generated as well. Return index of the menu item that was created/inserted, -1 on error
| virtual int vtkKWMenu::InsertSeparator | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::AddCascade | ( | const char * | label, | |
| vtkKWMenu * | menu | |||
| ) | [virtual] |
Append/Insert a sub-menu (cascade) to the menu. A vtkKWMenu::CascadeItemAddedEvent event is generated as well. Return index of the menu item that was created/inserted, -1 on error
| virtual int vtkKWMenu::InsertCascade | ( | int | index, | |
| const char * | label, | |||
| vtkKWMenu * | menu | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetIndexOfCascadeItem | ( | vtkKWMenu * | menu | ) | [virtual] |
Get the index of the first sub-menu (cascade) item that is using a specific menu object.
| virtual void vtkKWMenu::SetItemCascade | ( | int | index, | |
| vtkKWMenu * | ||||
| ) | [virtual] |
Set the sub-menu for an existing sub-menu (cascade) item.
| virtual void vtkKWMenu::SetItemCascade | ( | int | index, | |
| const char * | menu_name | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual vtkKWMenu* vtkKWMenu::GetItemCascade | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetIndexOfItem | ( | const char * | label | ) | [virtual] |
Returns the integer index of the menu item using a specific label. You can also use GetIndexOfCommandItem to retrieve the menu item using a specific command (if that menu item supports a command).
| virtual int vtkKWMenu::HasItem | ( | const char * | label | ) | [virtual] |
Checks if an item with a given label is in the menu.
| virtual int vtkKWMenu::GetItemType | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::SetItemLabel | ( | int | index, | |
| const char * | label | |||
| ) | [virtual] |
Set/Get the label of a specific menu item at a given index. Note that the output of GetItemLabel is a pointer to a temporary buffer that should be copied *immediately* to your own storage.
| virtual const char* vtkKWMenu::GetItemLabel | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::InvokeItem | ( | int | index | ) | [virtual] |
Call the callback/command of a specific menu item specified by its index.
| virtual void vtkKWMenu::DeleteItem | ( | int | index | ) | [virtual] |
Delete the menu item specified by its given index. Be careful, there is a bug in Tk, that will break other items in the menu below the one being deleted, unless a new item is added.
| virtual void vtkKWMenu::DeleteAllItems | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetNumberOfItems | ( | ) | [virtual] |
Returns the number of items.
| virtual void vtkKWMenu::SetItemState | ( | int | index, | |
| int | state | |||
| ) | [virtual] |
Set/Get state of the menu item with a given index or label. Valid constants can be found in vtkKWOptions::StateType.
| virtual void vtkKWMenu::SetItemStateToDisabled | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemStateToNormal | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemState | ( | const char * | label, | |
| int | state | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemStateToDisabled | ( | const char * | label | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemStateToNormal | ( | const char * | label | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetItemState | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetItemState | ( | const char * | label | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetState | ( | int | state | ) | [virtual] |
Set the state of all entries. Valid constants can be found in vtkKWOptions::StateType. This should not be used directly, this is done by SetEnabled()/UpdateEnableState(). Overriden to pass to all menu entries.
Reimplemented from vtkKWCoreWidget.
| virtual void vtkKWMenu::SetItemImage | ( | int | index, | |
| const char * | imgname | |||
| ) | [virtual] |
Set the image of a menu item. A valid Tk image name or the index of a predefined icon (as found in vtkKWIcon) should be passed. Check the SetItemCompoundMode method if you want to display both the image and the label at the same time.
| virtual void vtkKWMenu::SetItemImageToPredefinedIcon | ( | int | index, | |
| int | icon_index | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemImageToIcon | ( | int | index, | |
| vtkKWIcon * | icon | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemSelectImage | ( | int | index, | |
| const char * | imgname | |||
| ) | [virtual] |
Set the select image of a menu item. The select image is available only for checkbutton and radiobutton entries. This method can be used to specify the image to display in the menu item when it is selected (instead of the regular image).
| virtual void vtkKWMenu::SetItemSelectImageToPredefinedIcon | ( | int | index, | |
| int | icon_index | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemSelectImageToIcon | ( | int | index, | |
| vtkKWIcon * | icon | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemCompoundMode | ( | int | index, | |
| int | mode | |||
| ) | [virtual] |
Specifies if the menu item should display text and bitmaps/images at the same time, and if so, where the bitmap/image should be placed relative to the text. Valid constants can be found in vtkKWOptions::CompoundModeType. The (default) value CompoundModeNone specifies that the bitmap or image should (if defined) be displayed instead of the text. Check the SetItemMarginVisibility method too.
| virtual int vtkKWMenu::GetItemCompoundMode | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemCompoundModeToNone | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemCompoundModeToLeft | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemCompoundModeToCenter | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemCompoundModeToRight | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemCompoundModeToTop | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemCompoundModeToBottom | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemMarginVisibility | ( | int | index, | |
| int | flag | |||
| ) | [virtual] |
Set the visibility of the standard margin of a menu item. Hiding the margin is useful when creating palette with images in them, i.e., color palettes, pattern palettes, etc.
| virtual void vtkKWMenu::SetItemIndicatorVisibility | ( | int | index, | |
| int | flag | |||
| ) | [virtual] |
Set the visibility of the indicator of a menu item. Available only for checkbutton and radiobutton entries.
| virtual void vtkKWMenu::SetItemAccelerator | ( | int | index, | |
| const char * | accelerator | |||
| ) | [virtual] |
Specifies a string to display at the right side of the menu entry. Normally describes an accelerator keystroke sequence that may be typed to invoke the same function as the menu entry. This is an arbitrary string, not a key binding per say, i.e. pressing the accelerator key does not automatically call the command associated to this menu item. To do so, the corresponding key binding must be set and associated to the item's command, if any. The SetBindingForItemAccelerator method can be used to that effect.
| virtual void vtkKWMenu::SetBindingForItemAccelerator | ( | int | index, | |
| vtkKWWidget * | ||||
| ) | [virtual] |
This method retrieves the accelerator attached to a menu item, convert it to the proper keybinding (say, Ctrl+0 is converted into <Control-0>), and set that binding on a specific 'widget' so that whenever that widget has the focus and that key binding is pressed, the item's command will be invokved. A typical use for this method is to set a menu item's accelerator using SetItemAccelerator, then associate the corresponding binding to the toplevel this menu is attached to. For example: menu->SetItemAccelerator(1, "Ctrl+0"); menu->SetBindingForItemAccelerator(1, menu->GetParentTopLevel()); this last line is pretty much the same as this one below: menu->GetParentTopLevel()->SetBinding( "<Control-0>", menu->GetItemCommand(1)); but the accelerator to key-binding conversion is done automatically. Note that if the accelerator has not been set (or if it has been reset to an empty string or NULL), this method will *not* remove the binding (since it has no knowledge of what the previous accelerator was), this is up to the developper to do so by calling RemoveBinding for example.
| virtual void vtkKWMenu::RemoveBindingForItemAccelerator | ( | int | index, | |
| vtkKWWidget * | ||||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemHelpString | ( | int | index, | |
| const char * | help | |||
| ) | [virtual] |
Set/Get the help string for a given item specified by its index. The help string will be displayed automatically in the status bar of the window containing the menu, if any. Note that the output of GetItemHelpString is a pointer to a temporary buffer that should be copied *immediately* to your own storage.
| virtual const char* vtkKWMenu::GetItemHelpString | ( | int | index | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemUnderline | ( | int | index, | |
| int | underline_index | |||
| ) | [virtual] |
Set the index of a character to underline in the menu item specified by its index. Note that you can also specify that character by using the special '&' marker in the label of the menu item (ex: "&File", or "Sa&ve File").
| virtual void vtkKWMenu::SetItemColumnBreak | ( | int | index, | |
| int | flag | |||
| ) | [virtual] |
Set/Get a column break flag at a specific index.
| virtual const char* vtkKWMenu::GetItemVariable | ( | int | index | ) | [virtual] |
Set/Get the name of a *global* variable to set when a checkbutton or a radiobutton menu item is selected. Whenever selected, a checkbutton or radiobutton will set its variable to the value that was associated to it using SetItemSelectedValue. When deselected a checkbutton set its variable to the value that was associated to it using SetItemDeselectedValue. Setting the same variable names for different radiobuttons is the actual way to put them in the same *group* (i.e. selecting one radiobutton in the group will deselect the others). Is is recommended to use either the PutItemInGroup method to group buttons together, or the SetItemGroupName method, which are just front-ends to the SetItemVariable method, but build a global variable name out of the current menu instance name and a local group name. Note that the variable name should be unique within *this* menu instance as well as *all* other menu instances so that it can be shared between menus if needed. Most of the time, using a global name will not be needed and we therefore recommend you pick a local global name by using the SetItemGroupName. This variable name should stick to the usual variable naming convention (no spaces, start with a letter, etc). One way to create such a group name is, for example, to concatenate the Tcl name (GetTclName()) or the widget name (GetWidgetName()) of the menu instance with some string suffix describing the variable; a different signature is available to create such composite name automatically, but the CreateItemVariableName can be used as well. By default, each newly created radiobutton share the same variable name already. Each newly created checkbutton is assigned a unique variable name. Note that the output of GetItemVariable is a pointer to a temporary buffer that should be copied *immediately* to your own storage.
| virtual void vtkKWMenu::SetItemVariable | ( | int | index, | |
| const char * | varname | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemVariable | ( | int | index, | |
| vtkKWObject * | object, | |||
| const char * | suffix | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual char* vtkKWMenu::CreateItemVariableName | ( | vtkKWObject * | object, | |
| const char * | suffix | |||
| ) | [virtual] |
Convenience method to create a variable name out of an object (say, this instance) and an arbitrary suffix (say, the menu item label). Such a variable name can be used to call SetItemVariable on a checkbutton or radiobutton menu item. Note that spaces and unusual characters are automatically removed from the 'suffix'. This method allocates enough memory (using 'new') for that name and returns a pointer to that location. This pointer should be deleted by the user using 'delete []'.
| virtual const char* vtkKWMenu::GetItemVariableValue | ( | const char * | varname | ) | [virtual] |
Set/Get the value for a variable name given a variable name (as retrieved using GetItemVariable() for example). This will affect the menu entries accordingly (i.e. setting the variable will select/deselect the entries). Note that the output of GetItemVariableValue is a pointer to a temporary buffer that should be copied *immediately* to your own storage.
| virtual void vtkKWMenu::SetItemVariableValue | ( | const char * | varname, | |
| const char * | value | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetItemVariableValueAsInt | ( | const char * | varname | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetItemVariableValueAsInt | ( | const char * | varname, | |
| int | value | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetIndexOfItemWithVariableAndSelectedValue | ( | const char * | varname, | |
| const char * | value | |||
| ) | [virtual] |
Get the index of an item gien its variable name and its selected value.
| virtual int vtkKWMenu::GetIndexOfItemWithVariableAndSelectedValueAsInt | ( | const char * | varname, | |
| int | value | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetTearOff | ( | int | val | ) | [virtual] |
Set/Get if this menu is a tearoff menu. By dafault this value is off.
| virtual int vtkKWMenu::GetTearOff | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::TearOffOn | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::TearOffOff | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::PopUp | ( | int | x, | |
| int | y | |||
| ) | [virtual] |
Pop-up the menu at screen coordinates x, y
| virtual int vtkKWMenu::HasItemOption | ( | int | index, | |
| const char * | option | |||
| ) | [virtual] |
Get the Tk option of a specific menu item. Internal use. Note that the output of GetItemOption is a pointer to a temporary buffer that should be copied *immediately* to your own storage.
| virtual const char* vtkKWMenu::GetItemOption | ( | int | index, | |
| const char * | option | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::GetBackgroundColor | ( | double * | r, | |
| double * | g, | |||
| double * | b | |||
| ) | [virtual] |
Set/Get the background color of the widget.
| virtual double* vtkKWMenu::GetBackgroundColor | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetBackgroundColor | ( | double | r, | |
| double | g, | |||
| double | b | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetBackgroundColor | ( | double | rgb[3] | ) | [inline, virtual] |
Returns the type of a specific menu item. BTX
Definition at line 546 of file vtkKWMenu.h.
| virtual void vtkKWMenu::GetForegroundColor | ( | double * | r, | |
| double * | g, | |||
| double * | b | |||
| ) | [virtual] |
Set/Get the foreground color of the widget.
| virtual double* vtkKWMenu::GetForegroundColor | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetForegroundColor | ( | double | r, | |
| double | g, | |||
| double | b | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetForegroundColor | ( | double | rgb[3] | ) | [inline, virtual] |
Returns the type of a specific menu item. BTX
Definition at line 555 of file vtkKWMenu.h.
| virtual void vtkKWMenu::GetActiveBackgroundColor | ( | double * | r, | |
| double * | g, | |||
| double * | b | |||
| ) | [virtual] |
Set/Get the active background color of the widget. An element (a widget or portion of a widget) is active if the mouse cursor is positioned over the element and pressing a mouse button will cause some action to occur.
| virtual double* vtkKWMenu::GetActiveBackgroundColor | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetActiveBackgroundColor | ( | double | r, | |
| double | g, | |||
| double | b | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetActiveBackgroundColor | ( | double | rgb[3] | ) | [inline, virtual] |
Returns the type of a specific menu item. BTX
Definition at line 567 of file vtkKWMenu.h.
| virtual void vtkKWMenu::GetActiveForegroundColor | ( | double * | r, | |
| double * | g, | |||
| double * | b | |||
| ) | [virtual] |
Set/Get the active foreground color of the widget. An element (a widget or portion of a widget) is active if the mouse cursor is positioned over the element and pressing a mouse button will cause some action to occur.
| virtual double* vtkKWMenu::GetActiveForegroundColor | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetActiveForegroundColor | ( | double | r, | |
| double | g, | |||
| double | b | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetActiveForegroundColor | ( | double | rgb[3] | ) | [inline, virtual] |
Returns the type of a specific menu item. BTX
Definition at line 579 of file vtkKWMenu.h.
| virtual void vtkKWMenu::GetDisabledForegroundColor | ( | double * | r, | |
| double * | g, | |||
| double * | b | |||
| ) | [virtual] |
Set/Get the foreground color of the widget when it is disabled.
| virtual double* vtkKWMenu::GetDisabledForegroundColor | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetDisabledForegroundColor | ( | double | r, | |
| double | g, | |||
| double | b | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetDisabledForegroundColor | ( | double | rgb[3] | ) | [inline, virtual] |
Returns the type of a specific menu item. BTX
Definition at line 588 of file vtkKWMenu.h.
| virtual void vtkKWMenu::GetSelectColor | ( | double * | r, | |
| double * | g, | |||
| double * | b | |||
| ) | [virtual] |
Set/Get the background color to use when the widget is selected.
| virtual double* vtkKWMenu::GetSelectColor | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetSelectColor | ( | double | r, | |
| double | g, | |||
| double | b | |||
| ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetSelectColor | ( | double | rgb[3] | ) | [inline, virtual] |
Returns the type of a specific menu item. BTX
Definition at line 597 of file vtkKWMenu.h.
| virtual void vtkKWMenu::SetBorderWidth | ( | int | ) | [virtual] |
Set/Get the border width, a non-negative value indicating the width of the 3-D border to draw around the outside of the widget (if such a border is being drawn; the Relief option typically determines this).
| virtual int vtkKWMenu::GetBorderWidth | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetRelief | ( | int | ) | [virtual] |
Set/Get the 3-D effect desired for the widget. The value indicates how the interior of the widget should appear relative to its exterior. Valid constants can be found in vtkKWOptions::ReliefType.
| virtual int vtkKWMenu::GetRelief | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetReliefToRaised | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetReliefToSunken | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetReliefToFlat | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetReliefToRidge | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetReliefToSolid | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetReliefToGroove | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetFont | ( | const char * | font | ) | [virtual] |
Specifies the font to use when drawing text inside the widget. You can use predefined font names (e.g. 'system'), or you can specify a set of font attributes with a platform-independent name, for example, 'times 12 bold'. In this example, the font is specified with a three element list: the first element is the font family, the second is the size, the third is a list of style parameters (normal, bold, roman, italic, underline, overstrike). Example: 'times 12 {bold italic}'. The Times, Courier and Helvetica font families are guaranteed to exist and will be matched to the corresponding (closest) font on your system. If you are familiar with the X font names specification, you can also describe the font that way (say, '*times-medium-r-*-*-12*').
| virtual const char* vtkKWMenu::GetFont | ( | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::SetEnabled | ( | int | ) | [virtual] |
Set or get enabled state. This method has been overriden to propagate the state to all its menu entries by calling UpdateEnableState(), even* if the state (this->Enabled) is actually unchanged by the function. This make sure all the menu entries have been enabled/disabled properly.
Reimplemented from vtkKWWidget.
| virtual void vtkKWMenu::UpdateEnableState | ( | ) | [virtual] |
This method has been overriden to propagate the state to all its menu entries by calling SetState(). Update the "enable" state of the object and its internal parts. Depending on different Ivars (this->Enabled, the application's Limited Edition Mode, etc.), the "enable" state of the object is updated and propagated to its internal parts/subwidgets. This will, for example, enable/disable parts of the widget UI, enable/disable the visibility of 3D widgets, etc.
Reimplemented from vtkKWWidget.
| virtual void vtkKWMenu::DisplayHelpCallback | ( | const char * | widget_name | ) | [virtual] |
Callbacks: for active menu item doc line help
| virtual void vtkKWMenu::CommandInvokedCallback | ( | const char * | command | ) | [virtual] |
Returns the type of a specific menu item. BTX
| virtual void vtkKWMenu::CreateWidget | ( | ) | [protected, virtual] |
Create the widget.
Reimplemented from vtkKWCoreWidget.
| virtual int vtkKWMenu::AddGeneric | ( | const char * | type, | |
| const char * | label, | |||
| const char * | extra | |||
| ) | [protected, virtual] |
Add a generic menu item (defined by type) Return index of the menu item that was created/inserted, -1 on error
| virtual int vtkKWMenu::InsertGeneric | ( | int | index, | |
| const char * | type, | |||
| const char * | label, | |||
| const char * | extra | |||
| ) | [protected, virtual] |
Returns the type of a specific menu item. BTX
| virtual int vtkKWMenu::GetLabelWithoutUnderline | ( | const char * | label, | |
| char ** | clean_label, | |||
| int * | underline_index | |||
| ) | [protected, virtual] |
Given a label, allocate and create a clean label that is stripped out of its underline marker (ex: "&Open File" is cleaned as "Open File", "Sa&ve File" is cleaned as "Save File"). Return 1 if a clean label was created: the 'clean_label' parameter should be freed later on by the user by calling 'delete []'. The 'underline' parameter is set to the position of the underline marker. Return 0 if the label was already cleaned: the 'clean_label' parameter is set to the value of 'label' (set, *not* allocated). The 'underline' parameter is set to -1.
| virtual int vtkKWMenu::GetIndexOfActiveItem | ( | const char * | widget_name | ) | [protected, virtual] |
Returns the integer index of the active menu item of a given menu. Be extra careful with this method: most menus seems to be clone of themselves, according to the Tk doc: When a menu is set as a menubar for a toplevel window, or when a menu is torn off, a clone of the menu is made. This clone is a menu widget in its own right, but it is a child of the original. Changes in the configuration of the original are reflected in the clone. Additionally, any cascades that are pointed to are also cloned so that menu traversal will work right. Sadly, the active item of a menu is not something that is synchronized between a menu and its clone. Querying the active item on the current instance might therefore not work, because a clone is in fact being interacted upon. This kind of situation is mostly encountered when Tk events like <<MenuSelect>> are processed, and can therefore be solved by making sure the callbacks are passing the W parameter around: this gets resolved to the widget name of the clone.
| const char* vtkKWMenu::GetSuffixOutOfCreatedItemVariableName | ( | const char * | varname | ) | [protected] |
Get the suffix out of variable name that was created using CreateItemVariableName
| virtual void vtkKWMenu::ConvertItemAcceleratorToKeyBinding | ( | const char * | accelerator, | |
| char ** | keybinding | |||
| ) | [protected, virtual] |
Convert key accelerator to binding
int vtkKWMenu::TearOff [protected] |
Definition at line 694 of file vtkKWMenu.h.
vtkKWMenuInternals* vtkKWMenu::Internals [protected] |
PIMPL Encapsulation for STL containers
Reimplemented from vtkKWCoreWidget.
Definition at line 724 of file vtkKWMenu.h.
1.6.1