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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXColorDialog.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                           C o l o r   D i a l o g                             *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1998,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 FXCOLORDIALOG_H
00022 #define FXCOLORDIALOG_H
00023 
00024 #ifndef FXDIALOGBOX_H
00025 #include "FXDialogBox.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00031 class FXColorSelector;
00032 
00033 
00043 class FXAPI FXColorDialog : public FXDialogBox {
00044   FXDECLARE(FXColorDialog)
00045 protected:
00046   FXColorSelector *colorbox;
00047 protected:
00048   FXColorDialog(){}
00049 private:
00050   FXColorDialog(const FXColorDialog&);
00051   FXColorDialog &operator=(const FXColorDialog&);
00052 public:
00053   long onChgColor(FXObject*,FXSelector,void*);
00054   long onCmdColor(FXObject*,FXSelector,void*);
00055   long onCmdSetIntValue(FXObject*,FXSelector,void*);
00056   long onCmdGetIntValue(FXObject*,FXSelector,void*);
00057 public:
00058   enum {
00059     ID_COLORSELECTOR=FXDialogBox::ID_LAST,
00060     ID_LAST
00061     };
00062 public:
00063 
00065   FXColorDialog(FXWindow* owner,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00066 
00068   FXColorDialog(FXApp* a,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00069 
00071   virtual void create();
00072 
00074   virtual void destroy();
00075 
00077   void setRGBA(FXColor clr);
00078 
00080   FXColor getRGBA() const;
00081 
00083   void setActivePanel(FXint pnl=COLORTAB_COLOR_RING);
00084 
00086   FXint getActivePanel() const;
00087 
00089   void setWellColor(FXint w,FXColor clr);
00090 
00092   FXColor getWellColor(FXint w) const;
00093 
00095   void setOpaqueOnly(FXbool forceopaque);
00096 
00098   FXbool isOpaqueOnly() const;
00099 
00101   virtual void save(FXStream& store) const;
00102 
00104   virtual void load(FXStream& store);
00105 
00107   virtual ~FXColorDialog();
00108   };
00109 
00110 }
00111 
00112 #endif

Copyright © 1997-2011 Jeroen van der Zijp