source: tags/arb-6.0/RNA3D/RNA3D_Graphics.cxx

Last change on this file was 10902, checked in by westram, 11 years ago
  • elim unused parameter from AWT_expose_cb and AWT_resize_cb
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 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                      makeWindowCallback(AWT_resize_cb, scr),
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 gc_manager;
45}
46
47RNA3D_Graphics::RNA3D_Graphics(AW_root *aw_root_, GBDATA *gb_main_) {
48    exports.zoom_mode = AWT_ZOOM_NEVER;
49    exports.fit_mode  = AWT_FIT_NEVER;
50   
51    exports.set_standard_default_padding();
52
53    this->aw_root = aw_root_;
54    this->gb_main = gb_main_;
55}
56
57RNA3D_Graphics::~RNA3D_Graphics() {}
58
59void RNA3D_Graphics::show(AW_device *device) {
60    paint(device);
61}
62
63void RNA3D_Graphics::info(AW_device * /* device */, AW_pos /* x */, AW_pos /* y */, AW_clicked_line * /* cl */, AW_clicked_text * /* ct */)
64{
65    aw_message("INFO MESSAGE");
66}
67
68void RNA3D_Graphics::paint(AW_device * /* device */) {
69    MapDisplayParameters(aw_root);
70    RefreshOpenGLDisplay();
71}
72
73
74
Note: See TracBrowser for help on using the repository browser.