source: tags/ms_r16q3/SL/TREE_ADMIN/TreeAdmin.h

Last change on this file was 11582, checked in by westram, 10 years ago
  • fix #460 (attempted to register tree awar w/o tree having a tree registry)
File size: 1.6 KB
Line 
1// ============================================================= //
2//                                                               //
3//   File      : TreeAdmin.h                                     //
4//   Purpose   : Common tree admin functionality                 //
5//                                                               //
6//   Coded by Ralf Westram (coder@reallysoft.de) in April 2012   //
7//   Institute of Microbiology (Technical University Munich)     //
8//   http://www.arb-home.de/                                     //
9//                                                               //
10// ============================================================= //
11
12#ifndef TREEADMIN_H
13#define TREEADMIN_H
14
15#ifndef AW_BASE_HXX
16#include <aw_base.hxx>
17#endif
18
19class AW_awar;
20
21namespace TreeAdmin {
22
23    class Spec {
24        GBDATA     *gb_main;
25        const char *awar_selected_tree;
26    public:
27        Spec(GBDATA *gb_main_, const char *awar_selected_tree_)
28            : gb_main(gb_main_),
29              awar_selected_tree(awar_selected_tree_)
30        {}
31
32        GBDATA *get_gb_main() const { return gb_main; }
33        AW_awar *tree_awar(AW_root *awr) const;
34    };
35
36    void create_awars(AW_root *root, AW_default aw_def, bool registerTreeAwar);
37    AW_awar *dest_tree_awar(AW_root *root);
38    AW_awar *source_tree_awar(AW_root *root);
39
40    AW_window *create_rename_window(AW_root *root, const Spec *spec);
41    AW_window *create_copy_window(AW_root *root, const Spec *spec);
42
43    void delete_tree_cb(AW_window *aww, const Spec *spec);
44};
45
46#else
47#error TreeAdmin.h included twice
48#endif // TREEADMIN_H
Note: See TracBrowser for help on using the repository browser.