ARB
Classes | Macros | Enumerations | Functions | Variables
ui_species.cxx File Reference
#include "dbui.h"
#include <awtc_next_neighbours.hxx>
#include <probe_gui.hxx>
#include <item_sel_list.h>
#include <info_window.h>
#include <db_query.h>
#include <awt_sel_boxes.hxx>
#include <awt_config_manager.hxx>
#include <awt_prompt.hxx>
#include <AW_rename.hxx>
#include <aw_awar_defs.hxx>
#include <aw_root.hxx>
#include <aw_msg.hxx>
#include <aw_question.hxx>
#include <arb_defs.h>
#include <arb_strbuf.h>
#include <arb_progress.h>
#include <algorithm>
#include <cmath>
#include <map>
Include dependency graph for ui_species.cxx:

Go to the source code of this file.

Classes

class  KeySorter
 
class  NN_GlobalData
 

Macros

#define ui_assert(cond)   arb_assert(cond)
 
#define AWAR_FIELD_REORDER_ORDER   "tmp/adreorder/order"
 
#define AWAR_FIELD_REORDER_SOURCE_TMPL   "tmp/adreorder/%s/source"
 
#define AWAR_FIELD_REORDER_DEST_TMPL   "tmp/adreorder/%s/dest"
 
#define AWAR_FIELD_CREATE_NAME_TMPL   "tmp/adfield/%s/name"
 
#define AWAR_FIELD_CREATE_TYPE_TMPL   "tmp/adfield/%s/type"
 
#define AWAR_FIELD_DELETE_TMPL   "tmp/adfield/%s/source"
 
#define AWAR_FIELD_CONVERT_SOURCE_TMPL   "tmp/adconvert/%s/source"
 
#define AWAR_FIELD_CONVERT_TYPE_TMPL   "tmp/adconvert/%s/type"
 
#define AWAR_NN_COMPLEMENT   AWAR_NN_BASE "complement"
 
#define AWAR_NN_RANGE_START   AWAR_NN_BASE "range_start"
 
#define AWAR_NN_RANGE_END   AWAR_NN_BASE "range_end"
 
#define AWAR_NN_MIN_SCORE   AWAR_NN_BASE "min_scored"
 
#define AWAR_NN_MAX_HITS   AWAR_NN_BASE "max_hits"
 
#define AWAR_NN_BASE_SELECTED   AWAR_NN_BASE "selected/"
 
#define AWAR_NN_SELECTED_HIT_COUNT   "tmp/" AWAR_NN_BASE_SELECTED "hit_count"
 
#define AWAR_NN_SELECTED_AUTO_SEARCH   "tmp/" AWAR_NN_BASE_SELECTED "auto_search"
 
#define AWAR_NN_SELECTED_AUTO_MARK   "tmp/" AWAR_NN_BASE_SELECTED "auto_mark"
 
#define AWAR_NN_BASE_LISTED   AWAR_NN_BASE "listed/"
 
#define AWAR_NN_LISTED_DEST_FIELD   AWAR_NN_BASE_LISTED "dest_field"
 
#define AWAR_NN_LISTED_SCORED_ENTRIES   AWAR_NN_BASE_LISTED "scored_entries"
 

Enumerations

enum  ReorderMode {
  ORDER_ALPHA, ORDER_TYPE, ORDER_FREQ, RIGHT_BEHIND_LEFT,
  REVERSE_ORDER
}
 

Functions

const charitemAwar (const char *name_template, ItemSelector &itype)
 
static void init_itemspecific_DBUI_awars (AW_root *aw_root, ItemSelector &itype)
 
static void move_species_to_extended (AW_window *aww, GBDATA *gb_main)
 
static GB_ERROR species_create_handler (const char *dest, GBDATA *gb_main)
 
static void species_create_cb (AW_window *, GBDATA *gb_main)
 
static GBDATAexpect_species_selected (AW_root *aw_root, GBDATA *gb_main, char **give_name=NULp)
 
static void species_copy_cb (AW_window *aww, GBDATA *gb_main)
 
static GB_ERROR species_rename_handler (const char *new_fullname, GBDATA *gb_species)
 
static void species_rename_cb (AW_window *aww, GBDATA *gb_main)
 
