KWWidgets
|
00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkKWOptions.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 vtkKWOptions - set of common options. 00015 // .SECTION Description 00016 // This class also provides some conversion betweek vtkKWWidget constants 00017 // and the corresponding Tk options. 00018 00019 #ifndef __vtkKWOptions_h 00020 #define __vtkKWOptions_h 00021 00022 #include "vtkObject.h" 00023 #include "vtkKWWidgets.h" // Needed for export symbols directives 00024 00025 class KWWidgets_EXPORT vtkKWOptions : public vtkObject 00026 { 00027 public: 00028 static vtkKWOptions* New(); 00029 vtkTypeRevisionMacro(vtkKWOptions,vtkObject); 00030 void PrintSelf(ostream& os, vtkIndent indent); 00031 00032 // Description: 00033 // Specifies how the information in a widget (e.g. text or a bitmap) is to 00034 // be displayed in the widget. 00035 //BTX 00036 enum AnchorType 00037 { 00038 AnchorNorth = 0, 00039 AnchorNorthEast, 00040 AnchorEast, 00041 AnchorSouthEast, 00042 AnchorSouth, 00043 AnchorSouthWest, 00044 AnchorWest, 00045 AnchorNorthWest, 00046 AnchorCenter, 00047 AnchorUnknown 00048 }; 00049 //ETX 00050 00051 // Description: 00052 // Specifies the 3-D effect desired for the widget. The value indicates how 00053 // the interior of the widget should appear relative to its exterior. 00054 //BTX 00055 enum ReliefType 00056 { 00057 ReliefRaised = 0, 00058 ReliefSunken, 00059 ReliefFlat, 00060 ReliefRidge, 00061 ReliefSolid, 00062 ReliefGroove, 00063 ReliefUnknown 00064 }; 00065 //ETX 00066 00067 // Description: 00068 // When there are multiple lines of text displayed in a widget, 00069 // determines how the lines line up with each other. 00070 //BTX 00071 enum JustificationType 00072 { 00073 JustificationLeft = 0, 00074 JustificationCenter, 00075 JustificationRight, 00076 JustificationUnknown 00077 }; 00078 //ETX 00079 00080 // Description: 00081 // Specifies one of several styles for manipulating the selection. 00082 //BTX 00083 enum SelectionModeType 00084 { 00085 SelectionModeSingle = 0, 00086 SelectionModeBrowse, 00087 SelectionModeMultiple, 00088 SelectionModeExtended, 00089 SelectionModeUnknown 00090 }; 00091 //ETX 00092 00093 // Description: 00094 // For widgets that can lay themselves out with either a horizontal or 00095 // vertical orientation, such as scales or scrollbars, specifies which 00096 // orientation should be used. 00097 //BTX 00098 enum OrientationType 00099 { 00100 OrientationHorizontal = 0, 00101 OrientationVertical, 00102 OrientationUnknown 00103 }; 00104 //ETX 00105 00106 // Description: 00107 // Specifies the state of a widget. 00108 //BTX 00109 enum StateType 00110 { 00111 StateDisabled = 0, 00112 StateNormal = 1, 00113 StateActive = 2, 00114 StateReadOnly = 3, 00115 StateUnknown 00116 }; 00117 //ETX 00118 00119 // Description: 00120 // Specifies if the widget should display text and bitmaps/images at the 00121 // same time, and if so, where the bitmap/image should be placed relative 00122 // to the text. 00123 //BTX 00124 enum CompoundModeType 00125 { 00126 CompoundModeNone = 0, 00127 CompoundModeLeft, 00128 CompoundModeCenter, 00129 CompoundModeRight, 00130 CompoundModeTop, 00131 CompoundModeBottom, 00132 CompoundModeUnknown 00133 }; 00134 //ETX 00135 00136 // Description: 00137 // Return the Tcl value for a given encoding constant 00138 // Check vtkSystemIncludes for a list of valid encodings. 00139 static const char* GetCharacterEncodingAsTclOptionValue(int); 00140 00141 // Description: 00142 // Return the Tk value for a given anchor constant, and vice-versa 00143 static const char* GetAnchorAsTkOptionValue(int); 00144 static int GetAnchorFromTkOptionValue(const char *); 00145 00146 // Description: 00147 // Return the Tk value for a given relief constant, and vice-versa 00148 static const char* GetReliefAsTkOptionValue(int); 00149 static int GetReliefFromTkOptionValue(const char *); 00150 00151 // Description: 00152 // Return the Tk value for a given justification constant, and vice-versa. 00153 static const char* GetJustificationAsTkOptionValue(int); 00154 static int GetJustificationFromTkOptionValue(const char *); 00155 00156 // Description: 00157 // Return the Tk value for a given selection mode constant, and vice-versa. 00158 static const char* GetSelectionModeAsTkOptionValue(int); 00159 static int GetSelectionModeFromTkOptionValue(const char *); 00160 00161 // Description: 00162 // Return the Tk value for a given orientation constant, and vice-versa. 00163 static const char* GetOrientationAsTkOptionValue(int); 00164 static int GetOrientationFromTkOptionValue(const char *); 00165 00166 // Description: 00167 // Return the Tk value for a given state constant, and vice-versa. 00168 static const char* GetStateAsTkOptionValue(int); 00169 static int GetStateFromTkOptionValue(const char *); 00170 00171 // Description: 00172 // Return the Tk value for a given compound constant, and vice-versa. 00173 static const char* GetCompoundModeAsTkOptionValue(int); 00174 static int GetCompoundModeFromTkOptionValue(const char *); 00175 00176 protected: 00177 vtkKWOptions() {}; 00178 ~vtkKWOptions() {}; 00179 00180 private: 00181 00182 vtkKWOptions(const vtkKWOptions&); // Not implemented 00183 void operator=(const vtkKWOptions&); // Not implemented 00184 }; 00185 00186 #endif