Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkKWMenu Class Reference

a menu widget More...

#include <vtkKWMenu.h>

Inheritance diagram for vtkKWMenu:

Inheritance graph
[legend]
Collaboration diagram for vtkKWMenu:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vtkTypeRevisionMacro (vtkKWMenu, vtkKWCoreWidget)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void Create (vtkKWApplication *app)
const char * GetItemCommand (int idx)
int HasItem (const char *label)
int GetNumberOfItems ()
void DisplayHelp (const char *)
virtual void SetState (int state)
void ConfigureItem (int index, const char *)
virtual void SetEnabled (int)
virtual void UpdateEnableState ()
void AddSeparator ()
void InsertSeparator (int position)
void AddCascade (const char *label, vtkKWMenu *, int underline, const char *help=0)
void InsertCascade (int position, const char *label, vtkKWMenu *, int underline, const char *help=0)
int GetCascadeIndex (vtkKWMenu *)
void SetCascade (int index, vtkKWMenu *)
void SetCascade (const char *label, vtkKWMenu *)
void SetCascade (int index, const char *menu_name)
void SetCascade (const char *label, const char *menu_name)
char * CreateCheckButtonVariable (vtkKWObject *Object, const char *name)
int GetCheckButtonValue (vtkKWObject *Object, const char *name)
void CheckCheckButton (vtkKWObject *Object, const char *name, int val)
void AddCheckButton (const char *label, const char *ButtonVar, vtkObject *Object, const char *MethodAndArgString, const char *help=0)
void AddCheckButton (const char *label, const char *ButtonVar, vtkObject *Object, const char *MethodAndArgString, int underline, const char *help=0)
void InsertCheckButton (int position, const char *label, const char *ButtonVar, vtkObject *Object, const char *MethodAndArgString, const char *help=0)
void InsertCheckButton (int position, const char *label, const char *ButtonVar, vtkObject *Object, const char *MethodAndArgString, int underline, const char *help=0)
void AddCommand (const char *label, vtkObject *Object, const char *MethodAndArgString, const char *help=0)
void AddCommand (const char *label, vtkObject *Object, const char *MethodAndArgString, int underline, const char *help=0)
void InsertCommand (int position, const char *label, vtkObject *Object, const char *MethodAndArgString, const char *help=0)
void InsertCommand (int position, const char *label, vtkObject *Object, const char *MethodAndArgString, int underline, const char *help=0)
void SetEntryCommand (int index, vtkObject *object, const char *MethodAndArgString)
void SetEntryCommand (const char *item, vtkObject *object, const char *method)
void SetEntryCommand (int item, const char *method)
void SetEntryCommand (const char *item, const char *method)
char * CreateRadioButtonVariable (vtkKWObject *Object, const char *varname)
int GetRadioButtonValue (vtkKWObject *Object, const char *varname)
void CheckRadioButton (vtkKWObject *Object, const char *varname, int id)
int GetCheckedRadioButtonItem (vtkKWObject *Object, const char *varname)
void AddRadioButton (int value, const char *label, const char *buttonVar, vtkObject *Called, const char *MethodAndArgString, const char *help=0)
void AddRadioButton (int value, const char *label, const char *buttonVar, vtkObject *Called, const char *MethodAndArgString, int underline, const char *help=0)
void AddRadioButtonImage (int value, const char *imgname, const char *buttonVar, vtkObject *Called, const char *MethodAndArgString, const char *help=0)
void InsertRadioButton (int position, int value, const char *label, const char *buttonVar, vtkObject *Called, const char *MethodAndArgString, const char *help=0)
void InsertRadioButton (int position, int value, const char *label, const char *buttonVar, vtkObject *Called, const char *MethodAndArgString, int underline, const char *help=0)
void AddGeneric (const char *addtype, const char *label, vtkObject *Object, const char *MethodAndArgString, const char *extra, const char *help)
void InsertGeneric (int position, const char *addtype, const char *label, vtkObject *Object, const char *MethodAndArgString, const char *extra, const char *help)
void Invoke (int position)
void Invoke (const char *label)
void DeleteMenuItem (int position)
void DeleteMenuItem (const char *label)
void DeleteAllMenuItems ()
int GetIndexOfItem (const char *label)
int GetIndexOfCommand (vtkObject *Object, const char *MethodAndArgString)
int GetItemLabel (int position, char *label, int maxlen)
const char * GetItemLabel (int position)
int HasItemOption (int position, const char *option)
const char * GetItemOption (int position, const char *option)
const char * GetItemOption (const char *label, const char *option)
void SetItemImage (int position, const char *imagename)
void SetItemImage (const char *label, const char *imagename)
void SetItemImageToPredefinedIcon (int position, int icon_index)
void SetItemImageToPredefinedIcon (const char *label, int icon_index)
void SetItemSelectImage (int position, const char *imagename)
void SetItemSelectImage (const char *label, const char *imagename)
void SetItemSelectImageToPredefinedIcon (int position, int icon_index)
void SetItemSelectImageToPredefinedIcon (const char *label, int icon_index)
void SetItemCompoundMode (int position, int flag)
void SetItemCompoundMode (const char *label, int flag)
void SetItemMarginVisibility (int position, int flag)
void SetItemMarginVisibility (const char *label, int flag)
void SetItemIndicatorVisibility (int position, int flag)
void SetItemIndicatorVisibility (const char *label, int flag)
void SetItemAccelerator (int position, const char *accelerator)
void SetItemAccelerator (const char *label, const char *accelerator)
void SetTearOff (int val)
virtual int GetTearOff ()
virtual void TearOffOn ()
virtual void TearOffOff ()
virtual void SetItemState (int index, int state)
virtual void SetItemState (const char *label, int state)
virtual int GetItemState (int index)
virtual int GetItemState (const char *label)

