ARB
Classes | Macros | Functions
TreeCallbacks.cxx File Reference
#include "TreeCallbacks.hxx"
#include <aw_color_groups.hxx>
#include <aw_awars.hxx>
#include <aw_advice.hxx>
#include <aw_msg.hxx>
#include <aw_root.hxx>
#include <arb_strbuf.h>
#include <mode_text.h>
#include <cctype>
#include <gb_aci.h>
Include dependency graph for TreeCallbacks.cxx:

Go to the source code of this file.

Classes

struct  mark_nontree_cb_data
 

Macros

#define MARK_MODE_LOWER_BITS   (1|2)
 
#define MARK_MODE_UPPER_BITS   (4|8|16)
 
#define COUNTING_MARKED(mode)   (((mode)&MARK_MODE_LOWER_BITS) == 3)
 

Functions

void nt_mode_event (UNFIXED, TREE_canvas *ntw, AWT_COMMAND_MODE mode)
 
static void show_count (GBDATA *gb_main, int mark_mode, int tree_mode, long count)
 
static bool species_has_alignment (GBDATA *gb_species, void *cd_use)
 
static bool sequence_is_partial (GBDATA *gb_species, void *cd_partial)
 
void NT_mark_all_cb (UNFIXED, TREE_canvas *ntw, int mark_mode)
 
static void mark_tree_cb (UNFIXED, TREE_canvas *ntw, int mark_mode)
 
static bool are_not_in_tree (GBDATA *gb_species, void *cb_data)
 
static void mark_nontree_cb (UNFIXED, TREE_canvas *ntw, int mark_mode)
 
static charcreate_mark_menu_entry (const char *attrib, const char *entry_template)
 
static charcreate_mark_menu_id (const char *attrib, const char *id_suffix)
 
static void insert_mark_topic (AW_window_menu_modes *awm, AW_active mask, const char *attrib, const char *id_suffix, const char *entry_template, const char *hotkey, const char *helpfile, const WindowCallback &wcb)
 
static void insert_mark_topics (AW_window_menu_modes *awm, AW_active mask, TREE_canvas *ntw, int affect, const char *attrib)
 
void NT_insert_mark_submenus (AW_window_menu_modes *awm, TREE_canvas *ntw, int insert_as_submenu)
 
static void group_and_refold_tree (TREE_canvas *ntw, CollapseMode mode, int color_group)
 
static void collapse_all_cb (UNFIXED, TREE_canvas *ntw)
 
static void collapse_terminal_cb (UNFIXED, TREE_canvas *ntw)
 
static void expand_unmarked_cb (UNFIXED, TREE_canvas *ntw)
 
static void expand_all_cb (UNFIXED, TREE_canvas *ntw)
 
void NT_expand_marked_cb (UNFIXED, TREE_canvas *ntw)
 
static void expand_zombies_cb (UNFIXED, TREE_canvas *ntw)
 
static void expand_color_cb (UNFIXED, TREE_canvas *ntw, int colornum)
 
static void insert_color_collapse_submenu (AW_window_menu_modes *awm, TREE_canvas *ntree_canvas)
 
void NT_insert_collapse_submenu (AW_window_menu_modes *awm, TREE_canvas *ntw)
 
GB_ERROR NT_with_displayed_tree_do (TREE_canvas *ntw, bool(*displayed_tree_cb)(TreeNode *tree, GB_ERROR &error))
 
void NT_resort_tree_cb (UNFIXED, TREE_canvas *ntw, TreeOrder order)
 
void NT_reset_lzoom_cb (UNFIXED, TREE_canvas *ntw)
 
void NT_reset_pzoom_cb (UNFIXED, TREE_canvas *ntw)
 
void NT_set_tree_style (UNFIXED, TREE_canvas *ntw, AP_tree_display_style style)
 
void NT_reinit_treetype (UNFIXED, TREE_canvas *ntw)
 
