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

vtkKWUserInterfaceManagerDialog Class Reference

a user interface manager. More...

#include <vtkKWUserInterfaceManagerDialog.h>

Inheritance diagram for vtkKWUserInterfaceManagerDialog:

Inheritance graph
[legend]
Collaboration diagram for vtkKWUserInterfaceManagerDialog:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vtkTypeRevisionMacro (vtkKWUserInterfaceManagerDialog, vtkKWUserInterfaceManager)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void Create (vtkKWApplication *app)
virtual vtkKWWidgetGetPagesParentWidget (vtkKWUserInterfacePanel *panel)
virtual vtkKWUserInterfacePanelGetPanelFromPageId (int page_id)
virtual void SelectionChangedCallback ()
virtual void SetPanelNodeVisibility (int)
virtual int GetPanelNodeVisibility ()
virtual void PanelNodeVisibilityOn ()
virtual void PanelNodeVisibilityOff ()
virtual void SetPageNodeVisibility (int)
virtual int GetPageNodeVisibility ()
virtual void PageNodeVisibilityOn ()
virtual void PageNodeVisibilityOff ()
virtual vtkKWTopLevelGetTopLevel ()
virtual void RaiseSection (int page_id, const char *section)
virtual void RaiseSection (vtkKWUserInterfacePanel *panel, const char *page_title, const char *section)
virtual int AddPage (vtkKWUserInterfacePanel *panel, const char *title, const char *balloon=0, vtkKWIcon *icon=0)
virtual vtkKWWidgetGetPageWidget (int id)
virtual vtkKWWidgetGetPageWidget (vtkKWUserInterfacePanel *panel, const char *title)
virtual void RaisePage (int id)
virtual void RaisePage (vtkKWUserInterfacePanel *panel, const char *title)
virtual int ShowPanel (vtkKWUserInterfacePanel *panel)
virtual int HidePanel (vtkKWUserInterfacePanel *panel)
virtual int IsPanelVisible (vtkKWUserInterfacePanel *panel)

Static Public Member Functions

vtkKWUserInterfaceManagerDialogNew ()

Protected Member Functions

 vtkKWUserInterfaceManagerDialog ()
 ~vtkKWUserInterfaceManagerDialog ()
virtual int RemovePageWidgets (vtkKWUserInterfacePanel *panel)
virtual void PopulateTree ()
virtual int ShowSelectedNodeSection ()
virtual int CreateAllPanels ()
virtual void NumberOfPanelsChanged ()
int GetWidgetLocation (const char *widget, vtkKWUserInterfacePanel **panel, int *page_id)

Protected Attributes

vtkKWNotebookNotebook
vtkKWTopLevelTopLevel
vtkKWSplitFrameSplitFrame
vtkKWTreeWithScrollbarsTree
vtkKWPushButtonCloseButton
vtkKWUserInterfaceManagerDialogInternals * Internals
int PanelNodeVisibility
int PageNodeVisibility

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. As such, it is a concrete implementation of a vtkKWUserInterfaceManager. It uses a dialog under the hood to display all pages in a "Preferences" dialog style: the dialog is split into two parts: on the left, a tree with entries corresponding to the name of specific UI elements found in the panels. If an entry is selected, the corresponding UI element is display on the right side of the dialog. This allows a lot of small UI elements to be accessed pretty easily while keeping the size of the whole dialog small. For each panel, this class creates an entry in the tree using the panel name. For each page in the panel, it creates a sub-entry (leaf) under the panel name entry, using the page name. Then for each UI elements in that page, it looks for instances of vtkKWFrameWithLabel. This is the only constraint put on the panels, other than that, the panels (vtkKWUserInterfacePanel) can be created as usual, and managed by any subclass of vtkKWUserInterfaceManager. This is not too big a constraint since most panels are built that way. For a concrete example of such a panel, check vtkKWApplicationSettingsInterface.

