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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXProgressDialog.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                      P r o g r e s s   D i a l o g   B o x                    *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2001,2012 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (at your option) any later version.                                           *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXPROGRESSDIALOG_H
00022 #define FXPROGRESSDIALOG_H
00023 
00024 #ifndef FXDIALOGBOX_H
00025 #include "FXDialogBox.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00031 enum {
00032   PROGRESSDIALOG_NOCANCEL = 0,                        
00033   PROGRESSDIALOG_CANCEL   = 0x02000000,               
00034   PROGRESSDIALOG_NORMAL   = (DECOR_TITLE|DECOR_BORDER)
00035   };
00036 
00037 
00038 class FXHorizontalSeparator;
00039 class FXProgressBar;
00040 class FXButton;
00041 class FXLabel;
00042 
00050 class FXAPI FXProgressDialog : public FXDialogBox {
00051   FXDECLARE(FXProgressDialog)
00052 protected:
00053   FXProgressBar         *progress;    // Progress bar
00054   FXLabel               *message;     // Message
00055   FXHorizontalSeparator *separator;   // Separator
00056   FXButton              *cancel;      // Cancel button
00057   FXbool                 cancelled;   // User hit cancel
00058 protected:
00059   FXProgressDialog();
00060 private:
00061   FXProgressDialog(const FXProgressDialog&);
00062   FXProgressDialog &operator=(const FXProgressDialog&);
00063 public:
00064   long onCmdSetValue(FXObject*,FXSelector,void*);
00065   long onCmdSetIntValue(FXObject*,FXSelector,void*);
00066   long onCmdGetIntValue(FXObject*,FXSelector,void*);
00067   long onCmdSetLongValue(FXObject*,FXSelector,void*);
00068   long onCmdGetLongValue(FXObject*,FXSelector,void*);
00069   long onCmdSetIntRange(FXObject*,FXSelector,void*);
00070   long onCmdGetIntRange(FXObject*,FXSelector,void*);
00071   long onCmdSetStringValue(FXObject*,FXSelector,void*);
00072   long onCmdGetStringValue(FXObject*,FXSelector,void*);
00073   long onCmdCancel(FXObject*,FXSelector,void*);
00074 public:
00075 
00077   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);
00078 
00080   void setMessage(const FXString& msg);
00081 
00083   FXString getMessage() const;
00084 
00086   void setBarStyle(FXuint style);
00087 
00089   FXuint getBarStyle() const;
00090 
00092   void setProgress(FXuint value);
00093 
00095   FXuint getProgress() const;
00096 
00098   void setTotal(FXuint value);
00099 
00101   FXuint getTotal() const;
00102 
00104   void increment(FXuint value);
00105 
00107   FXbool isCancelled() const;
00108 
00110   void setCancelled(FXbool flg);
00111 
00113   virtual ~FXProgressDialog();
00114   };
00115 
00116 }
00117 
00118 #endif

Copyright © 1997-2011 Jeroen van der Zijp