ARB
Classes | Macros | Enumerations | Functions | Variables
TreeDisplay.cxx File Reference
#include "TreeDisplay.hxx"
#include "TreeCallbacks.hxx"
#include "GroupIterator.hxx"
#include <AP_TreeColors.hxx>
#include <AP_TreeShader.hxx>
#include <AP_TreeSet.hxx>
#include <nds.h>
#include <awt_config_manager.hxx>
#include <aw_preset.hxx>
#include <aw_awars.hxx>
#include <aw_msg.hxx>
#include <aw_root.hxx>
#include <aw_question.hxx>
#include <arb_defs.h>
#include <arb_diff.h>
#include <arb_global_defs.h>
#include <arb_strbuf.h>
#include <ad_cb.h>
#include <unistd.h>
#include <iostream>
#include <cfloat>
#include <algorithm>
Include dependency graph for TreeDisplay.cxx:

Go to the source code of this file.

Classes

struct  AWT_graphic_tree_group_state
 
class  Dragged
 
class  AP_tree_folding
 
class  ClickedElement
 
class  DragNDrop
 
class  BranchMover
 
class  Scaler
 
class  DB_scalable
 
class  RulerScaler
 
class  BranchScaler
 
class  BranchLinewidthScaler
 
class  FINAL_TYPE< SEQTYPE >
 xml element More...
 
class  MarkerIdentifier
 
class  MarkerXPos
 
class  MarkerPosition
 
struct  Subinfo
 
struct  Column
 
class  ListDisplayRow
 

Macros

#define RULER_LINEWIDTH   "ruler/ruler_width"
 
#define RULER_SIZE   "ruler/size"
 
#define DEFAULT_RULER_LINEWIDTH   tree_defaults::LINEWIDTH
 
#define DEFAULT_RULER_LENGTH   tree_defaults::LENGTH
 

Enumerations

enum  ScaleMode { SCALE_LENGTH, SCALE_LENGTH_PRESERVING, SCALE_SPREAD }
 

Functions

static void nocb ()
 
static void AWT_graphic_tree_root_changed (void *cd, AP_tree *old, AP_tree *newroot)
 
static void AWT_graphic_tree_node_deleted (void *cd, AP_tree *del)
 
bool is_cursor_keycode (AW_key_code kcode)
 
static GBDATAbrute_force_find_next_species (GBDATA *gb_main, GBDATA *gb_sel, bool marked_only, bool upwards)
 
static bool command_on_GBDATA (GBDATA *gbd, const AWT_graphic_event &event, AD_map_viewer_cb map_viewer_cb)
 
double discrete_value (double analog_value, int discretion_factor)
 
static void text_near_head (AW_device *device, int gc, const LineVector &line, const char *text)
 
Position calc_text_coordinates_near_tip (AW_device *device, int gc, const Position &pos, const Angle &orientation, AW_pos &alignment, double dist_factor=1.0)
 
Position calc_text_coordinates_aside_line (AW_device *device, int gc, const Position &pos, Angle orientation, bool right, AW_pos &alignment, double dist_factor=1.0)
 
static
AW_device_click::ClickPreference 
preferredForCommand (AWT_COMMAND_MODE mode)
 
static void tree_change_ignore_cb (AWT_graphic_tree *)
 
unsigned percentMarked (const AP_tree_members &gr)
 
AWT_graphic_treeNT_generate_tree (AW_root *root, GBDATA *gb_main, AD_map_viewer_cb map_viewer_cb)
 
static void markerThresholdChanged_cb (AW_root *root, bool partChanged)
 
void TREE_create_awars (AW_root *aw_root, AW_default db)
 
static void TREE_recompute_and_resize_cb (UNFIXED, TREE_canvas *ntw)
 
static void TREE_resize_cb (UNFIXED, TREE_canvas *ntw)
 
static void bootstrap_range_changed_cb (AW_root *awr, TREE_canvas *ntw, int upper_changed)
 
void TREE_install_update_callbacks (TREE_canvas *ntw)
 
static void tree_insert_jump_option_menu (AW_window *aws, const char *label, const char *awar_name)
 
static void insert_section_header (AW_window *aws, const char *title)
 
static AW_windowcreate_tree_expert_settings_window (AW_root *aw_root)
 
static AW_windowcreate_tree_bootstrap_settings_window (AW_root *aw_root)
 
AW_windowTREE_create_settings_window (AW_root *aw_root)
 
AW_windowTREE_create_marker_settings_window (AW_root *root)
 

Variables

const int MARKER_COLORS = 12
 
static int MarkerGC [MARKER_COLORS]
 
static GraphicTreeCallback treeChangeIgnore_cb = makeGraphicTreeCallback(tree_change_ignore_cb)
 
static AWT_config_mapping_def tree_setting_config_mapping []
 
static const int SCALER_WIDTH = 250
 
static const int LABEL_WIDTH = 30
 

Macro Definition Documentation

#define RULER_LINEWIDTH   "ruler/ruler_width"
#define RULER_SIZE   "ruler/size"
#define DEFAULT_RULER_LINEWIDTH   tree_defaults::LINEWIDTH
#define DEFAULT_RULER_LENGTH   tree_defaults::LENGTH

Enumeration Type Documentation

enum ScaleMode
Enumerator
SCALE_LENGTH 
SCALE_LENGTH_PRESERVING 
SCALE_SPREAD 

Definition at line 1586 of file TreeDisplay.cxx.

Function Documentation

static void nocb ( )
static

Definition at line 68 of file TreeDisplay.cxx.

static void AWT_graphic_tree_root_changed ( void *  cd,
AP_tree old,
AP_tree newroot 
)
static
static void AWT_graphic_tree_node_deleted ( void *  cd,
AP_tree del 
)
static
bool is_cursor_keycode ( AW_key_code  kcode)
inline