void NT_remove_leafs (UNFIXED, TREE_canvas *ntw, AWT_RemoveType mode)
 
void NT_remove_bootstrap (UNFIXED, TREE_canvas *ntw)
 
void NT_edit_bootstrap (UNFIXED, TREE_canvas *ntw)
 
void NT_reset_branchlengths (UNFIXED, TREE_canvas *ntw)
 
void NT_multifurcate_tree (TREE_canvas *ntw, const TreeNode::multifurc_limits &below)
 
void NT_move_boot_branch (UNFIXED, TREE_canvas *ntw, int direction)
 
void NT_scale_tree (UNFIXED, TREE_canvas *ntw)
 
AP_treecommon_ancestor (AP_tree *t1, AP_tree *t2)
 
void NT_jump_cb (UNFIXED, TREE_canvas *ntw, AP_tree_jump_type jumpType)
 
void TREE_auto_jump_cb (UNFIXED, TREE_canvas *ntw, AP_tree_jump_reason cause)
 
void NT_reload_tree_event (AW_root *, TREE_canvas *ntw, bool unzoom_and_expose)
 
static void tree_recompute_cb (UNFIXED, AWT_canvas *ntw)
 
void TREE_GC_changed_cb (GcChange whatChanged, AWT_canvas *ntw)
 
void NT_remove_species_in_tree_from_hash (AP_tree *tree, GB_HASH *hash)
 

Macro Definition Documentation

#define MARK_MODE_LOWER_BITS   (1|2)

Definition at line 70 of file TreeCallbacks.cxx.

Referenced by mark_nontree_cb(), mark_tree_cb(), and NT_mark_all_cb().

#define MARK_MODE_UPPER_BITS   (4|8|16)
#define COUNTING_MARKED (   mode)    (((mode)&MARK_MODE_LOWER_BITS) == 3)

Definition at line 73 of file TreeCallbacks.cxx.

Referenced by mark_nontree_cb(), mark_tree_cb(), NT_mark_all_cb(), and show_count().

Function Documentation

void nt_mode_event ( UNFIXED  ,
TREE_canvas ntw,
AWT_COMMAND_MODE  mode 
)
static void show_count ( GBDATA gb_main,
int  mark_mode,
int  tree_mode,
long  count 
)
static
static bool species_has_alignment ( GBDATA gb_species,
void *  cd_use 
)
static

Definition at line 132 of file TreeCallbacks.cxx.

References GBT_find_sequence().

Referenced by are_not_in_tree(), mark_tree_cb(), and NT_mark_all_cb().

static bool sequence_is_partial ( GBDATA gb_species,
void *  cd_partial 
)
static

Definition at line 136 of file TreeCallbacks.cxx.

References GBT_is_partial(), long, and td_assert.

Referenced by are_not_in_tree(), mark_tree_cb(), and NT_mark_all_cb().

void NT_mark_all_cb ( UNFIXED  ,
TREE_canvas ntw,
int  mark_mode 
)
static void mark_tree_cb ( UNFIXED  ,
TREE_canvas ntw,
int  mark_mode 
)
static
static bool are_not_in_tree ( GBDATA gb_species,
void *  cb_data 
)
static
static void mark_nontree_cb ( UNFIXED  ,
TREE_canvas ntw,
int  mark_mode 
)
static
static char* create_mark_menu_entry ( const char attrib,
const char entry_template 
)
static

Definition at line 322 of file TreeCallbacks.cxx.

References GBS_global_string_copy(), and NULp.

Referenced by insert_mark_topic(), and insert_mark_topics().

static char* create_mark_menu_id ( const char attrib,
const char id_suffix 
)
static

Definition at line 347 of file TreeCallbacks.cxx.

References GBS_global_string_copy(), id, and NULp.

Referenced by insert_mark_topic().

