OS no longer mentioned in information window.
[tangerine.git] / workbench / tools / Edit / Cursor.h
blob99dc1373675190cff9ce823e5d1fc6d7600e8b9e
1 /**************************************************************
2 **** Cursor.h : Cursor movement related functions ****
3 **** Free software under GNU license, started on 15/2/2000 ****
4 **** © T.Pierron, C.Guillaume. ****
5 **************************************************************/
7 #ifndef CURSOR_H
8 #define CURSOR_H
10 #ifndef PROJECT_H
11 #include "Project.h"
12 #endif
14 void inv_curs (Project, BYTE state); /* Show/Hide cursor */
15 void join_strip (Project); /* Join & strip \s on next line */
16 void move_to_line (Project, ULONG, char); /* Move to a specified line number */
17 void curs_down (Project); /* Move cursor one line down */
18 void curs_up (Project); /* Move one line up */
19 void curs_left (Project, BYTE word); /* Move cursor one character left */
20 void curs_right (Project, BYTE word); /* Move one character right */
21 void jump_horiz (Project, BYTE dir); /* Jump page by page horizontally */
22 void jump_vert (Project, BYTE dir); /* Jump page by page vertically */
23 void horiz_pos (Project, ULONG); /* Jump to an absolute pos in line */
24 void pg_updown (Project, BYTE dir); /* Jump one page without moving curs */
25 void split_curline (Project); /* Handle return key */
26 void join_strip (Project); /* Ctrl + J */
27 void amiga_k (Project); /* Remove entire line */
28 void back_space (Project, BYTE word); /* BS key */
29 void cut_line (Project, BYTE mode); /* Remove part (end or beg.) of line */
30 void del (Project, BYTE word); /* Del key */
32 void set_cursor_line (Project p, LONG pos, ULONG top);
33 void set_top_line (Project p, ULONG top, ULONG left);
34 void move_cursor (Project p, LONG dx, LONG dy);
36 /** Indirect cursor movement **/
37 LONG forward_word (LINE *ln, ULONG pos);
38 LONG backward_word (LINE *ln, ULONG pos);
39 ULONG x2pos (LINE *, ULONG);
40 ULONG adjust_rc (LINE *, ULONG, ULONG *, UBYTE);
41 ULONG find_nbc (LINE *, ULONG);
43 LONG adjust_leftpos(Project p, WORD step);
44 void click(Project p, WORD x, WORD y, BYTE update);
45 void unclick(Project p);
47 /** Parameter for horiz_pos **/
48 #define MAXPOS 0x7fff
50 /** Values for char parameter of move_to_line() **/
51 #define LINE_AS_IS 0 /* Display line to jump to as is */
52 #define LINE_DIRTY 1 /* The line we want to jump is modified */
53 #define LINES_DIRTY 2 /* Lines following the one we want to jump are modified */
55 /** Selection **/
56 typedef BYTE (*pfnSelectFunc)(Project, LONG, LONG);
58 extern pfnSelectFunc move_selection;
59 extern pfnSelectFunc SwitchSelect (Project, BYTE mode, BYTE force);
60 extern BYTE move_column_selection (Project, LONG, LONG);
61 extern BYTE move_stream_selection (Project, LONG, LONG);
63 #endif