Definition at line 653 of file TreeDisplay.cxx.

References AW_KEY_DOWN, AW_KEY_END, AW_KEY_HOME, AW_KEY_LEFT, AW_KEY_RIGHT, and AW_KEY_UP.

static GBDATA* brute_force_find_next_species ( GBDATA gb_main,
GBDATA gb_sel,
bool  marked_only,
bool  upwards 
)
static
static bool command_on_GBDATA ( GBDATA gbd,
const AWT_graphic_event event,
AD_map_viewer_cb  map_viewer_cb 
)
static
double discrete_value ( double  analog_value,
int  discretion_factor 
)
inline

Definition at line 1475 of file TreeDisplay.cxx.

Referenced by DB_scalable::write().

static void text_near_head ( AW_device device,
int  gc,
const LineVector line,
const char text 
)
static

Definition at line 1580 of file TreeDisplay.cxx.

References AW::LineVector::head(), and AW_device::text().

Position calc_text_coordinates_near_tip ( AW_device device,
int  gc,
const Position pos,
const Angle orientation,
AW_pos alignment,
double  dist_factor = 1.0 
)
inline

calculates text coordinates for text placed at the tip of a vector

Parameters
deviceoutput device
gccontext
postip of the vector (world coordinates)
orientationorientation of the vector (towards its tip)
alignmentresult param (alignment for call to text())
dist_factornormally 1.0 (smaller => text nearer towards 'pos')

Definition at line 1821 of file TreeDisplay.cxx.

References AW::Angle::cos(), AW_stylable::get_font_limits(), AW_font_limits::get_height(), AW_zoomable::get_unscale(), AW::Position::movey(), AW::Angle::normal(), AW::Vector::sety(), and AW::Vector::y().

Referenced by calc_text_coordinates_aside_line().

Position calc_text_coordinates_aside_line ( AW_device device,
int  gc,
const Position pos,
Angle  orientation,
bool  right,
AW_pos alignment,
double  dist_factor = 1.0 
)
inline

calculates text coordinates for text placed aside of a vector

Parameters
deviceoutput device
gccontext
posposition on the vector, e.g. center of vector (world coordinates)
orientationorientation of the vector (towards its tip)
righttrue -> on right side of vector (otherwise on left side)
alignmentresult param (alignment for call to text())
dist_factornormally 1.0 (smaller => text nearer towards 'pos')

Definition at line 1847 of file TreeDisplay.cxx.

References calc_text_coordinates_near_tip(), AW::Angle::rotate270deg(), and AW::Angle::rotate90deg().

static AW_device_click::ClickPreference preferredForCommand ( AWT_COMMAND_MODE  mode)
static

Definition at line 1910 of file TreeDisplay.cxx.

References AWT_MODE_LENGTH, AWT_MODE_MULTIFURC, and AWT_MODE_SPREAD.

Referenced by AWT_graphic_tree::handle_command().

static void tree_change_ignore_cb ( AWT_graphic_tree )
static

Definition at line 2282 of file TreeDisplay.cxx.

unsigned percentMarked ( const AP_tree_members gr)
inline

Definition at line 3707 of file TreeDisplay.cxx.

References AP_tree_members::leaf_sum, AP_tree_members::mark_sum, and td_assert.

AWT_graphic_tree* NT_generate_tree ( AW_root root,
GBDATA gb_main,
AD_map_viewer_cb  map_viewer_cb 
)

Definition at line 3859 of file TreeDisplay.cxx.

References AWT_graphic_tree::init(), and NULp.

Referenced by popup_new_main_window().

static void markerThresholdChanged_cb ( AW_root root,
bool  partChanged 
)
static
void TREE_create_awars ( AW_root aw_root,
AW_default  db 
)
static void TREE_recompute_and_resize_cb ( UNFIXED  ,
TREE_canvas ntw 
)
static
static void TREE_resize_cb ( UNFIXED  ,
TREE_canvas ntw 
)
static

Definition at line 3946 of file TreeDisplay.cxx.

References AWT_canvas::request_resize().

Referenced by TREE_install_update_callbacks().

static void bootstrap_range_changed_cb ( AW_root awr,
TREE_canvas ntw,
int  upper_changed 
)
static
void TREE_install_update_callbacks ( TREE_canvas ntw)
static void tree_insert_jump_option_menu ( AW_window aws,
const char label,
const char awar_name 
)
static
static void insert_section_header ( AW_window aws,
const char title 
)
static
static AW_window* create_tree_expert_settings_window ( AW_root aw_root)
static
static AW_window* create_tree_bootstrap_settings_window ( AW_root aw_root)
static
AW_window* TREE_create_settings_window ( AW_root aw_root)
AW_window* TREE_create_marker_settings_window ( AW_root root)

Variable Documentation

const int MARKER_COLORS = 12

Definition at line 48 of file TreeDisplay.cxx.

int MarkerGC[MARKER_COLORS]
static
GraphicTreeCallback treeChangeIgnore_cb = makeGraphicTreeCallback(tree_change_ignore_cb)
static

Definition at line 2283 of file TreeDisplay.cxx.

Referenced by AWT_graphic_tree::uninstall_tree_changed_callback().

AWT_config_mapping_def tree_setting_config_mapping[]
static

Definition at line 4048 of file TreeDisplay.cxx.

const int SCALER_WIDTH = 250
static

Definition at line 4089 of file TreeDisplay.cxx.

Referenced by SEC_create_display_window().

const int LABEL_WIDTH = 30
static

Definition at line 4090 of file TreeDisplay.cxx.