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

FXProgressDialog.h
1 /********************************************************************************
2 * *
3 * P r o g r e s s D i a l o g B o x *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2001,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 FXPROGRESSDIALOG_H
22 #define FXPROGRESSDIALOG_H
23 
24 #ifndef FXDIALOGBOX_H
25 #include "FXDialogBox.h"
26 #endif
27 
28 namespace FX {
29 
30 
32 enum {
33  PROGRESSDIALOG_NOCANCEL = 0,
34  PROGRESSDIALOG_CANCEL = 0x02000000,
35  PROGRESSDIALOG_NORMAL = (DECOR_TITLE|DECOR_BORDER)
36  };
37 
38 
39 class FXHorizontalSeparator;
40 class FXProgressBar;
41 class FXButton;
42 class FXLabel;
43 
51 class FXAPI FXProgressDialog : public FXDialogBox {
52  FXDECLARE(FXProgressDialog)
53 protected:
54  FXProgressBar *progress; // Progress bar
55  FXLabel *message; // Message
56  FXHorizontalSeparator *separator; // Separator
57  FXButton *cancel; // Cancel button
58  FXbool cancelled; // User hit cancel
59 protected:
61 private:
63  FXProgressDialog &operator=(const FXProgressDialog&);
64 public:
65  long onCmdSetValue(FXObject*,FXSelector,void*);
66  long onCmdSetIntValue(FXObject*,FXSelector,void*);
67  long onCmdGetIntValue(FXObject*,FXSelector,void*);
68  long onCmdSetLongValue(FXObject*,FXSelector,void*);
69  long onCmdGetLongValue(FXObject*,FXSelector,void*);
70  long onCmdSetIntRange(FXObject*,FXSelector,void*);
71  long onCmdGetIntRange(FXObject*,FXSelector,void*);
72  long onCmdSetStringValue(FXObject*,FXSelector,void*);
73  long onCmdGetStringValue(FXObject*,FXSelector,void*);
74  long onCmdCancel(FXObject*,FXSelector,void*);
75 public:
76 
78  FXProgressDialog(FXWindow* owner,const FXString& caption,const FXString& label,FXuint opts=PROGRESSDIALOG_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
79 
81  void setMessage(const FXString& msg);
82 
84  FXString getMessage() const;
85 
87  void setBarStyle(FXuint style);
88 
90  FXuint getBarStyle() const;
91 
93  void setProgress(FXuint value);
94 
96  FXuint getProgress() const;
97 
99  void setTotal(FXuint value);
100 
102  FXuint getTotal() const;
103 
105  void increment(FXuint value);
106 
108  FXbool isCancelled() const;
109 
111  void setCancelled(FXbool flg);
112 
114  virtual ~FXProgressDialog();
115  };
116 
117 }
118 
119 #endif
DialogBox window.
Definition: FXDialogBox.h:37
A label widget can be used to place a text and/or icon for explanation purposes.
Definition: FXLabel.h:64
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
Horizontal separator widget.
Definition: FXSeparator.h:77
Definition: FX4Splitter.h:28
A Progress Dialog is a simple dialog which is used to keep a user informed of the progress of a lengt...
Definition: FXProgressDialog.h:51
Progress bar widget.
Definition: FXProgressBar.h:42
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:134
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42

Copyright © 1997-2022 Jeroen van der Zijp