00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00024 #ifndef __vtkKWSelectionFrame_h
00025 #define __vtkKWSelectionFrame_h
00026
00027 #include "vtkKWCompositeWidget.h"
00028
00029 class vtkKWFrame;
00030 class vtkKWLabel;
00031 class vtkKWMenuButton;
00032 class vtkKWPushButton;
00033 class vtkKWSelectionFrameInternals;
00034 class vtkKWToolbarSet;
00035 class vtkStringArray;
00036
00037 class KWWidgets_EXPORT vtkKWSelectionFrame : public vtkKWCompositeWidget
00038 {
00039
00040 public:
00041 static vtkKWSelectionFrame* New();
00042 vtkTypeRevisionMacro(vtkKWSelectionFrame, vtkKWCompositeWidget);
00043 void PrintSelf(ostream& os, vtkIndent indent);
00044
00046
00047 virtual void SetTitle(const char *title);
00048 virtual const char* GetTitle();
00050
00052
00053 virtual void SetSelected(int);
00054 vtkGetMacro(Selected, int);
00055 vtkBooleanMacro(Selected, int);
00057
00059
00065 virtual void SetSelectionList(int num, const char **list);
00066 virtual void SetSelectionList(vtkStringArray *list);
00067 vtkGetObjectMacro(SelectionListMenuButton, vtkKWMenuButton);
00069
00078 virtual void SetSelectionListCommand(vtkObject *object, const char *method);
00079
00081
00082 virtual void SetSelectionListVisibility(int);
00083 vtkGetMacro(SelectionListVisibility, int);
00084 vtkBooleanMacro(SelectionListVisibility, int);
00086
00088
00091 virtual void SetAllowClose(int);
00092 vtkGetMacro(AllowClose, int);
00093 vtkBooleanMacro(AllowClose, int);
00094 vtkGetObjectMacro(CloseButton, vtkKWPushButton);
00096
00105 virtual void SetCloseCommand(vtkObject *object, const char *method);
00106
00110 virtual void Close();
00111
00113
00118 virtual void SetAllowChangeTitle(int);
00119 vtkGetMacro(AllowChangeTitle, int);
00120 vtkBooleanMacro(AllowChangeTitle, int);
00122
00134 virtual void SetChangeTitleCommand(vtkObject *object, const char *method);
00135
00151 virtual void SetTitleChangedCommand(vtkObject *object, const char *method);
00152
00161 virtual void SetSelectCommand(vtkObject *object, const char *method);
00162
00172 virtual void SetDoubleClickCommand(vtkObject *object, const char *method);
00173
00175
00177 vtkGetVector3Macro(TitleColor, double);
00178 virtual void SetTitleColor(double r, double g, double b);
00179 virtual void SetTitleColor(double rgb[3])
00180 { this->SetTitleColor(rgb[0], rgb[1], rgb[2]); };
00181 vtkGetVector3Macro(TitleSelectedColor, double);
00182 virtual void SetTitleSelectedColor(double r, double g, double b);
00183 virtual void SetTitleSelectedColor(double rgb[3])
00184 { this->SetTitleSelectedColor(rgb[0], rgb[1], rgb[2]); };
00185 vtkGetVector3Macro(TitleBackgroundColor, double);
00186 virtual void SetTitleBackgroundColor(double r, double g, double b);
00187 virtual void SetTitleBackgroundColor(double rgb[3])
00188 { this->SetTitleBackgroundColor(rgb[0], rgb[1], rgb[2]); };
00189 vtkGetVector3Macro(TitleSelectedBackgroundColor, double);
00190 virtual void SetTitleSelectedBackgroundColor(double r, double g, double b);
00191 virtual void SetTitleSelectedBackgroundColor(double rgb[3])
00192 { this->SetTitleSelectedBackgroundColor(rgb[0], rgb[1], rgb[2]); };
00194
00196
00197 virtual void SetTitleBarVisibility(int);
00198 vtkGetMacro(TitleBarVisibility, int);
00199 vtkBooleanMacro(TitleBarVisibility, int);
00201
00203
00205 virtual vtkKWToolbarSet* GetToolbarSet();
00206 virtual void SetToolbarSetVisibility(int);
00207 vtkGetMacro(ToolbarSetVisibility, int);
00208 vtkBooleanMacro(ToolbarSetVisibility, int);
00210
00215 virtual vtkKWFrame* GetTitleBarUserFrame();
00216
00218
00221 vtkGetObjectMacro(BodyFrame, vtkKWFrame);
00223
00225
00228 virtual vtkKWFrame* GetLeftUserFrame();
00229 virtual void SetLeftUserFrameVisibility(int);
00230 vtkGetMacro(LeftUserFrameVisibility, int);
00231 vtkBooleanMacro(LeftUserFrameVisibility, int);
00233
00235
00238 virtual vtkKWFrame* GetRightUserFrame();
00239 virtual void SetRightUserFrameVisibility(int);
00240 vtkGetMacro(RightUserFrameVisibility, int);
00241 vtkBooleanMacro(RightUserFrameVisibility, int);
00243
00245
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]); };
00263
00265
00266 virtual void SetOuterSelectionFrameBlinking(int);
00267 vtkGetMacro(OuterSelectionFrameBlinking, int);
00268 vtkBooleanMacro(OuterSelectionFrameBlinking, int);
00270
00277 virtual void UpdateEnableState();
00278
00280
00281 virtual void CloseCallback();
00282 virtual void SelectionListCallback(const char *menuItem);
00283 virtual void SelectCallback();
00284 virtual void DoubleClickCallback();
00285 virtual void ChangeTitleCallback();
00286 virtual void OuterSelectionFrameBlinkingCallback();
00288
00289
00290
00291 protected:
00292 vtkKWSelectionFrame();
00293 ~vtkKWSelectionFrame();
00294
00296 virtual void CreateWidget();
00297
00298 vtkKWFrame *OuterSelectionFrame;
00299 vtkKWFrame *TitleBarFrame;
00300 vtkKWMenuButton *SelectionListMenuButton;
00301 vtkKWPushButton *CloseButton;
00302 vtkKWLabel *TitleLabel;
00303 vtkKWFrame *BodyFrame;
00304
00305 virtual void Pack();
00306 virtual void Bind();
00307 virtual void UnBind();
00308
00309 virtual int SetColor(double *color, double r, double g, double b);
00310 virtual void UpdateSelectedAspect();
00311 virtual void UpdateOuterSelectionFrameColor();
00312 virtual void UpdateSelectionListMenuButton();
00313
00314 double TitleColor[3];
00315 double TitleSelectedColor[3];
00316 double TitleBackgroundColor[3];
00317 double TitleSelectedBackgroundColor[3];
00318
00319 double OuterSelectionFrameColor[3];
00320 double OuterSelectionFrameSelectedColor[3];
00321
00322 char *SelectionListCommand;
00323 char *CloseCommand;
00324 char *SelectCommand;
00325 char *DoubleClickCommand;
00326 char *ChangeTitleCommand;
00327 char *TitleChangedCommand;
00328 virtual void InvokeSelectionListCommand(const char*, vtkKWSelectionFrame*);
00329 virtual void InvokeCloseCommand(vtkKWSelectionFrame *obj);
00330 virtual void InvokeSelectCommand(vtkKWSelectionFrame *obj);
00331 virtual void InvokeDoubleClickCommand(vtkKWSelectionFrame *obj);
00332 virtual void InvokeChangeTitleCommand(vtkKWSelectionFrame *obj);
00333 virtual void InvokeTitleChangedCommand(vtkKWSelectionFrame *obj);
00334
00335 int Selected;
00336 int SelectionListVisibility;
00337 int AllowClose;
00338 int AllowChangeTitle;
00339 int ToolbarSetVisibility;
00340 int LeftUserFrameVisibility;
00341 int RightUserFrameVisibility;
00342 int TitleBarVisibility;
00343 int OuterSelectionFrameWidth;
00344 int OuterSelectionFrameBlinking;
00345
00346 virtual void CreateOuterSelectionFrameBlinkingTimer();
00347 virtual void CancelOuterSelectionFrameBlinkingTimer();
00348
00349
00350
00351 vtkKWSelectionFrameInternals *Internals;
00352
00353
00354
00355 private:
00356
00357 vtkKWToolbarSet *ToolbarSet;
00358 vtkKWFrame *LeftUserFrame;
00359 vtkKWFrame *RightUserFrame;
00360 vtkKWFrame *TitleBarUserFrame;
00361
00362 vtkKWSelectionFrame(const vtkKWSelectionFrame&);
00363 void operator=(const vtkKWSelectionFrame&);
00364 };
00365
00366 #endif
00367
00368