source: branches/alilink/SECEDIT/SEC_bonddef.hxx

Last change on this file was 7622, checked in by westram, 13 years ago
  • merge from dev [7434] [7435] [7436] [7437] [7438] [7439] [7440] [7441] [7442] [7443] [7444]
    • AW_device
      • removed some derived-class-specific functions
      • virtual functions
        • removed default parameters, renamed them to XXX_impl, made them private and added missing variants to replace direct calls to renamed functions
      • added AW_simple_device as base for AW_device_click and AW_device_size
      • do not pass AW_CL/AW_CL for AW_device_click down through all paint functions, instead create instances of AW_click_cd
      • devirtualized ready_to_draw + cursor
      • added default for filter to all paint functions (removed default from calls)
      • XXX_impl functions use Position, Rectangle, Vector etc. instead of AW_pos
    • AW_common
      • removed unneccessary members; made members private
      • moved some code between AW_gc, AW_GC_Xm and AW_common
      • global data (color tables) now referenced by references instead of pointers
      • made independent member function x_alignment() global
      • no longer install resize callback from ctor
    • AW_clicked_line (renamed some members; removed distanceTo)
    • fixed possible return of temporaries
    • AW_root
      • made independent member functions font_2_ascii() and font_2_xfig() global (AW_font_2_ascii AW_font_2_xfig)
    • Tree display
      • client data changed (bootstrap text and vertical lines starting at bifurcation belong to son now)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1// ================================================================= //
2//                                                                   //
3//   File      : sec_bonddef.hxx                                     //
4//   Purpose   :                                                     //
5//                                                                   //
6//   Coded by Ralf Westram (coder@reallysoft.de) in September 2007   //
7//   Institute of Microbiology (Technical University Munich)         //
8//   http://www.arb-home.de/                                         //
9//                                                                   //
10// ================================================================= //
11
12#ifndef SEC_BONDDEF_HXX
13#define SEC_BONDDEF_HXX
14
15#ifndef ARBDB_H
16#include <arbdb.h>
17#endif
18
19#ifndef AW_POSITION_HXX
20#include <aw_position.hxx>
21#endif
22
23using namespace AW;
24
25#define SEC_BOND_BASE_CHARS 5
26#define SEC_BOND_BASE_CHAR  "ACGTU"
27#define SEC_BOND_PAIR_CHARS 8
28#define SEC_BOND_PAIR_CHAR  ".o~#=+- @" // order is important for IUPAC bonds
29
30class AW_device;
31class AW_root;
32
33class SEC_bond_def {
34    char              bond[SEC_BOND_BASE_CHARS][SEC_BOND_BASE_CHARS];
35    GB_alignment_type ali_type;
36
37    int       get_index(char c) const;
38    void      clear();
39    GB_ERROR  insert(const char *pairs, char character);
40    char      get_bond(char base1, char base2) const;
41    char     *get_pair_string(char pair_char);
42
43    void paint(AW_device *device, int gc, char bond, const Position& p1, const Position& p2, const Vector& toNextBase, const double& char_radius) const;
44
45public:
46
47    SEC_bond_def(GB_alignment_type aliType) : ali_type(aliType) { clear(); }
48
49    GB_ERROR update(AW_root *awr, const char *changed_awar_name);
50
51    void paint(AW_device *device, char base1, char base2, const Position& p1, const Position& p2, const Vector& toNextBase, const double& char_radius) const;
52};
53
54
55#else
56#error sec_bonddef.hxx included twice
57#endif // SEC_BONDDEF_HXX
Note: See TracBrowser for help on using the repository browser.