Thanks:
This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Information on the National Centers for Biomedical Computing can be obtained from http://nihroadmap.nih.gov/bioinformatics.
See also:
vtkKWUserInterfaceManager vtkKWUserInterfacePanel vtkKWApplicationSettingsInterface

Definition at line 61 of file vtkKWUserInterfaceManagerDialog.h.


Constructor & Destructor Documentation

vtkKWUserInterfaceManagerDialog::vtkKWUserInterfaceManagerDialog  )  [protected]
 

vtkKWUserInterfaceManagerDialog::~vtkKWUserInterfaceManagerDialog  )  [protected]
 


Member Function Documentation

vtkKWUserInterfaceManagerDialog* vtkKWUserInterfaceManagerDialog::New  )  [static]
 

Reimplemented from vtkKWObject.

vtkKWUserInterfaceManagerDialog::vtkTypeRevisionMacro vtkKWUserInterfaceManagerDialog  ,
vtkKWUserInterfaceManager 
 

void vtkKWUserInterfaceManagerDialog::PrintSelf ostream &  os,
vtkIndent  indent
 

Reimplemented from vtkKWUserInterfaceManager.

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

Create the manager widget (i.e. the widget that will group and display all user interface panels). A notebook must be associated to the manager before it is created.

Reimplemented from vtkKWUserInterfaceManager.

virtual void vtkKWUserInterfaceManagerDialog::SetPanelNodeVisibility int   )  [virtual]
 

Set the panel node visibility. If On, each panel will show up as a node in the tree, acting as a parent to the page nodes or the section nodes. Defaults to Off to avoid too much clutter in the tree.

virtual int vtkKWUserInterfaceManagerDialog::GetPanelNodeVisibility  )  [virtual]
 

Set the panel node visibility. If On, each panel will show up as a node in the tree, acting as a parent to the page nodes or the section nodes. Defaults to Off to avoid too much clutter in the tree.

virtual void vtkKWUserInterfaceManagerDialog::PanelNodeVisibilityOn  )  [virtual]
 

Set the panel node visibility. If On, each panel will show up as a node in the tree, acting as a parent to the page nodes or the section nodes. Defaults to Off to avoid too much clutter in the tree.

virtual void vtkKWUserInterfaceManagerDialog::PanelNodeVisibilityOff  )  [virtual]
 

Set the panel node visibility. If On, each panel will show up as a node in the tree, acting as a parent to the page nodes or the section nodes. Defaults to Off to avoid too much clutter in the tree.

virtual void vtkKWUserInterfaceManagerDialog::SetPageNodeVisibility int   )  [virtual]
 

Set the page node visibility. If On, each page will show up as a node in the tree, acting as a parent to the section nodes. Default to On. Since sections can have the same name within different pages, it is advised to leave it On.

virtual int vtkKWUserInterfaceManagerDialog::GetPageNodeVisibility  )  [virtual]
 

Set the page node visibility. If On, each page will show up as a node in the tree, acting as a parent to the section nodes. Default to On. Since sections can have the same name within different pages, it is advised to leave it On.

virtual void vtkKWUserInterfaceManagerDialog::PageNodeVisibilityOn  )  [virtual]
 

Set the page node visibility. If On, each page will show up as a node in the tree, acting as a parent to the section nodes. Default to On. Since sections can have the same name within different pages, it is advised to leave it On.

virtual void vtkKWUserInterfaceManagerDialog::PageNodeVisibilityOff  )  [virtual]
 

Set the page node visibility. If On, each page will show up as a node in the tree, acting as a parent to the section nodes. Default to On. Since sections can have the same name within different pages, it is advised to leave it On.

virtual vtkKWTopLevel* vtkKWUserInterfaceManagerDialog::GetTopLevel  )  [virtual]
 

Access to the dialog/toplevel Can be used to change its title, and master window

virtual void vtkKWUserInterfaceManagerDialog::RaiseSection int  page_id,
const char *  section
[virtual]
 

