source: tags/ms_r16q2/AWT/awt.hxx

Last change on this file was 14641, checked in by westram, 8 years ago
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
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
24
25#define awt_assert(cond) arb_assert(cond)
26
27// ------------------------------------------------------------
28
29// holds all stuff needed to make ad_.. functions work with species _and_ genes (and more..)
30
31
32// ------------------------------------------------------------
33
34void AWT_create_ascii_print_window(AW_root *awr, const char *text_to_print, const char *title=0);
35void AWT_show_file(AW_root *awr, const char *filename);
36
37// open database viewer using input-mask-file
38class awt_item_type_selector;
39GB_ERROR AWT_initialize_input_mask(AW_root *root, GBDATA *gb_main, const awt_item_type_selector *sel, const char* mask_name, bool localMask);
40
41
42class awt_input_mask_descriptor {
43private:
44    char *title;                // title of the input mask
45    char *internal_maskname;    // starts with 0 for local mask and with 1 for global mask
46    // followed by file name w/o path
47    char *itemtypename;         // name of the itemtype
48    bool  local_mask;           // true if mask file was found in "$ARB_PROP/inputMasks"
49    bool  hidden;               // if true, mask is NOT shown in Menus
50
51public:
52    awt_input_mask_descriptor(const char *title_, const char *maskname_, const char *itemtypename_, bool local, bool hidden_);
53    awt_input_mask_descriptor(const awt_input_mask_descriptor& other);
54    virtual ~awt_input_mask_descriptor();
55
56    awt_input_mask_descriptor& operator = (const awt_input_mask_descriptor& other);
57
58    const char *get_title() const { return title; }
59    const char *get_maskname() const { return internal_maskname+1; }
60    const char *get_internal_maskname() const { return internal_maskname; }
61    const char *get_itemtypename() const { return itemtypename; }
62
63    bool is_local_mask() const { return local_mask; }
64    bool is_hidden() const { return hidden; }
65};
66
67const awt_input_mask_descriptor *AWT_look_input_mask(int id); // id starts with 0; returns 0 if no more masks
68
69#if defined(DEBUG)
70// database browser :
71void AWT_create_db_browser_awars(AW_root *aw_root, AW_default aw_def);
72void AWT_announce_db_to_browser(GBDATA *gb_main, const char *description);
73void AWT_browser_forget_db(GBDATA *gb_main);
74
75void AWT_create_debug_menu(AW_window *awmm);
76void AWT_check_action_ids(AW_root *aw_root, const char *suffix);
77#endif // DEBUG
78
79class UserActionTracker;
80AW_root *AWT_create_root(const char *properties, const char *program, UserActionTracker *user_tracker, int* argc, char*** argv);
81
82void AWT_install_cb_guards();
83void AWT_install_postcb_cb(AW_postcb_cb postcb_cb);
84
85void AWT_trigger_remote_action(UNFIXED, GBDATA *gb_main, const char *remote_action_spec);
86
87#else
88#error awt.hxx included twice
89#endif // AWT_HXX
Note: See TracBrowser for help on using the repository browser.