source: branches/help/EDIT4/ed4_block.hxx

Last change on this file was 16763, checked in by westram, 7 years ago
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1// =============================================================== //
2//                                                                 //
3//   File      : ed4_block.hxx                                     //
4//   Purpose   : Block operations                                  //
5//                                                                 //
6//   Coded by Ralf Westram (coder@reallysoft.de)                   //
7//   Institute of Microbiology (Technical University Munich)       //
8//   http://www.arb-home.de/                                       //
9//                                                                 //
10// =============================================================== //
11
12#ifndef ED4_BLOCK_HXX
13#define ED4_BLOCK_HXX
14
15enum ED4_blocktype {
16    ED4_BT_NOBLOCK,             // nothing is marked
17    ED4_BT_LINEBLOCK,           // all species with EDIT4-marks are marked
18    ED4_BT_COLUMNBLOCK,         // range is marked
19    ED4_BT_MODIFIED_COLUMNBLOCK // was columnblock, but single species were removed/added
20};
21
22enum ED4_blockoperation_type {
23    ED4_BO_UPPER_CASE,
24    ED4_BO_LOWER_CASE,
25    ED4_BO_REVERSE,
26    ED4_BO_COMPLEMENT,
27    ED4_BO_REVERSE_COMPLEMENT,
28    ED4_BO_UNALIGN_LEFT,
29    ED4_BO_UNALIGN_CENTER,
30    ED4_BO_UNALIGN_RIGHT,
31    ED4_BO_SHIFT_LEFT,
32    ED4_BO_SHIFT_RIGHT
33};
34
35ED4_blocktype ED4_getBlocktype();
36void          ED4_setBlocktype(ED4_blocktype bt);
37void          ED4_toggle_block_type();
38void          ED4_correctBlocktypeAfterSelection();
39void          ED4_setColumnblockCorner(AW_event *event, ED4_sequence_terminal *seq_term);
40bool          ED4_get_selected_range(ED4_terminal *term, PosRange& range);
41
42class SeqPart;
43
44class ED4_block_operator : virtual Noncopyable {
45protected:
46    mutable GB_ERROR error;
47public:
48    ED4_block_operator() : error(NULp) {}
49    virtual ~ED4_block_operator() {}
50
51    GB_ERROR get_error() const { return error; }
52    virtual char *operate(const SeqPart& part, int& new_len) const = 0;
53};
54
55void ED4_perform_block_operation(ED4_blockoperation_type type);
56
57AW_window *ED4_create_replace_window(AW_root *root);
58AW_window *ED4_create_modsai_window(AW_root *root);
59
60#else
61#error ed4_block.hxx included twice
62#endif // ED4_BLOCK_HXX
Note: See TracBrowser for help on using the repository browser.