source: branches/stable/SECEDIT/SEC_toggle.hxx

Last change on this file was 6385, checked in by westram, 14 years ago
  • removed trailing whitespace
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1// ================================================================= //
2//                                                                   //
3//   File      : SEC_toggle.hxx                                      //
4//   Purpose   : Support for multiple structure                      //
5//                                                                   //
6//   Coded by Ralf Westram (coder@reallysoft.de) in September 2007   //
7//   Institute of Microbiology (Technical University Munich)         //
8//   http://www.arb-home.de/                                         //
9//                                                                   //
10// ================================================================= //
11
12#ifndef SEC_TOGGLE_HXX
13#define SEC_TOGGLE_HXX
14
15#ifndef ARBDB_H
16#include <arbdb.h>
17#endif
18
19class SEC_graphic;
20
21class SEC_structure_toggler {
22    GBDATA      *gb_structures; // contains all structures
23    GBDATA      *gb_current;    // contains current structure
24    SEC_graphic *gfx;           // needed to trigger refresh
25    GB_ERROR     st_error;
26    int          Count;
27
28    int  current();
29    GB_ERROR set_current(int idx) __ATTR__USERESULT;
30
31    GBDATA *find(int num);
32    GBDATA *create(const char *name); // create new structure (storing current)
33
34    GB_ERROR store(GBDATA *gb_struct);
35    GB_ERROR restore(GBDATA *gb_struct);
36
37    GB_ERROR setName(GBDATA *gb_struct, const char *new_name);
38
39public:
40    SEC_structure_toggler(GBDATA *gb_main, const char *ali_name, SEC_graphic *Gfx); // might set error
41
42    GB_ERROR get_error() const { return st_error; }
43
44    GB_ERROR next();
45    GB_ERROR copyTo(const char *name);
46    GB_ERROR remove();
47
48    const char *name();
49    GB_ERROR setName(const char *new_name);
50
51    int getCount() const { return Count; }
52};
53
54
55#else
56#error SEC_toggle.hxx included twice
57#endif // SEC_TOGGLE_HXX
Note: See TracBrowser for help on using the repository browser.