1set_cursor_dimensions(3)        gstream manual        set_cursor_dimensions(3)
2
3
4

NAME

6       set_cursor_dimensions
7

SYNOPSIS

9       #include <gstream.h>
10
11
12       void set_cursor_dimensions(int iw, int ih, int ow, int oh);
13

DESCRIPTION

15       This  will set the cursor dimensions to IW x IH when in insert mode and
16       OW x OH when in overwrite mode. Although the standard  cursors  respond
17       to this, it is mostly intended to be used with custom cursor drawers.
18
19       Before requesting any inputs with your custom cursor drawer, you should
20       call this function with the appropriate values. To set the size of  the
21       character  underneath  the  cursor dynamically, pass gbuf::DYNAMIC_CUR‐
22       SOR_SIZE: if the cursor is at the end of the  line,  it  will  get  the
23       width  of a space ' ', else it will get the size of the character under
24       it.
25
26       Say that we have created a nice cursor drawer that for the insert  cur‐
27       sor  is one pixel wide and as tall as the characters (in other words: a
28       vertical line), but for the overwrite  cursor  is  a  BITMAP  with  the
29       dimensions 8x10. Then the following would do:
30
31          gs.set_cursor_dimensions(1, gbuf::DYNAMIC_CURSOR_SIZE, 8, 10);
32
33       It  is  important  that you remember to call this function when you are
34       using custom cursor drawers - else the inputter doesn't know  how  much
35       of the background below the cursor to save and recover.
36
37       The  default  dimensions  are  the  dimensions  that are suited for the
38       default cursor.
39
40

SEE ALSO

42       gstream-get_cursor_w(3),   gstream-get_cursor_h(3),    gstream-set_cur‐
43       sor_drawer(3)
44
45
46
47gstream                           version 1.6         set_cursor_dimensions(3)
Impressum