ARB
|
#include "item_sel_list.h"
#include <arbdbt.h>
#include <ad_cb.h>
#include <arb_defs.h>
#include <arb_global_defs.h>
#include <aw_root.hxx>
#include <aw_awar.hxx>
#include <aw_msg.hxx>
#include <awt_sel_boxes.hxx>
#include <map>
Go to the source code of this file.
Classes | |
class | RegFieldSelection |
Typedefs | |
typedef map< string, RegFieldSelection > | FieldSelectionRegistry |
Functions | |
const char * | get_itemfield_type_awarname (const char *itemfield_awarname) |
const char * | prepare_and_get_selected_itemfield (AW_root *awr, const char *awar_name, GBDATA *gb_main, const ItemSelector &itemtype, FailIfField failIf) |
static void | fieldname_changed_cb (AW_root *awr, RegFieldSelection *fsel) |
static void | fieldtype_changed_cb (AW_root *awr, RegFieldSelection *fsel) |
static void | popup_field_selection (AW_window *aw_parent, RegFieldSelection *fsel) |
void | create_itemfield_selection_button (AW_window *aws, const FieldSelDef &selDef, const char *at) |
Itemfield_Selection * | create_itemfield_selection_list (AW_window *aws, const FieldSelDef &selDef, const char *at) |
Variables | |
const int | FIELDNAME_VISIBLE_CHARS = 20 |
const int | NEWFIELD_EXTRA_SPACE = 13 |
struct { | |
GB_TYPES type | |
const char * label | |
const char * mnemonic | |
const char * typeName | |
} | creatable [] |
static bool | fieldtype_change_warning = true |
typedef map<string, RegFieldSelection> FieldSelectionRegistry |
Definition at line 128 of file item_sel_list.cxx.
returns the corresponding type-awar for an itemfield_awarname. Only returns an awarname if
Definition at line 215 of file item_sel_list.cxx.
References RegFieldSelection::find(), RegFieldSelection::get_type_awarname(), RegFieldSelection::new_fields_allowed(), NULp, and registered.
Referenced by SpeciesFlag::prepare_itemfield(), and setup_modify_fields_config().
const char* prepare_and_get_selected_itemfield | ( | AW_root * | awr, |
const char * | awar_name, | ||
GBDATA * | gb_main, | ||
const ItemSelector & | itemtype, | ||
FailIfField | failIf | ||
) |
Reads awar used in create_itemfield_selection_button().
If the user selected to create a new itemfield, the changekey is created.
awr | app root |
awar_name | name of awar used for create_itemfield_selection_button() |
gb_main | database |
itemtype | item type |
failIf | toggles various error conditions (defaults to FIF_STANDARD) |
When NULp is returned
Definition at line 230 of file item_sel_list.cxx.
References AW_root::awar(), MutableItemSelector::change_key_path, error(), FIF_NAME_SELECTED, FIF_NO_FIELD_SELECTED, RegFieldSelection::find(), GB_check_hkey(), GB_export_error(), GB_have_error(), GB_NONE, GBS_global_string(), GBT_add_new_changekey_to_keypath(), RegFieldSelection::get_def(), FieldSelDef::get_described_field(), RegFieldSelection::get_field_awarname(), RegFieldSelection::get_keytype(), RegFieldSelection::get_selected_type(), FieldSelDef::get_type_filter(), it_assert, RegFieldSelection::new_fields_allowed(), NO_FIELD_SELECTED, NULp, AW_awar::read_char_pntr(), and type.
Referenced by awtc_nn_search_all_listed(), calc_and_update_alignment_errors_cb(), mark_action(), mergeSimilarSpecies(), mg_check_field_cb(), modify_fields_of_queried_cb(), SpeciesFlag::prepare_itemfield(), set_field_of_queried_cb(), and st_check_cb().
|
static |
Definition at line 352 of file item_sel_list.cxx.
References AW_root::awar(), GB_NONE, RegFieldSelection::get_field_awarname(), RegFieldSelection::get_keytype(), RegFieldSelection::get_type_awarname(), RegFieldSelection::get_unmated_type(), RegFieldSelection::inAwarChange, RegFieldSelection::popdown(), AW_awar::read_char_pntr(), RegFieldSelection::update_button_text(), and AW_awar::write_int().
Referenced by RegFieldSelection::init_awars().
|
static |
Definition at line 377 of file item_sel_list.cxx.
References aw_message(), AW_root::awar(), fieldtype_change_warning, GB_NONE, RegFieldSelection::get_field_awarname(), RegFieldSelection::get_keytype(), RegFieldSelection::get_type_awarname(), RegFieldSelection::inAwarChange, AW_awar::read_char_pntr(), AW_awar::read_int(), RegFieldSelection::update_button_text(), and AW_awar::write_int().
Referenced by RegFieldSelection::init_awars().
|
static |
Definition at line 530 of file item_sel_list.cxx.
References AW_window::get_root(), and RegFieldSelection::popup_window().
Referenced by create_itemfield_selection_button().
void create_itemfield_selection_button | ( | AW_window * | aws, |
const FieldSelDef & | selDef, | ||
const char * | at | ||
) |
Create a button that pops up a window allowing to select an item-field. Field may exist or not. Allows to specify type of the new field in the latter case.
aws | parent window |
selDef | specifies details of field selection |
at | xfig label (ignored if NULp) |
The length of the button is hardcoded and depends on whether new fields are possible or not. Nevertheless you may override its size by defining an at-label with 'to:'-position in xfig.
At start of field-writing code:
For each item written to:
Definition at line 534 of file item_sel_list.cxx.
References AW_window::at(), AW_window::button_length(), AW_window::callback(), AW_window::create_button(), GBS_global_string(), GBS_string_eval(), FieldSelDef::get_awarname(), RegFieldSelection::get_button_awarname(), AW_window::get_button_length(), RegFieldSelection::get_field_awarname(), AW_window::get_root(), FieldSelDef::new_fields_allowed(), popup_field_selection(), and RegFieldSelection::registrate().
Referenced by create_group_species_by_field_window(), create_mg_check_fields_window(), create_mg_merge_tagged_fields_window(), create_modify_fields_window(), create_next_neighbours_listed_window(), QUERY::create_query_box(), RefEntries::create_refentries_window(), create_writeFieldOfListed_window(), createDisplayField_window(), createMergeSimilarSpeciesWindow(), ItemFieldShader::customize(), ED4_configure_species_flags(), ED4_popup_detect_bad_alignment_window(), GEN_open_nds_window(), NDS_create_window(), NT_create_compare_taxonomy_window(), NT_create_resort_window(), NT_create_species_join_window(), popup_single_field_transfer_window(), and STAT_create_chimera_check_window().
Itemfield_Selection* create_itemfield_selection_list | ( | AW_window * | aws, |
const FieldSelDef & | selDef, | ||
const char * | at | ||
) |
Create a selection list allowing to select an item-field. Similar to create_itemfield_selection_button().
Differences:
Definition at line 567 of file item_sel_list.cxx.
References AW_window::at(), FieldSelDef::build_sel(), AW_window::create_selection_list(), FieldSelDef::get_awarname(), AW_window::get_root(), it_assert, FieldSelDef::new_fields_allowed(), AW_selection::refresh(), and RegFieldSelection::registrate().
Referenced by create_field_convert_window(), DBUI::create_field_delete_window(), DBUI::create_fields_reorder_window(), and create_set_protection_window().
const int FIELDNAME_VISIBLE_CHARS = 20 |
Definition at line 113 of file item_sel_list.cxx.
const int NEWFIELD_EXTRA_SPACE = 13 |
Definition at line 114 of file item_sel_list.cxx.
GB_TYPES type |
Definition at line 117 of file item_sel_list.cxx.
Referenced by AW_window::_create_option_entry(), References::add_dbid(), GB_MAIN_TYPE::add_hierarchy_cb(), aisc_collect_sets(), aisc_create(), aisc_debug_info(), aisc_get(), aisc_nput(), aisc_put(), aisc_talking_get(), aisc_talking_sets(), aps_correct_filename(), SelectedDatabase::arg_type(), ED4_block::autocorrect_type(), AW_widget_refresh_cb::AW_widget_refresh_cb(), awt_add_sequences_to_list(), AWT_getItemType(), awtc_nn_search_all_listed(), build_rule_from_awars(), calc_method_changed_cb(), calculate_sai_cb(), ED4_terminal::changed_by_database(), checkAndMergeFields(), colstat_2_gnuplot_cb(), CON_calc_max_freq(), copy_field_into_partial_alignments(), QUERY::copy_selection_list_2_query_box(), create_loadsave_colored_window(), create_new_species(), AW_window::create_selection_list(), RegFieldSelection::create_window(), detectLinkType(), di_save_matrix_cb(), diff_type_changed_cb(), BootstrapConfig::display_remark(), ED4_popup_search_window(), ed_submit_info_event(), edit_SAI_description(), AP_filter::enable_simplify(), FeatureLine::FeatureLine(), field_convert_update_typesel_cb(), field_create_cb(), filter_columnstat_SAIs(), filter_posvar_SAI_for_ali(), gb_copy_explicit(), GB_create(), gb_create_dictionaries(), gb_expect_type(), GB_find_subcontent_by_quark(), gb_find_value_equal(), gb_info(), gb_make_entry(), gb_parse_ascii_rek(), gb_read_bin_rek_V2(), gb_read_pntr_ts(), GB_request_undo_type(), gb_search_system_folder_rek(), gb_set_undo_type(), GB_type_2_char(), GB_TYPES_2_name(), gb_write_bin_rek(), GB_write_pntr(), gbcm_read_bin(), gbcms_talking_find(), GBL_IMPL::gbl_new_param(), gbl_read_seq_sai_or_species(), GBT_check_alignment(), GBT_get_type_of_changekey(), gbt_scan_db_rek(), gbt_scan_db_start(), GBT_searchOrCreate_itemfield_according_to_changekey(), gde_filter_weights(), ED4_root::generate_window(), ED4_SearchResults::get_first_at(), ED4_SearchResults::get_first_starting_after(), ED4_SearchResults::get_last_starting_before(), FINAL_TYPE< SEQTYPE >::get_NDS_Type(), ED4_SearchResults::get_shown_at(), ED4_block::get_type(), Ostring::get_type(), Parameter::get_type(), SelectedDatabase::get_type(), FINAL_TYPE< SEQTYPE >::get_type(), DI_GLOBAL_MATRIX::has_type(), has_unsaved_sons(), InitNASeq(), KeySorter::KeySorter(), load_search_paras_from_file(), FieldTransfer::Rule::makeFromConfig(), MG_save_cb(), MG_transfer_species(), nt_species_join(), parse_intype(), parse_outtype(), parse_type(), parseSection(), perform_query_cb(), prepare_and_get_selected_itemfield(), SpeciesFlag::prepare_itemfield(), SequenceHandler::read_char_pntr(), registerType(), FeatureLine::reinterpret_as_continued_line(), GB_MAIN_TYPE::remove_hierarchy_cb(), ReplaceArgs(), saicalc_edit_method_cb(), save_search_paras_to_file(), QUERY::search_duplicated_field_content(), EDB_root_bact::search_sequence_data_rek(), searchParamsChanged(), SequenceHandler::SequenceHandler(), GEN_graphic::set_display_style(), ED4_block::set_type(), ED4_SearchResults::setNewSearch(), split_data_into_parts(), SQ_add_changekeys(), sq_calc_seq_quality_cb(), FieldTransfer::str2type(), ED4_block::toggle_type(), RegFieldSelection::update_button_text(), and DBwriter::writeFeature().
const char* label |
Definition at line 118 of file item_sel_list.cxx.
Referenced by _aw_create_toggle_entry(), GBT_config_item::append_to_config_string(), aw_create_color_chooser_window(), aw_question(), awt_create_input_mask(), create_config_manager_window(), RegFieldSelection::create_window(), export_nds_cb(), export_tree_node_print(), GBT_write_group_name(), GDE_menuitem_cb(), insert_mark_topics(), GBT_config_parser::nextItem(), NT_create_dna_2_pro_window(), parse_CMD_RADIO(), parse_treelabel(), ParseMenus(), and update_restore_label().
const char* mnemonic |
Definition at line 119 of file item_sel_list.cxx.
Referenced by AWT_create_mask_submenu(), create_config_manager_window(), and RegFieldSelection::create_window().
const char* typeName |
Definition at line 120 of file item_sel_list.cxx.
Referenced by RegFieldSelection::update_button_text().
struct { ... } creatable[] |
Referenced by RegFieldSelection::create_window(), RegFieldSelection::get_unmated_type(), and RegFieldSelection::update_button_text().
|
static |
Definition at line 376 of file item_sel_list.cxx.
Referenced by fieldtype_changed_cb(), and RegFieldSelection::init_awars().