ARB
|
Go to the source code of this file.
Classes | |
class | Itemfield_Selection |
class | FieldSelDef |
Macros | |
#define | PSEUDO_FIELD_ANY_FIELD "[any field]" |
#define | PSEUDO_FIELD_ALL_FIELDS "[all fields]" |
#define | PSEUDO_FIELD_ANY_FIELD_REC "[any recursive]" |
#define | PSEUDO_FIELD_ALL_FIELDS_REC "[all recursive]" |
Enumerations | |
enum | SelectableFields { SF_STANDARD = 0, SF_PSEUDO = 1, SF_HIDDEN = 2, SF_ALLOW_NEW = 4, SF_SHOW_TYPE = 8 } |
enum | FailIfField { FIF_NAME_SELECTED = 1, FIF_NO_FIELD_SELECTED = 2, FIF_STANDARD = FIF_NAME_SELECTED|FIF_NO_FIELD_SELECTED, FIF_ALLOW_NONE = FIF_STANDARD^FIF_NO_FIELD_SELECTED, FIF_ALLOW_ID_CHANGE = FIF_STANDARD^FIF_NAME_SELECTED } |
enum | RescanMode { RESCAN_REFRESH = 1, RESCAN_SHOW_ALL = 2 } |
Variables | |
CONSTEXPR long | FIELD_FILTER_STRING = (1<<GB_STRING) |
CONSTEXPR long | FIELD_FILTER_STRING_WRITEABLE = (1<<GB_STRING) |
CONSTEXPR long | FIELD_FILTER_INT_WRITEABLE = (1<<GB_STRING) | (1<<GB_INT) |
CONSTEXPR long | FIELD_FILTER_BYTE_WRITEABLE = (1<<GB_STRING) | (1<<GB_INT) | (1<<GB_BYTE) | (1<<GB_FLOAT) |
CONSTEXPR long | FIELD_FILTER_FLOAT_WRITEABLE = (1<<GB_STRING) | (1<<GB_FLOAT) |
CONSTEXPR long | FIELD_FILTER_STRING_READABLE = (1<<GB_BYTE)|(1<<GB_INT)|(1<<GB_FLOAT)|(1<<GB_STRING)|(1<<GB_BITS) |
CONSTEXPR long | FIELD_UNFILTERED = -1L |
CONSTEXPR long | FIELD_FILTER_ANY_FIELD = (FIELD_UNFILTERED ^ (1<<GB_DB)) |
CONSTEXPR long | FIELD_FILTER_NDS = FIELD_FILTER_STRING_READABLE |
#define PSEUDO_FIELD_ANY_FIELD "[any field]" |
Definition at line 27 of file item_sel_list.h.
Referenced by Itemfield_Selection::fill(), and SLOW_is_pseudo_key().
#define PSEUDO_FIELD_ALL_FIELDS "[all fields]" |
Definition at line 28 of file item_sel_list.h.
Referenced by Itemfield_Selection::fill(), and SLOW_is_pseudo_key().
#define PSEUDO_FIELD_ANY_FIELD_REC "[any recursive]" |
Definition at line 29 of file item_sel_list.h.
Referenced by Itemfield_Selection::fill(), and SLOW_is_pseudo_key().
#define PSEUDO_FIELD_ALL_FIELDS_REC "[all recursive]" |
Definition at line 30 of file item_sel_list.h.
Referenced by Itemfield_Selection::fill(), and SLOW_is_pseudo_key().
enum SelectableFields |
Enumerator | |
---|---|
SF_STANDARD | |
SF_PSEUDO | |
SF_HIDDEN | |
SF_ALLOW_NEW | |
SF_SHOW_TYPE |
Definition at line 32 of file item_sel_list.h.
enum FailIfField |
Enumerator | |
---|---|
FIF_NAME_SELECTED | |
FIF_NO_FIELD_SELECTED | |
FIF_STANDARD | |
FIF_ALLOW_NONE | |
FIF_ALLOW_ID_CHANGE |
Definition at line 114 of file item_sel_list.h.
enum RescanMode |
Enumerator | |
---|---|
RESCAN_REFRESH | |
RESCAN_SHOW_ALL |
Definition at line 129 of file item_sel_list.h.
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().
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().
const char* prepare_and_get_selected_itemfield | ( | AW_root * | awr, |
const char * | awar_name, | ||
GBDATA * | gb_main, | ||
const ItemSelector & | itemtype, | ||
FailIfField | failIf = FIF_STANDARD |
||
) |
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().
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().
void species_field_selection_list_rescan | ( | GBDATA * | gb_main, |
RescanMode | mode | ||
) |
Definition at line 97 of file changekey.cxx.
References CHANGE_KEY_PATH, delete_unused_changekeys(), FIELD_FILTER_STRING_READABLE, GB_pop_transaction(), GB_push_transaction(), gb_species_data, GB_STRING, GB_warning_if(), GBT_add_new_species_changekey(), GBT_get_species_data(), GBT_scan_db(), is_in_reserved_path(), names, NULp, RESCAN_REFRESH, RESCAN_SHOW_ALL, and show_all_changekeys().
Referenced by ArbImporter::import_data(), species_field_selection_list_unhide_all_cb(), and species_field_selection_list_update_cb().
void gene_field_selection_list_rescan | ( | GBDATA * | gb_main, |
RescanMode | mode | ||
) |
Definition at line 129 of file changekey.cxx.
References CHANGE_KEY_PATH_GENES, delete_unused_changekeys(), FIELD_FILTER_STRING_READABLE, GB_INT, GB_pop_transaction(), GB_push_transaction(), gb_species_data, GB_STRING, GB_warning_if(), GBT_add_new_gene_changekey(), GBT_get_species_data(), GBT_scan_db(), names, RESCAN_REFRESH, RESCAN_SHOW_ALL, and show_all_changekeys().
Referenced by gene_field_selection_list_unhide_all_cb(), gene_field_selection_list_update_cb(), and ArbImporter::import_data().
Definition at line 188 of file changekey.cxx.
References RESCAN_SHOW_ALL, and species_field_selection_list_rescan().
Referenced by DBUI::insert_field_admin_menuitems().
Definition at line 189 of file changekey.cxx.
References RESCAN_REFRESH, and species_field_selection_list_rescan().
Referenced by DBUI::insert_field_admin_menuitems().
Definition at line 191 of file changekey.cxx.
References gene_field_selection_list_rescan(), and RESCAN_SHOW_ALL.
Referenced by GEN_create_field_items().
Definition at line 192 of file changekey.cxx.
References gene_field_selection_list_rescan(), and RESCAN_REFRESH.
Referenced by GEN_create_field_items().
Definition at line 194 of file changekey.cxx.
References experiment_field_selection_list_rescan(), and RESCAN_SHOW_ALL.
Referenced by EXP_create_field_items().
Definition at line 195 of file changekey.cxx.
References experiment_field_selection_list_rescan(), and RESCAN_REFRESH.
Referenced by EXP_create_field_items().
Definition at line 41 of file item_sel_list.h.
Referenced by create_mg_merge_tagged_fields_window(), and RefEntries::create_refentries_window().
Definition at line 42 of file item_sel_list.h.
Referenced by create_mg_check_fields_window(), create_next_neighbours_listed_window(), and STAT_create_chimera_check_window().
Definition at line 43 of file item_sel_list.h.
Referenced by createMergeSimilarSpeciesWindow(), ED4_popup_detect_bad_alignment_window(), and NT_create_compare_taxonomy_window().
CONSTEXPR long FIELD_FILTER_BYTE_WRITEABLE = (1<<GB_STRING) | (1<<GB_INT) | (1<<GB_BYTE) | (1<<GB_FLOAT) |
Definition at line 44 of file item_sel_list.h.
Referenced by ED4_configure_species_flags().
Definition at line 45 of file item_sel_list.h.
CONSTEXPR long FIELD_FILTER_STRING_READABLE = (1<<GB_BYTE)|(1<<GB_INT)|(1<<GB_FLOAT)|(1<<GB_STRING)|(1<<GB_BITS) |
Definition at line 47 of file item_sel_list.h.
Referenced by create_field_convert_window(), create_group_species_by_field_window(), create_mg_check_fields_window(), create_modify_fields_window(), QUERY::create_query_box(), create_writeFieldOfListed_window(), createMergeSimilarSpeciesWindow(), ItemFieldShader::customize(), experiment_field_selection_list_rescan(), gene_field_selection_list_rescan(), NT_create_species_join_window(), and species_field_selection_list_rescan().
Definition at line 49 of file item_sel_list.h.
Referenced by DBUI::create_field_delete_window(), DBUI::create_fields_reorder_window(), create_set_protection_window(), and popup_single_field_transfer_window().
CONSTEXPR long FIELD_FILTER_ANY_FIELD = (FIELD_UNFILTERED ^ (1<<GB_DB)) |
Definition at line 50 of file item_sel_list.h.
Referenced by popup_single_field_transfer_window().
CONSTEXPR long FIELD_FILTER_NDS = FIELD_FILTER_STRING_READABLE |
Definition at line 52 of file item_sel_list.h.
Referenced by createDisplayField_window(), GEN_open_nds_window(), and NDS_create_window().