debian/tmp/usr/include/KWWidgets/vtkKWWindowBase.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __vtkKWWindowBase_h
00020 #define __vtkKWWindowBase_h
00021
00022 #include "vtkKWTopLevel.h"
00023
00024 class vtkKWFrame;
00025 class vtkKWLabel;
00026 class vtkKWMenu;
00027 class vtkKWMostRecentFilesManager;
00028 class vtkKWKeyBindingsManager;
00029 class vtkKWProgressGauge;
00030 class vtkKWSeparator;
00031 class vtkKWToolbar;
00032 class vtkKWToolbarSet;
00033
00034 class KWWidgets_EXPORT vtkKWWindowBase : public vtkKWTopLevel
00035 {
00036 public:
00037 static vtkKWWindowBase* New();
00038 vtkTypeRevisionMacro(vtkKWWindowBase,vtkKWTopLevel);
00039 void PrintSelf(ostream& os, vtkIndent indent);
00040
00041
00042
00043
00044
00045
00046
00047 virtual int Close();
00048
00049
00050
00051
00052 vtkSetMacro(PromptBeforeClose, int);
00053 vtkGetMacro(PromptBeforeClose, int);
00054 vtkBooleanMacro(PromptBeforeClose, int);
00055
00056
00057
00058
00059
00060
00061 virtual void LoadScript();
00062 virtual void LoadScript(const char *filename);
00063
00064
00065
00066 vtkSetStringMacro(ScriptExtension);
00067 vtkGetStringMacro(ScriptExtension);
00068
00069
00070
00071 vtkSetStringMacro(ScriptType);
00072 vtkGetStringMacro(ScriptType);
00073
00074
00075
00076 virtual void SetStatusText(const char *);
00077 virtual const char *GetStatusText();
00078
00079
00080
00081
00082
00083
00084
00085 enum
00086 {
00087 ErrorIconNone = 0,
00088 ErrorIconBlack,
00089 ErrorIconRed
00090 };
00091
00092 virtual void SetErrorIcon(int);
00093 virtual void SetErrorIconToNone()
00094 { this->SetErrorIcon(vtkKWWindowBase::ErrorIconNone); };
00095 virtual void SetErrorIconToBlack()
00096 { this->SetErrorIcon(vtkKWWindowBase::ErrorIconBlack); };
00097 virtual void SetErrorIconToRed()
00098 { this->SetErrorIcon(vtkKWWindowBase::ErrorIconRed); };
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 virtual vtkKWFrame* GetViewFrame();
00113
00114
00115
00116 vtkGetObjectMacro(MainToolbarSet, vtkKWToolbarSet);
00117
00118
00119
00120 vtkGetObjectMacro(StatusFrame, vtkKWFrame);
00121
00122
00123
00124
00125
00126
00127
00128
00129 virtual void SetStatusFrameVisibility(int flag);
00130 vtkGetMacro(StatusFrameVisibility, int);
00131 vtkBooleanMacro(StatusFrameVisibility, int);
00132
00133
00134
00135
00136 vtkGetObjectMacro(ProgressGauge, vtkKWProgressGauge);
00137
00138
00139
00140
00141
00142
00143
00144 enum
00145 {
00146 ProgressGaugePositionStatusFrame = 0,
00147 ProgressGaugePositionToolbar
00148 };
00149
00150 virtual void SetProgressGaugePosition(int);
00151 virtual void SetProgressGaugePositionToStatusFrame()
00152 { this->SetProgressGaugePosition(
00153 vtkKWWindowBase::ProgressGaugePositionStatusFrame); };
00154 virtual void SetProgressGaugePositionToToolbar()
00155 { this->SetProgressGaugePosition(
00156 vtkKWWindowBase::ProgressGaugePositionToolbar); };
00157
00158
00159
00160
00161
00162 vtkGetObjectMacro(TrayFrame, vtkKWFrame);
00163
00164
00165
00166
00167
00168
00169
00170 enum
00171 {
00172 TrayFramePositionStatusFrame = 0,
00173 TrayFramePositionToolbar
00174 };
00175
00176 vtkGetMacro(TrayFramePosition, int);
00177 virtual void SetTrayFramePosition(int);
00178 virtual void SetTrayFramePositionToStatusFrame()
00179 { this->SetTrayFramePosition(
00180 vtkKWWindowBase::TrayFramePositionStatusFrame); };
00181 virtual void SetTrayFramePositionToToolbar()
00182 { this->SetTrayFramePosition(
00183 vtkKWWindowBase::TrayFramePositionToolbar); };
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193 vtkKWMenu *GetFileMenu();
00194 vtkKWMenu *GetEditMenu();
00195 vtkKWMenu *GetViewMenu();
00196 vtkKWMenu *GetWindowMenu();
00197 vtkKWMenu *GetHelpMenu();
00198 vtkKWMenu *GetToolbarsVisibilityMenu();
00199 vtkGetObjectMacro(MenuBarSeparator, vtkKWSeparator);
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209 virtual int GetFileMenuInsertPosition();
00210 virtual int GetHelpMenuInsertPosition();
00211 virtual int GetViewMenuInsertPosition();
00212
00213
00214
00215
00216
00217
00218 vtkSetClampMacro(SupportHelp, int, 0, 1);
00219 vtkGetMacro(SupportHelp, int);
00220 vtkBooleanMacro(SupportHelp, int);
00221
00222
00223
00224
00225
00226
00227 virtual void AddRecentFile(
00228 const char *filename, vtkObject *target, const char *command);
00229
00230
00231
00232
00233
00234
00235 virtual void InsertRecentFilesMenu(int pos, vtkObject *target);
00236
00237
00238
00239
00240
00241
00242
00243 vtkSetClampMacro(SupportPrint, int, 0, 1);
00244 vtkGetMacro(SupportPrint, int);
00245 vtkBooleanMacro(SupportPrint, int);
00246
00247
00248
00249 vtkGetObjectMacro(KeyBindingsManager, vtkKWKeyBindingsManager);
00250
00251
00252
00253
00254 virtual char* GetTitle();
00255
00256
00257
00258
00259
00260
00261
00262 virtual void Update();
00263
00264
00265
00266 virtual void UpdateToolbarState();
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278 virtual void UpdateEnableState();
00279 virtual void UpdateMenuState();
00280
00281
00282
00283
00284 virtual void PrepareForDelete();
00285
00286
00287
00288 vtkGetStringMacro(PrintOptionsMenuLabel);
00289 vtkGetStringMacro(FileMenuLabel);
00290 vtkGetStringMacro(FileCloseMenuLabel);
00291 vtkGetStringMacro(FileExitMenuLabel);
00292 vtkGetStringMacro(OpenRecentFileMenuLabel);
00293 vtkGetStringMacro(EditMenuLabel);
00294 vtkGetStringMacro(ViewMenuLabel);
00295 vtkGetStringMacro(WindowMenuLabel);
00296 vtkGetStringMacro(HelpMenuLabel);
00297 vtkGetStringMacro(HelpAboutMenuLabel);
00298 vtkGetStringMacro(HelpTopicsMenuLabel);
00299 vtkGetStringMacro(HelpKeyBindingsMenuLabel);
00300 vtkGetStringMacro(HelpCheckForUpdatesMenuLabel);
00301 vtkGetStringMacro(ToolbarsVisibilityMenuLabel);
00302 vtkGetStringMacro(WindowGeometryRegKey);
00303 vtkGetStringMacro(DefaultGeometry);
00304
00305
00306
00307
00308
00309
00310
00311 enum
00312 {
00313 WindowClosingEvent = 10000
00314 };
00315
00316
00317
00318
00319
00320
00321
00322 virtual void AddCallbackCommandObservers();
00323 virtual void RemoveCallbackCommandObservers();
00324
00325
00326
00327
00328
00329
00330 virtual void AddErrorCallbackCommandObservers();
00331 virtual void RemoveErrorCallbackCommandObservers();
00332
00333
00334
00335 virtual void ErrorIconCallback();
00336 virtual void PrintSettingsCallback() {};
00337 virtual void ToolbarVisibilityChangedCallback(vtkKWToolbar*);
00338 virtual void NumberOfToolbarsChangedCallback();
00339 virtual void DisplayKeyBindingsCallback();
00340
00341 protected:
00342 vtkKWWindowBase();
00343 ~vtkKWWindowBase();
00344
00345
00346
00347 virtual void CreateWidget();
00348
00349
00350
00351
00352 virtual int DisplayCloseDialog();
00353
00354
00355
00356
00357 virtual void UpdateStatusImage();
00358 virtual vtkKWLabel *GetStatusImage();
00359
00360
00361
00362 vtkKWMostRecentFilesManager *MostRecentFilesManager;
00363
00364
00365
00366 vtkKWKeyBindingsManager *KeyBindingsManager;
00367
00368
00369
00370 virtual void SaveWindowGeometryToRegistry();
00371 virtual void RestoreWindowGeometryFromRegistry();
00372
00373
00374
00375 virtual void Pack();
00376
00377 vtkKWSeparator *MenuBarSeparator;
00378 vtkKWFrame *MainFrame;
00379
00380 vtkKWSeparator *StatusFrameSeparator;
00381 vtkKWFrame *StatusFrame;
00382 vtkKWLabel *StatusImage;
00383 vtkKWLabel *StatusLabel;
00384
00385 vtkKWProgressGauge *ProgressGauge;
00386 int ProgressGaugePosition;
00387
00388 vtkKWFrame *TrayFrame;
00389 vtkKWLabel *TrayImageError;
00390 int TrayFramePosition;
00391
00392 vtkKWToolbarSet *MainToolbarSet;
00393 vtkKWToolbar *StatusToolbar;
00394
00395 char *ScriptExtension;
00396 char *ScriptType;
00397 int SupportHelp;
00398 int SupportPrint;
00399 int PromptBeforeClose;
00400 int StatusFrameVisibility;
00401
00402
00403
00404 vtkKWMenu *FileMenu;
00405 vtkKWMenu *EditMenu;
00406 vtkKWMenu *ViewMenu;
00407 vtkKWMenu *WindowMenu;
00408 vtkKWMenu *HelpMenu;
00409 vtkKWMenu *ToolbarsVisibilityMenu;
00410
00411
00412
00413
00414
00415
00416 virtual void PopulateFileMenu();
00417 virtual void PopulateEditMenu();
00418 virtual void PopulateViewMenu();
00419 virtual void PopulateWindowMenu();
00420 virtual void PopulateHelpMenu();
00421
00422 vtkKWTclInteractor *TclInteractor;
00423
00424
00425
00426 vtkSetStringMacro(PrintOptionsMenuLabel);
00427 vtkSetStringMacro(FileMenuLabel);
00428 vtkSetStringMacro(FileCloseMenuLabel);
00429 vtkSetStringMacro(FileExitMenuLabel);
00430 vtkSetStringMacro(OpenRecentFileMenuLabel);
00431 vtkSetStringMacro(EditMenuLabel);
00432 vtkSetStringMacro(ViewMenuLabel);
00433 vtkSetStringMacro(WindowMenuLabel);
00434 vtkSetStringMacro(HelpMenuLabel);
00435 vtkSetStringMacro(HelpTopicsMenuLabel);
00436 vtkSetStringMacro(HelpKeyBindingsMenuLabel);
00437 vtkSetStringMacro(HelpAboutMenuLabel);
00438 vtkSetStringMacro(HelpCheckForUpdatesMenuLabel);
00439 vtkSetStringMacro(ToolbarsVisibilityMenuLabel);
00440 vtkSetStringMacro(WindowGeometryRegKey);
00441 vtkSetStringMacro(DefaultGeometry);
00442
00443
00444
00445
00446
00447 virtual void ProcessCallbackCommandEvents(
00448 vtkObject *caller, unsigned long event, void *calldata);
00449
00450 private:
00451
00452
00453
00454 char *PrintOptionsMenuLabel;
00455 char *FileMenuLabel;
00456 char *FileCloseMenuLabel;
00457 char *FileExitMenuLabel;
00458 char *OpenRecentFileMenuLabel;
00459 char *EditMenuLabel;
00460 char *ViewMenuLabel;
00461 char *WindowMenuLabel;
00462 char *HelpMenuLabel;
00463 char *HelpTopicsMenuLabel;
00464 char *HelpKeyBindingsMenuLabel;
00465 char *HelpAboutMenuLabel;
00466 char *HelpCheckForUpdatesMenuLabel;
00467 char *ToolbarsVisibilityMenuLabel;
00468 char *WindowGeometryRegKey;
00469 char *DefaultGeometry;
00470
00471 vtkKWWindowBase(const vtkKWWindowBase&);
00472 void operator=(const vtkKWWindowBase&);
00473 };
00474
00475 #endif