28 class AW_device_click;
29 class AW_device_print;
35 #define AW_MESSAGE_TIME 2000
36 #define AW_HEADER_MAIN extern "C" { int XtAppInitialize(); } void aw_never_called_main() { XtAppInitialize(); }
40 #define TUNE_INPUT (-TUNE_BUTTON)
41 #define TUNE_SUBMENU 0
42 #define TUNE_MENUTOPIC (-12)
43 #define TUNE_BRIGHT (256+30)
44 #define TUNE_DARK (-TUNE_BRIGHT)
117 #define NEVER_RECORDED_ID "___NEVER_MACRO_RECORDED___"
139 const WindowCallback& wcb,
140 const char *help_texti =
NULp,
144 delete next; next =
NULp;
152 int compare(
const AW_cb& other)
const {
return cb<other.cb ? -1 : (other.cb<cb ? 1 : 0); }
154 #if defined(ASSERTION_USED)
168 if (guard_before) guard_before();
171 if (guard_after) guard_after();
172 if (postcb) postcb(aw);
249 WindowCallback *hide_cb;
250 bool expose_callback_added;
257 int left_indent_of_horizontal_scrollbar;
258 int top_indent_of_vertical_scrollbar;
260 const char *layout_reset_wanted;
262 void all_menus_created()
const;
265 int calculate_string_width(
int columns)
const;
266 int calculate_string_height(
int columns,
int offset)
const;
267 char *align_string(
const char *label_text,
int columns);
269 void calculate_label_size(
int *width,
int *height,
bool in_pixel);
294 #if defined(IN_ARB_WINDOW)
296 const AW_at& get_at()
const {
return *_at; }
297 AW_at& get_at() {
return *_at; }
314 void on_hide(
const WindowCallback& call_on_hide);
377 const char *
local_id(
const char *
id)
const;
446 void insert_menu_topic(
const char *
id,
const char *name,
const char *
mnemonic,
const char *help_text_,
AW_active mask,
const CreateWindowCallback& cwcb) {
insert_menu_topic(
id, name, mnemonic, help_text_, mask,
makeWindowPopper(cwcb)); }
447 void insert_menu_topic(
const char *
id,
const char *name,
const char *
mnemonic,
const char *help_text_,
AW_active mask,
WindowCallbackSimple cb) {
insert_menu_topic(
id, name, mnemonic, help_text_, mask, makeWindowCallback(cb)); }
448 void insert_menu_topic(
const char *
id,
const char *name,
const char *
mnemonic,
const char *help_text_,
AW_active mask,
CreateWindowCallbackSimple cb) {
insert_menu_topic(
id, name, mnemonic, help_text_, mask, makeCreateWindowCallback(cb)); }
457 int create_mode(
const char *pixmap,
const char *help_text_,
AW_active mask,
const WindowCallback& cb);
484 #if defined(IN_ARB_WINDOW)
485 void set_window_size(
int width,
int height);
490 #if defined(IN_ARB_WINDOW)
491 void store_size_in_awars(
int width,
int height);
492 void get_size_from_awars(
int& width,
int& height);
495 void set_window_frame_pos(
int xpos,
int ypos);
496 void get_window_content_pos(
int& xpos,
int& ypos);
498 void store_pos_in_awars(
int xpos,
int ypos);
499 void get_pos_from_awars(
int& xpos,
int& ypos);
501 void reset_geometry_awars();
504 void get_screen_size(
int& width,
int& height);
505 bool get_mouse_pos(
int& x,
int&
y);
507 void get_font_size(
int& w,
int& h);
515 void load_xfig(
const char *file,
bool resize=
true);
516 void draw_line(
int x1,
int y1,
int x2,
int y2,
int width,
bool resize);
535 void at(
int x,
int y);
541 void at(
const char *
id);
554 void at_attach_to(
bool attach_x,
bool attach_y,
int xoff,
int yoff);
566 static void popper(
AW_window *, CreateWindowCallback *windowMaker);
567 static void replacer(
AW_window *aww, CreateWindowCallback *windowMaker);
568 static void destroyCreateWindowCallback(CreateWindowCallback *windowMaker);
571 return makeWindowCallback(popper, destroyCreateWindowCallback,
new CreateWindowCallback(cwcb));
574 return makeWindowCallback(replacer, destroyCreateWindowCallback,
new CreateWindowCallback(cwcb));
578 void callback(
const WindowCallback& cb);
591 void create_toggle(
const char *
awar_name);
594 void create_toggle(
const char *
awar_name,
const char *nobitmap,
const char *yesbitmap,
int buttonWidth = 0);
595 void create_text_toggle(
const char *var_name,
const char *noText,
const char *yesText,
int buttonWidth = 0);
607 void insert_option_internal(
AW_label choice_label,
const char *
mnemonic,
const char *var_value,
const char *name_of_color,
bool default_option);
608 void insert_option_internal(
AW_label choice_label,
const char *
mnemonic,
int var_value,
const char *name_of_color,
bool default_option);
609 void insert_option_internal(
AW_label choice_label,
const char *
mnemonic,
float var_value,
const char *name_of_color,
bool default_option);
611 void insert_toggle_internal(
AW_label toggle_label,
const char *
mnemonic,
const char *var_value,
bool default_toggle);
612 void insert_toggle_internal(
AW_label toggle_label,
const char *
mnemonic,
int var_value,
bool default_toggle);
613 void insert_toggle_internal(
AW_label toggle_label,
const char *
mnemonic,
float var_value,
bool default_toggle);
653 void *AW_window_menu_modes_private;
658 void init(
AW_root *root,
const char *wid,
const char *windowname,
int width,
int height);
668 void init(
AW_root *root,
const char *wid,
const char *windowname,
int width,
int height);
676 void init(
AW_root *root,
const char *wid,
const char *windowname);
685 void init(
AW_root *root,
const char *wid,
const char *windowname);
694 void init(
AW_root *root_in,
const char *wid,
const char *windowname,
bool allow_close);
695 void init(
AW_root *root_in,
const char *windowname,
bool allow_close);
701 #error aw_window.hxx included twice
void TuneBackground(Widget w, int modStrength)
void insert_option(AW_label choice_label, const char *mnemonic, const char *var_value, const char *name_of_color=NULp)
bool is_resize_callback(AW_area area, AnyWinCB f)
void update_scrollbar_settings_from_awars(AW_orientation orientation)
AW_device_print * get_print_device(AW_area area)
void refresh_option_menu(AW_option_menu_struct *)
void get_at_position(int *x, int *y) const
void insert_toggle(AW_label toggle_label, const char *mnemonic, const char *var_value)
void set_resize_callback(AW_area area, const WindowCallback &wcb)
void callback(const CreateWindowCallback &cwcb)
void button_length(int length)
AW_pos get_scrolled_picture_height() const
void d_callback(const WindowCallback &cb)
void sens_mask(AW_active mask)
int get_at_xposition() const
AW_device * get_device(AW_area area)
MARK_NONFINAL_CLASS(AW_window_menu_modes)
void insert_menu_topic(const char *id, const char *name, const char *mnemonic, const char *help_text_, AW_active mask, const WindowCallback &wcb)
void(* WindowCallbackSimple)(AW_window *)
void load_xfig(const char *file, bool resize=true)
const char * get_window_id() const
void set_popup_callback(const WindowCallback &wcb)
void update_label(Widget widget, const char *var_value)
void insert_help_topic(const char *labeli, const char *mnemonic, const char *helpText, AW_active mask, WindowCallbackSimple cb)
void reset_scrolled_picture_size()
void on_hide(const WindowCallback &call_on_hide)
void set_vertical_scrollbar_top_indent(int indent)
void _set_activate_callback(void *widget)
AW_cb(AW_window *awi, const WindowCallback &wcb, const char *help_texti=NULp, AW_cb *next=NULp)
AW_window *(* CreateWindowCallbackSimple)(AW_root *)
void callback(CreateWindowCallbackSimple cb)
void set_window_title_intern(char *title)
void(* AW_cb_struct_guard)()
static void set_AW_cb_guards(AW_cb_struct_guard before, AW_cb_struct_guard after)
static WindowCallback makeWindowReplacer(const CreateWindowCallback &cwcb)
void at_shift(int x, int y)
void AW_POPDOWN(AW_window *)
void get_scrollarea_size(AW_screen_area *square)
void set_background(const char *colorname, Widget w)
void init(AW_root *root_in, const char *wid, const char *windowname, bool allow_close)
void allow_delete_window(bool allow_close)
void reset_layout(const char *YYYYMMDD)
void _get_area_size(AW_area area, AW_screen_area *square)
AW_pos get_scrolled_picture_width() const
char * window_defaults_name
window title
void update_text_field(Widget widget, const char *var_value)
int slider_pos_horizontal
current position of the vertical slider
void set_window_title(const char *title)
void AW_clock_cursor(AW_root *)
bool is_focus_callback(AnyWinCB f)
void update_option_menu()
void set_motion_callback(AW_area area, const WindowCallback &wcb)
AW_device_size * get_size_device(AW_area area)
void update_toggle_field()
void update_toggle(Widget widget, const char *var_value, AW_CL cd)
AW_common * get_common(AW_area area)
struct Unfixed_cb_parameter * UNFIXED
void create_window_variables()
void create_input_field_with_scaler(const char *awar_name, int textcolumns=4, int scaler_length=250, AW_ScalerType scalerType=AW_SCALER_LINEAR)
void update_input_field(Widget widget, const char *var_value)
const char * window_local_awarname(const char *localname, bool tmp=true)
void AW_openURL(AW_root *aw_root, const char *url)
int create_mode(const char *pixmap, const char *help_text_, AW_active mask, const WindowCallback &cb)
AliDataPtr after(AliDataPtr data, size_t pos)
WindowCallback makeHelpCallback(const char *helpfile)
void create_toggle_field(const char *awar_name, AW_label label, AW_orientation orientation=AW_VERTICAL)
virtual void store(const AW_at &at)=0
bool contains(AnyWinCB g)
Widget get_last_widget() const
bool is_expose_callback(AW_area area, AnyWinCB f)
void get_event(AW_event *eventi) const
void set_double_click_callback(AW_area area, const WindowCallback &wcb)
void recalc_size_atShow(enum AW_SizeRecalc sr)
void create_inverse_toggle(const char *awar_name)
void increment_at_commands(int width, int height)
int compare(const AW_cb &other) const
virtual void restore(AW_at &at) const =0
static void set_AW_postcb_cb(AW_postcb_cb postcb_cb)
bool is_equal(const AW_cb &other) const
void calculate_scrollbars()
AW_device_click * get_click_device(AW_area area, int mousex, int mousey, int max_distance)
const char * get_window_title() const
AW_selection_list * create_selection_list(const char *awar_name)
void set_expose_callback(AW_area area, const WindowCallback &wcb)
void create_menu(const char *name, const char *mnemonic, AW_active mask=AWM_ALL)
int number_of_timed_title_changes
void help_text(const char *id)
static char const * macro_name
void insert_menu_topic(const char *id, const char *name, const char *mnemonic, const char *help_text_, AW_active mask, CreateWindowCallbackSimple cb)
static void error(const char *msg)
void restore_at_from(const AW_at_storage &stored)
void message(char *title, int ms)
void * _create_option_entry(AW_VARIABLE_TYPE type, const char *name, const char *mnemonic, const char *name_of_color)
void label(const char *label)
void insert_help_topic(const char *labeli, const char *mnemonic, const char *helpText, AW_active mask, const WindowCallback &cb)
bool window_is_shown
current position of the horizontal slider
void TuneOrSetBackground(Widget w, const char *color, int modStrength)
void insert_menu_topic(const char *id, const char *name, const char *mnemonic, const char *help_text_, AW_active mask, const CreateWindowCallback &cwcb)
int label_widget(void *wgt, AW_label str, char *mnemonic=NULp, int width=0, int alignment=0)
void refresh_toggle_field(int toggle_field_number)
void insert_sub_menu(const char *name, const char *mnemonic, AW_active mask=AWM_ALL)
int get_button_length() const
void button_height(int height)
AliDataPtr before(AliDataPtr data, size_t pos)
void AW_help_popup(UNFIXED, const char *help_file)
void create_user_geometry_awars(int posx, int posy, int width, int height)
void create_autosize_button(const char *macro_name, AW_label label, const char *mnemonic=NULp, unsigned xtraSpace=1)
void set_horizontal_scrollbar_left_indent(int indent)
static AW_at_storage * make(AW_window *aww, AW_at_storage_type type)
void clear_option_menu(AW_option_menu_struct *oms)
void insert_default_option(AW_label choice_label, const char *mnemonic, const char *var_value, const char *name_of_color=NULp)
WindowCallbackSimple AnyWinCB
class AW_awar * window_local_awar(const char *localname, bool tmp=true)
void tell_scrolled_picture_size(AW_screen_area rectangle)
static void set_focus_policy(const char *, long cl_aww, void *)
void set_info_area_height(int height)
virtual ~AW_at_storage()
store/restore some properties from/to AW_at
void create_input_field(const char *awar_name, int columns=0)
void set_bottom_area_height(int height)
void insert_menu_topic(const char *id, const char *name, const char *mnemonic, const char *help_text_, AW_active mask, WindowCallbackSimple cb)
void update_scaler(Widget widget, AW_awar *awar, AW_ScalerType scalerType)
void auto_space(int xspace, int yspace)
void draw_line(int x1, int y1, int x2, int y2, int width, bool resize)
void set_focus_callback(const WindowCallback &wcb)
void at_attach(int x, int y)
void create_invisible(int columns)
void recalc_pos_atShow(AW_PosRecalc pr)
AW_selection_list * create_selection_list(const char *awar_name, int columns, int rows)
void set_horizontal_scrollbar_position(int position)
static WindowCallback makeWindowPopper(const CreateWindowCallback &cwcb)
static ARB_init_perl_interface init
void on_hide(WindowCallbackSimple call_on_hide)
void auto_increment(int dx, int dy)
bool at_ifdef(const char *id)
AW_option_menu_struct * create_option_menu(const char *awar_name)
void select_mode(int mode)
void insert_default_toggle(AW_label toggle_label, const char *mnemonic, const char *var_value)
void callback(WindowCallbackSimple cb)
void dump_at_position(const char *debug_label) const
void create_text_toggle(const char *var_name, const char *noText, const char *yesText, int buttonWidth=0)
const char * AW_get_pixmapPath(const char *pixmapName)
struct AW_awar::@60::@62 f
void run_focus_callback()
void set_vertical_scrollbar_position(int position)
const char * local_id(const char *id) const
void store_at_to(AW_at_storage &storage)
static void useraction_init()
AW_PosRecalc get_recalc_pos_atShow() const
void callback(const WindowCallback &cb)
void set_horizontal_change_callback(const WindowCallback &wcb)
void set_vertical_change_callback(const WindowCallback &wcb)
void run_popup_callbacks()
int get_at_yposition() const
static void useraction_done(AW_window *aw)
void(* AW_postcb_cb)(AW_window *)
void hide_or_notify(const char *error)
void shadow_width(int shadow_thickness)
void AW_help_entry_pressed(AW_window *)
void label_length(int length)
int slider_pos_vertical
window id
void at_attach_to(bool attach_x, bool attach_y, int xoff, int yoff)
void set_input_callback(AW_area area, const WindowCallback &wcb)
struct _WidgetRec * Widget
AW_color_idx alloc_named_data_color(int colnum, const char *colorname)
void get_window_size(int &width, int &height)
void AW_normal_cursor(AW_root *)
void create_text_field(const char *awar_name, int columns=20, int rows=4)
void create_button(const char *macro_name, AW_label label, const char *mnemonic=NULp, const char *color=NULp)