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

FXColorDialog.h
1 /********************************************************************************
2 * *
3 * C o l o r D i a l o g *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1998,2017 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 FXCOLORDIALOG_H
22 #define FXCOLORDIALOG_H
23 
24 #ifndef FXDIALOGBOX_H
25 #include "FXDialogBox.h"
26 #endif
27 
28 namespace FX {
29 
30 
31 class FXColorSelector;
32 
33 
43 class FXAPI FXColorDialog : public FXDialogBox {
44  FXDECLARE(FXColorDialog)
45 protected:
46  FXColorSelector *colorbox;
47 protected:
48  static const FXchar sectionName[];
49 protected:
50  FXColorDialog(){}
51 private:
53  FXColorDialog &operator=(const FXColorDialog&);
54 public:
55  long onChgColor(FXObject*,FXSelector,void*);
56  long onCmdColor(FXObject*,FXSelector,void*);
57  long onCmdSetIntValue(FXObject*,FXSelector,void*);
58  long onCmdGetIntValue(FXObject*,FXSelector,void*);
59 public:
60  enum {
61  ID_COLORSELECTOR=FXDialogBox::ID_LAST,
62  ID_LAST
63  };
64 public:
65 
67  FXColorDialog(FXWindow* owner,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
68 
70  FXColorDialog(FXApp* a,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
71 
73  virtual void create();
74 
76  virtual void destroy();
77 
79  void setRGBA(FXColor clr);
80 
82  FXColor getRGBA() const;
83 
85  void setActivePanel(FXint pnl=COLORTAB_COLOR_RING);
86 
88  FXint getActivePanel() const;
89 
91  void setWellColor(FXint w,FXColor clr);
92 
94  FXColor getWellColor(FXint w) const;
95 
97  void setOpaqueOnly(FXbool forceopaque);
98 
100  FXbool isOpaqueOnly() const;
101 
103  virtual void save(FXStream& store) const;
104 
106  virtual void load(FXStream& store);
107 
109  virtual ~FXColorDialog();
110  };
111 
112 }
113 
114 #endif

Copyright © 1997-2016 Jeroen van der Zijp