Evita  0.16
evGUIWindow.h
Go to the documentation of this file.
1 /*
2  *
3  * EVITA: Efficient Visualization of Terascale Datasets
4  * Copyright (C) 2000-2016 Team Evita
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
19  * MA 02139, USA.
20  *
21  */
22 
23 
24 #ifndef __evGUIWindow_h
25 #define __evGUIWindow_h
26 
27 
28 #include <FL/Fl_Double_Window.H>
29 
30 #include "evGUIObject.h"
31 
32 
33 class evGUIWindow : public evGUIObject, public Fl_Double_Window
34 {
35 public:
36  evGUIWindow(const int width, const int height, const char *title);
37  virtual ~evGUIWindow(void);
38 
39  virtual const evString GetClassName(void) const
40  {
41  return(evString("evGUIWindow"));
42  }
43 
44  virtual void Show(void);
45 
46 protected:
47 
48 private:
49  static void Callback(Fl_Widget *widget, void *data);
50 };
51 
52 
53 inline evGUIWindow::evGUIWindow(const int width, const int height,
54  const char *title) :
55  Fl_Double_Window(width, height, title)
56 {
57  this->callback(this->Callback);
58 }
59 
60 
62 {
63 }
64 
65 
66 inline void evGUIWindow::Show(void)
67 {
68  Fl::visual(FL_DOUBLE|FL_INDEX);
69  this->show();
70  this->wait_for_expose();
71  Fl::flush();
72 }
73 
74 
75 inline void evGUIWindow::Callback(Fl_Widget *widget, void *data)
76 {
77  if (Fl::event_key() == FL_Escape)
78  return;
79 }
80 
81 
82 #endif
virtual ~evGUIWindow(void)
Definition: evGUIWindow.h:61
static void Callback(Fl_Widget *widget, void *data)
Definition: evGUIWindow.h:75
virtual void Show(void)
Definition: evGUIWindow.h:66
Definition: evGUIWindow.h:33
Definition: evGUIObject.h:33
Definition: evString.h:30
evGUIWindow(const int width, const int height, const char *title)
Definition: evGUIWindow.h:53
virtual const evString GetClassName(void) const
Definition: evGUIWindow.h:39