KWWidgets
|
00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkKWFrame.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 =========================================================================*/ 00014 // .NAME vtkKWFrame - a simple frame 00015 // .SECTION Description 00016 // The core frame 00017 00018 00019 #ifndef __vtkKWFrame_h 00020 #define __vtkKWFrame_h 00021 00022 #include "vtkKWCoreWidget.h" 00023 00024 class KWWidgets_EXPORT vtkKWFrame : public vtkKWCoreWidget 00025 { 00026 public: 00027 static vtkKWFrame* New(); 00028 vtkTypeRevisionMacro(vtkKWFrame,vtkKWCoreWidget); 00029 void PrintSelf(ostream& os, vtkIndent indent); 00030 00031 // Description: 00032 // Set/Get the background color of the widget. 00033 virtual void GetBackgroundColor(double *r, double *g, double *b); 00034 virtual double* GetBackgroundColor(); 00035 virtual void SetBackgroundColor(double r, double g, double b); 00036 virtual void SetBackgroundColor(double rgb[3]) 00037 { this->SetBackgroundColor(rgb[0], rgb[1], rgb[2]); }; 00038 00039 // Description: 00040 // Set/Get the highlight thickness, a non-negative value indicating the 00041 // width of the highlight rectangle to draw around the outside of the 00042 // widget when it has the input focus. 00043 virtual void SetHighlightThickness(int); 00044 virtual int GetHighlightThickness(); 00045 00046 // Description: 00047 // Set/Get the border width, a non-negative value indicating the width of 00048 // the 3-D border to draw around the outside of the widget (if such a border 00049 // is being drawn; the Relief option typically determines this). 00050 virtual void SetBorderWidth(int); 00051 virtual int GetBorderWidth(); 00052 00053 // Description: 00054 // Set/Get the 3-D effect desired for the widget. 00055 // The value indicates how the interior of the widget should appear 00056 // relative to its exterior. 00057 // Valid constants can be found in vtkKWOptions::ReliefType. 00058 virtual void SetRelief(int); 00059 virtual int GetRelief(); 00060 virtual void SetReliefToRaised(); 00061 virtual void SetReliefToSunken(); 00062 virtual void SetReliefToFlat(); 00063 virtual void SetReliefToRidge(); 00064 virtual void SetReliefToSolid(); 00065 virtual void SetReliefToGroove(); 00066 00067 // Description: 00068 // Set/Get the padding that will be applied around each widget (in pixels). 00069 // Specifies a non-negative value indicating how much extra space to request 00070 // for the widget in the X and Y-direction. When computing how large a 00071 // window it needs, the widget will add this amount to the width it would 00072 // normally need (as determined by the width of the things displayed 00073 // in the widget); if the geometry manager can satisfy this request, the 00074 // widget will end up with extra internal space around what it displays 00075 // inside. 00076 virtual void SetPadX(int); 00077 virtual int GetPadX(); 00078 virtual void SetPadY(int); 00079 virtual int GetPadY(); 00080 00081 // Description: 00082 // Request the width/height of a frame. 00083 // If width or height is less than or equal to zero then the frame will 00084 // not request any site at all, and we obey both the geometry of its 00085 // children and the space provided by its parent. 00086 // Supported only starting Tcl/Tk 8.3 00087 virtual void SetWidth(int); 00088 virtual int GetWidth(); 00089 virtual void SetHeight(int); 00090 virtual int GetHeight(); 00091 00092 protected: 00093 vtkKWFrame() {}; 00094 ~vtkKWFrame() {}; 00095 00096 // Description: 00097 // Create the widget. 00098 virtual void CreateWidget(); 00099 00100 private: 00101 vtkKWFrame(const vtkKWFrame&); // Not implemented 00102 void operator=(const vtkKWFrame&); // Not implemented 00103 }; 00104 00105 00106 #endif 00107 00108 00109