KWWidgets
|
00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkKWTheme.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 vtkKWTheme - a theme superclass 00015 // .SECTION Description 00016 // This class provides very simple/basic theming capabilities; it can be 00017 // used to setup an application-wide "theme" or "brand" by overriding the 00018 // default look&feel of the KWWidgets objects. 00019 // It mainly revolves around adding entries to the application's option 00020 // database (vtkKWOptionDataBase). 00021 // Check the Examples/Cxx/Theme for more details. 00022 // .SECTION Thanks 00023 // This work is part of the National Alliance for Medical Image 00024 // Computing (NAMIC), funded by the National Institutes of Health 00025 // through the NIH Roadmap for Medical Research, Grant U54 EB005149. 00026 // Information on the National Centers for Biomedical Computing 00027 // can be obtained from http://nihroadmap.nih.gov/bioinformatics. 00028 // .SECTION See Also 00029 // vtkKWOptionDataBase 00030 00031 #ifndef __vtkKWTheme_h 00032 #define __vtkKWTheme_h 00033 00034 #include "vtkKWObject.h" 00035 00036 class vtkKWOptionDataBase; 00037 00038 class KWWidgets_EXPORT vtkKWTheme : public vtkKWObject 00039 { 00040 public: 00041 static vtkKWTheme* New(); 00042 vtkTypeRevisionMacro(vtkKWTheme, vtkKWObject); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 00045 // Description: 00046 // Ask the theme to install/uninstall itself. 00047 // Subclasses should make sure to call the same superclass methods before 00048 // setting up their own options so that the application's option 00049 // database is backup'ed/restored correctly. 00050 virtual void Install(); 00051 virtual void Uninstall(); 00052 00053 protected: 00054 vtkKWTheme(); 00055 ~vtkKWTheme(); 00056 00057 // Description: 00058 // Backup the current option-database, and restore it 00059 virtual void BackupCurrentOptionDataBase(); 00060 virtual void RestorePreviousOptionDataBase(); 00061 00062 vtkKWOptionDataBase *BackupOptionDataBase; 00063 00064 private: 00065 00066 vtkKWTheme(const vtkKWTheme&); // Not implemented 00067 void operator=(const vtkKWTheme&); // Not implemented 00068 }; 00069 00070 #endif