Static Public Member Functions

vtkKWMenuNew ()

Protected Member Functions

 vtkKWMenu ()
 ~vtkKWMenu ()

Protected Attributes

int TearOff

Detailed Description

a menu widget

This class is the Menu abstraction for the Kitware toolkit. It provides a c++ interface to the TK menu widgets used by the Kitware toolkit.

Definition at line 27 of file vtkKWMenu.h.


Constructor & Destructor Documentation

vtkKWMenu::vtkKWMenu  )  [protected]
 

vtkKWMenu::~vtkKWMenu  )  [protected]
 


Member Function Documentation

vtkKWMenu* vtkKWMenu::New  )  [static]
 

Reimplemented from vtkKWCoreWidget.

vtkKWMenu::vtkTypeRevisionMacro vtkKWMenu  ,
vtkKWCoreWidget 
 

void vtkKWMenu::PrintSelf ostream &  os,
vtkIndent  indent
 

Reimplemented from vtkKWCoreWidget.

virtual void vtkKWMenu::Create vtkKWApplication app  )  [virtual]
 

Create the widget.

Reimplemented from vtkKWCoreWidget.

void vtkKWMenu::AddSeparator  ) 
 

Append/Insert a separator to the menu.

void vtkKWMenu::InsertSeparator int  position  ) 
 

Append/Insert a separator to the menu.

void vtkKWMenu::AddCascade const char *  label,
vtkKWMenu ,
int  underline,
const char *  help = 0
 

Append/Insert a sub menu to the current menu.

void vtkKWMenu::InsertCascade int  position,
const char *  label,
vtkKWMenu ,
int  underline,
const char *  help = 0
 

Append/Insert a sub menu to the current menu.

int vtkKWMenu::GetCascadeIndex vtkKWMenu  ) 
 

Append/Insert a sub menu to the current menu.

void vtkKWMenu::SetCascade int  index,
vtkKWMenu
 

Set cascade menu for menu entry.

void vtkKWMenu::SetCascade const char *  label,
vtkKWMenu
 

Set cascade menu for menu entry.

void vtkKWMenu::SetCascade int  index,
const char *  menu_name
 

Set cascade menu for menu entry.

void vtkKWMenu::SetCascade const char *  label,
const char *  menu_name
 

Set cascade menu for menu entry.

char* vtkKWMenu::CreateCheckButtonVariable vtkKWObject Object,
const char *  name
 

Append/Insert a CheckButton menu item to the current menu.

int vtkKWMenu::GetCheckButtonValue vtkKWObject Object,
const char *  name
 

Append/Insert a CheckButton menu item to the current menu.

