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

vtkKWUserInterfaceManagerNotebook Class Reference

a user interface manager. More...

#include <vtkKWUserInterfaceManagerNotebook.h>

Inheritance diagram for vtkKWUserInterfaceManagerNotebook:

Inheritance graph
[legend]
Collaboration diagram for vtkKWUserInterfaceManagerNotebook:

Collaboration graph
[legend]
List of all members.

[NOHEADER]

virtual void UpdatePanelDragAndDrop (vtkKWUserInterfacePanel *panel)
int EnableDragAndDrop
int LockDragAndDropEntries

Public Member Functions

 vtkTypeRevisionMacro (vtkKWUserInterfaceManagerNotebook, vtkKWUserInterfaceManager)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void Create (vtkKWApplication *app)
virtual vtkKWWidgetGetPagesParentWidget (vtkKWUserInterfacePanel *panel)
virtual void UpdatePanel (vtkKWUserInterfacePanel *panel)
virtual vtkKWUserInterfacePanelGetPanelFromPageId (int page_id)
virtual void SetNotebook (vtkKWNotebook *)
virtual vtkKWNotebookGetNotebook ()
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)
virtual int RaisePanel (vtkKWUserInterfacePanel *panel)
virtual void SetEnableDragAndDrop (int)
virtual void EnableDragAndDropOn ()
virtual void EnableDragAndDropOff ()
virtual int GetEnableDragAndDrop ()
virtual void DragAndDropEndCallback (int x, int y, vtkKWWidget *widget, vtkKWWidget *anchor, vtkKWWidget *target)
virtual int GetNumberOfDragAndDropEntries ()
virtual int DeleteAllDragAndDropEntries ()
virtual int GetDragAndDropEntry (int idx, ostream &widget_label, ostream &from_panel_name, ostream &from_page_title, ostream &from_after_widget_label, ostream &to_panel_name, ostream &to_page_title, ostream &to_after_widget_label)
virtual int DragAndDropWidget (const char *widget_label, const char *from_panel_name, const char *from_page_title, const char *from_after_widget_label, const char *to_panel_name, const char *to_page_title, const char *to_after_widget_label)
virtual void LockDragAndDropEntriesOn ()
virtual void LockDragAndDropEntriesOff ()
virtual void SetLockDragAndDropEntries (int)
virtual int GetLockDragAndDropEntries ()

Static Public Member Functions

vtkKWUserInterfaceManagerNotebookNew ()

Protected Member Functions

 vtkKWUserInterfaceManagerNotebook ()
 ~vtkKWUserInterfaceManagerNotebook ()
virtual int RemovePageWidgets (vtkKWUserInterfacePanel *panel)
virtual char * GetDragAndDropWidgetLabel (vtkKWWidget *widget)
DragAndDropEntryGetLastDragAndDropEntry (vtkKWWidget *Widget)
virtual int IsDragAndDropWidgetAtOriginalLocation (vtkKWWidget *widget)
virtual int CanWidgetBeDragAndDropped (vtkKWWidget *widget, vtkKWWidget **anchor=0)
virtual int GetDragAndDropWidgetLocation (vtkKWWidget *widget, WidgetLocation *loc)
virtual vtkKWWidgetGetDragAndDropWidgetFromLabelAndLocation (const char *widget_label, const WidgetLocation *loc_hint)
int AddDragAndDropEntry (vtkKWWidget *Widget, const WidgetLocation *from_loc, const WidgetLocation *to_loc)
virtual int DragAndDropWidget (vtkKWWidget *widget, const WidgetLocation *from_loc, const WidgetLocation *to_loc)

Protected Attributes

vtkKWNotebookNotebook
vtkKWUserInterfaceManagerNotebookInternals * Internals

Friends

class vtkKWUserInterfaceManagerNotebookInternals

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 notebook under the hood and delivers a notebook's page when one of its managed panels request a "page" (i.e. a section within a panel). Within the notebook, each page will be associated to a tag corresponding to its panel's ID. This allows panels to be shown once at a time, or grouped, or displayed using more advanced combination (like most recently used pages among all panels, pinned pages, etc.). This class is not a widget, the notebook is. Besides packing the notebook, 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:
vtkKWUserInterfaceManager vtkKWUserInterfacePanel

Definition at line 47 of file vtkKWUserInterfaceManagerNotebook.h.


Constructor & Destructor Documentation

vtkKWUserInterfaceManagerNotebook::vtkKWUserInterfaceManagerNotebook  )  [protected]
 

vtkKWUserInterfaceManagerNotebook::~vtkKWUserInterfaceManagerNotebook  )  [protected]
 


Member Function Documentation

vtkKWUserInterfaceManagerNotebook* vtkKWUserInterfaceManagerNotebook::New  )  [static]
 

