ARB
|
#include <aw_select.hxx>
Public Member Functions | |
AW_selection_list (const char *variable_name_, int variable_type_, Widget select_list_widget_) | |
~AW_selection_list () | |
const char * | get_awar_name () const |
GB_TYPES | get_awar_type () const |
size_t | size () |
void | insert (const char *displayed, const AW_scalar &value) |
void | insert_default (const char *displayed, const AW_scalar &value) |
template<class T > | |
void | insert (const char *displayed, T value) |
template<class T > | |
void | insert_default (const char *displayed, T value) |
void | init_from_array (const CharPtrArray &entries, const char *default_displayed, const char *default_value) |
void | update () |
void | refresh () |
void | set_update_callback (sellist_update_cb ucb, AW_CL cl_user) |
void | sort (bool backward, bool case_sensitive) |
void | sortCustom (sellist_cmp_fun cmp) |
AW_scalar | get_awar_value () const |
void | set_awar_value (const AW_scalar &new_value) |
const AW_scalar * | get_default_value () const |
const char * | get_default_display () const |
void | select_default () |
const AW_scalar * | get_selected_value () const |
int | get_index_of (const AW_scalar &searched_value) |
int | get_index_of_selected () |
const AW_scalar * | get_value_at (int index) |
void | select_element_at (int wanted_index) |
void | move_selection (int offset) |
bool | default_is_selected () const |
void | delete_element_at (int index) |
void | delete_value (const AW_scalar &value) |
void | delete_default () |
void | clear () |
void | move_content_to (AW_selection_list *target_list) |
void | to_array (StrArray &array, bool values) |
GB_HASH * | to_hash (bool case_sens) |
char * | get_content_as_string (long number_of_lines) |
void | set_file_suffix (const char *suffix) |
GB_ERROR | load (const char *filename) |
GB_ERROR | save (const char *filename, long number_of_lines) |
Public Attributes | |
Widget | select_list_widget |
AW_selection_list_entry * | list_table |
AW_selection_list_entry * | last_of_list_table |
AW_selection_list_entry * | default_select |
AW_selection_list * | next |
Definition at line 58 of file aw_select.hxx.
AW_selection_list::AW_selection_list | ( | const char * | variable_name_, |
int | variable_type_, | ||
Widget | select_list_widget_ | ||
) |
Definition at line 32 of file AW_select.cxx.
AW_selection_list::~AW_selection_list | ( | ) |
Definition at line 44 of file AW_select.cxx.
References clear().
|
inline |
Definition at line 82 of file aw_select.hxx.
|
inline |
Definition at line 84 of file aw_select.hxx.
size_t AW_selection_list::size | ( | ) |
Definition at line 459 of file AW_select.cxx.
References list_table, and AW_selection_list_entry::next.
Referenced by AW_subset_selection::delete_entries_missing_in_parent(), MP_compute(), probe_match_all_event(), remove_probe_from_collection_event(), reorder_configs_cb(), sortCustom(), to_array(), to_hash(), and update().
Definition at line 380 of file AW_select.cxx.
References AW_scalar::get_type_name(), AW_scalar::matches_variable_type(), and TERMINATE_selection_type_mismatch().
Referenced by add_probe_to_collection_event(), awt_add_sequences_to_list(), awtc_nn_search(), calc_and_update_alignment_errors_cb(), calculate_preserves_cb(), AW_subset_selection::collect_subset_cb(), QUERY::DbQuery_update_list(), File_selection::fill(), SAI_selection::fill(), AW_subset_selection::fill_entries_matching_values(), fillSelNamList(), init_from_array(), AW_selection::insert(), ProbeValuation::insert_in_result_list(), StorableSelectionList::load(), MG_update_selection_list_on_field_transfers(), MP_collect_probes(), MP_Comment(), MP_gen_quality(), MP_gen_singleprobe(), MP_modify_selected(), MP_new_sequence(), NT_create_colstat_2_gnuplot_window(), NT_fill_canvas_selection_list(), primer_design_event_go(), probe_match_event(), refill_boolrules_sellist(), ImportTestData::refill_species_list(), refresh_availfield_selbox_cb(), refresh_inputfield_selbox_cb(), refresh_rule_selection_box_cb(), resolve_IUPAC_target_string(), show_probes_in_sellist(), show_soft_link(), update_ClrTransTabNamesList_cb(), ClustersData::update_cluster_selection_list(), and update_colorset_selection_list().
Definition at line 385 of file AW_select.cxx.
References default_select, delete_default(), AW_scalar::get_type_name(), AW_scalar::matches_variable_type(), and TERMINATE_selection_type_mismatch().
Referenced by awt_clear_selection_list_cb(), awt_create_select_filter_window_gb_cb(), awtc_nn_search(), calc_and_update_alignment_errors_cb(), clear_candidates(), create_IUPAC_resolve_window(), create_next_neighbours_selected_window(), create_probe_collection_window(), create_probe_match_window(), create_probe_match_with_specificity_window(), QUERY::create_query_box(), MP_Window::create_result_window(), QUERY::DbQuery_update_list(), ED4_popup_detect_bad_alignment_window(), File_selection::fill(), SAI_selection::fill(), fillSelNamList(), ImportTestData::forgetLastImport(), init_from_array(), AW_selection::insert_default(), ProbeValuation::insert_in_result_list(), StorableSelectionList::load(), MG_update_selection_list_on_field_transfers(), move_content_to(), MP_compute(), MP_gen_quality(), MP_gen_singleprobe(), MP_modify_selected(), MP_Window::MP_Window(), NT_create_colstat_2_gnuplot_window(), primer_design_event_go(), probe_match_event(), refill_boolrules_sellist(), ImportTestData::refill_species_list(), refill_syncWithList_cb(), refresh_availfield_selbox_cb(), refresh_inputfield_selbox_cb(), refresh_rule_selection_box_cb(), remove_probe_from_collection_event(), resolve_IUPAC_target_string(), show_probes_in_sellist(), update_ClrTransTabNamesList_cb(), ClustersData::update_cluster_selection_list(), and update_colorset_selection_list().
|
inline |
Definition at line 94 of file aw_select.hxx.
References insert_default().
Referenced by insert_default().
void AW_selection_list::init_from_array | ( | const CharPtrArray & | entries, |
const char * | default_displayed, | ||
const char * | default_value | ||
) |
Definition at line 322 of file AW_select.cxx.
References aw_assert, clear(), get_selected_value(), insert(), insert_default(), set_awar_value(), and update().
Referenced by fill_SAI_group_selection_list(), init_alignments(), refresh_config_sellist_cb(), refresh_reference_list_cb(), and AW_subset_selection::reorder_subset_cb().
void AW_selection_list::update | ( | ) |
Definition at line 53 of file AW_select.cxx.
References default_select, AW_selection_list_entry::get_displayed(), list_table, AW_selection_list_entry::next, NULp, refresh(), select_list_widget, size(), and XmStringCreateSimple_wrapper().
Referenced by add_probe_to_collection_event(), awt_clear_selection_list_cb(), awt_create_select_filter_window_gb_cb(), awtc_nn_search(), calc_and_update_alignment_errors_cb(), calculate_preserves_cb(), clear_candidates(), AW_subset_selection::collect_subset_cb(), create_next_neighbours_selected_window(), QUERY::create_query_box(), QUERY::DbQuery_update_list(), AW_subset_selection::delete_entries_missing_in_parent(), ED4_popup_detect_bad_alignment_window(), File_selection::fill(), SAI_selection::fill(), fillSelNamList(), ImportTestData::forgetLastImport(), init_from_array(), ProbeValuation::insert_in_result_list(), StorableSelectionList::load(), MG_update_selection_list_on_field_transfers(), modify_probe_event(), MP_collect_probes(), MP_Comment(), MP_compute(), MP_delete_selected(), MP_gen_quality(), MP_gen_singleprobe(), MP_modify_selected(), MP_new_sequence(), NT_create_colstat_2_gnuplot_window(), primer_design_event_go(), probe_match_all_event(), probe_match_event(), refill_boolrules_sellist(), ImportTestData::refill_species_list(), refill_syncWithList_cb(), AW_selection::refresh(), refresh_availfield_selbox_cb(), refresh_inputfield_selbox_cb(), refresh_rule_selection_box_cb(), remove_probe_from_collection_event(), resolve_IUPAC_target_string(), show_probes_in_sellist(), update_ClrTransTabNamesList_cb(), ClustersData::update_cluster_selection_list(), and update_colorset_selection_list().
void AW_selection_list::refresh | ( | ) |
Definition at line 99 of file AW_select.cxx.
References aw_assert, AW_FLOAT, AW_INT, AW_POINTER, AW_STRING, AW_root::awar(), default_select, GB_warning(), GBK_terminatef(), AW_scalar::get_float(), AW_scalar::get_int(), AW_scalar::get_pointer(), AW_scalar::get_string(), AW_selection_list_entry::get_value(), list_table, AW_selection_list_entry::next, NULp, AW_awar::read_float(), AW_awar::read_int(), AW_awar::read_pointer(), AW_awar::read_string(), select_list_widget, and AW_root::SINGLETON.
Referenced by update().
void AW_selection_list::set_update_callback | ( | sellist_update_cb | ucb, |
AW_CL | cl_user | ||
) |
Definition at line 92 of file AW_select.cxx.
References aw_assert.
Referenced by awt_create_subset_selection_list().
void AW_selection_list::sort | ( | bool | backward, |
bool | case_sensitive | ||
) |
Definition at line 502 of file AW_select.cxx.
References ARB_stricmp(), cmp, sel_isort_backward(), sel_sort_backward(), and sortCustom().
Referenced by File_selection::fill(), SAI_selection::fill(), fillSelNamList(), MP_collect_probes(), MP_gen_quality(), MP_gen_singleprobe(), MP_modify_selected(), MP_new_sequence(), and probe_match_all_event().
void AW_selection_list::sortCustom | ( | sellist_cmp_fun | cmp | ) |
Definition at line 478 of file AW_select.cxx.
References gb_compare_function__2__sellist_cmp_fun(), GB_sort(), last_of_list_table, list_table, AW_selection_list_entry::next, NULp, and size().
Referenced by File_selection::fill(), and sort().
AW_scalar AW_selection_list::get_awar_value | ( | ) | const |
Definition at line 274 of file AW_select.cxx.
References AW_root::awar(), and AW_root::SINGLETON.
Referenced by AW_subset_selection::collect_subset_cb(), get_index_of_selected(), GroupUIdata::get_selected_group(), and AW_subset_selection::reorder_subset_cb().
void AW_selection_list::set_awar_value | ( | const AW_scalar & | new_value | ) |
Definition at line 444 of file AW_select.cxx.
References AW_root::awar(), AW_root::SINGLETON, and AW_scalar::write_to().
Referenced by AW_subset_selection::collect_subset_cb(), init_from_array(), select_default(), and select_element_at().
const AW_scalar * AW_selection_list::get_default_value | ( | ) | const |
Definition at line 298 of file AW_select.cxx.
References default_select, AW_selection_list_entry::get_value(), and NULp.
Referenced by default_is_selected(), AW_subset_selection::default_select_value(), AW_subset_selection::reorder_subset_cb(), select_default(), and select_element_at().
const char * AW_selection_list::get_default_display | ( | ) | const |
Definition at line 295 of file AW_select.cxx.
References default_select, AW_selection_list_entry::get_displayed(), and NULp.
Referenced by AW_subset_selection::default_select_display(), and AW_subset_selection::reorder_subset_cb().
void AW_selection_list::select_default | ( | ) |
Definition at line 244 of file AW_select.cxx.
References get_default_value(), and set_awar_value().
Referenced by delete_element_at().
const AW_scalar * AW_selection_list::get_selected_value | ( | ) | const |
Definition at line 210 of file AW_select.cxx.
References aw_assert, default_select, AW_selection_list_entry::get_value(), list_table, AW_selection_list_entry::next, NULp, and select_list_widget.
Referenced by default_is_selected(), and init_from_array().
get index of an entry in the selection list
Definition at line 303 of file AW_select.cxx.
References AW_selection_list_entry::get_value().
Referenced by AW_subset_selection::collect_subset_cb(), delete_value(), get_index_of_selected(), GroupUIdata::get_selected_group(), and reorder_configs_cb().
int AW_selection_list::get_index_of_selected | ( | ) |
Definition at line 316 of file AW_select.cxx.
References get_awar_value(), and get_index_of().
Referenced by add_field_cb(), del_boolrule_cb(), delete_element_at(), field_delete_cb(), mod_boolrule_cb(), modify_probe_event(), move_field_cb(), move_selection(), MP_collect_probes(), MP_delete_selected(), remove_probe_from_collection_event(), reorder_keys(), and reorder_up_down().
Definition at line 425 of file AW_select.cxx.
References AW_selection_list_entry::get_value(), and NULp.
Referenced by AW_subset_selection::delete_entries_missing_in_parent(), and select_element_at().
void AW_selection_list::select_element_at | ( | int | wanted_index | ) |
Definition at line 433 of file AW_select.cxx.
References aw_assert, get_default_value(), get_value_at(), and set_awar_value().
Referenced by add_field_cb(), AW_subset_selection::collect_subset_cb(), del_boolrule_cb(), field_delete_cb(), mod_boolrule_cb(), move_field_cb(), move_selection(), MP_delete_selected(), remove_probe_from_collection_event(), reorder_keys(), and reorder_up_down().
void AW_selection_list::move_selection | ( | int | offset | ) |
move selection 'offset' position offset == 1 -> select next element offset == -1 -> select previous element
Definition at line 415 of file AW_select.cxx.
References get_index_of_selected(), and select_element_at().
Referenced by add_selected_cb(), hide_field_cb(), MP_Comment(), MP_show_probes_in_tree_move(), and nt_delete_configuration().
bool AW_selection_list::default_is_selected | ( | ) | const |
Definition at line 203 of file AW_select.cxx.
References get_default_value(), and get_selected_value().
Referenced by AW_subset_selection::collect_subset_cb(), MP_collect_probes(), MP_delete_selected(), and AW_subset_selection::reorder_subset_cb().
void AW_selection_list::delete_element_at | ( | int | index | ) |
Definition at line 248 of file AW_select.cxx.
References aw_assert, default_select, get_index_of_selected(), if, last_of_list_table, list_table, AW_selection_list_entry::next, NULp, and select_default().
Referenced by AW_subset_selection::collect_subset_cb(), AW_subset_selection::delete_entries_missing_in_parent(), delete_value(), MP_delete_selected(), and remove_probe_from_collection_event().
void AW_selection_list::delete_value | ( | const AW_scalar & | value | ) |
Definition at line 269 of file AW_select.cxx.
References delete_element_at(), and get_index_of().
Referenced by MP_Comment(), MP_gen_quality(), and MP_gen_singleprobe().
void AW_selection_list::delete_default | ( | ) |
Removes the default entry from the list
Definition at line 372 of file AW_select.cxx.
References default_select, and NULp.
Referenced by clear(), insert_default(), and move_content_to().
void AW_selection_list::clear | ( | ) |
Remove all items from the list. Default item is removed as well.
Definition at line 190 of file AW_select.cxx.
References delete_default(), last_of_list_table, list_table, AW_selection_list_entry::next, and NULp.
Referenced by awt_clear_selection_list_cb(), awt_create_select_filter_window_gb_cb(), awtc_nn_search(), calc_and_update_alignment_errors_cb(), clear_candidates(), AW_subset_selection::collect_subset_cb(), QUERY::DbQuery_update_list(), File_selection::fill(), SAI_selection::fill(), AW_subset_selection::fill_entries_matching_values(), fillSelNamList(), ImportTestData::forgetLastImport(), init_from_array(), ProbeValuation::insert_in_result_list(), StorableSelectionList::load(), MG_update_selection_list_on_field_transfers(), move_content_to(), MP_compute(), MP_modify_selected(), primer_design_event_go(), probe_match_event(), refill_boolrules_sellist(), refill_syncWithList_cb(), AW_selection::refresh(), refresh_availfield_selbox_cb(), refresh_inputfield_selbox_cb(), refresh_rule_selection_box_cb(), resolve_IUPAC_target_string(), show_probes_in_sellist(), update_ClrTransTabNamesList_cb(), ClustersData::update_cluster_selection_list(), update_colorset_selection_list(), and ~AW_selection_list().
void AW_selection_list::move_content_to | ( | AW_selection_list * | target_list | ) |
move all entries (despite default entry) to another AW_selection_list
Definition at line 391 of file AW_select.cxx.
References clear(), default_select, delete_default(), AW_selection_list_entry::get_displayed(), AW_scalar::get_string(), AW_selection_list_entry::get_value(), insert_default(), list_table, and AW_selection_list_entry::next.
Referenced by MP_collect_probes().
void AW_selection_list::to_array | ( | StrArray & | array, |
bool | values | ||
) |
read contents of selection list into an array.
values | true->read values, false->read displayed strings Use GBT_free_names() to free the result. |
Note: if 'values' is true, this function only works for string selection lists!
Definition at line 516 of file AW_select.cxx.
References aw_assert, list_table, AW_selection_list_entry::next, and size().
Referenced by AW_selection::get_displayed(), AW_selection::get_values(), reorder_configs_cb(), AW_subset_selection::reorder_subset_cb(), and StorableSelectionList::save().
GB_HASH * AW_selection_list::to_hash | ( | bool | case_sens | ) |
Definition at line 532 of file AW_select.cxx.
References GB_IGNORE_CASE, GB_MIND_CASE, GBS_create_hash(), GBS_write_hash(), list_table, long, AW_selection_list_entry::next, and size().
Referenced by awtc_mark_hits(), and QUERY::copy_selection_list_2_query_box().
Definition at line 280 of file AW_select.cxx.
References GBS_strstruct::cat(), AW_selection_list_entry::get_displayed(), list_table, AW_selection_list_entry::next, GBS_strstruct::put(), and GBS_strstruct::release().
Referenced by create_print_box_for_selection_lists().
void AW_selection_list::set_file_suffix | ( | const char * | suffix | ) |
Definition at line 450 of file AW_select.cxx.
References AW_root::awar_string(), and AW_root::SINGLETON.
Referenced by MP_Window::create_result_window().
Widget AW_selection_list::select_list_widget |
Definition at line 73 of file aw_select.hxx.
Referenced by get_selected_value(), refresh(), and update().
AW_selection_list_entry* AW_selection_list::list_table |
Definition at line 75 of file aw_select.hxx.
Referenced by clear(), delete_element_at(), get_content_as_string(), get_selected_value(), move_content_to(), refresh(), size(), sortCustom(), to_array(), to_hash(), and update().
AW_selection_list_entry* AW_selection_list::last_of_list_table |
Definition at line 76 of file aw_select.hxx.
Referenced by clear(), delete_element_at(), and sortCustom().
AW_selection_list_entry* AW_selection_list::default_select |
Definition at line 77 of file aw_select.hxx.
Referenced by delete_default(), delete_element_at(), get_default_display(), get_default_value(), get_selected_value(), insert_default(), move_content_to(), refresh(), and update().
AW_selection_list* AW_selection_list::next |
Definition at line 78 of file aw_select.hxx.