static void species_delete_cb (AW_window *aww, GBDATA *gb_main)
 
static long count_field_occurrence (BoundItemSel *bsel, const char *field_name)
 
static void reorder_keys (AW_window *aws, ReorderMode mode, Itemfield_Selection *sel_left, Itemfield_Selection *sel_right)
 
static void reorder_right_behind_left (AW_window *aws, Itemfield_Selection *selleft, Itemfield_Selection *selright)
 
static void reverse_key_order (AW_window *aws, Itemfield_Selection *selleft, Itemfield_Selection *selright)
 
static void sort_keys (AW_window *aws, Itemfield_Selection *selleft, Itemfield_Selection *selright)
 
static void reorder_up_down (AW_window *aws, Itemfield_Selection *sel_right, int dir)
 
static void hide_field_cb (AW_window *aws, Itemfield_Selection *item_sel, int hide)
 
static void field_delete_cb (AW_window *aws, Itemfield_Selection *item_sel)
 
static void field_create_cb (AW_window *aws, BoundItemSel *bound_selector)
 
void insert_fieldtype_toggles (AW_window *aws)
 
static void field_convert_commit_cb (AW_window *aws, BoundItemSel *bound_selector)
 
static void field_convert_update_typesel_cb (AW_root *root, BoundItemSel *bound_selector)
 
static AW_windowcreate_field_convert_window (AW_root *root, BoundItemSel *bound_selector)
 
int get_and_fix_range_from_awar (AW_awar *awar)
 
static PosRange get_nn_range_from_awars (AW_root *aw_root)
 
charread_sequence_region (GBDATA *gb_data, const PosRange &range)
 
static void awtc_nn_search_all_listed (AW_window *aww)
 
static void awtc_mark_hits (AW_window *)
 
static void awtc_nn_search (AW_window *)
 
static void awtc_move_hits (AW_window *aww)
 
static unsigned nn_perform_delayed_autosearch_cb (AW_root *)
 
static void nn_trigger_delayed_autosearch_cb (AW_root *awr)
 
static void nn_auto_search_changed_cb (AW_root *awr)
 
static void nn_searchRel_awar_changed_cb (AW_root *awr)
 
static void create_next_neighbours_vars (AW_root *aw_root)
 
static void setup_next_neighbour_config (AWT_config_definition &cdef, bool for_listed)
 
static void create_common_next_neighbour_fields (AW_window *aws, bool for_listed)
 
static AW_windowcreate_next_neighbours_listed_window (AW_root *aw_root, DbQuery *query)
 
static AW_windowcreate_next_neighbours_selected_window (AW_root *aw_root, DbQuery *query)
 
static AW_windowpopup_new_speciesOrganismWindow (AW_root *aw_root, GBDATA *gb_main, bool organismWindow, int detach_id)
 
static void popup_detached_speciesOrganismWindow (AW_window *aw_parent, const InfoWindow *infoWin)
 
static void popup_speciesOrganismWindow (AW_root *aw_root, GBDATA *gb_main, bool organismWindow)
 

Variables

static NN_GlobalData NN_GLOBAL
 
static bool autosearch_triggered = false
 
static AW_windownn_of_sel_win = NULp
 
static AWT_config_mapping_def next_neighbour_config_mapping []
 
static DbQueryGLOBAL_species_query = NULp
 

Macro Definition Documentation

#define ui_assert (   cond)    arb_assert(cond)
#define AWAR_FIELD_REORDER_ORDER   "tmp/adreorder/order"
#define AWAR_FIELD_REORDER_SOURCE_TMPL   "tmp/adreorder/%s/source"
#define AWAR_FIELD_REORDER_DEST_TMPL   "tmp/adreorder/%s/dest"
#define AWAR_FIELD_CREATE_NAME_TMPL   "tmp/adfield/%s/name"
#define AWAR_FIELD_CREATE_TYPE_TMPL   "tmp/adfield/%s/type"
#define AWAR_FIELD_DELETE_TMPL   "tmp/adfield/%s/source"
#define AWAR_FIELD_CONVERT_SOURCE_TMPL   "tmp/adconvert/%s/source"
#define AWAR_FIELD_CONVERT_TYPE_TMPL   "tmp/adconvert/%s/type"
#define AWAR_NN_COMPLEMENT   AWAR_NN_BASE "complement"
#define AWAR_NN_RANGE_START   AWAR_NN_BASE "range_start"
#define AWAR_NN_RANGE_END   AWAR_NN_BASE "range_end"
#define AWAR_NN_MIN_SCORE   AWAR_NN_BASE "min_scored"
#define AWAR_NN_MAX_HITS   AWAR_NN_BASE "max_hits"
#define AWAR_NN_BASE_SELECTED   AWAR_NN_BASE "selected/"

