Documentation from drag.h | ![]() |
![]() | |
Introduction | [top] |
ROV - Easy applications from C
Copyright - © Jason Tribbeck / 7th ARM 1994-2001
Contributing authors - Jason Tribbeck
File - drag.h
Type - subsystem
Description
The drag subsystem handles dragging around canvasses.
![]() | |
drag_endhandler (function pointer) | [top] |
Called when the dragging has completed.
Parameters:
- main_mousestr *mouse_str - the mouse at the end of the drag.
typedef void (* drag_endhandler)(main_mousestr *mouse_str);
![]() | |
drag_durhandler (function pointer) | [top] |
Called duringa a dragging operation.
Parameters:
- int x - the x coordinate in the current canvas.
- int y - the y coordinate in the current canvas.typedef void (* drag_durhandler)(int x, int y);
![]() | |
drag_canvas | [top] |
Drag a canvas around the screen.
Parameters:
- canvas c - the canvas to drag around.
Note - This is identical to dragging the window's title bar to move it around, except it can be called with the mouse anywhere on the screen.
void drag_canvas(canvas c);
![]() | |
drag_outline | [top] |
Drag a dotted outline around the screen or canvas.
Parameters:
- canvas c - the canvas to originate from.
- int w - the width of the box.
- int h - the height of the box.
- int screen - a flag indicating whether the screen or the canvas gives the bounding limits. Non-zero means the screen gives the bounding limits.
- drag_endhandler proc - the function to call when dragging is complete.Note - This is normally used to create outline drags for save boxes.
void drag_outline(canvas c, int w, int h, int screen, drag_endhandler proc);See also: drag_endhandler()
![]() | |
drag_hidden | [top] |
Drag a hidden point around the screen or canvas
Parameters:
- canvas c - the canvas to originate from
- int screen - a flag indicating whether the screen or the canvas gives the bounding limits. Non-zero means the screen gives the bounding limits.
- drag_endhandler endproc - the function to call when dragging is complete.
- drag_durhandler during - the function to call during a drag (NULL for none).void drag_hidden(canvas c, int screen, drag_endhandler endproc, drag_durhandler during);See also: drag_durhandler(), drag_endhandler()
![]() | |
drag_htrench | [top] |
Drag a point in a horizontal trench
Parameters:
- canvas c - the canvas.
- int x - the left hand (canvas) coordinate.
- int y - the (canvas) y coordinate of the trench.
- int l - the length of the trench.
- drag_endhandler endproc - the function to call when dragging is complete.
- drag_durhandler during - the function to call during a drag (NULL for none).Note - this is typically used to create sliders.
void drag_htrench(canvas c, int x, int y, int l, drag_endhandler endproc, drag_durhandler during);See also: drag_durhandler(), drag_endhandler(), drag_trench(), drag_vtrench()
![]() | |
drag_vtrench | [top] |
Drag a point in a vertical trench
Parameters:
- canvas c - the canvas.
- int x - the (canvas) x coordinate of the trench.
- int y - the bottom (canvas) coordinate.
- int l - the length of the trench.
- drag_endhandler endproc - the function to call when dragging is complete.
- drag_durhandler during - the function to call during a drag (NULL for none).Note - this is typically used to create sliders.
void drag_vtrench(canvas c, int x, int y, int l, drag_endhandler endproc, drag_durhandler during);See also: drag_durhandler(), drag_endhandler(), drag_htrench(), drag_trench()
![]() | |
drag_trench | [top] |
Drag a point in a trench
Parameters:
- canvas c - the canvas.
- int x0 - the left hand (canvas) coordinate.
- int y0 - the bottom (canvas) coordinate.
- int x1 - the right hand (canvas) coordinate.
- int y1 - the top (canvas) coordinate.
- drag_endhandler endproc - the function to call when dragging is complete.
- drag_durhandler during - the function to call during a drag (NULL for none).Note - this is typically used to create 2D controllers.
void drag_trench(canvas c, int x0, int y0, int x1, int y1, drag_endhandler endproc, drag_durhandler during);See also: drag_durhandler(), drag_endhandler(), drag_htrench(), drag_vtrench()
![]() | |
drag_sprite | [top] |
Drag a sprite around the canvas or screen
Parameters:
- void *spr_area - the sprite area.
- char *spr_name - the sprite name.
- int screen - a flag indicating whether the screen or the canvas gives the bounding limits. Non-zero means the screen gives the bounding limits.
- drag_endhandler endproc - the function to call when dragging is complete.Returns:
- a success state (0 for failure, non-zero for success).
int drag_sprite(void *spr_area, char *spr_name, int screen, drag_endhandler endproc);
![]() | |
drag_spritestop | [top] |
Stop dragging a sprite
void drag_spritestop(void);
Generated Sun Feb 10 15:40:59 2002