ARB
GEN_graphic.hxx
Go to the documentation of this file.
1 // =============================================================== //
2 // //
3 // File : GEN_graphic.hxx //
4 // Purpose : //
5 // //
6 // Coded by Ralf Westram (coder@reallysoft.de) in 2001 //
7 // Institute of Microbiology (Technical University Munich) //
8 // http://www.arb-home.de/ //
9 // //
10 // =============================================================== //
11 
12 #ifndef GEN_GRAPHIC_HXX
13 #define GEN_GRAPHIC_HXX
14 
15 #ifndef AW_COLOR_GROUPS_HXX
16 #include <aw_color_groups.hxx>
17 #endif
18 #ifndef AWT_CANVAS_HXX
19 #include <awt_canvas.hxx>
20 #endif
21 
22 enum {
25 
29 
31 
33 
35 
36 };
37 
42 };
43 
44 #define GEN_DISPLAY_STYLES (GEN_DISPLAY_STYLE_VERTICAL+1)
45 
46 
47 // ---------------------
48 // GEN_graphic
49 
52 
53 class GEN_graphic : public AWT_nonDB_graphic, virtual Noncopyable {
54  AW_root *aw_root;
55  GBDATA *gb_main;
56  GEN_graphic_cb_installer callback_installer;
57  int window_nr;
58  GEN_root *gen_root;
59  GEN_DisplayStyle style;
60 
61  void delete_gen_root(AWT_canvas *scr, bool just_forget_callbacks);
62 
63  void update_structure() OVERRIDE {}
64 
65 protected:
66 
67  AW_device *disp_device; // device for recursive functions
68 
69 public:
70  GEN_graphic(AW_root *aw_root, GBDATA *gb_main, GEN_graphic_cb_installer callback_installer_, int window_nr_);
72 
73  void reinit_gen_root(AWT_canvas *scr, bool force_reinit);
74 
76  GEN_DisplayStyle get_display_style() const { return style; }
77 
79 
80  void show(AW_device *device) OVERRIDE;
81 
82  void handle_command(AW_device *device, AWT_graphic_event& event) OVERRIDE;
83  void check_for_DB_update(GBDATA *gbdummy) OVERRIDE;
84 
85  AW_root *get_aw_root() const { return aw_root; }
86  GBDATA *get_gb_main() const { return gb_main; }
87  const GEN_root *get_gen_root() const { return gen_root; }
88  AW_device *get_device() const { return disp_device; }
89 };
90 
91 #else
92 #error GEN_graphic.hxx included twice
93 #endif // GEN_GRAPHIC_HXX
GB_TYPES type
void show(AW_device *device) OVERRIDE
Definition: GEN_graphic.cxx:69
void handle_command(AW_device *device, AWT_graphic_event &event) OVERRIDE
Definition: GEN_graphic.cxx:86
AW_root * get_aw_root() const
Definition: GEN_graphic.hxx:85
void check_for_DB_update(GBDATA *gbdummy) OVERRIDE
Definition: GEN_graphic.cxx:83
#define AW_COLOR_GROUPS
GBDATA * get_gb_main() const
Definition: GEN_graphic.hxx:86
const GEN_root * get_gen_root() const
Definition: GEN_graphic.hxx:87
void reinit_gen_root(AWT_canvas *scr, bool force_reinit)
void set_display_style(GEN_DisplayStyle type)
GEN_DisplayStyle
Definition: GEN_graphic.hxx:38
AW_device * disp_device
Definition: GEN_graphic.hxx:67
~GEN_graphic() OVERRIDE
Definition: GEN_graphic.cxx:45
AW_device * get_device() const
Definition: GEN_graphic.hxx:88
#define OVERRIDE
Definition: cxxforward.h:112
GEN_DisplayStyle get_display_style() const
Definition: GEN_graphic.hxx:76
CbInstallMode
Definition: GEN_graphic.hxx:50
void(* GEN_graphic_cb_installer)(CbInstallMode install, AWT_canvas *, GEN_graphic *)
Definition: GEN_graphic.hxx:51
AW_gc_manager * init_devices(AW_window *, AW_device *, AWT_canvas *scr) OVERRIDE
Definition: GEN_graphic.cxx:47
GEN_graphic(AW_root *aw_root, GBDATA *gb_main, GEN_graphic_cb_installer callback_installer_, int window_nr_)
Definition: GEN_graphic.cxx:31