|
ARB
|
#include <ConfigMapping.h>#include <aw_base.hxx>#include <cb.h>

Go to the source code of this file.
Classes | |
| struct | AWT_config_mapping_def |
| struct | AWT_predefined_config |
| class | AWT_config |
| class | AWT_config_definition |
Macros | |
| #define | awt_assert(cond) arb_assert(cond) |
Typedefs | |
| typedef char *(* | ConfigModifyCallback )(const char *key, const char *value, AW_CL cl_user) |
Functions | |
| DECLARE_CBTYPE_FVV_AND_BUILDERS (ConfigSetupCallback, void, AWT_config_definition &) | |
| DECLARE_CBTYPE_VV_AND_BUILDERS (StoreConfigCallback, char *) | |
| DECLARE_CBTYPE_FVV_AND_BUILDERS (RestoreConfigCallback, void, const char *) | |
| void | AWT_insert_config_manager (AW_window *aww, AW_default default_file_, const char *id, const StoreConfigCallback &store, const RestoreConfigCallback &load_or_reset, const char *macro_id=NULp, const AWT_predefined_config *predef=NULp) |
| void | AWT_insert_config_manager (AW_window *aww, AW_default default_file_, const char *id, ConfigSetupCallback setup_cb, const char *macro_id=NULp, const AWT_predefined_config *predef=NULp) |
| void | AWT_insert_config_manager (AW_window *aww, AW_default default_file_, const char *id, const AWT_config_mapping_def *mapping, const char *macro_id=NULp, const AWT_predefined_config *predef=NULp) |
| void | AWT_define_config_manager_conversion (const char *old_config_id, const char *new_config_id, const char *name_prefix=NULp) |
| void | AWT_predef_config_manager (const char *macro_id, const char *window_title) |
| void | AWT_modify_managed_configs (AW_default default_file_, const char *id, ConfigModifyCallback mod_cb, AW_CL cl_user) |
| #define awt_assert | ( | cond | ) | arb_assert(cond) |
Definition at line 27 of file config_manager.hxx.
Referenced by AWT_config::config_string(), AWT_config::delete_entry(), AWT_config::get_entry(), AWT_config_definition::get_mapping(), AWT_config::has_entry(), and AWT_config::set_entry().
Definition at line 144 of file config_manager.hxx.
| DECLARE_CBTYPE_FVV_AND_BUILDERS | ( | ConfigSetupCallback | , |
| void | , | ||
| AWT_config_definition & | |||
| ) |
| DECLARE_CBTYPE_VV_AND_BUILDERS | ( | StoreConfigCallback | , |
| char * | |||
| ) |
| DECLARE_CBTYPE_FVV_AND_BUILDERS | ( | RestoreConfigCallback | , |
| void | , | ||
| const char * | |||
| ) |
| void AWT_insert_config_manager | ( | AW_window * | aww, |
| AW_default | default_file_, | ||
| const char * | id, | ||
| const StoreConfigCallback & | store, | ||
| const RestoreConfigCallback & | load_or_reset, | ||
| const char * | macro_id = NULp, |
||
| const AWT_predefined_config * | predef = NULp |
||
| ) |
inserts a config-button into aww
| default_file_ | db where configs will be stored (use AW_ROOT_DEFAULT to store in properties) |
| id | config id (has to be a key). Same ids may be used for identical or very similar configs. Please be explicit and use a globally defined ID in such cases. |
| store_cb | creates a string from current state |
| load_or_reset_cb | restores state from string or resets factory defaults if string is NULp |
| macro_id | custom macro id (normally default (=NULp) will do; only required if multiple managers used in same window) |
| predef | predefined configs (default: none) |
Definition at line 1107 of file config_manager.cxx.
References awt_assert, AW_window::button_length(), AW_window::callback(), AWT_configuration::configure_manager_window(), AWT_configuration::configure_manager_window_popping_up_from(), AW_window::create_button(), create_config_manager_window(), destroy_AWT_configuration(), AW_window::get_button_length(), move_configs_convertable_to(), and NULp.
Referenced by AP_create_con_expert_window(), AWT_create_www_window(), AWT_insert_config_manager(), create_colorTranslationTable_window(), create_common_next_neighbour_fields(), create_configuration_marker_window(), create_helix_props_window(), create_insertDeleteBySAI_window(), create_key_map_window(), create_matrix_settings_window(), create_modify_fields_window(), create_primer_design_window(), create_probe_design_window(), create_probe_match_window(), QUERY::create_query_box(), RefEntries::create_refentries_window(), create_tree_export_window(), createOptimizeWindow(), ED4_configure_species_flags(), ED4_create_consensus_definition_window(), ED4_create_editor_options_window(), ED4_pfold_create_props_window(), ED4_popup_dot_missing_bases_window(), ED4_popup_search_window(), FastAligner_create_window(), GDE_menuitem_cb(), MG_gene_species_create_field_transfer_def_window(), NDS_create_window(), new_sina_simple(), NT_create_moveGroupInfo_window(), PH_create_filter_window(), popup_group_search_window(), SAI_popup_calculator_window(), SEC_create_display_window(), SQ_create_seq_quality_window(), STAT_create_chimera_check_window(), and TREE_create_settings_window().
| void AWT_insert_config_manager | ( | AW_window * | aww, |
| AW_default | default_file_, | ||
| const char * | id, | ||
| ConfigSetupCallback | setup_cb, | ||
| const char * | macro_id = NULp, |
||
| const AWT_predefined_config * | predef = NULp |
||
| ) |
inserts a config-button into aww
| default_file_ | db where configs will be stored (use AW_ROOT_DEFAULT to store in properties) |
| id | config id (has to be a key). Same ids may be used for identical or very similar configs. Please be explicit and use a globally defined ID in such cases. |
| setup_cb | populates an AWT_config_definition (cl is passed to setup_cb) |
| macro_id | custom macro id (normally default (=NULp) will do; only required if multiple managers used in same window) |
| predef | predefined configs (default: none) |
Definition at line 1169 of file config_manager.cxx.
References AWT_insert_config_manager(), load_or_reset_generated_config_cb(), and store_generated_config_cb().
| void AWT_insert_config_manager | ( | AW_window * | aww, |
| AW_default | default_file_, | ||
| const char * | id, | ||
| const AWT_config_mapping_def * | mapping, | ||
| const char * | macro_id = NULp, |
||
| const AWT_predefined_config * | predef = NULp |
||
| ) |
inserts a config-button into aww
| default_file_ | db where configs will be stored (use AW_ROOT_DEFAULT to store in properties) |
| id | config id (has to be a key). Same ids may be used for identical or very similar configs. Please be explicit and use a globally defined ID in such cases. |
| mapping | hardcoded mapping between AWARS and config strings |
| macro_id | custom macro id (normally default (=NULp) will do; only required if multiple managers used in same window) |
| predef | predefined configs (default: none) |
Definition at line 1189 of file config_manager.cxx.
References AWT_insert_config_manager(), and generate_config_from_mapping_cb().
| void AWT_define_config_manager_conversion | ( | const char * | old_config_id, |
| const char * | new_config_id, | ||
| const char * | name_prefix = NULp |
||
| ) |
defines support for automatic config conversion (to support renaming the 'id' passed to AWT_insert_config_manager).
| old_config_id | old config id |
| new_config_id | new config id |
| name_prefix | prefix used to rename managed configs. If merging multiple old_config_id's into ONE new_config_id, use unique name_prefix for each. Use an empty prefix (or NULp) to convert w/o renaming configs. |
This method has to be called just before AWT_insert_config_manager to work properly. You may call this function multiple times to chain conversions (e.g. A->B->C). Call order does not matter. The conversions will be performed by move_configs_convertable_to.
Definition at line 954 of file config_manager.cxx.
Referenced by create_modify_fields_window().
If you want to place multiple config manager buttons into one window, you have to call this function once for each intended manager (in same order as calling AWT_insert_config_manager later).
Note: can also be used for a single config manager.
| macro_id | used for manager window. |
| window_title | used for manager window. |
Definition at line 1090 of file config_manager.cxx.
Referenced by MG_create_merge_species_window().
| void AWT_modify_managed_configs | ( | AW_default | default_file_, |
| const char * | id, | ||
| ConfigModifyCallback | mod_cb, | ||
| AW_CL | cl_user | ||
| ) |
allows to modify (parts of) all stored configs
| default_file | has to be same as used in AWT_insert_config_manager() |
| id | ditto |
| mod_cb | called with each key/value pair of each stored config. result == NULp -> delete pair; result != NULp -> change or leave unchanged (result has to be a heapcopy!) |
| cl_user | forwarded to mod_cb |
Definition at line 1386 of file config_manager.cxx.
References aw_message(), AWT_config::config_string(), AWT_config::delete_entry(), GB_FIND, GB_read_char_pntr(), GB_search(), GB_write_string(), GBS_global_string(), ConfigDefinition::get_config_dbpath(), ConfigDefinition::get_db(), AWT_config::get_entries(), AWT_config::get_entry(), get_existing_configs(), NULp, AWT_config::parseError(), AWT_config::set_entry(), CharPtrArray::size(), and ta.
Referenced by modify_configurations().
1.8.8