void vtkKWMenu::CheckCheckButton vtkKWObject Object,
const char *  name,
int  val
 

Append/Insert a CheckButton menu item to the current menu.

void vtkKWMenu::AddCheckButton const char *  label,
const char *  ButtonVar,
vtkObject *  Object,
const char *  MethodAndArgString,
const char *  help = 0
 

Append/Insert a CheckButton menu item to the current menu.

void vtkKWMenu::AddCheckButton const char *  label,
const char *  ButtonVar,
vtkObject *  Object,
const char *  MethodAndArgString,
int  underline,
const char *  help = 0
 

Append/Insert a CheckButton menu item to the current menu.

void vtkKWMenu::InsertCheckButton int  position,
const char *  label,
const char *  ButtonVar,
vtkObject *  Object,
const char *  MethodAndArgString,
const char *  help = 0
 

Append/Insert a CheckButton menu item to the current menu.

void vtkKWMenu::InsertCheckButton int  position,
const char *  label,
const char *  ButtonVar,
vtkObject *  Object,
const char *  MethodAndArgString,
int  underline,
const char *  help = 0
 

Append/Insert a CheckButton menu item to the current menu.

void vtkKWMenu::AddCommand const char *  label,
vtkObject *  Object,
const char *  MethodAndArgString,
const char *  help = 0
 

Append/Insert a standard menu item and command to the current menu.

void vtkKWMenu::AddCommand const char *  label,
vtkObject *  Object,
const char *  MethodAndArgString,
int  underline,
const char *  help = 0
 

Append/Insert a standard menu item and command to the current menu.

void vtkKWMenu::InsertCommand int  position,
const char *  label,
vtkObject *  Object,
const char *  MethodAndArgString,
const char *  help = 0
 

Append/Insert a standard menu item and command to the current menu.

void vtkKWMenu::InsertCommand int  position,
const char *  label,
vtkObject *  Object,
const char *  MethodAndArgString,
int  underline,
const char *  help = 0
 

Append/Insert a standard menu item and command to the current menu.

void vtkKWMenu::SetEntryCommand int  index,
vtkObject *  object,
const char *  MethodAndArgString
 

Set command of the menu entry with a given index.

void vtkKWMenu::SetEntryCommand const char *  item,
vtkObject *  object,
const char *  method
 

Set command of the menu entry with a given index.

void vtkKWMenu::SetEntryCommand int  item,
const char *  method
 

Set command of the menu entry with a given index.

void vtkKWMenu::SetEntryCommand const char *  item,
const char *  method
 

Set command of the menu entry with a given index.

char* vtkKWMenu::CreateRadioButtonVariable vtkKWObject Object,
const char *  varname
 

Append a radio menu item and command to the current menu. The radio group is specified by the buttonVar value.

int vtkKWMenu::GetRadioButtonValue vtkKWObject Object,
const char *  varname
 

Append a radio menu item and command to the current menu. The radio group is specified by the buttonVar value.

void vtkKWMenu::CheckRadioButton vtkKWObject Object,
const char *  varname,
int  id
 

Append a radio menu item and command to the current menu. The radio group is specified by the buttonVar value.

int vtkKWMenu::GetCheckedRadioButtonItem vtkKWObject Object,
const char *  varname
 

Append a radio menu item and command to the current menu. The radio group is specified by the buttonVar value.

void vtkKWMenu::AddRadioButton int  value,
const char *  label,
const char *  buttonVar,
vtkObject *  Called,
const char *  MethodAndArgString,
const char *  help = 0
 

Append a radio menu item and command to the current menu. The radio group is specified by the buttonVar value.

void vtkKWMenu::AddRadioButton int  value,
const char *  label,
const char *  buttonVar,
vtkObject *  Called,
const char *  MethodAndArgString,
int  underline,
const char *  help = 0
 

Append a radio menu item and command to the current menu. The radio group is specified by the buttonVar value.

void vtkKWMenu::AddRadioButtonImage int  value,
const char *  imgname,
const char *  buttonVar,
vtkObject *  Called,
const char *  MethodAndArgString,
const char *  help = 0
 

Append a radio menu item and command to the current menu. The radio group is specified by the buttonVar value.

