ARB
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AWT_graphic_tree Class Reference

#include <TreeDisplay.hxx>

Inheritance diagram for AWT_graphic_tree:
Inheritance graph
[legend]
Collaboration diagram for AWT_graphic_tree:
Collaboration graph
[legend]

Public Member Functions

 AWT_graphic_tree (AW_root *aw_root, GBDATA *gb_main, AD_map_viewer_cb map_viewer_cb)
 
 ~AWT_graphic_tree () OVERRIDE
 
void filled_box (int gc, const AW::Position &pos, int pixel_width)
 
void empty_box (int gc, const AW::Position &pos, int pixel_width)
 
void diamond (int gc, const AW::Position &pos, int pixel_radius)
 
const charruler_awar (const char *name)
 
void set_line_attributes_for (AP_tree *at) const
 
virtual void read_tree_settings ()
 
void update_structure () FINAL_OVERRIDE
 
void apply_zoom_settings_for_treetype (AWT_canvas *ntw)
 
int draw_branch_line (int gc, const AW::Position &root, const AW::Position &leaf, AW_bitset filter)
 
bool warn_inappropriate_mode (AWT_COMMAND_MODE mode)
 
virtual AP_tree_rootcreate_tree_root (AliView *aliview, AP_sequence *seq_prototype, bool insert_delete_cbs)
 
AW_rootget_root () const
 
GBDATAget_gbmain () const
 
AP_tree_rootget_tree_root ()
 
AP_treeget_root_node ()
 
const AP_treeget_root_node () const
 
AP_treeget_logical_root ()
 
const AP_treeget_logical_root () const
 
bool is_logically_zoomed ()
 
void set_logical_root_to (AP_tree *node)
 
void init (AliView *aliview, AP_sequence *seq_prototype, bool link_to_database_, bool insert_delete_cbs)
 
AW_gc_managerinit_devices (AW_window *, AW_device *, AWT_canvas *ntw) OVERRIDE
 
void show (AW_device *device) OVERRIDE
 
const AW::Positionget_cursor () const
 
const AW::Positionget_group_cursor () const
 
void handle_command (AW_device *device, AWT_graphic_event &event) OVERRIDE
 
void mark_species_in_tree (AP_tree *at, int mark)
 
void mark_species_in_tree_that (AP_tree *at, int mark, bool(*condition)(GBDATA *, void *), void *cd)
 
void mark_species_in_rest_of_tree (AP_tree *at, int mark)
 
void mark_species_in_rest_of_tree_that (AP_tree *at, int mark, bool(*condition)(GBDATA *, void *), void *cd)
 
bool tree_has_marks (AP_tree *at)
 
bool rest_tree_has_marks (AP_tree *at)
 
void detect_group_state (AP_tree *at, AWT_graphic_tree_group_state *state, AP_tree *skip_this_son)
 
bool group_tree (AP_tree *at, CollapseMode mode, int color_group)
 
void group_rest_tree (AP_tree *at, CollapseMode mode, int color_group)
 
void reorderTree (TreeOrder mode)
 
void toggle_group (AP_tree *at)
 
GB_ERROR load_from_DB (GBDATA *gb_main, const char *name) FINAL_OVERRIDE __ATTR__USERESULT
 
GB_ERROR save_to_DB (GBDATA *gb_main, const char *name) FINAL_OVERRIDE __ATTR__USERESULT
 
void check_for_DB_update (GBDATA *gb_main) FINAL_OVERRIDE
 
void notify_synchronized (GBDATA *gb_main) FINAL_OVERRIDE
 
void fast_sync_changed_folding (AP_tree *parent_of_all_changes)
 
void set_tree_style (AP_tree_display_style style, AWT_canvas *ntw)
 
AP_tree_display_style get_tree_style () const
 
double get_irs_tree_ruler_scale_factor () const
 
void show_ruler (AW_device *device, int gc)
 
void get_zombies_and_duplicates (int &zomb, int &dups) const
 
void hide_marker_display ()
 
void set_marker_display (MarkerDisplay *display)
 
MarkerDisplayget_marker_display ()
 
