Evita  0.16
evGUIWizardPanel.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 __evGUIWizardPanel_h
25 #define __evGUIWizardPanel_h
26 
27 
28 #include <FL/Fl_Button.H>
29 
30 #include "evGUIObject.h"
31 
32 
33 class evGUIWizardPanel;
35  void *data);
36 
37 class evGUIWizardPanel : public evGUIObject, public Fl_Group
38 {
39 public:
40  evGUIWizardPanel(const int x, const int y, const int width, const int height);
41  virtual ~evGUIWizardPanel(void);
42 
43  virtual const evString GetClassName(void) const
44  {
45  return(evString("evGUIWizardPanel"));
46  }
47 
48  void SetCallback(evGUIWizardPanelCallback callback, void *data);
49  int DoCallback(void);
50 
51  void SetNoButtons(void);
52  int DrawButtons(void) const;
53 
54 protected:
55 
56 private:
58  void *CallbackData;
59  int NoButtons;
60 };
61 
62 
63 inline evGUIWizardPanel::evGUIWizardPanel(const int x, const int y,
64  const int width, const int height) :
65  Fl_Group(x, y, width, height), NoButtons(0)
66 {
67  this->Callback = NULL;
68  this->CallbackData = NULL;
69 }
70 
71 
73 {
74 }
75 
76 
78  callback,
79  void *data)
80 {
81  this->Callback = callback;
82  this->CallbackData = data;
83 }
84 
85 
87 {
88  if (this->Callback == NULL)
89  return(0);
90  return(this->Callback(this, this->CallbackData));
91 }
92 
93 
95 {
96  this->NoButtons = 1;
97 }
98 
99 
100 inline int evGUIWizardPanel::DrawButtons(void) const
101 {
102  return(!this->NoButtons);
103 }
104 
105 
106 #endif
int DrawButtons(void) const
Definition: evGUIWizardPanel.h:100
evGUIWizardPanelCallback Callback
Definition: evGUIWizardPanel.h:57
int DoCallback(void)
Definition: evGUIWizardPanel.h:86
Definition: evGUIWizardPanel.h:37
int NoButtons
Definition: evGUIWizardPanel.h:59
evGUIWizardPanel(const int x, const int y, const int width, const int height)
Definition: evGUIWizardPanel.h:63
virtual ~evGUIWizardPanel(void)
Definition: evGUIWizardPanel.h:72
void * CallbackData
Definition: evGUIWizardPanel.h:58
virtual const evString GetClassName(void) const
Definition: evGUIWizardPanel.h:43
Definition: evGUIObject.h:33
void SetCallback(evGUIWizardPanelCallback callback, void *data)
Definition: evGUIWizardPanel.h:77
void SetNoButtons(void)
Definition: evGUIWizardPanel.h:94
Definition: evString.h:30
int(* evGUIWizardPanelCallback)(evGUIWizardPanel *panel, void *data)
Definition: evGUIWizardPanel.h:34