ARB
|
#include <ed4_extern.hxx>
#include "ed4_awars.hxx"
#include "ed4_class.hxx"
#include "ed4_tools.hxx"
#include "ed4_edit_string.hxx"
#include <fast_aligner.hxx>
#include <awt_config_manager.hxx>
#include <aw_awars.hxx>
#include <aw_file.hxx>
#include <aw_msg.hxx>
#include <aw_root.hxx>
#include <aw_question.hxx>
#include <arbdbt.h>
#include <climits>
#include <cctype>
#include <cerrno>
#include <map>
Go to the source code of this file.
Classes | |
struct | SearchAwarList |
class | SearchSettings |
class | SearchTreeNode |
class | SearchTree |
struct | LoadSaveSearchParam |
struct | search_windows |
Macros | |
#define | INSERT_ROOT_PATTERN(tok, com) |
#define | AWAR_NAME(t, s) ED4_AWAR_##t##_SEARCH_##s |
#define | AWAR_LIST(t) |
#define | cb(action) add_callback(makeRootCallback(searchParamsChanged, ED4_SearchPositionType(i), search_params_changed_action(action))); |
#define | ESC '\\' |
Typedefs | |
typedef void(* | reportMatch )(int start, int end, GB_CSTR comment, int mismatches[MAX_MISMATCHES]) |
typedef std::map< ED4_window *, SmartPtr< search_windows > > | search_window_map |
Enumerations | |
enum | search_params_changed_action { REFRESH_IF_SHOWN = 1, REFRESH_ALWAYS = 2, RECALC_SEARCH_TREE = 4, TEST_MIN_MISMATCH = 8, TEST_MAX_MISMATCH = 16, DO_AUTO_JUMP = 32 } |
Variables | |
const char * | ED4_SearchPositionTypeId [SEARCH_PATTERNS+1] |
static struct SearchAwarList | awar_list [SEARCH_PATTERNS] |
static SearchSettings * | settings [SEARCH_PATTERNS] |
static SearchTree * | tree [SEARCH_PATTERNS] |
static ED4_SearchResults * | reportToResult = NULp |
static ED4_SearchPositionType | reportType |
static int | last_searchDescriptor = -1 |
#define INSERT_ROOT_PATTERN | ( | tok, | |
com | |||
) |
Referenced by SearchTree::SearchTree().
Definition at line 584 of file ED4_search.cxx.
#define AWAR_LIST | ( | t | ) |
Definition at line 586 of file ED4_search.cxx.
#define cb | ( | action | ) | add_callback(makeRootCallback(searchParamsChanged, ED4_SearchPositionType(i), search_params_changed_action(action))); |
Referenced by AW_root_cblist::add(), LocationEditor::add_pos_changed_cb(), TREE_canvas::at_screen_update_call(), gb_callback_list::call(), ED4_cb_list< ED4_species_manager, ED4_species_managerCallback >::call(), gb_pending_callbacks::call_and_forget(), TrackedFile::callAll(), AW_cb::contains(), CallbackList< gb_hierarchy_callback >::contains_unremoved_callback(), CallbackList< CB >::contains_unremoved_callback(), create_config_manager_window(), ED4_seq_colors::ED4_seq_colors(), ED4_with_all_edit_windows(), free_action(), GB_ensure_callback(), GB_get_callback_info(), GBK_raises_SIGSEGV(), glwInput(), AW_cb::is_equal(), IsSpecificHierarchyCallback::operator()(), Realize(), Redraw(), CallbackList< gb_callback >::remove_callbacks_that(), Resize(), ED4_base::route_down_hierarchy(), ED4_manager::route_down_hierarchy(), AW_cb::run_callbacks(), SEC_seq_data::SEC_seq_data(), DI_GLOBAL_MATRIX::set_changed_cb(), AP_tree_root::set_node_deleted_callback(), AP_tree_root::set_root_changed_callback(), with_affected_clusters_do(), and GEN_map_manager::with_all_mapped_windows().
#define ESC '\\' |
Definition at line 1386 of file ED4_search.cxx.
Referenced by pattern2str(), and str2pattern().
Definition at line 123 of file ED4_search.cxx.
typedef std::map<ED4_window*, SmartPtr<search_windows> > search_window_map |
Definition at line 1654 of file ED4_search.cxx.
Enumerator | |
---|---|
REFRESH_IF_SHOWN | |
REFRESH_ALWAYS | |
RECALC_SEARCH_TREE | |
TEST_MIN_MISMATCH | |
TEST_MAX_MISMATCH | |
DO_AUTO_JUMP |
Definition at line 617 of file ED4_search.cxx.
Definition at line 320 of file ED4_search.cxx.
References NULp, and shortenString().
Referenced by SearchTree::SearchTree().
Definition at line 334 of file ED4_search.cxx.
Referenced by SearchTree::SearchTree().
|
inlinestatic |
Definition at line 613 of file ED4_search.cxx.
References ED4_root::aw_root, AW_root::awar(), ED4_ROOT, AW_awar::read_int(), and SearchAwarList::show.
Referenced by ED4_SearchResults::ED4_SearchResults(), ED4_SearchResults::get_first_starting_after(), ED4_SearchResults::get_last_starting_before(), searchParamsChanged(), and ED4_SearchResults::setNewSearch().
|
static |
Definition at line 633 of file ED4_search.cxx.
References abs, aw_message(), AW_root::awar(), current_cursor(), current_ed4w(), DO_AUTO_JUMP, ED4_AWAR_SEARCH_RESULT_CHANGED, ED4_encodeSearchDescriptor(), ED4_JUMP_KEEP_POSITION, ED4_ROOT, ED4_search_cb(), ED4_root::first_window, GBS_global_string(), ED4_SearchResults::get_first_starting_after(), ED4_SearchResults::get_last_starting_before(), ED4_cursor::get_sequence_pos(), SearchTree::get_shortestPattern(), ED4_SearchPosition::get_start_pos(), ED4_base::is_sequence_terminal(), SearchAwarList::max_mismatches, SearchAwarList::min_mismatches, NULp, ED4_cursor::owner_of_cursor, AW_awar::read_int(), RECALC_SEARCH_TREE, REFRESH_ALWAYS, REFRESH_IF_SHOWN, ED4_root::request_refresh_for_sequence_terminals(), result, ED4_sequence_terminal::results(), resultsAreShown(), ED4_SearchResults::search(), ED4_terminal::setCursorTo(), ED4_SearchResults::setNewSearch(), TEST_MAX_MISMATCH, TEST_MIN_MISMATCH, AW_awar::touch(), type, SearchSettings::update(), win, and AW_awar::write_int().
void ED4_create_search_awars | ( | AW_root * | root | ) |
Definition at line 735 of file ED4_search.cxx.
References ARB_strdup(), SearchAwarList::autoJump, AW_create_fileselection_awars(), AW_root::awar(), AW_root::awar_int(), AW_root::awar_string(), SearchAwarList::complement, DO_AUTO_JUMP, ED4_AWAR_SEARCH_RESULT_CHANGED, ED4_ROOT, ED4_SC_CASE_INSENSITIVE, ED4_SEARCH_SAVE_BASE, ED4_SG_IGNORE_GAPS, ED4_ST_T_EQUAL_U, SearchAwarList::exact, gb_main, GB_path_in_arbprop(), ED4_root::get_gb_main(), SearchAwarList::max_mismatches, SearchAwarList::min_mismatches, NULp, SearchAwarList::openFolded, SearchAwarList::pat_gaps, RECALC_SEARCH_TREE, REFRESH_ALWAYS, REFRESH_IF_SHOWN, SearchAwarList::reverse, SEARCH_PATTERNS, SearchAwarList::seq_gaps, SearchAwarList::show, TEST_MAX_MISMATCH, TEST_MIN_MISMATCH, SearchAwarList::tu, and AW_awar::write_string().
Referenced by ed4_create_all_awars().
|
static |
Definition at line 920 of file ED4_search.cxx.
References ED4_SearchResults::addSearchPosition().
Referenced by ED4_SearchResults::search().
|
inline |
Definition at line 1248 of file ED4_search.cxx.
Referenced by ED4_search_cb().
GB_ERROR ED4_repeat_last_search | ( | ED4_window * | ed4w | ) |
Definition at line 1255 of file ED4_search.cxx.
References ED4_search_cb(), GBS_global_string(), and NULp.
void ED4_search_cb | ( | UNFIXED | , |
int | searchDescriptor, | ||
ED4_window * | ed4w | ||
) |
Definition at line 1264 of file ED4_search.cxx.
References aw_message(), current_cursor(), decodeSearchDescriptor(), ED4_ANY_PATTERN, ED4_JUMP_KEEP_POSITION, ED4_ROOT, ED4_SearchResults::get_first_starting_after(), ED4_manager::get_first_terminal(), ED4_SearchResults::get_last_starting_before(), ED4_manager::get_last_terminal(), ED4_base::get_next_terminal(), ED4_base::get_prev_terminal(), ED4_cursor::get_sequence_pos(), ED4_SearchPosition::get_start_pos(), ED4_base::is_in_folded_group(), ED4_base::is_sequence_terminal(), NULp, ED4_cursor::owner_of_cursor, pattern, ED4_sequence_terminal::results(), ED4_root::root_group_man, ED4_SearchResults::search(), and ED4_terminal::setCursorTo().
Referenced by ED4_popup_search_window(), ED4_repeat_last_search(), ED4_root::generate_window(), insert_search_fields(), and searchParamsChanged().
|
static |
Definition at line 1360 of file ED4_search.cxx.
References e4_assert, ED4_ROOT, GB_write_flag(), ED4_SearchResults::get_first_starting_after(), ED4_manager::get_first_terminal(), ED4_root::get_gb_main(), ED4_base::get_next_terminal(), ED4_base::get_parent(), ED4_base::is_sequence_terminal(), LEV_SPECIES, ED4_sequence_terminal::results(), ED4_root::root_group_man, ED4_SearchResults::search(), and ta.
Referenced by ED4_popup_search_window().
Definition at line 1388 of file ED4_search.cxx.
References ARB_strdup(), ESC, GB_give_buffer(), and s.
Referenced by save_search_paras_to_file().
|
static |
Definition at line 1416 of file ED4_search.cxx.
Referenced by load_search_paras_from_file().
|
static |
Definition at line 1447 of file ED4_search.cxx.
References aw_message(), AW_POPDOWN(), aw_question(), ED4_root::aw_root, AW_root::awar(), ED4_ROOT, ED4_SEARCH_SAVE_BASE, error(), GBS_global_string(), GBS_global_string_copy(), SearchSettings::get_autoJump(), SearchSettings::get_case_sensitive(), SearchSettings::get_complement(), SearchSettings::get_exact(), SearchSettings::get_max_mismatches(), SearchSettings::get_min_mismatches(), SearchSettings::get_open_folded(), SearchSettings::get_pat_gaps(), SearchSettings::get_pattern(), SearchSettings::get_reverse(), SearchSettings::get_seq_gaps(), SearchSettings::get_tu(), NULp, pattern2str(), AW_awar::read_string(), s, and type.
Referenced by loadsave_search_parameters().
|
static |
Definition at line 1512 of file ED4_search.cxx.
References SearchAwarList::autoJump, aw_message(), AW_POPDOWN(), ED4_root::aw_root, AW_root::awar(), buffer, BUFFERSIZE, SearchAwarList::case_sensitive, SearchAwarList::complement, ED4_ROOT, ED4_SEARCH_SAVE_BASE, error(), SearchAwarList::exact, GBS_global_string(), SearchAwarList::max_mismatches, SearchAwarList::min_mismatches, NULp, SearchAwarList::openFolded, SearchAwarList::pat_gaps, SearchAwarList::pattern, AW_awar::read_string(), SearchAwarList::reverse, SearchAwarList::seq_gaps, str2pattern(), SearchAwarList::tu, type, AW_awar::write_int(), and AW_awar::write_string().
Referenced by loadsave_search_parameters().
|
static |
Definition at line 1570 of file ED4_search.cxx.
References GBS_global_string_copy(), and GBS_string_2_key().
Referenced by ED4_popup_search_window(), and loadsave_search_parameters().
|
static |
Definition at line 1592 of file ED4_search.cxx.
References AW_create_standard_fileselection(), AW_POPDOWN(), aws_init_localized(), ED4_SEARCH_SAVE_BASE, load_search_paras_from_file(), makeHelpCallback(), save_search_paras_to_file(), LoadSaveSearchParam::type, and LoadSaveSearchParam::winNum.
Referenced by ED4_popup_search_window().
|
static |
Definition at line 1631 of file ED4_search.cxx.
References AWT_config_definition::add(), SearchAwarList::autoJump, SearchAwarList::case_sensitive, SearchAwarList::complement, SearchAwarList::exact, SearchAwarList::max_mismatches, SearchAwarList::min_mismatches, SearchAwarList::openFolded, SearchAwarList::pat_gaps, SearchAwarList::pattern, SearchAwarList::reverse, SearchAwarList::seq_gaps, SearchAwarList::show, and SearchAwarList::tu.
Referenced by ED4_popup_search_window().
void ED4_popup_search_window | ( | AW_window * | aww, |
ED4_SearchPositionType | type | ||
) |
Definition at line 1656 of file ED4_search.cxx.
References SearchAwarList::autoJump, AW_HORIZONTAL, AW_POPDOWN(), AW_ROOT_DEFAULT, aws_init_localized(), AWT_insert_config_manager(), SearchAwarList::case_sensitive, SearchAwarList::complement, ED4_encodeSearchDescriptor(), ED4_mark_matching_species(), ED4_search_cb(), SearchAwarList::exact, ED4_WinContext::get_ed4w(), AW_window::get_root(), ED4_window::id, loadsave_search_parameters(), makeHelpCallback(), SearchAwarList::max_mismatches, SearchAwarList::min_mismatches, SearchAwarList::openFolded, SearchAwarList::pat_gaps, SearchAwarList::pattern, SearchAwarList::reverse, SearchAwarList::seq_gaps, setup_search_config(), SearchAwarList::show, SearchAwarList::tu, type, and search_windows::windows.
Referenced by ED4_root::generate_window(), and insert_search_fields().
const char* ED4_SearchPositionTypeId[SEARCH_PATTERNS+1] |
Definition at line 35 of file ED4_search.cxx.
Referenced by ED4_root::generate_window().
|
static |
Definition at line 601 of file ED4_search.cxx.
Referenced by MG_create_preserves_selection_window().
|
static |
Definition at line 628 of file ED4_search.cxx.
Referenced by ArbParsimony::optimize_tree().
|
static |
Definition at line 629 of file ED4_search.cxx.
Referenced by add_dtree_to_dtree(), add_to_dtree(), build_dict_tree(), calculate_clusters(), cut_dtree(), cut_useless_words(), DI_MATRIX::extract_from_tree(), gbt_is_invalid(), GBT_read_tree_and_size(), GBT_remove_leafs(), TreeReader::load(), new_dtree(), nt_build_conf_string_rek(), PVP_calculate(), remove_word_from_dtree(), removeSubsequentString(), single2full_dtree(), TREE_load(), and tree_of_cached_taxonomy().
|
static |
Definition at line 917 of file ED4_search.cxx.
|
static |
Definition at line 918 of file ED4_search.cxx.
|
static |
Definition at line 1253 of file ED4_search.cxx.