1 | // =========================================================== // |
---|
2 | // // |
---|
3 | // File : awt.hxx // |
---|
4 | // Purpose : // |
---|
5 | // // |
---|
6 | // Institute of Microbiology (Technical University Munich) // |
---|
7 | // http://www.arb-home.de/ // |
---|
8 | // // |
---|
9 | // =========================================================== // |
---|
10 | |
---|
11 | #ifndef AWT_HXX |
---|
12 | #define AWT_HXX |
---|
13 | |
---|
14 | #ifndef AW_BASE_HXX |
---|
15 | #include <aw_base.hxx> |
---|
16 | #endif |
---|
17 | #ifndef ARBDB_BASE_H |
---|
18 | #include <arbdb_base.h> |
---|
19 | #endif |
---|
20 | |
---|
21 | |
---|
22 | #define awt_assert(cond) arb_assert(cond) |
---|
23 | |
---|
24 | // ------------------------------------------------------------ |
---|
25 | |
---|
26 | // holds all stuff needed to make ad_.. functions work with species _and_ genes (and more..) |
---|
27 | |
---|
28 | |
---|
29 | // ------------------------------------------------------------ |
---|
30 | |
---|
31 | void AWT_create_ascii_print_window(AW_root *awr, const char *text_to_print, const char *title=0); |
---|
32 | void AWT_show_file(AW_root *awr, const char *filename); |
---|
33 | |
---|
34 | // open database viewer using input-mask-file |
---|
35 | class awt_item_type_selector; |
---|
36 | GB_ERROR AWT_initialize_input_mask(AW_root *root, GBDATA *gb_main, const awt_item_type_selector *sel, const char* mask_name, bool localMask); |
---|
37 | |
---|
38 | |
---|
39 | class awt_input_mask_descriptor { |
---|
40 | private: |
---|
41 | char *title; // title of the input mask |
---|
42 | char *internal_maskname; // starts with 0 for local mask and with 1 for global mask |
---|
43 | // followed by file name w/o path |
---|
44 | char *itemtypename; // name of the itemtype |
---|
45 | bool local_mask; // true if mask file was found in "$ARB_PROP/inputMasks" |
---|
46 | bool hidden; // if true, mask is NOT shown in Menus |
---|
47 | |
---|
48 | public: |
---|
49 | awt_input_mask_descriptor(const char *title_, const char *maskname_, const char *itemtypename_, bool local, bool hidden_); |
---|
50 | awt_input_mask_descriptor(const awt_input_mask_descriptor& other); |
---|
51 | virtual ~awt_input_mask_descriptor(); |
---|
52 | |
---|
53 | awt_input_mask_descriptor& operator = (const awt_input_mask_descriptor& other); |
---|
54 | |
---|
55 | const char *get_title() const { return title; } |
---|
56 | const char *get_maskname() const { return internal_maskname+1; } |
---|
57 | const char *get_internal_maskname() const { return internal_maskname; } |
---|
58 | const char *get_itemtypename() const { return itemtypename; } |
---|
59 | |
---|
60 | bool is_local_mask() const { return local_mask; } |
---|
61 | bool is_hidden() const { return hidden; } |
---|
62 | }; |
---|
63 | |
---|
64 | const awt_input_mask_descriptor *AWT_look_input_mask(int id); // id starts with 0; returns 0 if no more masks |
---|
65 | |
---|
66 | #if defined(DEBUG) |
---|
67 | // database browser : |
---|
68 | void AWT_create_db_browser_awars(AW_root *aw_root, AW_default aw_def); |
---|
69 | void AWT_announce_db_to_browser(GBDATA *gb_main, const char *description); |
---|
70 | void AWT_browser_forget_db(GBDATA *gb_main); |
---|
71 | |
---|
72 | void AWT_create_debug_menu(AW_window *awmm); |
---|
73 | void AWT_check_action_ids(AW_root *aw_root, const char *suffix); |
---|
74 | #endif // DEBUG |
---|
75 | |
---|
76 | class UserActionTracker; |
---|
77 | AW_root *AWT_create_root(const char *properties, const char *program, UserActionTracker *user_tracker, int* argc, char*** argv); |
---|
78 | |
---|
79 | void AWT_install_cb_guards(); |
---|
80 | void AWT_install_postcb_cb(AW_postcb_cb postcb_cb); |
---|
81 | |
---|
82 | #else |
---|
83 | #error awt.hxx included twice |
---|
84 | #endif // AWT_HXX |
---|