void install_tree_changed_callback (const GraphicTreeCallback &gtcb)
 
void uninstall_tree_changed_callback ()
 
void auto_unfold (AP_tree *want_visible)
 
void forget_auto_unfolded ()
 
void select_group (AP_tree *node)
 
void select_group (GBDATA *gb_group)
 
void deselect_group ()
 
const Groupget_selected_group () const
 
AP_treelocate_selected_group (AP_tree *in_subtree)
 
void dislocate_selected_group ()
 
 PREPARE_MARK_NONFINAL_CLASS (AWT_graphic_tree)
 
- Public Member Functions inherited from AWT_graphic
 AWT_graphic ()
 
virtual ~AWT_graphic ()
 
bool wants_drag_target () const
 
void drag_target_detection (bool detect)
 
int get_drag_gc () const
 

Static Public Member Functions

static void install_group_changed_callback (const GraphicTreeCallback &gccb)
 

Protected Member Functions

void store_command_data (AWT_command_data *new_cmd_data)
 
AWT_command_dataget_command_data ()
 

Protected Attributes

group_scaling groupScale
 
- Protected Attributes inherited from AWT_graphic
int drag_gc
 

Additional Inherited Members

- Public Attributes inherited from AWT_graphic
AWT_graphic_exports exports
 

Detailed Description

Definition at line 352 of file TreeDisplay.hxx.

Constructor & Destructor Documentation

AWT_graphic_tree::AWT_graphic_tree ( AW_root aw_root,
GBDATA gb_main,
AD_map_viewer_cb  map_viewer_cb 
)

Definition at line 2285 of file TreeDisplay.cxx.

References AP_TREE_NORMAL, NULp, set_tree_style(), and td_assert.

AWT_graphic_tree::~AWT_graphic_tree ( )

Definition at line 2319 of file TreeDisplay.cxx.

References destroy().

Member Function Documentation

void AWT_graphic_tree::store_command_data ( AWT_command_data new_cmd_data)
inlineprotected

Definition at line 453 of file TreeDisplay.hxx.

Referenced by handle_command().

AWT_command_data* AWT_graphic_tree::get_command_data ( )
inlineprotected

Definition at line 457 of file TreeDisplay.hxx.

Referenced by handle_command().

void AWT_graphic_tree::filled_box ( int  gc,
const AW::Position pos,
int  pixel_width 
)
inline

Definition at line 463 of file TreeDisplay.hxx.

References AW::FillStyle::SOLID.

void AWT_graphic_tree::empty_box ( int  gc,
const AW::Position pos,
int  pixel_width 
)
inline

Definition at line 464 of file TreeDisplay.hxx.

References AW::FillStyle::EMPTY.

Referenced by show().

void AWT_graphic_tree::diamond ( int  gc,
const AW::Position pos,
int  pixel_radius 
)
const char * AWT_graphic_tree::ruler_awar ( const char name)
void AWT_graphic_tree::set_line_attributes_for ( AP_tree at) const
inline
void AWT_graphic_tree::read_tree_settings ( )
virtual
void AWT_graphic_tree::update_structure ( )
inlinevirtual

Implements AWT_graphic.

Definition at line 474 of file TreeDisplay.hxx.

References AP_tree::compute_tree(), forget_auto_unfolded(), and get_root_node().

void AWT_graphic_tree::apply_zoom_settings_for_treetype ( AWT_canvas ntw)
int AWT_graphic_tree::draw_branch_line ( int  gc,
const AW::Position root,
const AW::Position leaf,
AW_bitset  filter 
)
inline
bool AWT_graphic_tree::warn_inappropriate_mode ( AWT_COMMAND_MODE  mode)

Definition at line 643 of file TreeDisplay.cxx.

References AP_TREE_RADIAL, aw_message(), AWT_MODE_ROTATE, and AWT_MODE_SPREAD.

Referenced by handle_command().

AP_tree_root * AWT_graphic_tree::create_tree_root ( AliView aliview,
AP_sequence seq_prototype,
bool  insert_delete_cbs 
)
virtual

Definition at line 2328 of file TreeDisplay.cxx.

