1 | #include "RNA3D_GlobalHeader.hxx" |
---|
2 | #include "RNA3D_Graphics.hxx" |
---|
3 | #include "RNA3D_Interface.hxx" |
---|
4 | #include "RNA3D_OpenGLEngine.hxx" |
---|
5 | |
---|
6 | #include <aw_preset.hxx> |
---|
7 | |
---|
8 | |
---|
9 | using namespace std; |
---|
10 | |
---|
11 | |
---|
12 | AW_gc_manager RNA3D_Graphics::init_devices(AW_window *aww, AW_device *device, AWT_canvas* ntw, AW_CL cd2) { |
---|
13 | AW_gc_manager preset_window = |
---|
14 | AW_manage_GC (aww, |
---|
15 | device, |
---|
16 | RNA3D_GC_FOREGROUND, |
---|
17 | RNA3D_GC_MAX, |
---|
18 | AW_GCM_DATA_AREA, |
---|
19 | (AW_CB)AWT_resize_cb, |
---|
20 | (AW_CL)ntw, |
---|
21 | cd2, |
---|
22 | false, |
---|
23 | "#000000", |
---|
24 | "+-Foreground$#FFFFFF", "+-MOLECULE Skeleton$#606060", "-Mapped Species$#FF0000", |
---|
25 | "+-BASE: Deletion$#FF0000", "+-BASE: Insertion$#00FF00", "-BASE: Positions$#FFAA00", |
---|
26 | "+-BASE: Helix$#55AAFF", "+-BASE: Unpaired$#AAFF00", "-BASE: Non-Helix$#FFAA55", |
---|
27 | "+-HELIX$#FF0000", "+-HELIX Skeleton$#606060", "-HELIX MidPoint$#FFFFFF", |
---|
28 | |
---|
29 | // colors used to Paint search patterns |
---|
30 | // (do not change the names of these gcs) |
---|
31 | "+-User1$#B8E2F8", "+-User2$#B8E2F8", "-Probe$#B8E2F8", |
---|
32 | "+-Primer(l)$#A9FE54", "+-Primer(r)$#A9FE54", "-Primer(g)$#A9FE54", |
---|
33 | "+-Sig(l)$#DBB0FF", "+-Sig(r)$#DBB0FF", "-Sig(g)$#DBB0FF", |
---|
34 | |
---|
35 | // Color Ranges to paint SAIs |
---|
36 | "+-RANGE 0$#FFFFFF", "+-RANGE 1$#E0E0E0", "-RANGE 2$#C0C0C0", |
---|
37 | "+-RANGE 3$#A0A0A0", "+-RANGE 4$#909090", "-RANGE 5$#808080", |
---|
38 | "+-RANGE 6$#808080", "+-RANGE 7$#505050", "-RANGE 8$#404040", |
---|
39 | "+-RANGE 9$#303030", "+-Pseudoknots$#FFAAFF","-Triple Bases$#55FF00", |
---|
40 | |
---|
41 | "+-Cursor$#FFFFFF", "+-Comments$#808080", "-MoleculeMask$#00FF00", |
---|
42 | NULL); |
---|
43 | |
---|
44 | return preset_window; |
---|
45 | } |
---|
46 | |
---|
47 | RNA3D_Graphics::RNA3D_Graphics(AW_root *aw_root_, GBDATA *gb_main_) { |
---|
48 | exports.dont_fit_x = 1; |
---|
49 | exports.dont_fit_y = 1; |
---|
50 | exports.dont_fit_larger = 0; |
---|
51 | exports.left_offset = 20; |
---|
52 | exports.right_offset = 200; |
---|
53 | exports.top_offset = 30; |
---|
54 | exports.bottom_offset = 30; |
---|
55 | exports.dont_scroll = 0; |
---|
56 | |
---|
57 | this->aw_root = aw_root_; |
---|
58 | this->gb_main = gb_main_; |
---|
59 | } |
---|
60 | |
---|
61 | RNA3D_Graphics::~RNA3D_Graphics(void) {} |
---|
62 | |
---|
63 | void RNA3D_Graphics::show(AW_device *device){ |
---|
64 | paint(device); |
---|
65 | } |
---|
66 | |
---|
67 | void RNA3D_Graphics::info(AW_device */*device*/, AW_pos /*x*/, AW_pos /*y*/, AW_clicked_line */*cl*/, AW_clicked_text */*ct*/) |
---|
68 | { |
---|
69 | aw_message("INFO MESSAGE"); |
---|
70 | } |
---|
71 | |
---|
72 | void RNA3D_Graphics::paint(AW_device */*device*/) { |
---|
73 | MapDisplayParameters(aw_root); |
---|
74 | RefreshOpenGLDisplay(); |
---|
75 | } |
---|
76 | |
---|
77 | |
---|
78 | |
---|