void vtkKWMenu::InsertRadioButton int  position,
int  value,
const char *  label,
const char *  buttonVar,
vtkObject *  Called,
const char *  MethodAndArgString,
const char *  help = 0
 

Append a radio menu item and command to the current menu. The radio group is specified by the buttonVar value.

void vtkKWMenu::InsertRadioButton int  position,
int  value,
const char *  label,
const char *  buttonVar,
vtkObject *  Called,
const char *  MethodAndArgString,
int  underline,
const char *  help = 0
 

Append a radio menu item and command to the current menu. The radio group is specified by the buttonVar value.

void vtkKWMenu::AddGeneric const char *  addtype,
const char *  label,
vtkObject *  Object,
const char *  MethodAndArgString,
const char *  extra,
const char *  help
 

Add a generic menu item (defined by addtype)

void vtkKWMenu::InsertGeneric int  position,
const char *  addtype,
const char *  label,
vtkObject *  Object,
const char *  MethodAndArgString,
const char *  extra,
const char *  help
 

Add a generic menu item (defined by addtype)

void vtkKWMenu::Invoke int  position  ) 
 

Call the menu item callback at the given index

void vtkKWMenu::Invoke const char *  label  ) 
 

Call the menu item callback at the given index

void vtkKWMenu::DeleteMenuItem int  position  ) 
 

Delete the menu item at the given position. 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.

void vtkKWMenu::DeleteMenuItem const char *  label  ) 
 

Delete the menu item at the given position. 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.

void vtkKWMenu::DeleteAllMenuItems  ) 
 

Delete the menu item at the given position. 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.

int vtkKWMenu::GetIndexOfItem const char *  label  ) 
 

Returns the integer index of the menu item by string, or by the command (object/method) pair associated to it.

int vtkKWMenu::GetIndexOfCommand vtkObject *  Object,
const char *  MethodAndArgString
 

Returns the integer index of the menu item by string, or by the command (object/method) pair associated to it.

const char* vtkKWMenu::GetItemCommand int  idx  ) 
 

Get the command for the entry at index. This is what is returned by Script, so you should make a copy if you want to use it in Tcl.

int vtkKWMenu::GetItemLabel int  position,
char *  label,
int  maxlen
 

Copies the label of the item at the given position to the given string ( with the given length ). Returns VTK_OK if there is label, VTK_ERROR otherwise. The second version returns a pointer to the result of the Tcl interpreter last evaluation (be careful).

const char* vtkKWMenu::GetItemLabel int  position  ) 
 

Copies the label of the item at the given position to the given string ( with the given length ). Returns VTK_OK if there is label, VTK_ERROR otherwise. The second version returns a pointer to the result of the Tcl interpreter last evaluation (be careful).

int vtkKWMenu::HasItemOption int  position,
const char *  option
 

Get the option of an entry

const char* vtkKWMenu::GetItemOption int  position,
const char *  option
 

Get the option of an entry

const char* vtkKWMenu::GetItemOption const char *  label,
const char *  option
 

Get the option of an entry

void vtkKWMenu::SetItemImage int  position,
const char *  imagename
 

Set the image and select image of an entry. Check the SetItemCompoundMode if you want to display both the image and the text.

void vtkKWMenu::SetItemImage const char *  label,
const char *  imagename
 

Set the image and select image of an entry. Check the SetItemCompoundMode if you want to display both the image and the text.

void vtkKWMenu::SetItemImageToPredefinedIcon int  position,
int  icon_index
 

Set the image and select image of an entry. Check the SetItemCompoundMode if you want to display both the image and the text.

void vtkKWMenu::SetItemImageToPredefinedIcon const char *  label,
int  icon_index
 

Set the image and select image of an entry. Check the SetItemCompoundMode if you want to display both the image and the text.

void vtkKWMenu::SetItemSelectImage int  position,
const char *  imagename
 

Set the select image of an entry. The select image is available only for checkbutton and radiobutton entries. Specifies an image to display in the entry (in place of the regular image) when it is selected.

void vtkKWMenu::SetItemSelectImage const char *  label,
const char *  imagename
 

Set the select image of an entry. The select image is available only for checkbutton and radiobutton entries. Specifies an image to display in the entry (in place of the regular image) when it is selected.

void vtkKWMenu::SetItemSelectImageToPredefinedIcon int  position,
int  icon_index
 

