ARB
awt.hxx
Go to the documentation of this file.
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 #ifndef CB_BASE_H
21 #include <cb_base.h>
22 #endif
23 #ifndef CXXFORWARD_H
24 #include <cxxforward.h>
25 #endif
26 
27 
28 #define awt_assert(cond) arb_assert(cond)
29 
30 // ------------------------------------------------------------
31 
32 // holds all stuff needed to make ad_.. functions work with species _and_ genes (and more..)
33 
34 
35 // ------------------------------------------------------------
36 
37 void AWT_create_ascii_print_window(AW_root *awr, const char *text_to_print, const char *title=NULp);
38 void AWT_show_file(AW_root *awr, const char *filename);
39 
40 // open database viewer using input-mask-file
42 GB_ERROR AWT_initialize_input_mask(AW_root *root, GBDATA *gb_main, const awt_item_type_selector *sel, const char* mask_name, bool localMask);
43 
44 
45 class awt_input_mask_descriptor FINAL_TYPE {
46 private:
47  char *title; // title of the input mask
48  char *internal_maskname; // starts with 0 for local mask and with 1 for global mask
49  // followed by file name w/o path
50  char *itemtypename; // name of the itemtype
51  bool local_mask; // true if mask file was found in "$ARB_PROP/inputMasks"
52  bool hidden; // if true, mask is NOT shown in Menus
53 
54 public:
55  awt_input_mask_descriptor(const char *title_, const char *maskname_, const char *itemtypename_, bool local, bool hidden_);
56  awt_input_mask_descriptor(const awt_input_mask_descriptor& other);
57  virtual ~awt_input_mask_descriptor();
58 
59  awt_input_mask_descriptor& operator = (const awt_input_mask_descriptor& other);
60 
61  const char *get_title() const { return title; }
62  const char *get_maskname() const { return internal_maskname+1; }
63  const char *get_internal_maskname() const { return internal_maskname; }
64  const char *get_itemtypename() const { return itemtypename; }
65 
66  bool is_local_mask() const { return local_mask; }
67  bool is_hidden() const { return hidden; }
68 };
69 
70 const awt_input_mask_descriptor *AWT_look_input_mask(int id); // id starts with 0; returns 0 if no more masks
71 
72 #if defined(DEBUG)
73 // database browser :
74 void AWT_create_db_browser_awars(AW_root *aw_root, AW_default aw_def);
75 void AWT_announce_db_to_browser(GBDATA *gb_main, const char *description);
76 void AWT_browser_forget_db(GBDATA *gb_main);
77 
78 void AWT_create_debug_menu(AW_window *awmm);
79 void AWT_check_action_ids(AW_root *aw_root, const char *suffix);
80 #endif // DEBUG
81 
82 class UserActionTracker;
83 AW_root *AWT_create_root(const char *properties, const char *program, UserActionTracker *user_tracker);
84 
86 void AWT_install_postcb_cb(AW_postcb_cb postcb_cb);
87 
88 void AWT_trigger_remote_action(UNFIXED, GBDATA *gb_main, const char *remote_action_spec);
89 
90 #else
91 #error awt.hxx included twice
92 #endif // AWT_HXX
const char * GB_ERROR
Definition: arb_core.h:25
const awt_input_mask_descriptor * AWT_look_input_mask(int id)
const char * get_title() const
Definition: awt.hxx:61
const char * title
Definition: readseq.c:22
struct Unfixed_cb_parameter * UNFIXED
Definition: cb_base.h:15
bool is_hidden() const
Definition: awt.hxx:67
const char * get_maskname() const
Definition: awt.hxx:62
const char * get_internal_maskname() const
Definition: awt.hxx:63
const char * get_itemtypename() const
Definition: awt.hxx:64
bool is_local_mask() const
Definition: awt.hxx:66
AW_root * AWT_create_root(const char *properties, const char *program, UserActionTracker *user_tracker)
void AWT_trigger_remote_action(UNFIXED, GBDATA *gb_main, const char *remote_action_spec)
xml element
void AWT_create_ascii_print_window(AW_root *awr, const char *text_to_print, const char *title=NULp)
void AWT_install_postcb_cb(AW_postcb_cb postcb_cb)
#define NULp
Definition: cxxforward.h:97
void AWT_install_cb_guards()
GBDATA * gb_main
Definition: adname.cxx:33
void(* AW_postcb_cb)(AW_window *)
Definition: aw_base.hxx:24
GB_ERROR AWT_initialize_input_mask(AW_root *root, GBDATA *gb_main, const awt_item_type_selector *sel, const char *mask_name, bool localMask)
void AWT_show_file(AW_root *awr, const char *filename)