vtkKWUserInterfaceManager Class Reference

a user interface manager. More...

#include <vtkKWUserInterfaceManager.h>

Inheritance diagram for vtkKWUserInterfaceManager:
Inheritance graph
[legend]
Collaboration diagram for vtkKWUserInterfaceManager:
Collaboration graph
[legend]

List of all members.

Classes

class  PanelSlot

Public Types

typedef vtkKWObject Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void Update ()
virtual int GetNumberOfPanels ()
virtual vtkKWWidgetGetPagesParentWidget (vtkKWUserInterfacePanel *panel)=0
virtual void UpdatePanel (vtkKWUserInterfacePanel *)

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkKWUserInterfaceManagerSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkKWUserInterfaceManager ()
 ~vtkKWUserInterfaceManager ()
PanelSlotGetPanelSlot (vtkKWUserInterfacePanel *panel)
PanelSlotGetPanelSlot (int id)
PanelSlotGetPanelSlot (const char *panel_name)
PanelSlotGetNthPanelSlot (int rank)
int GetPanelId (vtkKWUserInterfacePanel *panel)
virtual void NumberOfPanelsChanged ()

Protected Attributes

int IdCounter
vtkKWUserInterfaceManagerInternals * Internals

Friends

class vtkKWUserInterfaceManagerInternals



virtual void Create ()
virtual int IsCreated ()
virtual void SetEnabled (int)
virtual void UpdateEnableState ()
virtual int AddPanel (vtkKWUserInterfacePanel *panel)
virtual int HasPanel (vtkKWUserInterfacePanel *panel)
virtual vtkKWUserInterfacePanelGetPanel (const char *panel_name)
virtual vtkKWUserInterfacePanelGetPanel (int id)
virtual vtkKWUserInterfacePanelGetPanelFromPageId (int id)=0
virtual vtkKWUserInterfacePanelGetNthPanel (int rank)
virtual int RemovePanel (vtkKWUserInterfacePanel *panel)
virtual void RemoveAllPanels ()
virtual int AddPage (vtkKWUserInterfacePanel *panel, const char *title, const char *balloon=0, vtkKWIcon *icon=0)=0
virtual int RemovePage (vtkKWUserInterfacePanel *panel, const char *title)=0
virtual void SetPageTitle (int id, const char *title)=0
virtual void SetPageBalloonHelpString (int id, const char *str)=0
virtual void SetPageIcon (int id, vtkKWIcon *icon)=0
virtual void SetPageIconToPredefinedIcon (int id, int icon_index)=0
virtual vtkKWWidgetGetPageWidget (int id)=0
virtual vtkKWWidgetGetPageWidget (vtkKWUserInterfacePanel *panel, const char *title)=0
virtual void RaisePage (int id)=0
virtual void RaisePage (vtkKWUserInterfacePanel *panel, const char *title)=0
virtual int ShowPanel (vtkKWUserInterfacePanel *panel)=0
virtual int HidePanel (vtkKWUserInterfacePanel *panel)=0
virtual int IsPanelVisible (vtkKWUserInterfacePanel *panel)=0
virtual int RaisePanel (vtkKWUserInterfacePanel *panel)
virtual void ShowAllPanels ()
virtual void HideAllPanels ()
virtual int RemovePageWidgets (vtkKWUserInterfacePanel *)

Detailed Description

a user interface manager.

