- Timestamp:
- 01/12/11 11:25:08 (6 months ago)
- Location:
- trunk/WINDOW
- Files:
-
- 2 modified
-
AW_button.cxx (modified) (7 diffs)
-
AW_window.cxx (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WINDOW/AW_button.cxx
r7811 r8271 934 934 AW_cb_struct *cbs; 935 935 VarUpdateInfo *vui; 936 char * String;936 char *str; 937 937 int x_correcting_for_label = 0; 938 938 … … 940 940 941 941 AW_awar *vs = root->awar(var_name); 942 String= root->awar(var_name)->read_as_string();942 str = root->awar(var_name)->read_as_string(); 943 943 944 944 int width_of_input_label, height_of_input_label; … … 985 985 XmNwidth, (int)width_of_input, 986 986 XmNrows, 1, 987 XmNvalue, String,987 XmNvalue, str, 988 988 XmNfontList, p_global->fontlist, 989 989 XmNbackground, _at->background_color, … … 994 994 } 995 995 996 free( String);996 free(str); 997 997 998 998 // user-own callback … … 1055 1055 1056 1056 void AW_window::create_text_field(const char *var_name, int columns, int rows) { 1057 Widget scrolledWindowText;1058 Widget scrolledText;1059 Widget tmp_label= 0;1060 AW_cb_struct *cbs;1057 Widget scrolledWindowText; 1058 Widget scrolledText; 1059 Widget tmp_label = 0; 1060 AW_cb_struct *cbs; 1061 1061 VarUpdateInfo *vui; 1062 char *String= NULL;1063 short width_of_last_widget= 0;1064 short height_of_last_widget= 0;1065 int width_of_text= 0;1066 int height_of_text= 0;1067 int x_correcting_for_label = 0;1062 char *str = NULL; 1063 short width_of_last_widget = 0; 1064 short height_of_last_widget = 0; 1065 int width_of_text = 0; 1066 int height_of_text = 0; 1067 int x_correcting_for_label = 0; 1068 1068 1069 1069 AW_awar *vs = root->awar(var_name); 1070 String= root->awar(var_name)->read_string();1070 str = root->awar(var_name)->read_string(); 1071 1071 1072 1072 int width_of_text_label, height_of_text_label; … … 1131 1131 scrolledWindowText, 1132 1132 XmNeditMode, XmMULTI_LINE_EDIT, 1133 XmNvalue, String,1133 XmNvalue, str, 1134 1134 XmNscrollLeftSide, false, 1135 1135 XmNwidth, (int)width_of_text, … … 1138 1138 XmNbackground, _at->background_color, 1139 1139 NULL); 1140 free( String);1140 free(str); 1141 1141 1142 1142 if (!_at->to_position_exists) { -
trunk/WINDOW/AW_window.cxx
r8103 r8271 2573 2573 } 2574 2574 2575 int AW_window::create_mode(const char *pixmap, const char *helpText, AW_active Mask, void (*f)(AW_window*, AW_CL, AW_CL), AW_CL cd1, AW_CL cd2) {2576 aw_assert(legal_mask( Mask));2575 int AW_window::create_mode(const char *pixmap, const char *helpText, AW_active mask, void (*f)(AW_window*, AW_CL, AW_CL), AW_CL cd1, AW_CL cd2) { 2576 aw_assert(legal_mask(mask)); 2577 2577 Widget button; 2578 2578 … … 2609 2609 } 2610 2610 2611 root->make_sensitive(button, Mask);2611 root->make_sensitive(button, mask); 2612 2612 p_w->number_of_modes++; 2613 2613 … … 2821 2821 // -------------------------------------------------------------------------------- 2822 2822 2823 void AW_window::create_menu(AW_label name, const char *mnemonic, AW_active Mask) {2824 aw_assert(legal_mask( Mask));2823 void AW_window::create_menu(AW_label name, const char *mnemonic, AW_active mask) { 2824 aw_assert(legal_mask(mask)); 2825 2825 p_w->menu_deep = 0; 2826 2826 #ifdef DEBUG … … 2830 2830 dumpCloseAllSubMenus(); 2831 2831 #endif // DUMP_MENU_LIST 2832 insert_sub_menu(name, mnemonic, Mask);2832 insert_sub_menu(name, mnemonic, mask); 2833 2833 } 2834 2834 … … 2845 2845 } 2846 2846 2847 void AW_window::insert_sub_menu(AW_label name, const char *mnemonic, AW_active Mask) {2848 aw_assert(legal_mask( Mask));2847 void AW_window::insert_sub_menu(AW_label name, const char *mnemonic, AW_active mask) { 2848 aw_assert(legal_mask(mask)); 2849 2849 Widget shell, Label; 2850 2850 … … 2899 2899 if (p_w->menu_deep < AW_MAX_MENU_DEEP-1) p_w->menu_deep++; 2900 2900 2901 root->make_sensitive(Label, Mask);2901 root->make_sensitive(Label, mask); 2902 2902 } 2903 2903 … … 2914 2914 2915 2915 void AW_window::insert_menu_topic(const char *topic_id, AW_label name, 2916 const char *mnemonic, const char *helpText, AW_active Mask,2916 const char *mnemonic, const char *helpText, AW_active mask, 2917 2917 void (*f)(AW_window*, AW_CL, AW_CL), AW_CL cd1, AW_CL cd2) 2918 2918 { 2919 aw_assert(legal_mask( Mask));2919 aw_assert(legal_mask(mask)); 2920 2920 Widget button; 2921 2921 … … 2955 2955 cbs->id = strdup(topic_id); 2956 2956 root->define_remote_command(cbs); 2957 root->make_sensitive(button, Mask);2958 } 2959 2960 void AW_window::insert_help_topic(AW_label name, const char *mnemonic, const char *helpText, AW_active Mask,2957 root->make_sensitive(button, mask); 2958 } 2959 2960 void AW_window::insert_help_topic(AW_label name, const char *mnemonic, const char *helpText, AW_active mask, 2961 2961 void (*f)(AW_window*, AW_CL, AW_CL), AW_CL cd1, AW_CL cd2) 2962 2962 { 2963 aw_assert(legal_mask( Mask));2963 aw_assert(legal_mask(mask)); 2964 2964 Widget button; 2965 2965 … … 2973 2973 (XtPointer) new AW_cb_struct(this, f, cd1, cd2, helpText)); 2974 2974 2975 root->make_sensitive(button, Mask);2975 root->make_sensitive(button, mask); 2976 2976 } 2977 2977
