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,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 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  void readRegistry();
52  void writeRegistry();
53 private:
55  FXColorDialog &operator=(const FXColorDialog&);
56 public:
57  long onChgColor(FXObject*,FXSelector,void*);
58  long onCmdColor(FXObject*,FXSelector,void*);
59  long onCmdSetIntValue(FXObject*,FXSelector,void*);
60  long onCmdGetIntValue(FXObject*,FXSelector,void*);
61 public:
62  enum {
63  ID_COLORSELECTOR=FXDialogBox::ID_LAST,
64  ID_LAST
65  };
66 public:
67 
69  FXColorDialog(FXWindow* owner,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
70 
72  FXColorDialog(FXApp* a,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
73 
75  virtual void create();
76 
78  virtual void destroy();
79 
81  void setRGBA(FXColor clr);
82 
84  FXColor getRGBA() const;
85 
87  void setActivePanel(FXint pnl=COLORTAB_COLOR_RING);
88 
90  FXint getActivePanel() const;
91 
93  void setWellColor(FXint w,FXColor clr);
94 
96  FXColor getWellColor(FXint w) const;
97 
99  void setOpaqueOnly(FXbool forceopaque);
100 
102  FXbool isOpaqueOnly() const;
103 
105  virtual void save(FXStream& store) const;
106 
108  virtual void load(FXStream& store);
109 
111  virtual ~FXColorDialog();
112  };
113 
114 }
115 
116 #endif
DialogBox window.
Definition: FXDialogBox.h:37
The Color dialog is a standard dialog panel used to edit colors.
Definition: FXColorDialog.h:43
Window is the base class for all widgets in FOX.
Definition: FXWindow.h:130
The Application object is the central point of a FOX user-interface.
Definition: FXApp.h:134
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
Definition: FX4Splitter.h:28
Color selection widget.
Definition: FXColorSelector.h:56
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:138
Closes the dialog, accept the entry.
Definition: FXDialogBox.h:51
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42

Copyright © 1997-2022 Jeroen van der Zijp