KWWidgets
debian/tmp/usr/include/KWWidgets/vtkKWScrollbar.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Module: $RCSfile: vtkKWScrollbar.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 vtkKWScrollbar - a simple scrollbar
15 // .SECTION Description
16 // The core scrollbar
17 
18 
19 #ifndef __vtkKWScrollbar_h
20 #define __vtkKWScrollbar_h
21 
22 #include "vtkKWCoreWidget.h"
23 
25 {
26 public:
27  static vtkKWScrollbar* New();
28  vtkTypeRevisionMacro(vtkKWScrollbar,vtkKWCoreWidget);
29  void PrintSelf(ostream& os, vtkIndent indent);
30 
31  // Description:
32  // Set/Get the background color of the widget.
33  virtual void GetBackgroundColor(double *r, double *g, double *b);
34  virtual double* GetBackgroundColor();
35  virtual void SetBackgroundColor(double r, double g, double b);
36  virtual void SetBackgroundColor(double rgb[3])
37  { this->SetBackgroundColor(rgb[0], rgb[1], rgb[2]); };
38 
39  // Description:
40  // Set/Get the foreground color of the widget.
41  virtual void GetForegroundColor(double *r, double *g, double *b);
42  virtual double* GetForegroundColor();
43  virtual void SetForegroundColor(double r, double g, double b);
44  virtual void SetForegroundColor(double rgb[3])
45  { this->SetForegroundColor(rgb[0], rgb[1], rgb[2]); };
46 
47  // Description:
48  // Set/Get the highlight thickness, a non-negative value indicating the
49  // width of the highlight rectangle to draw around the outside of the
50  // widget when it has the input focus.
51  virtual void SetHighlightThickness(int);
52  virtual int GetHighlightThickness();
53 
54  // Description:
55  // Set/Get the active background color of the widget. An element
56  // (a widget or portion of a widget) is active if the mouse cursor is
57  // positioned over the element and pressing a mouse button will cause some
58  // action to occur.
59  virtual void GetActiveBackgroundColor(double *r, double *g, double *b);
60  virtual double* GetActiveBackgroundColor();
61  virtual void SetActiveBackgroundColor(double r, double g, double b);
62  virtual void SetActiveBackgroundColor(double rgb[3])
63  { this->SetActiveBackgroundColor(rgb[0], rgb[1], rgb[2]); };
64 
65  // Description:
66  // Set/Get the border width, a non-negative value indicating the width of
67  // the 3-D border to draw around the outside of the widget (if such a border
68  // is being drawn; the Relief option typically determines this).
69  virtual void SetBorderWidth(int);
70  virtual int GetBorderWidth();
71 
72  // Description:
73  // Set/Get the 3-D effect desired for the widget.
74  // The value indicates how the interior of the widget should appear
75  // relative to its exterior.
76  // Valid constants can be found in vtkKWOptions::ReliefType.
77  virtual void SetRelief(int);
78  virtual int GetRelief();
79  virtual void SetReliefToRaised();
80  virtual void SetReliefToSunken();
81  virtual void SetReliefToFlat();
82  virtual void SetReliefToRidge();
83  virtual void SetReliefToSolid();
84  virtual void SetReliefToGroove();
85 
86  // Description:
87  // Set/Get the orientation type.
88  // For widgets that can lay themselves out with either a horizontal or
89  // vertical orientation, such as scrollbars, this option specifies which
90  // orientation should be used.
91  // Valid constants can be found in vtkKWOptions::OrientationType.
92  virtual void SetOrientation(int);
93  virtual int GetOrientation();
94  virtual void SetOrientationToHorizontal();
95  virtual void SetOrientationToVertical();
96 
97  // Description:
98  // Set/Get the trough color, i.e. the color to use for the rectangular
99  // trough areas in widgets such as scrollbars and scales.
100  // Ignored on Windows though (not supported by native widget)
101  virtual void GetTroughColor(double *r, double *g, double *b);
102  virtual double* GetTroughColor();
103  virtual void SetTroughColor(double r, double g, double b);
104  virtual void SetTroughColor(double rgb[3])
105  { this->SetTroughColor(rgb[0], rgb[1], rgb[2]); };
106 
107  // Description:
108  // Set/Get the desired narrow dimension of the scrollbar widget, not
109  // including 3-D border, if any. For vertical scrollbars this will be the
110  // width and for horizontal scrollbars this will be the height.
111  virtual void SetWidth(int);
112  virtual int GetWidth();
113 
114  // Description:
115  // Specifies a command to associate with the widget. This command is
116  // typically invoked to change the view in the widget associated with
117  // the scrollbar.
118  // The 'object' argument is the object that will have the method called on
119  // it. The 'method' argument is the name of the method to be called and any
120  // arguments in string form. If the object is NULL, the method is still
121  // evaluated as a simple command.
122  virtual void SetCommand(vtkObject *object, const char *method);
123 
124 protected:
127 
128  // Description:
129  // Create the widget.
130  virtual void CreateWidget();
131 
132 private:
133  vtkKWScrollbar(const vtkKWScrollbar&); // Not implemented
134  void operator=(const vtkKWScrollbar&); // Not implemented
135 };
136 
137 #endif