References groupScale.

Referenced by init().

AW_root* AWT_graphic_tree::get_root ( ) const
inline

Definition at line 495 of file TreeDisplay.hxx.

Referenced by group_selected_by_canvas_cb().

GBDATA* AWT_graphic_tree::get_gbmain ( ) const
inline

Definition at line 496 of file TreeDisplay.hxx.

References gb_main.

Referenced by nt_add(), and nt_add_partial().

AP_tree_root* AWT_graphic_tree::get_tree_root ( )
inline
AP_tree* AWT_graphic_tree::get_root_node ( )
inline
const AP_tree* AWT_graphic_tree::get_root_node ( ) const
inline

Definition at line 501 of file TreeDisplay.hxx.

References get_root_node().

Referenced by get_root_node().

AP_tree* AWT_graphic_tree::get_logical_root ( )
inline
const AP_tree* AWT_graphic_tree::get_logical_root ( ) const
inline

Definition at line 504 of file TreeDisplay.hxx.

bool AWT_graphic_tree::is_logically_zoomed ( )
inline

Definition at line 506 of file TreeDisplay.hxx.

References get_root_node().

Referenced by NT_jump_cb().

void AWT_graphic_tree::set_logical_root_to ( AP_tree node)
inline
void AWT_graphic_tree::init ( AliView aliview,
AP_sequence seq_prototype,
bool  link_to_database_,
bool  insert_delete_cbs 
)
AW_gc_manager * AWT_graphic_tree::init_devices ( AW_window aww,
AW_device device,
AWT_canvas ntw 
)
virtual
void AWT_graphic_tree::show ( AW_device device)
virtual
const AW::Position& AWT_graphic_tree::get_cursor ( ) const
inline

Definition at line 516 of file TreeDisplay.hxx.

References PaintedNode::get_pos().

Referenced by NT_jump_cb().

const AW::Position& AWT_graphic_tree::get_group_cursor ( ) const
inline

Definition at line 517 of file TreeDisplay.hxx.

References PaintedNode::get_pos().

Referenced by NT_jump_cb().

void AWT_graphic_tree::handle_command ( AW_device device,
AWT_graphic_event event 
)
virtual

Implements AWT_graphic.

Definition at line 1927 of file TreeDisplay.cxx.

References Dragged::abort(), ADMVT_SELECT, AP_TREE_IRS, AW_BUTTON_LEFT, AW_BUTTON_MIDDLE, AW_BUTTON_RIGHT, AW_Keyboard_Press, AW_Keyboard_Release, AW_Mouse_Drag, AW_Mouse_Press, AW_Mouse_Release, AW_root::awar(), AWAR_EXPERT, AWT_MODE_GROUP, AWT_MODE_INFO, AWT_MODE_LENGTH, AWT_MODE_LINE, AWT_MODE_LZOOM, AWT_MODE_MARK, AWT_MODE_MOVE, AWT_MODE_MULTIFURC, AWT_MODE_NONE, AWT_MODE_ROTATE, AWT_MODE_SELECT, AWT_MODE_SETROOT, AWT_MODE_SPREAD, AWT_MODE_SWAP, AWT_MODE_WWW, AWT_graphic_event::best_click(), AWT_graphic_event::button(), AWT_graphic_event::cmd(), command_on_GBDATA(), DEFAULT_RULER_LENGTH, DEFAULT_RULER_LINEWIDTH, dislocate_selected_group(), Dragged::do_drag(), Dragged::do_drop(), AWT_graphic::drag_gc, AWT_graphic::drag_target_detection(), Dragged::draw_drag_indicator(), DragNDrop::draw_drag_indicator(), Scaler::draw_drag_indicator(), AWT_graphic::exports, TreeNode::father, TreeRoot::find_innermost_edge(), GB_searchOrCreate_float(), GB_searchOrCreate_int(), get_command_data(), ARB_seqtree_root::get_gb_main(), ARB_seqtree_root::get_gb_tree(), AW_clicked_line::get_line(), MarkerDisplay::get_marker_name(), AW_zoomable::get_unscale(), MarkerDisplay::handle_click(), Dragged::hide_drag_indicator(), DB_scalable::inverse(), is_nan_or_inf(), mark_species_in_tree(), NULp, preferredForCommand(), AW_awar::read_int(), AWT_graphic_exports::request_refresh(), AWT_graphic_exports::request_save(), AWT_graphic_exports::request_save_and_zoom_reset(), AWT_graphic_exports::request_structure_update(), AWT_graphic_exports::request_zoom_reset(), AW_zoomable::rtransform(), ruler_awar(), RULER_LINEWIDTH, RULER_SIZE, SCALE_LENGTH, SCALE_LENGTH_PRESERVING, SCALE_SPREAD, DB_scalable::set_discretion_factor(), set_logical_root_to(), DB_scalable::set_min(), ARB_edge::set_root(), store_command_data(), ta, td_assert, toggle_group(), AWT_graphic_event::type(), AP_tree_root::update_timers(), and warn_inappropriate_mode().

