KWWidgets
debian/tmp/usr/include/KWWidgets/vtkKWTreeWithScrollbars.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Module: $RCSfile: vtkKWTreeWithScrollbars.h,v $
4 
5  Copyright (c) Kitware, Inc.
6  All rights reserved.
7  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 // .NAME vtkKWTreeWithScrollbars - a vtkKWTree associated to two vtkKWScrollbar's
15 // .SECTION Description
16 // This composite widget provides horizontal and vertical scrolling
17 // capabilities to a core widget. They can be enabled or disabled separately.
18 // As a subclass of vtkKWWidgetWithScrollbars, it inherits methods to
19 // retrieve the scrollbars and set their visibility and layout.
20 // .SECTION See Also
21 // vtkKWWidgetWithScrollbars vtkKWTree
22 
23 #ifndef __vtkKWTreeWithScrollbars_h
24 #define __vtkKWTreeWithScrollbars_h
25 
27 
28 class vtkKWScrollbar;
29 class vtkKWTree;
30 class vtkKWPushButtonSet;
31 
33 {
34 public:
35  static vtkKWTreeWithScrollbars* New();
37  void PrintSelf(ostream& os, vtkIndent indent);
38 
39  // Description:
40  // Get the vtkKWTree for which we addded the scrollbars
41  virtual vtkKWTree* GetWidget();
42 
43  // Descrition:
44  // Set/Get the visibility of the small resize buttons placed next to each
45  // scrollbar. Note that they won't show if the corresponding scrollbar
46  // is not visible.
47  virtual void SetResizeButtonsVisibility(int arg);
48  vtkBooleanMacro(ResizeButtonsVisibility, int);
49  vtkGetMacro(ResizeButtonsVisibility, int);
50 
51  // Description:
52  // Update the "enable" state of the object and its internal parts.
53  // Depending on different Ivars (this->Enabled, the application's
54  // Limited Edition Mode, etc.), the "enable" state of the object is updated
55  // and propagated to its internal parts/subwidgets. This will, for example,
56  // enable/disable parts of the widget UI, enable/disable the visibility
57  // of 3D widgets, etc.
58  virtual void UpdateEnableState();
59 
60  // Description:
61  // Callbacks. Internal, do not use.
62  virtual void ExpandTreeVerticallyCallback();
63  virtual void ShrinkTreeVerticallyCallback();
64  virtual void ExpandTreeHorizontallyCallback();
65  virtual void ShrinkTreeHorizontallyCallback();
66 
67 protected:
70 
71  // Description:
72  // Create the widget.
73  virtual void CreateWidget();
74 
75  // Description:
76  // Set the visibility of the resize buttons
78 
79  // Description:
80  // Internal widgets
84 
85  // Description:
86  // Create scrollbars and associate the scrollbars to a widget by
87  // setting up the callbacks between both instances.
88  // Re-implemented to set the associated now that we know the internal widget
89  virtual void CreateHorizontalScrollbar();
90  virtual void CreateVerticalScrollbar();
91 
92  // Description:
93  // Pack.
94  virtual void Pack();
95 
96  // Description:
97  // Update buttons
98  virtual void UpdateButtonsVisibility();
99 
100 private:
101  vtkKWTreeWithScrollbars(const vtkKWTreeWithScrollbars&); // Not implemented
102  void operator=(const vtkKWTreeWithScrollbars&); // Not implemented
103 };
104 
105 #endif