static void insert_mark_topic ( AW_window_menu_modes awm,
AW_active  mask,
const char attrib,
const char id_suffix,
const char entry_template,
const char hotkey,
const char helpfile,
const WindowCallback &  wcb 
)
static
static void insert_mark_topics ( AW_window_menu_modes awm,
AW_active  mask,
TREE_canvas ntw,
int  affect,
const char attrib 
)
static
void NT_insert_mark_submenus ( AW_window_menu_modes awm,
TREE_canvas ntw,
int  insert_as_submenu 
)
static void group_and_refold_tree ( TREE_canvas ntw,
CollapseMode  mode,
int  color_group 
)
static
static void collapse_all_cb ( UNFIXED  ,
TREE_canvas ntw 
)
static

Definition at line 444 of file TreeCallbacks.cxx.

References COLLAPSE_ALL, and group_and_refold_tree().

Referenced by NT_insert_collapse_submenu().

static void collapse_terminal_cb ( UNFIXED  ,
TREE_canvas ntw 
)
static

Definition at line 445 of file TreeCallbacks.cxx.

References COLLAPSE_TERMINAL, and group_and_refold_tree().

Referenced by NT_insert_collapse_submenu().

static void expand_unmarked_cb ( UNFIXED  ,
TREE_canvas ntw 
)
static

Definition at line 446 of file TreeCallbacks.cxx.

References EXPAND_UNMARKED, and group_and_refold_tree().

Referenced by NT_insert_collapse_submenu().

static void expand_all_cb ( UNFIXED  ,
TREE_canvas ntw 
)
static

Definition at line 447 of file TreeCallbacks.cxx.

References EXPAND_ALL, and group_and_refold_tree().

Referenced by NT_insert_collapse_submenu().

void NT_expand_marked_cb ( UNFIXED  ,
TREE_canvas ntw 
)
static void expand_zombies_cb ( UNFIXED  ,
TREE_canvas ntw 
)
static

Definition at line 449 of file TreeCallbacks.cxx.

References EXPAND_ZOMBIES, and group_and_refold_tree().

Referenced by NT_insert_collapse_submenu().

static void expand_color_cb ( UNFIXED  ,
TREE_canvas ntw,
int  colornum 
)
static

Definition at line 451 of file TreeCallbacks.cxx.

References EXPAND_COLOR, and group_and_refold_tree().

Referenced by insert_color_collapse_submenu().

