12
12
#ifndef ED4_BLOCK_HXX
13
13
#define ED4_BLOCK_HXX
16
16
ED4_BT_NOBLOCK, // nothing is marked
17
17
ED4_BT_LINEBLOCK, // all species with EDIT4-marks are marked
18
18
ED4_BT_COLUMNBLOCK, // range is marked
19
19
ED4_BT_MODIFIED_COLUMNBLOCK // was columnblock, but single species were removed/added
22
enum ED4_blockoperation_type {
27
27
ED4_BO_REVERSE_COMPLEMENT,
29
ED4_BO_UNALIGN_CENTER,
29
30
ED4_BO_UNALIGN_RIGHT,
32
} ED4_blockoperation_type;
34
35
ED4_blocktype ED4_getBlocktype();
35
36
void ED4_setBlocktype(ED4_blocktype bt);
36
37
void ED4_toggle_block_type();
37
38
void ED4_correctBlocktypeAfterSelection();
38
39
void ED4_setColumnblockCorner(AW_event *event, ED4_sequence_terminal *seq_term);
39
int ED4_get_selected_range(ED4_terminal *term, int *first_column, int *last_column);
41
typedef char *(*ED4_blockoperation)(const char *sequence_data, int len, int repeat, int *new_len, GB_ERROR *error);
43
void ED4_with_whole_block(ED4_blockoperation block_operation, int repeat);
40
bool ED4_get_selected_range(ED4_terminal *term, PosRange& range);
44
class ED4_block_operator : virtual Noncopyable {
46
mutable GB_ERROR error;
48
ED4_block_operator() : error(NULL) {}
49
virtual ~ED4_block_operator() {}
51
GB_ERROR get_error() const { return error; }
52
virtual char *operate(const SeqPart& part, int& new_len) const = 0;
44
55
void ED4_perform_block_operation(ED4_blockoperation_type type);
46
57
AW_window *ED4_create_replace_window(AW_root *root);
58
AW_window *ED4_create_modsai_window(AW_root *root);
49
61
#error ed4_block.hxx included twice