Raise a specific section, given a panel, a page id (or page title) and a section name. If panel is NULL, page_id is < 0, page_title is NULL or empty, section is NULL or empty, then any of these parameters will be ignored and the first matching section will be picked.

virtual void vtkKWUserInterfaceManagerDialog::RaiseSection vtkKWUserInterfacePanel panel,
const char *  page_title,
const char *  section
[virtual]
 

Raise a specific section, given a panel, a page id (or page title) and a section name. If panel is NULL, page_id is < 0, page_title is NULL or empty, section is NULL or empty, then any of these parameters will be ignored and the first matching section will be picked.

virtual int vtkKWUserInterfaceManagerDialog::AddPage vtkKWUserInterfacePanel panel,
const char *  title,
const char *  balloon = 0,
vtkKWIcon icon = 0
[virtual]
 

Instruct the manager to reserve a page for a given panel. In this concrete implementation, this adds a page to the notebook, and sets the page tag to be the panel's ID. 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()). Return a unique positive ID, or < 0 on error.

Implements vtkKWUserInterfaceManager.

virtual vtkKWWidget* vtkKWUserInterfaceManagerDialog::GetPageWidget int  id  )  [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. In this concrete implementation, this returns the inner frame of a notebook's page. 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.

Implements vtkKWUserInterfaceManager.

virtual vtkKWWidget* vtkKWUserInterfaceManagerDialog::GetPageWidget vtkKWUserInterfacePanel panel,
const char *  title
[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. In this concrete implementation, this returns the inner frame of a notebook's page. 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.

Implements vtkKWUserInterfaceManager.

virtual vtkKWWidget* vtkKWUserInterfaceManagerDialog::GetPagesParentWidget vtkKWUserInterfacePanel panel  )  [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()).

Implements vtkKWUserInterfaceManager.

virtual void vtkKWUserInterfaceManagerDialog::RaisePage int  id  )  [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. In this concrete implementation, this raises a notebook's page. 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()). Note that if the panel corresponding to the page to raise has not been created yet, it will be created automatically by calling the panel's Create() method (see vtkKWUserInterfacePanel::Create()) ; this allows the creation of the panel to be delayed until it is really needed.

Implements vtkKWUserInterfaceManager.

virtual void vtkKWUserInterfaceManagerDialog::RaisePage vtkKWUserInterfacePanel panel,
const char *  title
[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. In this concrete implementation, this raises a notebook's page. 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()). Note that if the panel corresponding to the page to raise has not been created yet, it will be created automatically by calling the panel's Create() method (see vtkKWUserInterfacePanel::Create()) ; this allows the creation of the panel to be delayed until it is really needed.

Implements vtkKWUserInterfaceManager.

virtual int vtkKWUserInterfaceManagerDialog::ShowPanel vtkKWUserInterfacePanel panel  )  [virtual]
 

Show/Hide a panel. It will make sure the pages reserved by the manager for this panel are shown/hidden. In this concrete implementation, this shows/hides all notebook's pages belonging to this panel. 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 a panel: this will automatically call this method with the proper panel parameter (see vtkKWUserInterfacePanel::Show()). Note that if the panel has not been created yet, it will be created automatically by calling the panel's Create() method (see vtkKWUserInterfacePanel::Create()) ; this allows the creation of the panel to be delayed until it is really needed. Return 1 on success, 0 on error.

Implements vtkKWUserInterfaceManager.

virtual int vtkKWUserInterfaceManagerDialog::HidePanel vtkKWUserInterfacePanel panel  )  [virtual]
 

Show/Hide a panel. It will make sure the pages reserved by the manager for this panel are shown/hidden. In this concrete implementation, this shows/hides all notebook's pages belonging to this panel. 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 a panel: this will automatically call this method with the proper panel parameter (see vtkKWUserInterfacePanel::Show()). Note that if the panel has not been created yet, it will be created automatically by calling the panel's Create() method (see vtkKWUserInterfacePanel::Create()) ; this allows the creation of the panel to be delayed until it is really needed. Return 1 on success, 0 on error.

