source: trunk/SL/SPECSEL/selection_admin.h

Last change on this file was 19726, checked in by westram, 8 days ago
  • define titles via SelectionAdmin
    • use suffixed_title() in NTREE (NtSelectionAdmin).
    • use "(left/right DB)" in mergetool (MgSelectionAdmin).
  • use SelectionAdmin to create title of species selection windows.
  • use suffixed_title() in create_configuration_marker_window().
File size: 2.4 KB
Line 
1// ========================================================= //
2//                                                           //
3//   File      : selection_admin.h                           //
4//   Purpose   : species selection admin                     //
5//                                                           //
6//   Coded by Ralf Westram (coder@reallysoft.de) in Feb 26   //
7//   http://www.arb-home.de/                                 //
8//                                                           //
9// ========================================================= //
10
11#ifndef SELECTION_ADMIN_H
12#define SELECTION_ADMIN_H
13
14#ifndef AW_BASE_HXX
15#include <aw_base.hxx>
16#endif
17#ifndef CB_H
18#include <cb.h>
19#endif
20
21struct SelectionAdmin {
22    virtual ~SelectionAdmin() {}
23
24    virtual const char *get_macro_suffix() const = 0;
25    virtual GBDATA *get_gb_main() const          = 0;
26
27    virtual const char *get_selection_awarname() const        = 0;
28    virtual const char *get_selectionComment_awarname() const = 0;
29
30    virtual const char *get_window_title() const = 0;
31
32    virtual const char *get_name_of_tree() const  = 0;
33    virtual class TreeNode *get_tree_root() const = 0;
34
35    virtual const char *get_toparea_SAIs() const = 0;
36
37    virtual void speciesSelection_renamed_cb(const char *old_name, const char *new_name) const = 0;
38    virtual void speciesSelection_deleted_cb(const char *name) const                           = 0;
39};
40
41enum SelectionCreation {
42    BY_CALLING_THE_EDITOR,
43    FROM_IMPORTER,
44    FROM_MANAGER,
45};
46
47enum SelectionExtractType {
48    SELECTION_EXTRACT, // unmark all + mark selection
49    SELECTION_MARK,    // mark selection (= logical OR)
50    SELECTION_UNMARK,  // unmark selection
51    SELECTION_INVERT,  // invert selection (= logical XOR)
52    SELECTION_COMBINE  // logical AND (i.e. unmark all that are not member from selection)
53};
54
55GB_ERROR   create_species_selection(const SelectionAdmin& selection, const char *conf_name, int use_species_aside, SelectionCreation creation);
56void       extract_species_selection(GBDATA *gb_main, const char *selectionName, SelectionExtractType ext_type);
57AW_window *create_species_selection_window(AW_root *root, const SelectionAdmin *selection);
58
59void create_species_selection_button(AW_window *awm, WindowCallback wcb, const char *macro_id, const char *awarname_buttontext, GBDATA *gb_main);
60
61#else
62#error selection_admin.h included twice
63#endif // SELECTION_ADMIN_H
Note: See TracBrowser for help on using the repository browser.