| swamigui Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
enum SwamiguiCanvasModType; #define SWAMIGUI_CANVAS_MOD_TYPE_COUNT enum SwamiguiCanvasModAxis; #define SWAMIGUI_CANVAS_MOD_AXIS_COUNT enum SwamiguiCanvasModFlags; enum SwamiguiCanvasModActions; SwamiguiCanvasMod; SwamiguiCanvasMod * swamigui_canvas_mod_new (void); void swamigui_canvas_mod_set_vars (SwamiguiCanvasMod *mod,SwamiguiCanvasModAxis axis,SwamiguiCanvasModType type,double mult,double power,double ofs); void swamigui_canvas_mod_get_vars (SwamiguiCanvasMod *mod,SwamiguiCanvasModAxis axis,SwamiguiCanvasModType type,double *mult,double *power,double *ofs); gboolean swamigui_canvas_mod_handle_event (SwamiguiCanvasMod *mod,GdkEvent *event);
typedef enum
{
SWAMIGUI_CANVAS_MOD_SNAP_ZOOM, /* snap line zoom */
SWAMIGUI_CANVAS_MOD_WHEEL_ZOOM, /* wheel zoom */
SWAMIGUI_CANVAS_MOD_SNAP_SCROLL, /* snap line scroll */
SWAMIGUI_CANVAS_MOD_WHEEL_SCROLL /* wheel scroll */
} SwamiguiCanvasModType;
typedef enum
{
SWAMIGUI_CANVAS_MOD_X,
SWAMIGUI_CANVAS_MOD_Y
} SwamiguiCanvasModAxis;
typedef enum
{
SWAMIGUI_CANVAS_MOD_ENABLED = 1 << 0 /* TRUE if modulator is enabled */
} SwamiguiCanvasModFlags;
typedef enum
{
SWAMIGUI_CANVAS_MOD_ZOOM_X = 1 << 0,
SWAMIGUI_CANVAS_MOD_ZOOM_Y = 1 << 1,
SWAMIGUI_CANVAS_MOD_SCROLL_X = 1 << 2,
SWAMIGUI_CANVAS_MOD_SCROLL_Y = 1 << 3
} SwamiguiCanvasModActions;
SwamiguiCanvasMod * swamigui_canvas_mod_new (void);
Create a new canvas zoom/scroll modulator object. This object is used for handling canvas events and intercepting those which apply to zooming or scrolling operations by the user.
Returns : |
New canvas modulator object with a refcount of 1 which the caller owns. |
void swamigui_canvas_mod_set_vars (SwamiguiCanvasMod *mod,SwamiguiCanvasModAxis axis,SwamiguiCanvasModType type,double mult,double power,double ofs);
Assigns equation variables for a specific modulator and axis.
|
Canvas zoom/scroll modulator |
|
Axis of variables to assign (X or Y) |
|
Modulator type to assign to (snap zoom, snap scroll, wheel zoom or wheel scroll) |
|
Multiplier value to assign to equation |
|
Power value to assign to equation |
|
Offset value to assign to equation |
void swamigui_canvas_mod_get_vars (SwamiguiCanvasMod *mod,SwamiguiCanvasModAxis axis,SwamiguiCanvasModType type,double *mult,double *power,double *ofs);
Gets equation variables for a specific modulator and axis.
|
Canvas zoom/scroll modulator |
|
Axis of variables to get (X or Y) |
|
Modulator type to get vars from (snap zoom, snap scroll, wheel zoom or wheel scroll) |
|
Location to store multiplier value of equation or NULL
|
|
Location to store power value of equation or NULL
|
|
Location to store offset value of equation or NULL
|
gboolean swamigui_canvas_mod_handle_event (SwamiguiCanvasMod *mod,GdkEvent *event);
Processes canvas events and handles events related to zoom/scroll actions.
"snap" signalvoid user_function (SwamiguiCanvasMod *swamiguicanvasmod, guint arg1, gdouble arg2, gdouble arg3, gpointer user_data) : Run First