void AWT_graphic_tree::mark_species_in_tree ( AP_tree at,
int  mark 
)
void AWT_graphic_tree::mark_species_in_tree_that ( AP_tree at,
int  mark,
bool(*)(GBDATA *, void *)  condition,
void *  cd 
)

Definition at line 148 of file TreeDisplay.cxx.

References TreeNode::gb_node, GB_read_flag(), GB_write_flag(), TreeNode::is_leaf(), ta, and td_assert.

Referenced by mark_tree_cb().

void AWT_graphic_tree::mark_species_in_rest_of_tree ( AP_tree at,
int  mark 
)

Definition at line 182 of file TreeDisplay.cxx.

References TreeNode::get_brother(), and ta.

void AWT_graphic_tree::mark_species_in_rest_of_tree_that ( AP_tree at,
int  mark,
bool(*)(GBDATA *, void *)  condition,
void *  cd 
)

Definition at line 195 of file TreeDisplay.cxx.

References TreeNode::get_brother(), and ta.

bool AWT_graphic_tree::tree_has_marks ( AP_tree at)

Definition at line 207 of file TreeDisplay.cxx.

References TreeNode::gb_node, GB_read_flag(), and TreeNode::is_leaf().

bool AWT_graphic_tree::rest_tree_has_marks ( AP_tree at)

Definition at line 219 of file TreeDisplay.cxx.

References TreeNode::get_brother().

void AWT_graphic_tree::detect_group_state ( AP_tree at,
AWT_graphic_tree_group_state state,
AP_tree skip_this_son 
)
bool AWT_graphic_tree::group_tree ( AP_tree at,
CollapseMode  mode,
int  color_group 
)

collapse/expand subtree according to mode (and color_group) Run on father! (why?)

Returns
true if subtree shall expand

Definition at line 315 of file TreeDisplay.cxx.

References COLLAPSE_TERMINAL, EXPAND_ALL, EXPAND_COLOR, EXPAND_MARKED, EXPAND_ZOMBIES, TreeNode::gb_node, GB_read_flag(), GBT_get_color_group(), AP_tree::gr, AP_tree_members::grouped, TreeNode::is_keeled_group(), TreeNode::is_leaf(), TreeNode::is_normal_group(), and ta.

Referenced by group_and_refold_tree().

void AWT_graphic_tree::group_rest_tree ( AP_tree at,
CollapseMode  mode,
int  color_group 
)

Definition at line 305 of file TreeDisplay.cxx.

References TreeNode::get_brother().

void AWT_graphic_tree::reorderTree ( TreeOrder  mode)

Definition at line 364 of file TreeDisplay.cxx.

References TreeNode::reorder_tree().

Referenced by calc_branchlengths_and_reorder(), nt_add(), and NT_bootstrap().

void AWT_graphic_tree::toggle_group ( AP_tree at)
GB_ERROR AWT_graphic_tree::load_from_DB ( GBDATA gb_main,
const char name 
)
virtual
GB_ERROR AWT_graphic_tree::save_to_DB ( GBDATA gb_main,
const char name 
)
virtual
void AWT_graphic_tree::check_for_DB_update ( GBDATA gb_main)
virtual
void AWT_graphic_tree::notify_synchronized ( GBDATA gb_main)
virtual

