26 #ifndef SAGA2_BUTTON_H 27 #define SAGA2_BUTTON_H 29 #include "saga2/panel.h" 30 #include "saga2/cmisc.h" 31 #include "saga2/floating.h" 32 #include "saga2/idtypes.h" 64 dlPen = urPen = inPen = dlHilitePen = urHilitePen = inHilitePen = 0;
67 textPallete(uint8 dlP, uint8 urP, uint8 inP, uint8 dlHP, uint8 urHP, uint8 inHP) {
68 set(dlP, urP, inP, dlHP, urHP, inHP);
75 dlHilitePen = pal.dlHilitePen;
76 urHilitePen = pal.urHilitePen;
77 inHilitePen = pal.inHilitePen;
80 void set(uint8 dlP, uint8 urP, uint8 inP, uint8 dlHP, uint8 urHP, uint8 inHP) {
105 uint16 _currentImage;
111 virtual void *getCurrentCompImage();
128 uint16, AppFunc *cmd = NULL);
131 const char *,
textPallete &, uint16, AppFunc *cmd = NULL);
136 char a,
char b,
char c,
143 const char *,
textPallete &, uint16, AppFunc *cmd = NULL);
149 void invalidate(
Rect16 *unused =
nullptr);
151 return _currentImage;
159 void setCurrent(uint16 val) {
160 _currentImage = clamp(_min, val, _max);
162 void setExtent(
const Rect16 &rect);
163 void select(uint16 val);
164 void select(uint16 val,
const Rect16 &rect);
165 void setImages(
void **images);
166 void setImage(
void *image);
169 virtual void drawClipped(
gPort &,
178 ColorTable _objColors;
186 uint16, AppFunc *cmd = NULL);
189 void drawClipped(
gPort &,
210 uint16, AppFunc *cmd = NULL);
213 uint16, AppFunc *cmd = NULL);
216 uint16, AppFunc *cmd = NULL);
219 uint16, AppFunc *cmd = NULL);
222 uint16, AppFunc *cmd = NULL);
225 uint16, AppFunc *cmd = NULL);
228 uint16, AppFunc *cmd = NULL);
231 uint16, AppFunc *cmd = NULL);
234 const char *,
textPallete &, uint16, AppFunc *cmd = NULL);
237 uint16, AppFunc *cmd = NULL);
240 uint16, AppFunc *cmd = NULL);
243 const char *,
textPallete &, uint16, AppFunc *cmd = NULL);
250 bool activate(gEventType why);
254 void invalidate(
Rect16 *unused =
nullptr);
258 void setForImage(
void *image) {
259 if (image) _forImage = image;
261 void setResImage(
void *image) {
262 if (image) _resImage = image;
266 void loadImages(
hResContext *con, hResID res1, hResID res2);
267 void loadImages(uint32 contextID, hResID res1, hResID res2);
274 virtual void *getCurrentCompImage();
286 uint16, AppFunc *cmd = NULL);
289 bool activate(gEventType why);
291 void select(uint16 val);
312 uint16, AppFunc *cmd = NULL);
315 uint16, AppFunc *cmd = NULL);
319 uint16, AppFunc *cmd = NULL);
332 void setCurrent(int16 val) {
333 _current = clamp(_min, val, _max);
335 void setImages(
void **newImages) {
336 if (_images && newImages)
339 void setResponse(
bool resp) {
344 bool activate(gEventType why);
346 virtual void *getCurrentCompImage();
364 void **, int16, int16,
365 uint16, AppFunc *cmd = NULL);
368 bool activate(gEventType why);
374 void updateSliderIndexes(
Point16 &pos);
375 void drawClipped(
gPort &port,
380 void setSliderCurrent(int16 val) {
383 int16 getSliderCurrent() {
386 int16 getSliderLenVal();
387 virtual void *getCurrentCompImage();
396 void drawCompressedImageToMap(
gPixelMap &map,
void *image);
398 void writePlaqText(
gPort &port,
404 const char *msg, ...);
407 void writePlaqTextPos(
gPort &port,
413 const char *msg, ...);
Definition: objects.h:118