1 | #ifndef AW_PRESET_HXX |
---|
2 | #define AW_PRESET_HXX |
---|
3 | |
---|
4 | #ifndef ATTRIBUTES_H |
---|
5 | #include <attributes.h> |
---|
6 | #endif |
---|
7 | |
---|
8 | #define AWP_COLORNAME_TEMPLATE "GCS/%s/MANAGE_GCS/%s/colorname" |
---|
9 | #define AWP_FONTNAME_TEMPLATE "GCS/%s/MANAGE_GCS/%s/font" |
---|
10 | #define AWP_FONTSIZE_TEMPLATE "GCS/%s/MANAGE_GCS/%s/size" |
---|
11 | |
---|
12 | void AW_save_defaults( AW_window *aw ); // use this if you're unsure |
---|
13 | void AW_save_specific_defaults( AW_window *aw, const char *filename); |
---|
14 | |
---|
15 | AW_window *AW_preset_window( AW_root *root ); |
---|
16 | |
---|
17 | typedef enum { |
---|
18 | AW_GCM_DATA_AREA, |
---|
19 | AW_GCM_WINDOW_AREA |
---|
20 | } AW_GCM_AREA; |
---|
21 | |
---|
22 | AW_gc_manager AW_manage_GC(AW_window *aww, |
---|
23 | AW_device *device, int base_gc, int base_drag, AW_GCM_AREA area, |
---|
24 | void (*changecb)(AW_window*,AW_CL,AW_CL), AW_CL cd1, AW_CL cd2, |
---|
25 | bool define_color_groups, |
---|
26 | const char *default_background_color, |
---|
27 | ...) __ATTR__SENTINEL; |
---|
28 | /* creates some GC pairs: one for normal operation, |
---|
29 | the other for drag mode |
---|
30 | eg. |
---|
31 | AW_manage_GC(aww,device,10,20,AW_GCM_DATA_AREA, my_expose_cb, cd1 ,cd2, "name","#sequence",NULL); |
---|
32 | |
---|
33 | (see implementation for more details on parameter strings) |
---|
34 | |
---|
35 | will create 4 GCs: |
---|
36 | GC 10 (normal) and 20 (drag) |
---|
37 | GC 11 (normal and monospaced (indicated by '#') |
---|
38 | 21 drag and monospaced |
---|
39 | don't forget the 0 at the end of the fontname field |
---|
40 | |
---|
41 | When the GCs are modified the 'changecb' is called |
---|
42 | */ |
---|
43 | |
---|
44 | AW_window *AW_create_gc_window(AW_root *aw_root, AW_gc_manager id); /* opens the properties Window */ |
---|
45 | |
---|
46 | // same as AW_create_gc_window, but uses different window id and name |
---|
47 | // (use if if there are two or more color def windows in one application, |
---|
48 | // otherwise they save the same window properties) |
---|
49 | AW_window *AW_create_gc_window_named(AW_root * aw_root, AW_gc_manager id_par, const char *wid, const char *windowname); |
---|
50 | |
---|
51 | |
---|
52 | void AW_preset_create_font_chooser(AW_window *aws, const char *awar, const char *label,bool message_reload = false); |
---|
53 | void AW_preset_create_scale_chooser(AW_window *aws, const char *awar, const char *label); |
---|
54 | void AW_preset_create_color_chooser(AW_window *aws, const char *awar, const char *label,bool message_reload = false, bool show_label = false); |
---|
55 | |
---|
56 | void AW_copy_GCs(AW_root *aw_root, const char *source_window, const char *dest_window, AW_BOOL has_font_info, const char *id0, ...) __ATTR__SENTINEL; |
---|
57 | |
---|
58 | #else |
---|
59 | #error aw_preset.hxx included twice |
---|
60 | #endif |
---|