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

FXFileProgressDialog.h
1 /********************************************************************************
2 * *
3 * F i l e P r o g r e s s D i a l o g *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2016,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 FXFILEPROGRESSDIALOG_H
22 #define FXFILEPROGRESSDIALOG_H
23 
24 #ifndef FXDIALOGBOX_H
25 #include "FXDialogBox.h"
26 #endif
27 
28 namespace FX {
29 
30 
31 class FXHorizontalSeparator;
32 class FXProgressBar;
33 class FXLabel;
34 class FXIcon;
35 
39 class FXAPI FXFileProgressDialog : public FXDialogBox {
40  FXDECLARE(FXFileProgressDialog)
41 protected:
42  FXProgressBar *progress; // Progress bar
43  FXLabel *activitylabel; // Label describing ongoing activity
44  FXLabel *originlabel; // Original file name
45  FXLabel *targetlabel; // Target file name
46  FXLabel *byteslabel; // Bytes copied thus far
47  FXLabel *fileslabel; // Files copied thus far
48  FXLabel *originfile; // Origin file name
49  FXLabel *targetfile; // Target file name
50  FXLabel *numbytes; // Number of bytes
51  FXLabel *numfiles; // Number of files
52  FXbool cancelled; // Cancelled button was pressed
53 protected:
55 private:
57  FXFileProgressDialog &operator=(const FXFileProgressDialog&);
58 public:
59  long onCmdCancel(FXObject*,FXSelector,void*);
60 public:
61 
63  FXFileProgressDialog(FXWindow* owner,const FXString& caption,const FXString& label,FXIcon* ico=nullptr,FXuint opts=DECOR_TITLE|DECOR_BORDER|DECOR_RESIZE,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
64 
66  void setProgress(FXuint value);
67 
69  FXuint getProgress() const;
70 
72  void setTotal(FXuint value);
73 
75  FXuint getTotal() const;
76 
78  void increment(FXuint value);
79 
81  void setActivityText(const FXString& text);
82 
84  void setActivityIcon(FXIcon* ico);
85 
87  void setOriginFile(const FXString& fn);
88 
90  void setTargetFile(const FXString& fn);
91 
93  void setNumBytes(FXlong num);
94 
96  void setNumFiles(FXlong num);
97 
99  void setCancelled(FXbool flg);
100 
102  FXbool isCancelled() const;
103 
105  virtual ~FXFileProgressDialog();
106  };
107 
108 }
109 
110 #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
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
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
File Progress Dialog.
Definition: FXFileProgressDialog.h:39
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42

Copyright © 1997-2022 Jeroen van der Zijp