Definition at line 64 of file ui_species.cxx.

#define AWAR_NN_SELECTED_HIT_COUNT   "tmp/" AWAR_NN_BASE_SELECTED "hit_count"
#define AWAR_NN_SELECTED_AUTO_SEARCH   "tmp/" AWAR_NN_BASE_SELECTED "auto_search"
#define AWAR_NN_SELECTED_AUTO_MARK   "tmp/" AWAR_NN_BASE_SELECTED "auto_mark"
#define AWAR_NN_BASE_LISTED   AWAR_NN_BASE "listed/"

Definition at line 70 of file ui_species.cxx.

#define AWAR_NN_LISTED_DEST_FIELD   AWAR_NN_BASE_LISTED "dest_field"
#define AWAR_NN_LISTED_SCORED_ENTRIES   AWAR_NN_BASE_LISTED "scored_entries"

Enumeration Type Documentation

Enumerator
ORDER_ALPHA 
ORDER_TYPE 
ORDER_FREQ 
RIGHT_BEHIND_LEFT 
REVERSE_ORDER 

Definition at line 74 of file ui_species.cxx.

Function Documentation

const char* itemAwar ( const char name_template,
ItemSelector itype 
)
inline
static void init_itemspecific_DBUI_awars ( AW_root aw_root,
ItemSelector itype 
)
static
static void move_species_to_extended ( AW_window aww,
GBDATA gb_main 
)
static
static GB_ERROR species_create_handler ( const char dest,
GBDATA gb_main 
)
static
static void species_create_cb ( AW_window ,
GBDATA gb_main 
)
static

Definition at line 165 of file ui_species.cxx.

References AWT_activate_prompt(), and species_create_handler().

Referenced by popup_new_speciesOrganismWindow().

static GBDATA* expect_species_selected ( AW_root aw_root,
GBDATA gb_main,
char **  give_name = NULp 
)
static
static void species_copy_cb ( AW_window aww,
GBDATA gb_main 
)
static
static GB_ERROR species_rename_handler ( const char new_fullname,
GBDATA gb_species 
)
static
static void species_rename_cb ( AW_window aww,
GBDATA gb_main 
)
static
static void species_delete_cb ( AW_window aww,
GBDATA gb_main 
)
static
static long count_field_occurrence ( BoundItemSel bsel,
const char field_name 
)
static
static void reorder_keys ( AW_window aws,
ReorderMode  mode,
Itemfield_Selection sel_left,
Itemfield_Selection sel_right 
)
static
static void reorder_right_behind_left ( AW_window aws,
Itemfield_Selection selleft,
Itemfield_Selection selright 
)
static

Definition at line 544 of file ui_species.cxx.

References reorder_keys(), and RIGHT_BEHIND_LEFT.

Referenced by DBUI::create_fields_reorder_window().

static void reverse_key_order ( AW_window aws,
Itemfield_Selection selleft,
Itemfield_Selection selright 
)
static

Definition at line 545 of file ui_species.cxx.

References reorder_keys(), and REVERSE_ORDER.

Referenced by DBUI::create_fields_reorder_window().

