| 1 |
#ifndef ICONS_H_ |
| 2 |
#define ICONS_H_ |
| 3 |
|
| 4 |
#define USE_IMAGE_LABELS 1 |
| 5 |
|
| 6 |
#include <FL/Fl_Widget.H> |
| 7 |
#include <FL/Fl_Menu_Item.H> |
| 8 |
#include <FL/fl_ask.H> |
| 9 |
#include "pixmaps.h" |
| 10 |
|
| 11 |
namespace icons { |
| 12 |
|
| 13 |
const char* make_icon_label(const char* text, const char** pixmap = 0); |
| 14 |
|
| 15 |
void set_icon_label(Fl_Menu_Item* item); |
| 16 |
void set_icon_label(Fl_Widget* w); |
| 17 |
|
| 18 |
void toggle_icon_labels(void); |
| 19 |
|
| 20 |
const char* get_icon_label_text(Fl_Menu_Item* item); |
| 21 |
const char* get_icon_label_text(Fl_Widget* w); |
| 22 |
|
| 23 |
void free_icon_label(Fl_Menu_Item* item); |
| 24 |
void free_icon_label(Fl_Widget* w); |
| 25 |
|
| 26 |
void set_active(Fl_Menu_Item* item, bool v); |
| 27 |
void set_active(Fl_Widget* w, bool v); |
| 28 |
|
| 29 |
// fltk message dialogs with nicer icons |
| 30 |
void set_message_icon(const char** pixmap); |
| 31 |
|
| 32 |
} |
| 33 |
#define fl_input2(...) ({ icons::set_message_icon(dialog_question_48_icon); fl_input(__VA_ARGS__); }) |
| 34 |
#define fl_choice2(...) ({ icons::set_message_icon(dialog_question_48_icon); fl_choice(__VA_ARGS__); }) |
| 35 |
#define fl_message2(...) ({ icons::set_message_icon(dialog_information_48_icon); fl_message(__VA_ARGS__); }) |
| 36 |
#define fl_alert2(...) ({ icons::set_message_icon(dialog_warning_48_icon); fl_alert(__VA_ARGS__); }) |
| 37 |
#define fl_warn_choice2(...) ({ icons::set_message_icon(dialog_warning_48_icon); fl_choice(__VA_ARGS__); }) |
| 38 |
|
| 39 |
|
| 40 |
#endif // ICONS_H_ |