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,2024 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
DialogBox window.
Definition: FXDialogBox.h:37
Window is the base class for all widgets in FOX.
Definition: FXWindow.h:130
A button provides a push button, with optional icon and/or text label.
Definition: FXButton.h:70
The Application object is the central point of a FOX user-interface.
Definition: FXApp.h:134
Horizontal frame layout manager widget is used to automatically place child-windows horizontally from...
Definition: FXHorizontalFrame.h:36
The Switcher layout manager automatically arranges its child windows such that one of them is placed ...
Definition: FXSwitcher.h:52
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
FXButton * advanceButton() const
Return a pointer to the "Advance" button.
Definition: FXWizard.h:88
FXButton * retreatButton() const
Return a pointer to the "Retreat" button.
Definition: FXWizard.h:91
Definition: FX4Splitter.h:28
An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask ...
Definition: FXIcon.h:42
A Wizard widget guides the user through a number of panels in a predefined sequence; each step must b...
Definition: FXWizard.h:45
FXHorizontalFrame * buttonFrame() const
Return a pointer to the button frame.
Definition: FXWizard.h:85
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:138
The image frame is a simple frame widget displaying an image; the image is not owned by the image fra...
Definition: FXImageFrame.h:36
An Image is a rectangular array of pixels.
Definition: FXImage.h:67
FXButton * finishButton() const
Return a pointer to the "Finish" button.
Definition: FXWizard.h:94
Closes the dialog, accept the entry.
Definition: FXDialogBox.h:51
FXButton * cancelButton() const
Return a pointer to the "Cancel" button.
Definition: FXWizard.h:97
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42
FXSwitcher * getContainer() const
Return the container used as parent for the subpanels.
Definition: FXWizard.h:100

Copyright © 1997-2022 Jeroen van der Zijp