Diana Software
QGWindow.hh
Go to the documentation of this file.
1 #ifndef _QG_WINDOW_HH_
2 #define _QG_WINDOW_HH_
3 
11 #include <list>
12 #include <string>
13 #include "TGFrame.h"
14 
15 class QGWindow : public TGMainFrame {
16 public:
18  QGWindow(const TGWindow *p = 0, UInt_t w = 100, UInt_t h = 100);
19 
21  virtual ~QGWindow();
22 
24  static QGWindow *GetWindowByName(const std::string& name);
25 
27  static const std::list<QGWindow*>& GetWindows() {return fWindows;}
28 
30  virtual void SetWindowName(const char *name = 0);
31 
33  static bool IsNameInUse(std::string name);
34 
36  static std::string GenerateWindowName(std::string baseName);
37 
39  static void UpdateWindowDropDownBoxes();
40 
41 protected:
43  UInt_t fWidth;
44 
46  UInt_t fHeight;
47 
49  static std::list<QGWindow*> fWindows;
50 
51  ClassDef(QGWindow, 0)
52 };
53 
54 #endif
Base class for GUI windows.
Definition: QGWindow.hh:15
static std::list< QGWindow * > fWindows
Collection of pointers to all open QGWindows.
Definition: QGWindow.hh:49
static const std::list< QGWindow * > & GetWindows()
Get collection of windows.
Definition: QGWindow.hh:27
static bool IsNameInUse(std::string name)
Check whether string is the name of any window.
Definition: QGWindow.cc:69
static std::string GenerateWindowName(std::string baseName)
Generate a name for the window.
Definition: QGWindow.cc:82
static void UpdateWindowDropDownBoxes()
Update window drop down boxes.
Definition: QGWindow.cc:95
static QGWindow * GetWindowByName(const std::string &name)
Get pointer to window with a given name.
Definition: QGWindow.cc:39
virtual void SetWindowName(const char *name=0)
Set name of window.
Definition: QGWindow.cc:52
UInt_t fHeight
Height of window.
Definition: QGWindow.hh:46
UInt_t fWidth
Width of window.
Definition: QGWindow.hh:43
QGWindow(const TGWindow *p=0, UInt_t w=100, UInt_t h=100)
Constructor.
Definition: QGWindow.cc:18
virtual ~QGWindow()
Destructor.
Definition: QGWindow.cc:27