00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __vtkKWSelectionFrame_h
00023 #define __vtkKWSelectionFrame_h
00024
00025 #include "vtkKWCompositeWidget.h"
00026
00027 class vtkKWFrame;
00028 class vtkKWLabel;
00029 class vtkKWMenuButton;
00030 class vtkKWPushButton;
00031 class vtkKWSelectionFrameInternals;
00032 class vtkKWToolbarSet;
00033 class vtkStringArray;
00034
00035 class KWWidgets_EXPORT vtkKWSelectionFrame : public vtkKWCompositeWidget
00036 {
00037 public:
00038 static vtkKWSelectionFrame* New();
00039 vtkTypeRevisionMacro(vtkKWSelectionFrame, vtkKWCompositeWidget);
00040 void PrintSelf(ostream& os, vtkIndent indent);
00041
00042
00043
00044 virtual void SetTitle(const char *title);
00045 virtual const char* GetTitle();
00046
00047
00048
00049 virtual void SetSelected(int);
00050 vtkGetMacro(Selected, int);
00051 vtkBooleanMacro(Selected, int);
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 virtual void SetSelectionList(int num, const char **list);
00062 virtual void SetSelectionList(vtkStringArray *list);
00063 vtkGetObjectMacro(SelectionListMenuButton, vtkKWMenuButton);
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075 virtual void SetSelectionListCommand(vtkObject *object, const char *method);
00076
00077
00078
00079 virtual void SetSelectionListVisibility(int);
00080 vtkGetMacro(SelectionListVisibility, int);
00081 vtkBooleanMacro(SelectionListVisibility, int);
00082
00083
00084
00085
00086
00087 virtual void SetAllowClose(int);
00088 vtkGetMacro(AllowClose, int);
00089 vtkBooleanMacro(AllowClose, int);
00090 vtkGetObjectMacro(CloseButton, vtkKWPushButton);
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102 virtual void SetCloseCommand(vtkObject *object, const char *method);
00103
00104
00105
00106
00107
00108 virtual void Close();
00109
00110
00111
00112
00113
00114
00115
00116 virtual void SetAllowChangeTitle(int);
00117 vtkGetMacro(AllowChangeTitle, int);
00118 vtkBooleanMacro(AllowChangeTitle, int);
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133 virtual void SetChangeTitleCommand(vtkObject *object, const char *method);
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152 virtual void SetTitleChangedCommand(vtkObject *object, const char *method);
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164 virtual void SetSelectCommand(vtkObject *object, const char *method);
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177 virtual void SetDoubleClickCommand(vtkObject *object, const char *method);
00178
00179
00180
00181
00182 vtkGetVector3Macro(TitleColor, double);
00183 virtual void SetTitleColor(double r, double g, double b);
00184 virtual void SetTitleColor(double rgb[3])
00185 { this->SetTitleColor(rgb[0], rgb[1], rgb[2]); };
00186 vtkGetVector3Macro(TitleSelectedColor, double);
00187 virtual void SetTitleSelectedColor(double r, double g, double b);
00188 virtual void SetTitleSelectedColor(double rgb[3])
00189 { this->SetTitleSelectedColor(rgb[0], rgb[1], rgb[2]); };
00190 vtkGetVector3Macro(TitleBackgroundColor, double);
00191 virtual void SetTitleBackgroundColor(double r, double g, double b);
00192 virtual void SetTitleBackgroundColor(double rgb[3])
00193 { this->SetTitleBackgroundColor(rgb[0], rgb[1], rgb[2]); };
00194 vtkGetVector3Macro(TitleSelectedBackgroundColor, double);
00195 virtual void SetTitleSelectedBackgroundColor(double r, double g, double b);
00196 virtual void SetTitleSelectedBackgroundColor(double rgb[3])
00197 { this->SetTitleSelectedBackgroundColor(rgb[0], rgb[1], rgb[2]); };
00198
00199
00200
00201 virtual void SetTitleBarVisibility(int);
00202 vtkGetMacro(TitleBarVisibility, int);
00203 vtkBooleanMacro(TitleBarVisibility, int);
00204
00205
00206
00207
00208 virtual vtkKWToolbarSet* GetToolbarSet();
00209 virtual void SetToolbarSetVisibility(int);
00210 vtkGetMacro(ToolbarSetVisibility, int);
00211 vtkBooleanMacro(ToolbarSetVisibility, int);
00212
00213
00214
00215
00216
00217
00218 virtual vtkKWFrame* GetTitleBarUserFrame();
00219
00220
00221
00222
00223
00224 vtkGetObjectMacro(BodyFrame, vtkKWFrame);
00225
00226
00227
00228
00229
00230 virtual vtkKWFrame* GetLeftUserFrame();
00231 virtual void SetLeftUserFrameVisibility(int);
00232 vtkGetMacro(LeftUserFrameVisibility, int);
00233 vtkBooleanMacro(LeftUserFrameVisibility, int);
00234
00235
00236
00237
00238
00239 virtual vtkKWFrame* GetRightUserFrame();
00240 virtual void SetRightUserFrameVisibility(int);
00241 vtkGetMacro(RightUserFrameVisibility, int);
00242 vtkBooleanMacro(RightUserFrameVisibility, int);
00243
00244
00245
00246
00247
00248
00249
00250
00251 virtual void SetOuterSelectionFrameWidth(int);
00252 vtkGetMacro(OuterSelectionFrameWidth, int);
00253 vtkGetVector3Macro(OuterSelectionFrameColor, double);
00254 virtual void SetOuterSelectionFrameColor(double r, double g, double b);
00255 virtual void SetOuterSelectionFrameColor(double rgb[3])
00256 { this->SetOuterSelectionFrameColor(rgb[0], rgb[1], rgb[2]); };
00257 vtkGetVector3Macro(OuterSelectionFrameSelectedColor, double);
00258 virtual void SetOuterSelectionFrameSelectedColor(
00259 double r, double g, double b);
00260 virtual void SetOuterSelectionFrameSelectedColor(double rgb[3])
00261 { this->SetOuterSelectionFrameSelectedColor(rgb[0], rgb[1], rgb[2]); };
00262
00263
00264
00265 virtual void SetOuterSelectionFrameBlinking(int);
00266 vtkGetMacro(OuterSelectionFrameBlinking, int);
00267 vtkBooleanMacro(OuterSelectionFrameBlinking, int);
00268
00269
00270
00271
00272
00273
00274
00275
00276 virtual void UpdateEnableState();
00277
00278
00279
00280 virtual void CloseCallback();
00281 virtual void SelectionListCallback(const char *menuItem);
00282 virtual void SelectCallback();
00283 virtual void DoubleClickCallback();
00284 virtual void ChangeTitleCallback();
00285 virtual void OuterSelectionFrameBlinkingCallback();
00286
00287 protected:
00288 vtkKWSelectionFrame();
00289 ~vtkKWSelectionFrame();
00290
00291
00292
00293 virtual void CreateWidget();
00294
00295 vtkKWFrame *OuterSelectionFrame;
00296 vtkKWFrame *TitleBarFrame;
00297 vtkKWMenuButton *SelectionListMenuButton;
00298 vtkKWPushButton *CloseButton;
00299 vtkKWLabel *TitleLabel;
00300 vtkKWFrame *BodyFrame;
00301
00302 virtual void Pack();
00303 virtual void Bind();
00304 virtual void UnBind();
00305
00306 virtual int SetColor(double *color, double r, double g, double b);
00307 virtual void UpdateSelectedAspect();
00308 virtual void UpdateOuterSelectionFrameColor();
00309 virtual void UpdateSelectionListMenuButton();
00310
00311 double TitleColor[3];
00312 double TitleSelectedColor[3];
00313 double TitleBackgroundColor[3];
00314 double TitleSelectedBackgroundColor[3];
00315
00316 double OuterSelectionFrameColor[3];
00317 double OuterSelectionFrameSelectedColor[3];
00318
00319 char *SelectionListCommand;
00320 char *CloseCommand;
00321 char *SelectCommand;
00322 char *DoubleClickCommand;
00323 char *ChangeTitleCommand;
00324 char *TitleChangedCommand;
00325 virtual void InvokeSelectionListCommand(const char*, vtkKWSelectionFrame*);
00326 virtual void InvokeCloseCommand(vtkKWSelectionFrame *obj);
00327 virtual void InvokeSelectCommand(vtkKWSelectionFrame *obj);
00328 virtual void InvokeDoubleClickCommand(vtkKWSelectionFrame *obj);
00329 virtual void InvokeChangeTitleCommand(vtkKWSelectionFrame *obj);
00330 virtual void InvokeTitleChangedCommand(vtkKWSelectionFrame *obj);
00331
00332 int Selected;
00333 int SelectionListVisibility;
00334 int AllowClose;
00335 int AllowChangeTitle;
00336 int ToolbarSetVisibility;
00337 int LeftUserFrameVisibility;
00338 int RightUserFrameVisibility;
00339 int TitleBarVisibility;
00340 int OuterSelectionFrameWidth;
00341 int OuterSelectionFrameBlinking;
00342
00343 virtual void CreateOuterSelectionFrameBlinkingTimer();
00344 virtual void CancelOuterSelectionFrameBlinkingTimer();
00345
00346
00347
00348 vtkKWSelectionFrameInternals *Internals;
00349
00350 private:
00351
00352 vtkKWToolbarSet *ToolbarSet;
00353 vtkKWFrame *LeftUserFrame;
00354 vtkKWFrame *RightUserFrame;
00355 vtkKWFrame *TitleBarUserFrame;
00356
00357 vtkKWSelectionFrame(const vtkKWSelectionFrame&);
00358 void operator=(const vtkKWSelectionFrame&);
00359 };
00360
00361 #endif
00362