source: branches/stable/RNA3D/RNA3D_Graphics.cxx

Last change on this file was 16763, checked in by westram, 6 years ago
  • 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_MAX,
19                      AW_GCM_DATA_AREA,
20                      makeGcChangedCallback(AWT_GC_changed_cb, scr),
21                      "#000000",
22                      "+-Foreground$#FFFFFF",     "+-MOLECULE Skeleton$#606060", "-Mapped Species$#FF0000",
23                      "+-BASE: Deletion$#FF0000", "+-BASE: Insertion$#00FF00",   "-BASE: Positions$#FFAA00",
24                      "+-BASE: Helix$#55AAFF",    "+-BASE: Unpaired$#AAFF00",    "-BASE: Non-Helix$#FFAA55",
25                      "+-HELIX$#FF0000",          "+-HELIX Skeleton$#606060",    "-HELIX MidPoint$#FFFFFF",
26
27                      // colors used to Paint search patterns
28                      // (do not change the names of these gcs)
29                      "+-User1$#B8E2F8",          "+-User2$#B8E2F8",         "-Probe$#B8E2F8",
30                      "+-Primer(l)$#A9FE54",      "+-Primer(r)$#A9FE54",     "-Primer(g)$#A9FE54",
31                      "+-Sig(l)$#DBB0FF",         "+-Sig(r)$#DBB0FF",        "-Sig(g)$#DBB0FF",
32
33                      // Color Ranges to paint SAIs
34                      "+-RANGE 0$#FFFFFF",    "+-RANGE 1$#E0E0E0",    "-RANGE 2$#C0C0C0",
35                      "+-RANGE 3$#A0A0A0",    "+-RANGE 4$#909090",    "-RANGE 5$#808080",
36                      "+-RANGE 6$#808080",    "+-RANGE 7$#505050",    "-RANGE 8$#404040",
37                      "+-RANGE 9$#303030",    "+-Pseudoknots$#FFAAFF", "-Triple Bases$#55FF00",
38
39                      "+-Cursor$#FFFFFF",    "+-Comments$#808080",    "-MoleculeMask$#00FF00",
40                      NULp);
41
42    return gc_manager;
43}
44
45RNA3D_Graphics::RNA3D_Graphics(AW_root *aw_root_, GBDATA *gb_main_) {
46    exports.zoom_mode = AWT_ZOOM_NEVER;
47    exports.fit_mode  = AWT_FIT_NEVER;
48   
49    exports.set_standard_default_padding();
50
51    this->aw_root = aw_root_;
52    this->gb_main = gb_main_;
53}
54
55RNA3D_Graphics::~RNA3D_Graphics() {}
56
57void RNA3D_Graphics::show(AW_device *device) {
58    paint(device);
59}
60
61void RNA3D_Graphics::paint(AW_device * /* device */) {
62    MapDisplayParameters(aw_root);
63    RefreshOpenGLDisplay();
64}
65
66
67
Note: See TracBrowser for help on using the repository browser.