ARB
|
#include "awt_config_manager.hxx"
#include "awt_sel_boxes.hxx"
#include "awt.hxx"
#include <aw_root.hxx>
#include <aw_question.hxx>
#include <aw_awar.hxx>
#include <aw_msg.hxx>
#include <aw_select.hxx>
#include <arb_defs.h>
#include <arb_str.h>
Go to the source code of this file.
Classes | |
class | ConfigDefinition |
class | AWT_configuration |
Macros | |
#define | HEADER "ARB_CONFIGURATION" |
#define | HEADERLEN 17 |
#define | NO_CONFIG_SELECTED "<no config selected>" |
Enumerations | |
enum | ConfigAwar { VISIBLE_COMMENT, STORED_COMMENTS, EXISTING_CFGS, CURRENT_CFG, SELECTED_FIELD, FIELD_CONTENT, CONFIG_AWARS } |
#define HEADER "ARB_CONFIGURATION" |
Definition at line 191 of file AWT_config_manager.cxx.
Referenced by AWT_configuration::Load(), and AWT_configuration::Save().
#define HEADERLEN 17 |
Definition at line 192 of file AWT_config_manager.cxx.
Referenced by AWT_configuration::Load(), and AWT_configuration::Save().
#define NO_CONFIG_SELECTED "<no config selected>" |
Definition at line 310 of file AWT_config_manager.cxx.
Referenced by current_changed_cb(), AWT_configuration_selection::fill(), and nt_extract_configuration().
enum ConfigAwar |
Enumerator | |
---|---|
VISIBLE_COMMENT | |
STORED_COMMENTS | |
EXISTING_CFGS | |
CURRENT_CFG | |
SELECTED_FIELD | |
FIELD_CONTENT | |
CONFIG_AWARS |
Definition at line 31 of file AWT_config_manager.cxx.
bool is_prefined | ( | const string & | cfgname | ) |
Definition at line 44 of file AWT_config_manager.cxx.
Referenced by comment_changed_cb(), current_changed_cb(), delete_cb(), AWT_configuration::find_predefined(), AWT_configuration::get_config(), load_cb(), AWT_configuration::set_config(), and store_cb().
Definition at line 294 of file AWT_config_manager.cxx.
References GBT_join_strings(), GBT_split_string(), and ConstStrArray::put().
Referenced by delete_cb(), and store_cb().
|
static |
Definition at line 312 of file AWT_config_manager.cxx.
References CURRENT_CFG, AWT_predefined_config::description, AWT_configuration::find_predefined(), GBS_global_string(), GBS_string_2_key(), ConfigDefinition::get_awar(), ConfigDefinition::get_awar_value(), AWT_configuration::has_existing(), is_prefined(), NO_CONFIG_SELECTED, AW_awar::read_char_pntr(), STORED_COMMENTS, string(), AWT_configuration::update_field_selection_list(), VISIBLE_COMMENT, and AW_awar::write_string().
Referenced by create_config_manager_window().
|
inline |
Definition at line 369 of file AWT_config_manager.cxx.
References AWT_config::config_string(), ConfigDefinition::set_awar_value(), and STORED_COMMENTS.
Referenced by comment_changed_cb(), and delete_cb().
|
static |
Definition at line 375 of file AWT_config_manager.cxx.
References aw_message(), CURRENT_CFG, AWT_predefined_config::description, AWT_configuration::find_predefined(), GBS_global_string(), ConfigDefinition::get_awar(), ConfigDefinition::get_awar_value(), AWT_configuration::has_existing(), is_prefined(), save_comments(), STORED_COMMENTS, AW_awar::touch(), and VISIBLE_COMMENT.
Referenced by create_config_manager_window().
Definition at line 403 of file AWT_config_manager.cxx.
References AW_awar::write_string().
Referenced by create_config_manager_window().
|
static |
Definition at line 407 of file AWT_config_manager.cxx.
References aw_message_if(), CURRENT_CFG, error(), ConfigDefinition::get_awar_value(), AWT_configuration::get_config(), and AWT_configuration::Restore().
Referenced by create_config_manager_window(), load_cb(), and save_cb().
|
static |
Definition at line 418 of file AWT_config_manager.cxx.
References aw_message(), aw_message_if(), CURRENT_CFG, error(), EXISTING_CFGS, ConfigDefinition::get_awar(), ConfigDefinition::get_awar_value(), is_prefined(), AW_awar::read_char_pntr(), remove_from_configs(), AW_awar::rewrite_string(), ConfigDefinition::set_awar_value(), AWT_configuration::set_config(), AWT_configuration::Store(), string(), AW_awar::touch(), and VISIBLE_COMMENT.
Referenced by create_config_manager_window(), and load_cb().
|
static |
Definition at line 443 of file AWT_config_manager.cxx.
References aw_message(), CURRENT_CFG, AWT_config::delete_entry(), AWT_configuration::erase_deleted_configs(), EXISTING_CFGS, ConfigDefinition::get_awar_value(), is_prefined(), remove_from_configs(), save_comments(), ConfigDefinition::set_awar_value(), and STORED_COMMENTS.
Referenced by create_config_manager_window().
|
static |
Definition at line 462 of file AWT_config_manager.cxx.
References aw_message_if(), aw_modal_file_selection(), CURRENT_CFG, error(), GBS_global_string_copy(), ConfigDefinition::get_awar_value(), ConfigDefinition::get_id(), is_prefined(), AWT_configuration::Load(), NULp, restore_cb(), ConfigDefinition::set_awar_value(), store_cb(), and VISIBLE_COMMENT.
Referenced by create_config_manager_window().
|
static |
Definition at line 487 of file AWT_config_manager.cxx.
References aw_message_if(), aw_modal_file_selection(), CURRENT_CFG, error(), GBS_global_string_copy(), ConfigDefinition::get_awar_value(), ConfigDefinition::get_id(), NULp, restore_cb(), AWT_configuration::Save(), and VISIBLE_COMMENT.
Referenced by create_config_manager_window().
|
static |
Definition at line 690 of file AWT_config_manager.cxx.
References AWT_configuration::keep_changed_fields().
Referenced by AWT_configuration::popup_edit_window().
|
static |
Definition at line 691 of file AWT_config_manager.cxx.
References AWT_configuration::delete_selected_field().
Referenced by AWT_configuration::popup_edit_window().
|
static |
Definition at line 692 of file AWT_config_manager.cxx.
References AWT_configuration::update_field_content().
Referenced by AWT_configuration::popup_edit_window().
|
static |
Definition at line 693 of file AWT_config_manager.cxx.
References AWT_configuration::store_changed_field_content().
Referenced by AWT_configuration::popup_edit_window().
|
static |
Definition at line 754 of file AWT_config_manager.cxx.
References AWT_configuration::popup_edit_window().
Referenced by create_config_manager_window().
|
static |
Definition at line 755 of file AWT_config_manager.cxx.
References AWT_configuration::Reset().
Referenced by create_config_manager_window().
|
static |
Definition at line 757 of file AWT_config_manager.cxx.
References EXISTING_CFGS, GBT_split_string(), and ConfigDefinition::get_awar_value().
Referenced by AWT_modify_managed_configs(), and refresh_config_sellist_cb().
|
static |
Definition at line 762 of file AWT_config_manager.cxx.
References AWT_configuration::add_predefined_to(), get_existing_configs(), and AW_selection_list::init_from_array().
Referenced by create_config_manager_window().
|
static |
Definition at line 770 of file AWT_config_manager.cxx.
References AW_awar::add_callback(), ARRAY_ELEMS, AW_POPDOWN(), AW_awar::awar_name, awt_create_selection_list_with_input_field(), cb, comment_changed_cb(), CURRENT_CFG, current_changed_cb(), delete_cb(), edit_cb(), erase_comment_cb(), EXISTING_CFGS, GBS_global_string_copy(), ConfigDefinition::get_awar(), AW_window::get_root(), AW_window::get_window_id(), AW_window::get_window_title(), id, label, load_cb(), makeHelpCallback(), mnemonic, refresh_config_sellist_cb(), reset_cb(), restore_cb(), save_cb(), store_cb(), title, AW_awar::touch(), and VISIBLE_COMMENT.
Referenced by AWT_insert_config_manager().
|
static |
Definition at line 854 of file AWT_config_manager.cxx.
Referenced by AWT_insert_config_manager().
void AWT_insert_config_manager | ( | AW_window * | aww, |
AW_default | default_file_, | ||
const char * | id, | ||
const StoreConfigCallback & | store_cb, | ||
const RestoreConfigCallback & | load_or_reset_cb, | ||
const char * | macro_id, | ||
const AWT_predefined_config * | predef | ||
) |
inserts a config-button into aww
default_file_ | db where configs will be stored (use AW_ROOT_DEFAULT to store in properties) |
id | unique id (has to be a key) |
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) |
predef | predefined configs (default: none) |
Definition at line 856 of file AWT_config_manager.cxx.
References AW_window::button_length(), AW_window::callback(), AW_window::create_button(), create_config_manager_window(), destroy_AWT_configuration(), and AW_window::get_button_length().
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().
|
static |
Definition at line 878 of file AWT_config_manager.cxx.
References AWT_config_definition::read().
Referenced by AWT_insert_config_manager().
|
static |
Definition at line 884 of file AWT_config_manager.cxx.
References AWT_config_definition::reset(), and AWT_config_definition::write().
Referenced by AWT_insert_config_manager().
void AWT_insert_config_manager | ( | AW_window * | aww, |
AW_default | default_file_, | ||
const char * | id, | ||
ConfigSetupCallback | setup_cb, | ||
const char * | macro_id, | ||
const AWT_predefined_config * | predef | ||
) |
inserts a config-button into aww
default_file_ | db where configs will be stored (use AW_ROOT_DEFAULT to store in properties) |
id | unique id (has to be a key) |
setup_cb | populates an AWT_config_definition (cl is passed to setup_cb) |
macro_id | custom macro id (normally default (=NULp) will do) |
predef | predefined configs (default: none) |
Definition at line 891 of file AWT_config_manager.cxx.
References AWT_insert_config_manager(), load_or_reset_generated_config_cb(), and store_generated_config_cb().
|
static |
Definition at line 907 of file AWT_config_manager.cxx.
References AWT_config_definition::add().
Referenced by AWT_insert_config_manager().
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, | ||
const AWT_predefined_config * | predef | ||
) |
inserts a config-button into aww
default_file_ | db where configs will be stored (use AW_ROOT_DEFAULT to store in properties) |
id | unique id (has to be a key) |
mapping | hardcoded mapping between AWARS and config strings |
macro_id | custom macro id (normally default (=NULp) will do) |
predef | predefined configs (default: none) |
Definition at line 911 of file AWT_config_manager.cxx.
References AWT_insert_config_manager(), and generate_config_from_mapping_cb().
|
inline |
Definition at line 932 of file AWT_config_manager.cxx.
References aw_message(), and GBS_global_string().
Referenced by AWT_config_definition::reset().
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 1108 of file AWT_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().