12 #ifndef AWT_INPUT_MASK_INTERNAL_HXX
13 #define AWT_INPUT_MASK_INTERNAL_HXX
15 #ifndef AWT_INPUT_MASK_HXX
18 #ifndef AWT_HOTKEYS_HXX
44 #ifndef _GLIBCXX_VECTOR
62 std::map<std::string, awt_mask_item*> id;
69 std::map<std::string, awt_mask_item*>::const_iterator found =
id.find(name);
70 return (found ==
id.end()) ?
NULp : found->second;
74 bool empty()
const {
return id.empty(); }
91 bool test_edit_enabled;
106 mask_name(mask_name_),
107 internal_mask_name(
std::
string(1, local ?
'0' :
'1')+mask_name_),
108 mask_id(generate_id(mask_name_)),
111 test_edit_enabled(test_edit_enabled_),
114 awt_assert(mask_name_[0] !=
'0' && mask_name_[0] !=
'1');
137 return ids.
add(name, handler);
142 return global_ids.
add(name, handler);
156 if (!found) found = global_ids.
lookup(name);
227 return const_cast<AW_awar*
>(
awar())->read_string();
279 printf(
"awt_variable was changed\n");
313 virtual GB_ERROR add_db_callbacks();
314 virtual void remove_db_callbacks();
318 printf(
"gb_item=%p new_item=%p\n", gb_item, new_item);
336 virtual void db_changed() = 0;
345 const awt_script *script;
349 static int awar_counter = 0;
358 GB_ERROR relink() OVERRIDE {
return link_to(mask_global().get_selected_item()); }
361 void awar_changed() OVERRIDE;
362 void db_changed() OVERRIDE;
383 static int awar_counter = 0;
393 GB_ERROR relink() FINAL_OVERRIDE {
return link_to(mask_global().get_selected_item()); }
417 default_value(default_awar_value_)
422 void awar_changed() OVERRIDE;
425 virtual
std::
string awar2db(const
std::
string& awar_content)
const {
return awar_content; }
428 void build_widget(
AW_window *aws) OVERRIDE = 0;
442 field_width(field_width_)
459 field_width(field_width_)
465 printf(
"awt_text_viewport awar changed!\n");
514 int default_position;
516 std::vector<std::string> buttons;
517 std::vector<std::string> values;
522 default_position(default_position_),
550 awt_mask_item_list handlers;
551 AW_window_simple *aws;
552 bool shall_reload_on_reinit;
554 void link_to(
GBDATA *gbitem);
558 global(awr, gb_main, mask_name_, itemtype_, local, sel_, test_edit_enabled),
560 shall_reload_on_reinit(
false)
565 virtual ~awt_input_mask();
567 void show() { aws->activate(); }
578 void add_handler(awt_mask_item_ptr handler) { handlers.push_back(handler); }
594 #error awt_input_mask_internal.hxx included twice
595 #endif // AWT_INPUT_MASK_INTERNAL_HXX
const awt_input_mask_global & mask_global() const
bool reload_on_reinit() const
~awt_check_box() OVERRIDE
const std::string & get_name() const
return string(buffer, length)
awt_input_mask(AW_root *awr, GBDATA *gb_main, const std::string &mask_name_, awt_item_type itemtype_, bool local, const awt_item_type_selector *sel_, bool test_edit_enabled)
awt_check_box(awt_input_mask_global &global_, const std::string &child_path_, const std::string &label_, bool default_checked)
virtual void build_widget(AW_window *aws)=0
void set_reload_on_reinit(bool dest)
const awt_linked_to_item * to_linked_item() const
void set_item(GBDATA *new_item)
const char * GBS_global_string(const char *templat,...)
void awar_changed() OVERRIDE
const std::string & get_label() const
bool isNull() const
test if SmartPtr is NULp
void add_awarItem_callbacks()
void add_handler(awt_mask_item_ptr handler)
const char * hotkey(const std::string &label)
virtual GB_ERROR set_value(const std::string &new_value)=0
const awt_viewport * to_viewport() const
awt_mask_awar_item(awt_input_mask_global &global_, const std::string &awar_base, const std::string &default_value, bool saved_with_properties)
awt_input_mask_global & mask_global()
awt_string_handler(awt_input_mask_global &global_, const std::string &child_path_, const std::string &default_awar_value_, GB_TYPES default_type, const std::string &label_)
static void error(const char *msg)
awt_viewport(awt_input_mask_global &global_, const std::string &awar_base, const std::string &default_value, bool saved_with_properties, const std::string &label_)
std::string get_value() const OVERRIDE
virtual GBDATA * current(AW_root *root, GBDATA *gb_main) const =0
void awar_changed() OVERRIDE
void remove_awarItem_callbacks()
~awt_mask_awar_item() OVERRIDE
awt_script(awt_input_mask_global &global_, const std::string &script_)
AW_awar * awar(const char *awar)
AW_window_simple *& get_window()
virtual void general_item_change()
virtual std::string db2awar(const std::string &db_content) const
GB_ERROR set_name(const std::string &name_, bool is_global)
~awt_text_viewport() OVERRIDE
awt_variable(awt_input_mask_global &global_, const std::string &id, bool is_global_, const std::string &default_value, GB_ERROR &error)
std::string awar_name() const
virtual std::string get_value() const =0
virtual void awar_changed()=0
awt_mask_item(awt_input_mask_global &global_)
GB_ERROR set_value(const std::string &new_value) OVERRIDE
const AW_awar * awar() const
const awt_input_mask_global & mask_global() const
awt_text_viewport(const awt_mask_awar_item *item, const std::string &label_, long field_width_)
GB_ERROR write_string(const char *aw_string)
virtual ~awt_linked_to_item()
bool is_linked_item() const
awt_input_mask_global & mask_global()
~awt_string_handler() OVERRIDE
awt_viewport(const awt_mask_awar_item &ref_item, const std::string &label_)