root/trunk/AWT/awt_sel_boxes.hxx

Revision 8696, 4.6 KB (checked in by westram, 3 weeks ago)
  • merge from saiali [8634:8695]
    • unalign center (blockop)
    • modify SAI range (using ACI/SRT)
    • align ranges defined by SAI
    • refactorings
      • block ops
      • selection lists
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1// ==================================================================== //
2//                                                                      //
3//   File      : awt_sel_boxes.hxx                                      //
4//   Purpose   :                                                        //
5//                                                                      //
6//                                                                      //
7// Coded by Ralf Westram (coder@reallysoft.de) in May 2005              //
8// Copyright Department of Microbiology (Technical University Munich)   //
9//                                                                      //
10// Visit our web site at: http://www.arb-home.de/                       //
11//                                                                      //
12// ==================================================================== //
13#ifndef AWT_SEL_BOXES_HXX
14#define AWT_SEL_BOXES_HXX
15
16#ifndef ARBDB_BASE_H
17#include <arbdb_base.h>
18#endif
19#ifndef AW_BASE_HXX
20#include <aw_base.hxx>
21#endif
22#ifndef ARBTOOLS_H
23#include <arbtools.h>
24#endif
25
26class AP_filter;
27struct adfiltercbstruct;
28
29typedef char *(*awt_sai_sellist_filter)(GBDATA *, AW_CL);
30class AWT_sai_selection;
31
32class SAI_selection_list_spec : virtual Noncopyable {
33    char   *awar_name;
34    GBDATA *gb_main;
35
36    awt_sai_sellist_filter filter_poc;
37    AW_CL                  filter_cd;
38
39public:
40    SAI_selection_list_spec(const char *awar_name_, GBDATA *gb_main_)
41        : awar_name(strdup(awar_name_)),
42          gb_main(gb_main_),
43          filter_poc(NULL),
44          filter_cd(0)
45    {}
46    ~SAI_selection_list_spec() { free(awar_name); }
47
48    void define_filter(awt_sai_sellist_filter filter_poc_, AW_CL filter_cd_) {
49        // Warning: do not use different filters for same awar! (wont work as expected)
50        filter_poc = filter_poc_;
51        filter_cd  = filter_cd_;
52    }
53
54    const char *get_awar_name() const { return awar_name; }
55
56    AWT_sai_selection *create_list(AW_window *aws) const;
57};
58
59// -----------------------------------------
60//      various database selection boxes
61
62class AW_DB_selection;
63
64AW_DB_selection *awt_create_selection_list_on_alignments(GBDATA *gb_main, AW_window *aws, const char *varname, const char *ali_type_match);
65void awt_reconfigure_selection_list_on_alignments(AW_DB_selection *alisel, const char *ali_type_match);
66
67AW_DB_selection *awt_create_selection_list_on_trees(GBDATA *gb_main, AW_window *aws, const char *varname);
68
69void awt_create_selection_list_on_pt_servers(AW_window *aws, const char *varname, bool popup);
70void awt_edit_arbtcpdat_cb(AW_window *aww, AW_CL cl_gb_main);
71
72void awt_create_selection_list_on_tables(GBDATA *gb_main, AW_window *aws, const char *varname);
73void awt_create_selection_list_on_table_fields(GBDATA *gb_main, AW_window *aws, const char *tablename, const char *varname);
74AW_window *AWT_create_tables_admin_window(AW_root *aw_root, GBDATA *gb_main);
75
76AWT_sai_selection *awt_create_selection_list_on_sai(GBDATA *gb_main, AW_window *aws, const char *varname, awt_sai_sellist_filter filter_poc = 0, AW_CL filter_cd = 0);
77void awt_selection_list_on_sai_update_cb(GBDATA *dummy, AWT_sai_selection *cbsid);
78void awt_popup_sai_selection_list(AW_root *aw_root, AW_CL cl_awar_name, AW_CL cl_gb_main);
79void awt_popup_sai_selection_list(AW_window *aww, AW_CL cl_awar_name, AW_CL cl_gb_main);
80void awt_popup_filtered_sai_selection_list(AW_root *aw_root, AW_CL cl_sai_sellist_spec);
81void awt_popup_filtered_sai_selection_list(AW_window *aww, AW_CL cl_sai_sellist_spec);
82void awt_create_SAI_selection_button(GBDATA *gb_main, AW_window *aws, const char *varname, awt_sai_sellist_filter filter_poc = 0, AW_CL filter_cd = 0);
83
84void  awt_create_selection_list_on_configurations(GBDATA *gb_main, AW_window *aws, const char *varname);
85char *awt_create_string_on_configurations(GBDATA *gb_main);
86
87AW_window *awt_create_load_box(AW_root *aw_root, const char *load_what, const char *file_extension, char **set_file_name_awar,
88                               void (*callback)(AW_window*), AW_window* (*create_popup)(AW_root *, AW_default));
89
90// -------------------------------
91
92class AW_selection;
93class AW_selection_list;
94class ConstStrArray;
95
96AW_selection *awt_create_subset_selection_list(AW_window *aww, AW_selection_list *select_subset_from, const char *at_box, const char *at_add, const char *at_sort);
97
98// -------------------------------
99
100AW_window *create_save_box_for_selection_lists(AW_root *aw_root, AW_CL selid);
101AW_window *create_load_box_for_selection_lists(AW_root *aw_root, AW_CL selid);
102void create_print_box_for_selection_lists(AW_window *aw_window, AW_CL selid);
103
104#else
105#error awt_sel_boxes.hxx included twice
106#endif // AWT_SEL_BOXES_HXX
Note: See TracBrowser for help on using the browser.