Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXWizard.h
1 /********************************************************************************
2 * *
3 * W i z a r d W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2002,2017 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXWIZARD_H
22 #define FXWIZARD_H
23 
24 #ifndef FXDIALOGBOX_H
25 #include "FXDialogBox.h"
26 #endif
27 
28 namespace FX {
29 
30 
31 class FXImage;
32 class FXIcon;
33 class FXImageFrame;
34 class FXButton;
35 class FXSwitcher;
36 
37 
45 class FXAPI FXWizard : public FXDialogBox {
46  FXDECLARE(FXWizard)
47 protected:
48  FXHorizontalFrame *buttons; // Button frame
49  FXImageFrame *sidebar; // Sidebar comprising image
50  FXButton *advance; // Advance to next stage
51  FXButton *retreat; // Retreat to last stage
52  FXButton *finish; // Finish panel
53  FXButton *cancel; // Cancel button
54  FXSwitcher *panels; // Sub panels
55  FXIcon *finishicon;
56  FXIcon *nexticon;
57  FXIcon *backicon;
58 protected:
59  FXWizard(){}
60  void construct();
61 private:
62  FXWizard(const FXWizard&);
63  FXWizard &operator=(const FXWizard&);
64 public:
65  long onUpdFinish(FXObject*,FXSelector,void*);
66  long onCmdNext(FXObject*,FXSelector,void*);
67  long onUpdNext(FXObject*,FXSelector,void*);
68  long onCmdBack(FXObject*,FXSelector,void*);
69  long onUpdBack(FXObject*,FXSelector,void*);
70 public:
71  enum {
72  ID_NEXT=FXDialogBox::ID_LAST,
73  ID_BACK,
74  ID_LAST
75  };
76 public:
77 
79  FXWizard(FXApp* a,const FXString& name,FXImage *image,FXuint opts=DECOR_TITLE|DECOR_BORDER|DECOR_RESIZE,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=10,FXint pr=10,FXint pt=10,FXint pb=10,FXint hs=10,FXint vs=10);
80 
82  FXWizard(FXWindow* owner,const FXString& name,FXImage *image,FXuint opts=DECOR_TITLE|DECOR_BORDER|DECOR_RESIZE,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=10,FXint pr=10,FXint pt=10,FXint pb=10,FXint hs=10,FXint vs=10);
83 
85  FXHorizontalFrame *buttonFrame() const { return buttons; }
86 
88  FXButton *advanceButton() const { return advance; }
89 
91  FXButton *retreatButton() const { return retreat; }
92 
94  FXButton *finishButton() const { return finish; }
95 
97  FXButton *cancelButton() const { return cancel; }
98 
100  FXSwitcher *getContainer() const { return panels; }
101 
103  void setImage(FXImage* img);
104 
106  FXImage* getImage() const;
107 
109  FXint getNumPanels() const;
110 
112  void setCurrentPanel(FXint index);
113 
115  FXint getCurrentPanel() const;
116 
118  virtual void save(FXStream& store) const;
119 
121  virtual void load(FXStream& store);
122 
123  // Destroy
124  virtual ~FXWizard();
125  };
126 
127 }
128 
129 #endif

Copyright © 1997-2016 Jeroen van der Zijp