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

GUI/Widgets/vtkKWUserInterfaceManagerNotebook.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWUserInterfaceManagerNotebook.h,v $
00004 
00005   Copyright (c) Kitware, Inc.
00006   All rights reserved.
00007   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE.  See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00035 #ifndef __vtkKWUserInterfaceManagerNotebook_h
00036 #define __vtkKWUserInterfaceManagerNotebook_h
00037 
00038 #include "vtkKWUserInterfaceManager.h"
00039 
00040 class vtkKWApplication;
00041 class vtkKWIcon;
00042 class vtkKWNotebook;
00043 class vtkKWUserInterfacePanel;
00044 class vtkKWWidget;
00045 class vtkKWUserInterfaceManagerNotebookInternals;
00046 
00047 class KWWIDGETS_EXPORT vtkKWUserInterfaceManagerNotebook : public vtkKWUserInterfaceManager
00048 {
00049 public:
00050   static vtkKWUserInterfaceManagerNotebook* New();
00051   vtkTypeRevisionMacro(vtkKWUserInterfaceManagerNotebook,vtkKWUserInterfaceManager);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00053 
00055 
00058   virtual void SetNotebook(vtkKWNotebook*);
00059   vtkGetObjectMacro(Notebook, vtkKWNotebook);
00061   
00065   virtual void Create(vtkKWApplication *app);
00066 
00068 
00075   virtual int AddPage(vtkKWUserInterfacePanel *panel, 
00076                       const char *title, 
00077                       const char *balloon = 0, 
00078                       vtkKWIcon *icon = 0);
00080 
00082 
00090   virtual vtkKWWidget* GetPageWidget(int id);
00091   virtual vtkKWWidget* GetPageWidget(vtkKWUserInterfacePanel *panel, 
00092                                      const char *title);
00094 
00101   virtual vtkKWWidget *GetPagesParentWidget(vtkKWUserInterfacePanel *panel);
00102 
00104 
00114   virtual void RaisePage(int id);
00115   virtual void RaisePage(vtkKWUserInterfacePanel *panel, 
00116                          const char *title);
00118   
00120 
00134   virtual int ShowPanel(vtkKWUserInterfacePanel *panel);
00135   virtual int HidePanel(vtkKWUserInterfacePanel *panel);
00136   virtual int IsPanelVisible(vtkKWUserInterfacePanel *panel);
00137   virtual int RaisePanel(vtkKWUserInterfacePanel *panel);
00139   
00144   virtual void UpdatePanel(vtkKWUserInterfacePanel *panel);
00145 
00148   virtual vtkKWUserInterfacePanel* GetPanelFromPageId(int page_id);
00149 
00151 
00154   virtual void SetEnableDragAndDrop(int);
00155   vtkBooleanMacro(EnableDragAndDrop, int);
00156   vtkGetMacro(EnableDragAndDrop, int);
00158 
00160 
00161   virtual void DragAndDropEndCallback(
00162     int x, int y, 
00163     vtkKWWidget *widget, vtkKWWidget *anchor, vtkKWWidget *target);
00165 
00167 
00169   virtual int GetNumberOfDragAndDropEntries();
00170   virtual int DeleteAllDragAndDropEntries();
00172 
00174 
00179   virtual int GetDragAndDropEntry(
00180     int idx, 
00181     ostream &widget_label, 
00182     ostream &from_panel_name, 
00183     ostream &from_page_title, 
00184     ostream &from_after_widget_label, 
00185     ostream &to_panel_name, 
00186     ostream &to_page_title,
00187     ostream &to_after_widget_label);
00188   virtual int DragAndDropWidget(
00189     const char *widget_label, 
00190     const char *from_panel_name, 
00191     const char *from_page_title, 
00192     const char *from_after_widget_label,
00193     const char *to_panel_name, 
00194     const char *to_page_title,
00195     const char *to_after_widget_label);
00197 
00199 
00201   vtkBooleanMacro(LockDragAndDropEntries, int);
00202   vtkSetMacro(LockDragAndDropEntries, int);
00203   vtkGetMacro(LockDragAndDropEntries, int);
00205 
00206   //BTX
00207   // A Widget location. 
00208   // Store both the page the widget is packed in, and the widget it is 
00209   // packed after (if any).
00210   // @cond nested_class
00211   class WidgetLocation
00212   {
00213   public:
00214     WidgetLocation();
00215     void Empty();
00216 
00217     int PageId;
00218     vtkKWWidget *AfterWidget;
00219   };
00220   // @endcond
00221 
00222   // A D&D entry. 
00223   // Store the widget source and target location.
00224   // @cond nested_class
00225   class DragAndDropEntry
00226   {
00227   public:
00228     DragAndDropEntry();
00229 
00230     vtkKWWidget *Widget;
00231     WidgetLocation FromLocation;
00232     WidgetLocation ToLocation;
00233   };
00234   // @endcond
00235   //ETX
00236 
00237 protected:
00238   vtkKWUserInterfaceManagerNotebook();
00239   ~vtkKWUserInterfaceManagerNotebook();
00240 
00245   virtual int RemovePageWidgets(vtkKWUserInterfacePanel *panel);
00246   
00247   vtkKWNotebook *Notebook;
00248 
00250 
00251   virtual void UpdatePanelDragAndDrop(vtkKWUserInterfacePanel *panel);
00252   int EnableDragAndDrop;
00253   int LockDragAndDropEntries;
00255 
00256   //BTX
00257 
00259 
00264   virtual int CanWidgetBeDragAndDropped(
00265     vtkKWWidget *widget, vtkKWWidget **anchor = 0);
00267 
00271   virtual char* GetDragAndDropWidgetLabel(vtkKWWidget *widget);
00272 
00273   // PIMPL Encapsulation for STL containers
00274 
00275   vtkKWUserInterfaceManagerNotebookInternals *Internals;
00276   friend class vtkKWUserInterfaceManagerNotebookInternals;
00277 
00279 
00280   virtual int GetDragAndDropWidgetLocation(
00281     vtkKWWidget *widget, WidgetLocation *loc);
00283 
00285 
00287   virtual vtkKWWidget* GetDragAndDropWidgetFromLabelAndLocation(
00288     const char *widget_label, const WidgetLocation *loc_hint);
00290 
00292   DragAndDropEntry* GetLastDragAndDropEntry(vtkKWWidget *Widget);
00293 
00296   virtual int IsDragAndDropWidgetAtOriginalLocation(vtkKWWidget *widget);
00297 
00299 
00301   int AddDragAndDropEntry(
00302     vtkKWWidget *Widget, 
00303     const WidgetLocation *from_loc,
00304     const WidgetLocation *to_loc);
00306 
00308 
00311   virtual int DragAndDropWidget(
00312     vtkKWWidget *widget, 
00313     const WidgetLocation *from_loc,
00314     const WidgetLocation *to_loc);
00316 
00317   //ETX
00318 
00319 private:
00320 
00321   vtkKWUserInterfaceManagerNotebook(const vtkKWUserInterfaceManagerNotebook&); // Not implemented
00322   void operator=(const vtkKWUserInterfaceManagerNotebook&); // Not Implemented
00323 };
00324 
00325 #endif
00326 

Generated on Tue May 30 12:31:44 2006 for ParaView by doxygen 1.3.5