Set the select image of an entry. The select image is available only for checkbutton and radiobutton entries. Specifies an image to display in the entry (in place of the regular image) when it is selected.

void vtkKWMenu::SetItemSelectImageToPredefinedIcon const char *  label,
int  icon_index
 

Set the select image of an entry. The select image is available only for checkbutton and radiobutton entries. Specifies an image to display in the entry (in place of the regular image) when it is selected.

void vtkKWMenu::SetItemCompoundMode int  position,
int  flag
 

Set the compound mode of an entry. Set it to 'true' to display both the image and the text. Check the SetItemMarginVisibility method too.

void vtkKWMenu::SetItemCompoundMode const char *  label,
int  flag
 

Set the compound mode of an entry. Set it to 'true' to display both the image and the text. Check the SetItemMarginVisibility method too.

void vtkKWMenu::SetItemMarginVisibility int  position,
int  flag
 

Set the visibility of the standard margin of an entry. Hiding the margin is useful when creating palette with images in them, i.e., color palettes, pattern palettes, etc.

void vtkKWMenu::SetItemMarginVisibility const char *  label,
int  flag
 

Set the visibility of the standard margin of an entry. Hiding the margin is useful when creating palette with images in them, i.e., color palettes, pattern palettes, etc.

void vtkKWMenu::SetItemIndicatorVisibility int  position,
int  flag
 

Set the visibility of the indicator of an entry. Available only for checkbutton and radiobutton entries.

void vtkKWMenu::SetItemIndicatorVisibility const char *  label,
int  flag
 

Set the visibility of the indicator of an entry. Available only for checkbutton and radiobutton entries.

void vtkKWMenu::SetItemAccelerator int  position,
const char *  accelerator
 

Set/Get the accelerator for a given item.

void vtkKWMenu::SetItemAccelerator const char *  label,
const char *  accelerator
 

Set/Get the accelerator for a given item.

int vtkKWMenu::HasItem const char *  label  ) 
 

Checks if an item is in the menu

int vtkKWMenu::GetNumberOfItems  ) 
 

Returns the number of items

void vtkKWMenu::DisplayHelp const char *   ) 
 

Call back for active menu item doc line help

void vtkKWMenu::SetTearOff int  val  ) 
 

Option to make this menu a tearoff menu. By dafault this value is off.

virtual int vtkKWMenu::GetTearOff  )  [virtual]
 

Option to make this menu a tearoff menu. By dafault this value is off.

virtual void vtkKWMenu::TearOffOn  )  [virtual]
 

Option to make this menu a tearoff menu. By dafault this value is off.

virtual void vtkKWMenu::TearOffOff  )  [virtual]
 

Option to make this menu a tearoff menu. By dafault this value is off.

virtual void vtkKWMenu::SetItemState int  index,
int  state
[virtual]
 

Set/Get state of the menu entry with a given index or name. Valid constants can be found in vtkKWTkOptions::StateType.

virtual void vtkKWMenu::SetItemState const char *  label,
int  state
[virtual]
 

Set/Get state of the menu entry with a given index or name. Valid constants can be found in vtkKWTkOptions::StateType.

virtual int vtkKWMenu::GetItemState int  index  )  [virtual]
 

Set/Get state of the menu entry with a given index or name. Valid constants can be found in vtkKWTkOptions::StateType.

virtual int vtkKWMenu::GetItemState const char *  label  )  [virtual]
 

Set/Get state of the menu entry with a given index or name. Valid constants can be found in vtkKWTkOptions::StateType.

virtual void vtkKWMenu::SetState int  state  )  [virtual]
 

Convenience method to set the state of all entries. Valid constants can be found in vtkKWTkOptions::StateType. This should not be used directly, this is done by SetEnabled()/UpdateEnableState(). Overriden to pass to all menu entries

Reimplemented from vtkKWCoreWidget.

void vtkKWMenu::ConfigureItem int  index,
const char * 
 

Configure the item at given index.

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.


Member Data Documentation

int vtkKWMenu::TearOff [protected]
 

Definition at line 294 of file vtkKWMenu.h.


The documentation for this class was generated from the following file:
Generated on Tue May 30 12:40:10 2006 for ParaView by doxygen 1.3.5