static void sort_keys ( AW_window aws,
Itemfield_Selection selleft,
Itemfield_Selection selright 
)
static
static void reorder_up_down ( AW_window aws,
Itemfield_Selection sel_right,
int  dir 
)
static
static void hide_field_cb ( AW_window aws,
Itemfield_Selection item_sel,
int  hide 
)
static
static void field_delete_cb ( AW_window aws,
Itemfield_Selection item_sel 
)
static
static void field_create_cb ( AW_window aws,
BoundItemSel bound_selector 
)
static
void insert_fieldtype_toggles ( AW_window aws)
inline
static void field_convert_commit_cb ( AW_window aws,
BoundItemSel bound_selector 
)
static
static void field_convert_update_typesel_cb ( AW_root root,
BoundItemSel bound_selector 
)
static
static AW_window* create_field_convert_window ( AW_root root,
BoundItemSel bound_selector 
)
static
int get_and_fix_range_from_awar ( AW_awar awar)
inline
static PosRange get_nn_range_from_awars ( AW_root aw_root)
static
char* read_sequence_region ( GBDATA gb_data,
const PosRange range 
)
inline
static void awtc_nn_search_all_listed ( AW_window aww)
static
static void awtc_mark_hits ( AW_window )
static
static void awtc_nn_search ( AW_window )
static
static void awtc_move_hits ( AW_window aww)
static
static unsigned nn_perform_delayed_autosearch_cb ( AW_root )
static

Definition at line 1186 of file ui_species.cxx.

References autosearch_triggered, awtc_nn_search(), and NULp.

Referenced by nn_trigger_delayed_autosearch_cb().

static void nn_trigger_delayed_autosearch_cb ( AW_root awr)
static
static void nn_auto_search_changed_cb ( AW_root awr)
static
static void nn_searchRel_awar_changed_cb ( AW_root awr)
static
static void create_next_neighbours_vars ( AW_root aw_root)
static
static void setup_next_neighbour_config ( AWT_config_definition cdef,
bool  for_listed 
)
static
static void create_common_next_neighbour_fields ( AW_window aws,
bool  for_listed 
)
static
static AW_window* create_next_neighbours_listed_window ( AW_root aw_root,
DbQuery query 
)
static
static AW_window* create_next_neighbours_selected_window ( AW_root aw_root,
DbQuery query 
)
static
static AW_window * popup_new_speciesOrganismWindow ( AW_root aw_root,
GBDATA gb_main,
bool  organismWindow,
int  detach_id 
)
static
static void popup_detached_speciesOrganismWindow ( AW_window aw_parent,
const InfoWindow infoWin 
)
static
static void popup_speciesOrganismWindow ( AW_root aw_root,
GBDATA gb_main,
bool  organismWindow 
)
static

Variable Documentation

NN_GlobalData NN_GLOBAL
static

Definition at line 946 of file ui_species.cxx.

bool autosearch_triggered = false
static
AW_window* nn_of_sel_win = NULp
static

Definition at line 1213 of file ui_species.cxx.

AWT_config_mapping_def next_neighbour_config_mapping[]
static
Initial value:
= {
{ AWAR_NN_OLIGO_LEN, "oligolen" },
{ AWAR_NN_MISMATCHES, "mismatches" },
{ AWAR_NN_FAST_MODE, "fastmode" },
{ AWAR_NN_REL_MATCHES, "relmatches" },
{ AWAR_NN_REL_SCALING, "relscaling" },
{ AWAR_NN_COMPLEMENT, "complement" },
{ AWAR_NN_RANGE_START, "rangestart" },
{ AWAR_NN_RANGE_END, "rangeend" },
{ AWAR_NN_MAX_HITS, "maxhits" },
{ AWAR_NN_MIN_SCORE, "minscore" },
{ NULp, NULp }
}
#define AWAR_NN_RANGE_START
Definition: ui_species.cxx:58
#define AWAR_NN_REL_SCALING
#define AWAR_NN_FAST_MODE
#define AWAR_NN_RANGE_END
Definition: ui_species.cxx:59
#define AWAR_NN_MIN_SCORE
Definition: ui_species.cxx:60
#define AWAR_NN_COMPLEMENT
Definition: ui_species.cxx:57
#define AWAR_NN_MAX_HITS
Definition: ui_species.cxx:61
#define NULp
Definition: cxxforward.h:97
#define AWAR_NN_MISMATCHES
#define AWAR_NN_OLIGO_LEN
#define AWAR_NN_REL_MATCHES

Definition at line 1250 of file ui_species.cxx.

DbQuery* GLOBAL_species_query = NULp
static

Definition at line 1490 of file ui_species.cxx.