gwenhywfar  5.11.1beta
theme.h
Go to the documentation of this file.
1 
2 /* These widgets have initially been created by Martin Oberzalek who gave them into
3  * the public domain via an email to the mailing list foxgui-users on 17th of June, 2010
4  * ("here the source. Free to use for alll.").
5  * I (Martin Preuss) adapted them to be usable with FOX 1.6 and also added some widgets of
6  * my own (for now: ThemeHeaderItem).
7  */
8 
9 #ifndef THEME_H
10 #define THEME_H
11 
12 #include <fx.h>
13 
20 
21 
22 
23 #define THEMEBUTTON ThemeButton
24 #define THEMETEXTFIELD ThemeTextField
25 #define THEMECOMBOBOX ThemeComboBox
26 #define THEMELABEL ThemeLabel
27 #define THEMEVERTICALFRAME ThemeVerticalFrame
28 #define THEMEHORIZONTALFRAME ThemeHorizontalFrame
29 #define THEMEMENUBUTTON ThemeMenuButton
30 #define THEMEHEADERITEM ThemeHeaderItem
31 #define THEMETABITEM ThemeTabItem
32 
33 
34 
35 class FOX16GUI_API ThemeButton : public FXButton {
36  FXDECLARE(ThemeButton);
37 
38 protected:
40 
41 public:
42  ThemeButton(FXComposite *p, const FXString &text, FXIcon *ic=NULL,
43  FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=BUTTON_NORMAL,
44  FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD,
45  FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD);
46 
47  long onPaint(FXObject *, FXSelector, void *ptr);
48 };
49 
50 
51 
52 class FOX16GUI_API ThemeTextField : public FXTextField {
53  FXDECLARE(ThemeTextField);
54 
55 protected:
57 
58 public:
59  ThemeTextField(FXComposite *p, FXint ncols, FXObject *tgt=NULL, FXSelector sel=0,
60  FXuint opts=TEXTFIELD_NORMAL, FXint x=0, FXint y=0, FXint w=0,
61  FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD);
62 
63  long onPaint(FXObject *, FXSelector, void *ptr);
64 
65 protected:
66  void drawFrame(FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h);
67 };
68 
69 
70 
71 
72 FOX16GUI_API void init_theme(FXApp *app);
73 
74 
75 
76 
77 class FOX16GUI_API ThemeComboBox : public FXComboBox {
78  FXDECLARE(ThemeComboBox);
79 
80 protected:
82 
83 public:
84  ThemeComboBox(FXComposite *p, FXint cols, FXObject *tgt=NULL, FXSelector sel=0,
85  FXuint opts=COMBOBOX_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0,
86  FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD);
87 
88  long onPaint(FXObject *, FXSelector, void *ptr);
89 };
90 
91 
92 
93 
94 class FOX16GUI_API ThemeLabel : public FXLabel {
95  FXDECLARE(ThemeLabel);
96 
97 protected:
99 
100 public:
101  ThemeLabel(FXComposite *p, const FXString &text, FXIcon *ic=0, FXuint opts=LABEL_NORMAL,
102  FXint x=0, FXint y=0, FXint w=0, FXint h=0,
103  FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD);
104 
105  long onPaint(FXObject *, FXSelector, void *ptr);
106 };
107 
108 
109 
110 
111 class FOX16GUI_API ThemeTabItem : public FXTabItem {
112  FXDECLARE(ThemeTabItem);
113 
114 protected:
116 
117 public:
118  ThemeTabItem(FXTabBar *p, const FXString &text, FXIcon *ic=0,
119  FXuint opts=TAB_TOP_NORMAL,
120  FXint x=0, FXint y=0, FXint w=0, FXint h=0,
121  FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD,
122  FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD);
123 };
124 
125 
126 
127 
128 class FOX16GUI_API ThemeVerticalFrame : public FXVerticalFrame {
129 protected:
131 
132 public:
133  ThemeVerticalFrame(FXComposite *p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0,
134  FXint pl=DEFAULT_SPACING, FXint pr=DEFAULT_SPACING, FXint pt=DEFAULT_SPACING,
135  FXint pb=DEFAULT_SPACING, FXint hs=DEFAULT_SPACING, FXint vs=DEFAULT_SPACING);
136 };
137 
138 
139 
140 
141 class FOX16GUI_API ThemeHorizontalFrame : public FXHorizontalFrame {
142 protected:
144 
145 public:
146  ThemeHorizontalFrame(FXComposite *p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint
147  pl=DEFAULT_SPACING, FXint pr=DEFAULT_SPACING, FXint pt=DEFAULT_SPACING,
148  FXint pb=DEFAULT_SPACING, FXint hs=DEFAULT_SPACING, FXint vs=DEFAULT_SPACING);
149 };
150 
151 
152 
153 
154 class FOX16GUI_API ThemeMenuButton : public FXMenuButton {
155  FXDECLARE(ThemeMenuButton);
156 
157 protected:
159 
160 public:
161  ThemeMenuButton(FXComposite *p, const FXString &text, FXIcon *ic=NULL,
162  FXPopup *pup=NULL,
163  FXuint opts=JUSTIFY_NORMAL|ICON_BEFORE_TEXT|MENUBUTTON_DOWN,
164  FXint x=0, FXint y=0, FXint w=0, FXint h=0,
165  FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD,
166  FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD);
167 
168 
169  long onPaint(FXObject *, FXSelector, void *ptr);
170 
172 };
173 
174 
175 
176 class FOX16GUI_API ThemeHeaderItem : public FXHeaderItem {
177 protected:
179 
180 public:
181  ThemeHeaderItem(const FXString &text, FXIcon *ic=NULL, FXint s=0, void *ptr=NULL);
182 
183  void draw(const FXHeader *header, FXDC &dc, FXint x, FXint y, FXint w, FXint h);
184 
185 };
186 
187 
188 
189 #endif
190 
ThemeButton()
Definition: theme.h:39
long onPaint(FXObject *, FXSelector, void *ptr)
ThemeButton(FXComposite *p, const FXString &text, FXIcon *ic=NULL, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
ThemeComboBox(FXComposite *p, FXint cols, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=COMBOBOX_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
long onPaint(FXObject *, FXSelector, void *ptr)
ThemeComboBox()
Definition: theme.h:81
ThemeHeaderItem(const FXString &text, FXIcon *ic=NULL, FXint s=0, void *ptr=NULL)
ThemeHeaderItem()
Definition: theme.h:178
void draw(const FXHeader *header, FXDC &dc, FXint x, FXint y, FXint w, FXint h)
ThemeHorizontalFrame(FXComposite *p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_SPACING, FXint pr=DEFAULT_SPACING, FXint pt=DEFAULT_SPACING, FXint pb=DEFAULT_SPACING, FXint hs=DEFAULT_SPACING, FXint vs=DEFAULT_SPACING)
ThemeLabel(FXComposite *p, const FXString &text, FXIcon *ic=0, FXuint opts=LABEL_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
long onPaint(FXObject *, FXSelector, void *ptr)
ThemeLabel()
Definition: theme.h:98
long onPaint(FXObject *, FXSelector, void *ptr)
ThemeMenuButton(FXComposite *p, const FXString &text, FXIcon *ic=NULL, FXPopup *pup=NULL, FXuint opts=JUSTIFY_NORMAL|ICON_BEFORE_TEXT|MENUBUTTON_DOWN, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
ThemeMenuButton()
Definition: theme.h:158
FXint getDefaultWidth()
ThemeTabItem(FXTabBar *p, const FXString &text, FXIcon *ic=0, FXuint opts=TAB_TOP_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
ThemeTabItem()
Definition: theme.h:115
ThemeTextField()
Definition: theme.h:56
ThemeTextField(FXComposite *p, FXint ncols, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=TEXTFIELD_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
long onPaint(FXObject *, FXSelector, void *ptr)
void drawFrame(FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h)
ThemeVerticalFrame(FXComposite *p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_SPACING, FXint pr=DEFAULT_SPACING, FXint pt=DEFAULT_SPACING, FXint pb=DEFAULT_SPACING, FXint hs=DEFAULT_SPACING, FXint vs=DEFAULT_SPACING)
FOX16GUI_API void init_theme(FXApp *app)