Evita  0.16
evGUIWizard.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 __evGUIWizard_h
25 #define __evGUIWizard_h
26 
27 
28 #include <vector>
29 
30 #include <FL/Fl_Box.H>
31 #include <FL/Fl_Button.H>
32 
33 #include "evGUIObject.h"
34 #include "evGUIWizardPanel.h"
35 
36 
37 #define EVGUIWIZARD_BUTTON_WIDTH 70
38 #define EVGUIWIZARD_BUTTON_HEIGHT 20
39 
40 class evGUIWizard : public evGUIObject, public Fl_Group
41 {
42 public:
43  evGUIWizard(const int x, const int y, const int width, const int height);
44  virtual ~evGUIWizard(void);
45 
46  virtual const evString GetClassName(void) const
47  {
48  return(evString("evGUIWizard"));
49  }
50 
51  void AddPanel(evGUIWizardPanel *panel);
52  void Next(void);
53 
54 protected:
55 
56 private:
57  Fl_Button *QuitButton;
58  Fl_Button *FinishButton;
59  Fl_Button *NextButton;
60  Fl_Button *BackButton;
61 
62  unsigned int CurrentPanel;
63  std::vector<evGUIWizardPanel *> Panels;
64 
65  void UpdateButtons(void);
66  static void NextCallback(Fl_Widget *widget, void *data);
67  static void BackCallback(Fl_Widget *widget, void *data);
68  static void QuitCallback(Fl_Widget *widget, void *data);
69 };
70 
71 
72 inline void evGUIWizard::Next(void)
73 {
74  this->NextCallback(NULL, (void *)this);
75 }
76 
77 
78 inline void evGUIWizard::QuitCallback(Fl_Widget *widget, void *data)
79 {
80  evExit;
81 }
82 
83 
84 #endif
Fl_Button * QuitButton
Definition: evGUIWizard.h:57
std::vector< evGUIWizardPanel * > Panels
Definition: evGUIWizard.h:63
evGUIWizard(const int x, const int y, const int width, const int height)
Definition: evGUIWizardPanel.h:37
virtual ~evGUIWizard(void)
unsigned int CurrentPanel
Definition: evGUIWizard.h:62
static void QuitCallback(Fl_Widget *widget, void *data)
Definition: evGUIWizard.h:78
void Next(void)
Definition: evGUIWizard.h:72
virtual const evString GetClassName(void) const
Definition: evGUIWizard.h:46
static void BackCallback(Fl_Widget *widget, void *data)
Fl_Button * FinishButton
Definition: evGUIWizard.h:58
void UpdateButtons(void)
Fl_Button * BackButton
Definition: evGUIWizard.h:60
Definition: evGUIObject.h:33
static void NextCallback(Fl_Widget *widget, void *data)
void AddPanel(evGUIWizardPanel *panel)
Definition: evGUIWizard.h:40
Fl_Button * NextButton
Definition: evGUIWizard.h:59
#define evExit
Definition: evMiscRoutines.h:27
Definition: evString.h:30