static void insert_color_collapse_submenu ( AW_window_menu_modes awm,
TREE_canvas ntree_canvas 
)
static
void NT_insert_collapse_submenu ( AW_window_menu_modes awm,
TREE_canvas ntw 
)
GB_ERROR NT_with_displayed_tree_do ( TREE_canvas ntw,
bool(*)(TreeNode *tree, GB_ERROR &error displayed_tree_cb 
)
void NT_resort_tree_cb ( UNFIXED  ,
TREE_canvas ntw,
TreeOrder  order 
)
void NT_reset_lzoom_cb ( UNFIXED  ,
TREE_canvas ntw 
)
void NT_reset_pzoom_cb ( UNFIXED  ,
TREE_canvas ntw 
)

Definition at line 548 of file TreeCallbacks.cxx.

References AWT_canvas::gb_main, AWT_canvas::request_zoom_reset(), and ta.

Referenced by pars_start_cb(), and popup_new_main_window().

void NT_set_tree_style ( UNFIXED  ,
TREE_canvas ntw,
AP_tree_display_style  style 
)
void NT_reinit_treetype ( UNFIXED  ,
TREE_canvas ntw 
)

Definition at line 563 of file TreeCallbacks.cxx.

References AWT_TREE, NT_set_tree_style(), and NULp.

Referenced by TREE_install_update_callbacks().

void NT_remove_leafs ( UNFIXED  ,
TREE_canvas ntw,
AWT_RemoveType  mode 
)
void NT_remove_bootstrap ( UNFIXED  ,
TREE_canvas ntw 
)
void NT_edit_bootstrap ( UNFIXED  ,
TREE_canvas ntw 
)
void NT_reset_branchlengths ( UNFIXED  ,
TREE_canvas ntw 
)
void NT_multifurcate_tree ( TREE_canvas ntw,
const TreeNode::multifurc_limits below 
)
void NT_move_boot_branch ( UNFIXED  ,
TREE_canvas ntw,
int  direction 
)
void NT_scale_tree ( UNFIXED  ,
TREE_canvas ntw 
)
AP_tree* common_ancestor ( AP_tree t1,
AP_tree t2 
)
inline

Definition at line 690 of file TreeCallbacks.cxx.

References TreeNode::ancestor_common_with(), and DOWNCAST.

Referenced by NT_jump_cb().

void NT_jump_cb ( UNFIXED  ,
TREE_canvas ntw,
AP_tree_jump_type  jumpType 
)

Definition at line 694 of file TreeCallbacks.cxx.

References AP_DONT_JUMP, AP_JUMP_ALLOW_HCENTER, AP_JUMP_AUTO_UNFOLD, AP_JUMP_BE_VERBOOSE, AP_JUMP_FORCE_HCENTER, AP_JUMP_FORCE_VCENTER, AP_JUMP_LOGICAL_UNZOOM, AP_LIST_NDS, AP_LIST_SIMPLE, AP_TREE_IRS, AP_TREE_NORMAL, AP_TREE_RADIAL, AW::are_distinct(), AWT_graphic_tree::auto_unfold(), aw_message(), AW_MIDDLE_AREA, AW_SIZE, AW_SIZE_UNSCALED, AW_root::awar(), AWAR_SPECIES_NAME, AWT_TREE, AWT_canvas::aww, AW_screen_area::b, common_ancestor(), AWT_graphic::exports, TreeNode::findLeafNamed(), AWT_canvas::gb_main, GBS_global_string_copy(), AW_device::get_area_size(), AWT_graphic_tree::get_cursor(), AWT_graphic_tree::get_group_cursor(), Group::get_group_data(), AWT_graphic_tree::get_logical_root(), Group::get_name(), AW_window::get_root(), AWT_graphic_tree::get_root_node(), AWT_graphic_tree::get_selected_group(), AW_window::get_size_device(), AWT_graphic_tree::get_tree_style(), AWT_canvas::gfx, AWT_canvas::init_device(), TreeNode::is_clade(), AP_tree::is_inside_folded_group(), AWT_graphic_tree::is_logically_zoomed(), is_tree(), is_tree_style(), AWT_graphic_tree::locate_selected_group(), NULp, AW::Origin, AW_screen_area::r, AW_awar::read_char_pntr(), AWT_graphic_exports::request_refresh(), AWT_canvas::request_resize(), AW_device::reset(), AWT_canvas::scroll(), AW_device::set_filter(), AWT_graphic_tree::set_logical_root_to(), AWT_graphic::show(), AWT_canvas::sync_DB_model_and_view(), ta, td_assert, AW_zoomable::transform(), AW::Position::xpos(), and AW::Position::ypos().

Referenced by pars_start_cb(), popup_new_main_window(), and TREE_auto_jump_cb().

void TREE_auto_jump_cb ( UNFIXED  ,
TREE_canvas ntw,
AP_tree_jump_reason  cause 
)
void NT_reload_tree_event ( AW_root ,
TREE_canvas ntw,
bool  unzoom_and_expose 
)
static void tree_recompute_cb ( UNFIXED  ,
AWT_canvas ntw 
)
static

Definition at line 937 of file TreeCallbacks.cxx.

References AWT_canvas::request_structure_update().

Referenced by TREE_GC_changed_cb().

void TREE_GC_changed_cb ( GcChange  whatChanged,
AWT_canvas ntw 
)
void NT_remove_species_in_tree_from_hash ( AP_tree tree,
GB_HASH hash 
)