Reimplemented from vtkKWObject.

vtkKWUserInterfaceManagerNotebook::vtkTypeRevisionMacro vtkKWUserInterfaceManagerNotebook  ,
vtkKWUserInterfaceManager 
 

void vtkKWUserInterfaceManagerNotebook::PrintSelf ostream &  os,
vtkIndent  indent
 

Reimplemented from vtkKWUserInterfaceManager.

virtual void vtkKWUserInterfaceManagerNotebook::SetNotebook vtkKWNotebook  )  [virtual]
 

Set the user interface manager's notebook. This has to be done before Create() is called (i.e. the sooner, the better), and can be done only once.

virtual vtkKWNotebook* vtkKWUserInterfaceManagerNotebook::GetNotebook  )  [virtual]
 

Set the user interface manager's notebook. This has to be done before Create() is called (i.e. the sooner, the better), and can be done only once.

virtual void vtkKWUserInterfaceManagerNotebook::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 int vtkKWUserInterfaceManagerNotebook::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* vtkKWUserInterfaceManagerNotebook::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* vtkKWUserInterfaceManagerNotebook::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* vtkKWUserInterfaceManagerNotebook::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 vtkKWUserInterfaceManagerNotebook::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 vtkKWUserInterfaceManagerNotebook::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 vtkKWUserInterfaceManagerNotebook::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 vtkKWUserInterfaceManagerNotebook::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 vtkKWUserInterfaceManagerNotebook::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 int vtkKWUserInterfaceManagerNotebook::RaisePanel 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.

Reimplemented from vtkKWUserInterfaceManager.

virtual void vtkKWUserInterfaceManagerNotebook::UpdatePanel vtkKWUserInterfacePanel panel  )  [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 from vtkKWUserInterfaceManager.

virtual vtkKWUserInterfacePanel* vtkKWUserInterfaceManagerNotebook::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 vtkKWUserInterfaceManagerNotebook::SetEnableDragAndDrop int   )  [virtual]
 

Enable/disable Drag and Drop. If enabled, elements of the user interface can be drag&drop within the same panel, or between different panels.

virtual void vtkKWUserInterfaceManagerNotebook::EnableDragAndDropOn  )  [virtual]
 

Enable/disable Drag and Drop. If enabled, elements of the user interface can be drag&drop within the same panel, or between different panels.

virtual void vtkKWUserInterfaceManagerNotebook::EnableDragAndDropOff  )  [virtual]
 

Enable/disable Drag and Drop. If enabled, elements of the user interface can be drag&drop within the same panel, or between different panels.

virtual int vtkKWUserInterfaceManagerNotebook::GetEnableDragAndDrop  )  [virtual]
 

Enable/disable Drag and Drop. If enabled, elements of the user interface can be drag&drop within the same panel, or between different panels.

virtual void vtkKWUserInterfaceManagerNotebook::DragAndDropEndCallback int  x,
int  y,
vtkKWWidget widget,
vtkKWWidget anchor,
vtkKWWidget target
[virtual]
 

Drag and Drop callback

virtual int vtkKWUserInterfaceManagerNotebook::GetNumberOfDragAndDropEntries  )  [virtual]
 

Get the number of Drag&Drop entries so far. Delete all Drag&Drop entries.

virtual int vtkKWUserInterfaceManagerNotebook::DeleteAllDragAndDropEntries  )  [virtual]
 

Get the number of Drag&Drop entries so far. Delete all Drag&Drop entries.

virtual int vtkKWUserInterfaceManagerNotebook::GetDragAndDropEntry int  idx,
ostream &  widget_label,
ostream &  from_panel_name,
ostream &  from_page_title,
ostream &  from_after_widget_label,
ostream &  to_panel_name,
ostream &  to_page_title,
ostream &  to_after_widget_label
[virtual]
 

Convenience function used to save/restore Drag&Drop entries to a text file. GetDragAndDropEntry() can be used to get a Drag&Drop entry parameters as plain text string. DragAndDropWidget() will perform a Drag&Drop given parameters similar to those acquired through GetDragAndDropEntry().

virtual int vtkKWUserInterfaceManagerNotebook::DragAndDropWidget const char *  widget_label,
const char *  from_panel_name,
const char *  from_page_title,
const char *  from_after_widget_label,
const char *  to_panel_name,
const char *  to_page_title,
const char *  to_after_widget_label
[virtual]
 

Convenience function used to save/restore Drag&Drop entries to a text file. GetDragAndDropEntry() can be used to get a Drag&Drop entry parameters as plain text string. DragAndDropWidget() will perform a Drag&Drop given parameters similar to those acquired through GetDragAndDropEntry().

