root/branches/stable_5.0/DIST/di_view_matrix.hxx

Revision 5675, 2.9 KB (checked in by westram, 3 years ago)
  • removed automatic timestamps (the best they were good for, were vc-conflicts)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1// =============================================================== //
2//                                                                 //
3//   File      : di_view_matrix.hxx                                //
4//                                                                 //
5//   Institute of Microbiology (Technical University Munich)       //
6//   http://www.arb-home.de/                                       //
7//                                                                 //
8// =============================================================== //
9
10#ifndef DI_VIEW_MATRIX_HXX
11#define DI_VIEW_MATRIX_HXX
12
13#ifndef AW_WINDOW_HXX
14#include <aw_window.hxx>
15#endif
16
17#define SPECIES_NAME_LEN 10    // only for displaying speciesnames
18
19typedef enum  {
20    DI_G_STANDARD,
21    DI_G_NAMES,
22    DI_G_RULER,
23    DI_G_RULER_DISPLAY,
24    DI_G_BELOW_DIST,
25    DI_G_ABOVE_DIST,
26    DI_G_LAST                   // must be last
27} DI_gc;
28
29class DI_dmatrix {
30    AW_pos  screen_width;         // dimensions of main screen
31    AW_pos  screen_height;
32    long    cell_width;           // width and height of one cell
33    long    cell_height;
34    long    cell_offset;          // don't write on base line of cell
35    long    horiz_page_start;     // number of first element in this page
36    long    vert_page_start;
37    long    vert_last_view_start; // last value of scrollbars
38    long    horiz_last_view_start;
39    long    total_cells_horiz;
40    long    total_cells_vert;
41    long    horiz_page_size;      // page size in cells (how many cells per page,
42    long    vert_page_size;       // vertical and horizontal)
43    long    off_dx;               // offset values for devic.shift_dx(y)
44    long    off_dy;
45    double  min_view_dist;        // m[i][j]<min_view_dist -> ascii ; else small slider
46    double  max_view_dist;        // m[i][j]>max_view_dist -> ascii ; else small slider
47
48    void set_scrollbar_steps(long width,long hight,long xinc,long yinc);
49
50public:
51    AW_window *awm;
52    AW_device *device;          // device to draw in
53    DI_MATRIX  *di_matrix;       // the Matrix
54
55    DI_MATRIX *get_matrix();
56
57    void monitor_vertical_scroll_cb(AW_window *);   // vertical and horizontal
58    void monitor_horizontal_scroll_cb(AW_window *); // scrollbar movements
59    void display(bool clear);                       // display data
60    void resized(void);                             // call after resize main window
61
62    // ******************** real public section *******************
63    void set_slider_min(double d) { min_view_dist = d; };
64    void set_slider_max(double d) { max_view_dist = d; };
65
66    void handle_move(AW_event& event);
67   
68    DI_dmatrix();
69    void init(DI_MATRIX *matrix=0); // set the output matrix
70
71    // if matrix == 0, use DI_MATRIX::root
72};
73
74AW_window *DI_create_view_matrix_window(AW_root *awr, DI_dmatrix *dmatrix);
75
76
77#else
78#error di_view_matrix.hxx included twice
79#endif // DI_VIEW_MATRIX_HXX
Note: See TracBrowser for help on using the browser.