Implements vtkKWUserInterfaceManager.

virtual int vtkKWUserInterfaceManagerDialog::IsPanelVisible vtkKWUserInterfacePanel panel  )  [virtual]
 

Show/Hide a panel. It will make sure the pages reserved by the manager for this panel are shown/hidden. In this concrete implementation, this shows/hides all notebook's pages belonging to this panel. 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 a panel: this will automatically call this method with the proper panel parameter (see vtkKWUserInterfacePanel::Show()). Note that if the panel has not been created yet, it will be created automatically by calling the panel's Create() method (see vtkKWUserInterfacePanel::Create()) ; this allows the creation of the panel to be delayed until it is really needed. Return 1 on success, 0 on error.

Implements vtkKWUserInterfaceManager.

virtual vtkKWUserInterfacePanel* vtkKWUserInterfaceManagerDialog::GetPanelFromPageId int  page_id  )  [virtual]
 

Convenience method to get the panel from a page ID (return the ID of the panel that holds that page).

Implements vtkKWUserInterfaceManager.

virtual void vtkKWUserInterfaceManagerDialog::SelectionChangedCallback  )  [virtual]
 

Callbacks

virtual int vtkKWUserInterfaceManagerDialog::RemovePageWidgets vtkKWUserInterfacePanel panel  )  [protected, virtual]
 

Remove the widgets of all pages belonging to a panel. It is called by RemovePanel(). In this concrete implementation, this will remove all notebook's pages belonging to this panel. Return 1 on success, 0 on error.

Reimplemented from vtkKWUserInterfaceManager.

virtual void vtkKWUserInterfaceManagerDialog::PopulateTree  )  [protected, virtual]
 

virtual int vtkKWUserInterfaceManagerDialog::ShowSelectedNodeSection  )  [protected, virtual]
 

virtual int vtkKWUserInterfaceManagerDialog::CreateAllPanels  )  [protected, virtual]
 

virtual void vtkKWUserInterfaceManagerDialog::NumberOfPanelsChanged  )  [protected, virtual]
 

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

Reimplemented from vtkKWUserInterfaceManager.

int vtkKWUserInterfaceManagerDialog::GetWidgetLocation const char *  widget,
vtkKWUserInterfacePanel **  panel,
int *  page_id
[protected]
 


Member Data Documentation

vtkKWNotebook* vtkKWUserInterfaceManagerDialog::Notebook [protected]
 

Definition at line 199 of file vtkKWUserInterfaceManagerDialog.h.

vtkKWTopLevel* vtkKWUserInterfaceManagerDialog::TopLevel [protected]
 

Definition at line 200 of file vtkKWUserInterfaceManagerDialog.h.

vtkKWSplitFrame* vtkKWUserInterfaceManagerDialog::SplitFrame [protected]
 

Definition at line 201 of file vtkKWUserInterfaceManagerDialog.h.

vtkKWTreeWithScrollbars* vtkKWUserInterfaceManagerDialog::Tree [protected]
 

Definition at line 202 of file vtkKWUserInterfaceManagerDialog.h.

vtkKWPushButton* vtkKWUserInterfaceManagerDialog::CloseButton [protected]
 

Definition at line 203 of file vtkKWUserInterfaceManagerDialog.h.

vtkKWUserInterfaceManagerDialogInternals* vtkKWUserInterfaceManagerDialog::Internals [protected]
 

Reimplemented from vtkKWUserInterfaceManager.

Definition at line 207 of file vtkKWUserInterfaceManagerDialog.h.

int vtkKWUserInterfaceManagerDialog::PanelNodeVisibility [protected]
 

Definition at line 214 of file vtkKWUserInterfaceManagerDialog.h.

int vtkKWUserInterfaceManagerDialog::PageNodeVisibility [protected]
 

Definition at line 215 of file vtkKWUserInterfaceManagerDialog.h.


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