Show
Ignore:
Timestamp:
02/06/10 09:01:31 (2 years ago)
Author:
westram
Message:
  • AW_awar / widget interaction
    • replaced AW_INSERT_BUTTON_IN_AWAR_LIST by AW_awar/tie_widget
    • link AW_widget_refresh_cb in AW_awar (leak)
    • use Widget type instead of void*
    • untie_all_widgets() in dtor
  • removed deprecated header aw_awar.hxx
  • AW_root
    • delete focus_callback_list (leak)
    • method remove_button_from_sens_list replaces AW_remove_button_from_sens_list
    • moved member 'button_list' from AW_root_Motif, renamed it into 'button_sens_list' and destroy it in dtor
    • use Widget type instead of void*
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/WINDOW/aw_root.hxx

    r6674 r6675  
    7575} AW_VARIABLE_TYPE; 
    7676 
     77 
     78typedef enum { 
     79    AW_WIDGET_INPUT_FIELD, 
     80    AW_WIDGET_TEXT_FIELD, 
     81    AW_WIDGET_LABEL_FIELD, 
     82    AW_WIDGET_CHOICE_MENU, 
     83    AW_WIDGET_TOGGLE_FIELD, 
     84    AW_WIDGET_SELECTION_LIST, 
     85    AW_WIDGET_TOGGLE 
     86} AW_widget_type; 
     87 
     88 
    7789typedef struct { 
    7890    int t, b, l, r; 
     
    168180class  AW_root_Motif; 
    169181class  AW_awar; 
     182struct AW_buttons_struct; 
    170183struct AW_var_callback; 
    171184 
     
    177190 
    178191class AW_root { 
    179     AW_default application_database; 
    180      
     192    AW_default         application_database; 
     193    AW_buttons_struct *button_sens_list; 
     194 
    181195    void init_variables(AW_default database); 
    182196    void exit_variables(); 
     
    191205    AW_root_Motif *prvt;                            // Do not use !!! 
    192206    bool           value_changed; 
    193     long           changer_of_variable; 
     207    Widget         changer_of_variable; 
    194208    int            y_correction_for_input_labels; 
    195209    AW_active      global_mask; 
     
    266280    void apply_sensitivity(AW_active mask); 
    267281    void make_sensitive(Widget w, AW_active mask); 
     282    bool remove_button_from_sens_list(Widget button); 
    268283 
    269284    GB_ERROR start_macro_recording(const char *file, const char *application_id, const char *stop_action_name); 
     
    293308struct AW_var_callback; 
    294309struct AW_var_target; 
     310struct AW_widget_refresh_cb; 
    295311 
    296312typedef void (*Awar_CB)(AW_root *, AW_CL, AW_CL); 
     
    308324    } pp; 
    309325 
    310     struct AW_var_callback *callback_list; 
    311     struct AW_var_target   *target_list; 
     326    struct AW_var_callback      *callback_list; 
     327    struct AW_var_target        *target_list; 
     328    struct AW_widget_refresh_cb *refresh_list; 
    312329 
    313330#if defined(DEBUG) 
     
    342359    AW_awar(AW_VARIABLE_TYPE var_type, const char *var_name, const char *var_value, double var_double_value, AW_default default_file, AW_root *root); 
    343360    ~AW_awar(); 
     361 
     362    void tie_widget(AW_CL cd1, Widget widget, AW_widget_type type, AW_window *aww); 
     363    void untie_all_widgets(); 
    344364 
    345365    AW_awar *add_callback(Awar_CB2 f, AW_CL cd1, AW_CL cd2);