Implements AWT_graphic.

Definition at line 2470 of file TreeDisplay.cxx.

References get_tree_root(), and AP_tree_root::update_timers().

Referenced by fast_sync_changed_folding().

void AWT_graphic_tree::fast_sync_changed_folding ( AP_tree parent_of_all_changes)
void AWT_graphic_tree::set_tree_style ( AP_tree_display_style  style,
AWT_canvas ntw 
)
AP_tree_display_style AWT_graphic_tree::get_tree_style ( ) const
inline

Definition at line 545 of file TreeDisplay.hxx.

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

double AWT_graphic_tree::get_irs_tree_ruler_scale_factor ( ) const
inline

Definition at line 547 of file TreeDisplay.hxx.

void AWT_graphic_tree::show_ruler ( AW_device device,
int  gc 
)
void AWT_graphic_tree::get_zombies_and_duplicates ( int zomb,
int dups 
) const
inline

Definition at line 549 of file TreeDisplay.hxx.

void AWT_graphic_tree::hide_marker_display ( )
inline
void AWT_graphic_tree::set_marker_display ( MarkerDisplay display)
inline
MarkerDisplay* AWT_graphic_tree::get_marker_display ( )
inline
void AWT_graphic_tree::install_tree_changed_callback ( const GraphicTreeCallback &  gtcb)

install a callback called whenever

  • topology changes (either by DB-change or by GUI command),
  • logical zoom changes or
  • a different tree gets displayed.

Definition at line 3827 of file TreeDisplay.cxx.

References td_assert.

Referenced by TopologyShader::activate().

void AWT_graphic_tree::uninstall_tree_changed_callback ( )

Definition at line 3836 of file TreeDisplay.cxx.

References td_assert, and treeChangeIgnore_cb.

Referenced by TopologyShader::activate().

static void AWT_graphic_tree::install_group_changed_callback ( const GraphicTreeCallback &  gccb)
inlinestatic

Definition at line 564 of file TreeDisplay.hxx.

Referenced by popup_new_main_window().

void AWT_graphic_tree::auto_unfold ( AP_tree want_visible)
void AWT_graphic_tree::forget_auto_unfolded ( )

Definition at line 779 of file TreeDisplay.cxx.

References AP_tree_folding::forget().

Referenced by NT_reload_tree_event(), and update_structure().

void AWT_graphic_tree::select_group ( AP_tree node)
inline

Definition at line 579 of file TreeDisplay.hxx.

References TreeNode::is_clade(), and td_assert.

void AWT_graphic_tree::select_group ( GBDATA gb_group)
inline

Definition at line 583 of file TreeDisplay.hxx.

void AWT_graphic_tree::deselect_group ( )
inline

Definition at line 586 of file TreeDisplay.hxx.

Referenced by group_awar_changed_cb(), NT_reload_tree_event(), and toggle_group().

const Group& AWT_graphic_tree::get_selected_group ( ) const
inline
AP_tree* AWT_graphic_tree::locate_selected_group ( AP_tree in_subtree)
inline

Definition at line 592 of file TreeDisplay.hxx.

References Group::get_node(), Group::is_valid(), Group::locate(), and NULp.

Referenced by NT_jump_cb().

void AWT_graphic_tree::dislocate_selected_group ( )
inline

Definition at line 601 of file TreeDisplay.hxx.

References Group::dislocate().

Referenced by handle_command(), and toggle_group().

AWT_graphic_tree::PREPARE_MARK_NONFINAL_CLASS ( AWT_graphic_tree  )

Member Data Documentation

double AWT_graphic_tree::marked

Definition at line 400 of file TreeDisplay.hxx.

double AWT_graphic_tree::partiallyMarked

Definition at line 401 of file TreeDisplay.hxx.

group_scaling AWT_graphic_tree::groupScale
protected

Definition at line 451 of file TreeDisplay.hxx.

Referenced by create_tree_root(), and read_tree_settings().


The documentation for this class was generated from the following files: