source: tags/ms_r16q2/RNA3D/RNA3D_Graphics.cxx

Last change on this file was 14940, checked in by westram, 8 years ago
  • AW_manage_GC: changed trigger for color-groups (bool → definition string)
    • allows to specify the position of color_groups in GC-list managed by AW_gc_manager
    • Fixed: if a color-range was specified ⇒ fonts of color-group-GCs were undefined (bug was triggered by [14936])
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1#include "RNA3D_GlobalHeader.hxx"
2#include "RNA3D_Graphics.hxx"
3#include "RNA3D_Interface.hxx"
4#include "RNA3D_OpenGLEngine.hxx"
5
6#include <aw_msg.hxx>
7#include <aw_preset.hxx>
8
9
10using namespace std;
11
12
13AW_gc_manager *RNA3D_Graphics::init_devices(AW_window *aww, AW_device *device, AWT_canvas *scr) {
14    AW_gc_manager *gc_manager =
15        AW_manage_GC (aww,
16                      scr->get_gc_base_name(),
17                      device,
18                      RNA3D_GC_FOREGROUND,
19                      RNA3D_GC_MAX,
20                      AW_GCM_DATA_AREA,
21                      makeGcChangedCallback(AWT_GC_changed_cb, scr),
22                      "#000000",
23                      "+-Foreground$#FFFFFF",     "+-MOLECULE Skeleton$#606060", "-Mapped Species$#FF0000",
24                      "+-BASE: Deletion$#FF0000", "+-BASE: Insertion$#00FF00",   "-BASE: Positions$#FFAA00",
25                      "+-BASE: Helix$#55AAFF",    "+-BASE: Unpaired$#AAFF00",    "-BASE: Non-Helix$#FFAA55",
26                      "+-HELIX$#FF0000",          "+-HELIX Skeleton$#606060",    "-HELIX MidPoint$#FFFFFF",
27
28                      // colors used to Paint search patterns
29                      // (do not change the names of these gcs)
30                      "+-User1$#B8E2F8",          "+-User2$#B8E2F8",         "-Probe$#B8E2F8",
31                      "+-Primer(l)$#A9FE54",      "+-Primer(r)$#A9FE54",     "-Primer(g)$#A9FE54",
32                      "+-Sig(l)$#DBB0FF",         "+-Sig(r)$#DBB0FF",        "-Sig(g)$#DBB0FF",
33
34                      // Color Ranges to paint SAIs
35                      "+-RANGE 0$#FFFFFF",    "+-RANGE 1$#E0E0E0",    "-RANGE 2$#C0C0C0",
36                      "+-RANGE 3$#A0A0A0",    "+-RANGE 4$#909090",    "-RANGE 5$#808080",
37                      "+-RANGE 6$#808080",    "+-RANGE 7$#505050",    "-RANGE 8$#404040",
38                      "+-RANGE 9$#303030",    "+-Pseudoknots$#FFAAFF", "-Triple Bases$#55FF00",
39
40                      "+-Cursor$#FFFFFF",    "+-Comments$#808080",    "-MoleculeMask$#00FF00",
41                      NULL);
42
43    return gc_manager;
44}
45
46RNA3D_Graphics::RNA3D_Graphics(AW_root *aw_root_, GBDATA *gb_main_) {
47    exports.zoom_mode = AWT_ZOOM_NEVER;
48    exports.fit_mode  = AWT_FIT_NEVER;
49   
50    exports.set_standard_default_padding();
51
52    this->aw_root = aw_root_;
53    this->gb_main = gb_main_;
54}
55
56RNA3D_Graphics::~RNA3D_Graphics() {}
57
58void RNA3D_Graphics::show(AW_device *device) {
59    paint(device);
60}
61
62void RNA3D_Graphics::paint(AW_device * /* device */) {
63    MapDisplayParameters(aw_root);
64    RefreshOpenGLDisplay();
65}
66
67
68
Note: See TracBrowser for help on using the repository browser.