This class is used to abstract the way a set of interface "panels" (vtkKWUserInterfacePanel) can be grouped inside a widget. For example, if a concrete implementation of that class uses a notebook as its underlying widget, then it will deliver a notebook's page when one of its managed panels request a "page" (i.e. a section within a panel). If another concrete implementation chooses for a flat GUI for example, then it will likely return frames as pages and pack them on top of each other. This class is not a widget. Concrete implementation of this class will provide an access point to a widget into which the manager will organize its panels (a notebook, a frame, etc.). Besides packing this widget, you will just have to set each panel's UserInterfaceManager ivar to point to this manager, and the rest should be taken care of (i.e. you do not need to manually add a panel to a manager, or manually request a page from the manager, it should be done through the panel's API).

See also:
vtkKWUserInterfaceManagerNotebook vtkKWUserInterfacePanel

Definition at line 47 of file vtkKWUserInterfaceManager.h.


Member Typedef Documentation

Reimplemented from vtkKWObject.

Reimplemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

Definition at line 51 of file vtkKWUserInterfaceManager.h.


Constructor & Destructor Documentation

vtkKWUserInterfaceManager::vtkKWUserInterfaceManager (  )  [protected]
vtkKWUserInterfaceManager::~vtkKWUserInterfaceManager (  )  [protected]

Member Function Documentation

virtual const char* vtkKWUserInterfaceManager::GetClassName (  )  [virtual]
static int vtkKWUserInterfaceManager::IsTypeOf ( const char *  type  )  [static]
virtual int vtkKWUserInterfaceManager::IsA ( const char *  type  )  [virtual]
static vtkKWUserInterfaceManager* vtkKWUserInterfaceManager::SafeDownCast ( vtkObject o  )  [static]
void vtkKWUserInterfaceManager::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]
virtual void vtkKWUserInterfaceManager::Create (  )  [virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

Reimplemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual int vtkKWUserInterfaceManager::IsCreated (  )  [virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

virtual void vtkKWUserInterfaceManager::SetEnabled ( int   )  [virtual]

Enable/Disable this interface. This propagates SetEnabled() calls to all panels.

virtual void vtkKWUserInterfaceManager::UpdateEnableState (  )  [virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

virtual void vtkKWUserInterfaceManager::Update (  )  [virtual]

Iterate over all panels and call Update() for each one. This will refresh the panels (provided that Update() has been reimplemented).

virtual int vtkKWUserInterfaceManager::AddPanel ( vtkKWUserInterfacePanel panel  )  [virtual]

Add a panel to the manager. Note that you most probably do not need to call this method, since setting a panel's UserInterfaceManager ivar will add the panel automatically (see vtkKWUserInterfacePanel::SetUserInterfaceManager()). Return a unique positive ID corresponding to that panel, or < 0 on error.

virtual int vtkKWUserInterfaceManager::HasPanel ( vtkKWUserInterfacePanel panel  )  [virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

virtual int vtkKWUserInterfaceManager::GetNumberOfPanels (  )  [virtual]

Get the number of panel

virtual vtkKWUserInterfacePanel* vtkKWUserInterfaceManager::GetPanel ( const char *  panel_name  )  [virtual]

Get the panel from its name or ID, from a page ID (return the ID of the panel that holds that page), or the nth panel.

virtual vtkKWUserInterfacePanel* vtkKWUserInterfaceManager::GetPanel ( int  id  )  [virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

virtual vtkKWUserInterfacePanel* vtkKWUserInterfaceManager::GetPanelFromPageId ( int  id  )  [pure virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual vtkKWUserInterfacePanel* vtkKWUserInterfaceManager::GetNthPanel ( int  rank  )  [virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

virtual int vtkKWUserInterfaceManager::RemovePanel ( vtkKWUserInterfacePanel panel  )  [virtual]

Remove a panel (or all) from the manager. Note that you most probably do not need to call this method, since setting a panel's UserInterfaceManager ivar to NULL will remove the panel automatically (this is done in the panel's destructor). Return 1 on success, 0 on error.

virtual void vtkKWUserInterfaceManager::RemoveAllPanels (  )  [virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

virtual int vtkKWUserInterfaceManager::AddPage ( vtkKWUserInterfacePanel panel,
const char *  title,
const char *  balloon = 0,
vtkKWIcon icon = 0 
) [pure virtual]

Instruct the manager to reserve or remove a page for a given panel. Note that you should use the panel's own API to add a page to a panel: this will automatically call this method with the proper panel parameter (see vtkKWUserInterfacePanel::AddPage() and vtkKWUserInterfacePanel::RemovePage()). Return a unique positive ID for the page that was reserved/removed, or < 0 on error.

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual int vtkKWUserInterfaceManager::RemovePage ( vtkKWUserInterfacePanel panel,
const char *  title 
) [pure virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual void vtkKWUserInterfaceManager::SetPageTitle ( int  id,
const char *  title 
) [pure virtual]

Set a page's title, balloon help and icon.

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual void vtkKWUserInterfaceManager::SetPageBalloonHelpString ( int  id,
const char *  str 
) [pure virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual void vtkKWUserInterfaceManager::SetPageIcon ( int  id,
vtkKWIcon icon 
) [pure virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual void vtkKWUserInterfaceManager::SetPageIconToPredefinedIcon ( int  id,
int  icon_index 
) [pure virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual vtkKWWidget* vtkKWUserInterfaceManager::GetPageWidget ( int  id  )  [pure virtual]

Retrieve the widget corresponding to a given page reserved by the manager. This can be done through the unique page ID, or using a panel and the page title. The user UI components should be inserted into this widget. Note that you should use the panel's own API to get a page widget: this will automatically call this method with the proper ID or panel parameter (see vtkKWUserInterfacePanel::GetPageWidget()). Return NULL on error.

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual vtkKWWidget* vtkKWUserInterfaceManager::GetPageWidget ( vtkKWUserInterfacePanel panel,
const char *  title 
) [pure virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual vtkKWWidget* vtkKWUserInterfaceManager::GetPagesParentWidget ( vtkKWUserInterfacePanel panel  )  [pure virtual]

Retrieve the parent widget of the pages associated to a panel. It is the unique widget that is common to all pages in the chain of parents. Note that you should use the panel's own API to get the page parent: this will automatically call this method with the proper panel parameter (see vtkKWUserInterfacePanel::GetPagesParentWidget()).

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual void vtkKWUserInterfaceManager::RaisePage ( int  id  )  [pure virtual]

Raise a page reserved by the manager. This can be done through the unique page ID, or using a panel and the page title. Note that you should use the panel's own API to raise a page: this will automatically call this method with the proper ID or panel parameter (see vtkKWUserInterfacePanel::RaisePage()).

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual void vtkKWUserInterfaceManager::RaisePage ( vtkKWUserInterfacePanel panel,
const char *  title 
) [pure virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual int vtkKWUserInterfaceManager::ShowPanel ( vtkKWUserInterfacePanel panel  )  [pure virtual]

Show/Hide a panel. It will make sure the pages reserved by the manager for this panel are shown/hidden. RaisePanel() behaves like ShowPanel(), but it will also try to bring up the first page of the panel to the front (i.e., "select" it). IsPanelVisible() checks if the pages of the panel are visible/shown. Note that you should use the panel's own API to show/raise a panel: this will automatically call this method with the proper panel parameter (see vtkKWUserInterfacePanel::Show/Raise()). Return 1 on success, 0 on error.

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual int vtkKWUserInterfaceManager::HidePanel ( vtkKWUserInterfacePanel panel  )  [pure virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual int vtkKWUserInterfaceManager::IsPanelVisible ( vtkKWUserInterfacePanel panel  )  [pure virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

Implemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

virtual int vtkKWUserInterfaceManager::RaisePanel ( vtkKWUserInterfacePanel panel  )  [inline, virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

Reimplemented in vtkKWUserInterfaceManagerNotebook.

Definition at line 172 of file vtkKWUserInterfaceManager.h.

virtual void vtkKWUserInterfaceManager::ShowAllPanels (  )  [virtual]

Show/hide all panels.

virtual void vtkKWUserInterfaceManager::HideAllPanels (  )  [virtual]

Create the manager widget (i.e. the widget that will group and display all user interface panels).

virtual void vtkKWUserInterfaceManager::UpdatePanel ( vtkKWUserInterfacePanel  )  [inline, virtual]

Update a panel according to the manager settings (i.e., it just performs manager-specific changes on the panel). Note that it does not call the panel's Update() method, on the opposite the panel's Update() will call this method if the panel has a UIM set.

Reimplemented in vtkKWUserInterfaceManagerNotebook.

Definition at line 186 of file vtkKWUserInterfaceManager.h.

virtual int vtkKWUserInterfaceManager::RemovePageWidgets ( vtkKWUserInterfacePanel  )  [inline, protected, virtual]

Remove the widgets of all pages belonging to a panel. It is called by RemovePanel() and should be overloaded if the concrete implementation of the manager needs to unmap/unpack widgets before everything is deleted. Return 1 on success, 0 on error.

Reimplemented in vtkKWUserInterfaceManagerDialog, and vtkKWUserInterfaceManagerNotebook.

Definition at line 199 of file vtkKWUserInterfaceManager.h.

PanelSlot* vtkKWUserInterfaceManager::GetPanelSlot ( vtkKWUserInterfacePanel panel  )  [protected]
PanelSlot* vtkKWUserInterfaceManager::GetPanelSlot ( int  id  )  [protected]
PanelSlot* vtkKWUserInterfaceManager::GetPanelSlot ( const char *  panel_name  )  [protected]
PanelSlot* vtkKWUserInterfaceManager::GetNthPanelSlot ( int  rank  )  [protected]
int vtkKWUserInterfaceManager::GetPanelId ( vtkKWUserInterfacePanel panel  )  [protected]
virtual void vtkKWUserInterfaceManager::NumberOfPanelsChanged (  )  [inline, protected, virtual]

This method is (and should be) called each time the number of panels changes (for example, after AddPanel() / RemovePanel())

Reimplemented in vtkKWUserInterfaceManagerDialog.

Definition at line 235 of file vtkKWUserInterfaceManager.h.


Friends And Related Function Documentation

friend class vtkKWUserInterfaceManagerInternals [friend]

Definition at line 219 of file vtkKWUserInterfaceManager.h.


Member Data Documentation

Definition at line 200 of file vtkKWUserInterfaceManager.h.

vtkKWUserInterfaceManagerInternals* vtkKWUserInterfaceManager::Internals [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Tue Apr 27 02:38:43 2010 for KWWidgets by  doxygen 1.6.1