virtual void vtkKWUserInterfaceManagerNotebook::LockDragAndDropEntriesOn  )  [virtual]
 

Lock Drag and Drop entries. If enabled, GetDragAndDropEntry() will not return any entry, and DragAndDropWidget() will not set any.

virtual void vtkKWUserInterfaceManagerNotebook::LockDragAndDropEntriesOff  )  [virtual]
 

Lock Drag and Drop entries. If enabled, GetDragAndDropEntry() will not return any entry, and DragAndDropWidget() will not set any.

virtual void vtkKWUserInterfaceManagerNotebook::SetLockDragAndDropEntries int   )  [virtual]
 

Lock Drag and Drop entries. If enabled, GetDragAndDropEntry() will not return any entry, and DragAndDropWidget() will not set any.

virtual int vtkKWUserInterfaceManagerNotebook::GetLockDragAndDropEntries  )  [virtual]
 

Lock Drag and Drop entries. If enabled, GetDragAndDropEntry() will not return any entry, and DragAndDropWidget() will not set any.

virtual int vtkKWUserInterfaceManagerNotebook::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 vtkKWUserInterfaceManagerNotebook::UpdatePanelDragAndDrop vtkKWUserInterfacePanel panel  )  [protected, virtual]
 

Update Drag And Drop bindings

virtual int vtkKWUserInterfaceManagerNotebook::CanWidgetBeDragAndDropped vtkKWWidget widget,
vtkKWWidget **  anchor = 0
[protected, virtual]
 

Check if a given widget can be Drag&Dropped given our framework. At the moment, only labeled frame can be D&D. If **anchor is not NULL, it will be assigned the widget D&D anchor (i.e. the internal part of the widget that is actually used to grab the widget). Return 1 if can be D&D, 0 otherwise.

virtual char* vtkKWUserInterfaceManagerNotebook::GetDragAndDropWidgetLabel vtkKWWidget widget  )  [protected, virtual]
 

Assuming that the widget can be Drag&Dropped given our framework, return a label that will be used to identify it. This is mostly used to save a D&D event to a text string/file.

virtual int vtkKWUserInterfaceManagerNotebook::GetDragAndDropWidgetLocation vtkKWWidget widget,
WidgetLocation loc
[protected, virtual]
 

Get the location of a widget.

virtual vtkKWWidget* vtkKWUserInterfaceManagerNotebook::GetDragAndDropWidgetFromLabelAndLocation const char *  widget_label,
const WidgetLocation loc_hint
[protected, virtual]
 

Get a D&D widget given its label (as returned by GetDragAndDropWidgetLabel()) and a hint about its location.

DragAndDropEntry* vtkKWUserInterfaceManagerNotebook::GetLastDragAndDropEntry vtkKWWidget Widget  )  [protected]
 

Get the last D&D entry that was added for a given widget

virtual int vtkKWUserInterfaceManagerNotebook::IsDragAndDropWidgetAtOriginalLocation vtkKWWidget widget  )  [protected, virtual]
 

Check if a widget that was drag & drop has gone back to its previous location

int vtkKWUserInterfaceManagerNotebook::AddDragAndDropEntry vtkKWWidget Widget,
const WidgetLocation from_loc,
const WidgetLocation to_loc
[protected]
 

Add a D&D entry to the list of entries, given a widget and its target location (its current/source location will be computed automatically)

virtual int vtkKWUserInterfaceManagerNotebook::DragAndDropWidget vtkKWWidget widget,
const WidgetLocation from_loc,
const WidgetLocation to_loc
[protected, virtual]
 

Perform the actual D&D given a widget and its target location. It will call AddDragAndDropEntry() and pack the widget to its new location


Friends And Related Function Documentation

friend class vtkKWUserInterfaceManagerNotebookInternals [friend]
 

Definition at line 276 of file vtkKWUserInterfaceManagerNotebook.h.


Member Data Documentation

vtkKWNotebook* vtkKWUserInterfaceManagerNotebook::Notebook [protected]
 

Definition at line 247 of file vtkKWUserInterfaceManagerNotebook.h.

int vtkKWUserInterfaceManagerNotebook::EnableDragAndDrop [protected]
 

Update Drag And Drop bindings

Definition at line 252 of file vtkKWUserInterfaceManagerNotebook.h.

int vtkKWUserInterfaceManagerNotebook::LockDragAndDropEntries [protected]
 

Update Drag And Drop bindings

Definition at line 253 of file vtkKWUserInterfaceManagerNotebook.h.

vtkKWUserInterfaceManagerNotebookInternals* vtkKWUserInterfaceManagerNotebook::Internals [protected]
 

Reimplemented from vtkKWUserInterfaceManager.

Definition at line 275 of file vtkKWUserInterfaceManagerNotebook.h.


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