KWWidgets
debian/tmp/usr/include/KWWidgets/vtkKWWidgetWithScrollbars.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Module: $RCSfile: vtkKWWidgetWithScrollbars.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 vtkKWWidgetWithScrollbars - an abstract class for composite widgets associated to two vtkKWScrollbar's
15 // .SECTION Description
16 // This provide a boilerplate for a composite widget associated to a horizontal
17 // and vertical scrollbars.
18 //
19 // Be aware that most subclasses of vtkKWWidgetWithScrollbars are
20 // generated automatically out of the vtkKWWidgetWithScrollbarsSubclass
21 // template located in the Templates directory. Therefore, even though the
22 // source code for those vtkKWWidgetWithScrollbars subclasses does not exist
23 // in the KWWidgets repository, they are still generated automatically and
24 // documented in the API online; check the vtkKWWidgetWithScrollbars API
25 // online for its subclasses, as well as the \subpage
26 // kwwidgets_autogenerated_page page. Classes related
27 // to the same template can be found in the
28 // \ref kwwidgets_autogenerated_widget_with_scrollbars_group section.
29 // .SECTION See Also
30 // vtkKWCanvasWithScrollbars vtkKWListBoxWithScrollbars vtkKWMultiColumnListWithScrollbars vtkKWTextWithScrollbars vtkKWTreeWithScrollbars
31 
32 #ifndef __vtkKWWidgetWithScrollbars_h
33 #define __vtkKWWidgetWithScrollbars_h
34 
35 #include "vtkKWCompositeWidget.h"
36 
37 class vtkKWScrollbar;
38 
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
45  // Description:
46  // Set/Get the vertical scrollbar visibility (default to On).
47  virtual void SetVerticalScrollbarVisibility(int val);
48  vtkGetMacro(VerticalScrollbarVisibility, int);
49  vtkBooleanMacro(VerticalScrollbarVisibility, int);
50 
51  // Description:
52  // Set/Get the horizontal scrollbar visibility (default to On).
53  virtual void SetHorizontalScrollbarVisibility(int val);
54  vtkGetMacro(HorizontalScrollbarVisibility, int);
55  vtkBooleanMacro(HorizontalScrollbarVisibility, int);
56 
57  // Description:
58  // Access the internal scrollbars.
59  vtkGetObjectMacro(VerticalScrollbar, vtkKWScrollbar);
60  vtkGetObjectMacro(HorizontalScrollbar, vtkKWScrollbar);
61 
62  // Description:
63  // Update the "enable" state of the object and its internal parts.
64  // Depending on different Ivars (this->Enabled, the application's
65  // Limited Edition Mode, etc.), the "enable" state of the object is updated
66  // and propagated to its internal parts/subwidgets. This will, for example,
67  // enable/disable parts of the widget UI, enable/disable the visibility
68  // of 3D widgets, etc.
69  virtual void UpdateEnableState();
70 
71 protected:
74 
75  // Description:
76  // Create the widget.
77  virtual void CreateWidget();
78 
79  // Description:
80  // Scrollbar visibility flags
83 
84  // Description:
85  // Scrollbars
88 
89  // Description:
90  // Create scrollbars and associate the scrollbars to a widget by
91  // setting up the callbacks between both instances.
92  // The associated *has* to be made for this class to work, but
93  // since we do not know the internal widget at that point, it is up
94  // to the subclass to reimplement both Create*Scrollbar() methods
95  // and have them simply call the super and the Associate*Scrollbar()
96  // methods with the internal argument as parameter.
97  virtual void CreateHorizontalScrollbar();
98  virtual void CreateVerticalScrollbar();
99  virtual void AssociateHorizontalScrollbarToWidget(vtkKWCoreWidget *widget);
100  virtual void AssociateVerticalScrollbarToWidget(vtkKWCoreWidget *widget);
101 
102  // Description:
103  // Pack or repack the widget. This should be implemented by subclasses,
104  // but a convenience function PackScrollbarsWithWidget() can be
105  // called from the subclass just as easily.
106  virtual void Pack() = 0;
107  virtual void PackScrollbarsWithWidget(vtkKWWidget *widget);
108 
109 private:
110 
111  vtkKWWidgetWithScrollbars(const vtkKWWidgetWithScrollbars&); // Not implemented
112  void operator=(const vtkKWWidgetWithScrollbars&); // Not implemented
113 };
114 
115 #endif