![]() |
![]() |
![]() |
crcanvas: A GTK/Cairo Canvas Widget | ![]() |
---|---|---|---|---|
CrZoomerCrZoomer — A object for setting up box zooming on a CrCanvas widget. |
CrZoomer; CrZoomer* cr_zoomer_new (CrCanvas *canvas, const gchar *first_arg_name, ...); void cr_zoomer_activate (CrZoomer *zoomer); void cr_zoomer_deactivate (CrZoomer *zoomer);
"active" gboolean : Read / Write "canvas" CrCanvas* : Read / Write "corner-to-corner" gboolean : Read / Write "cursor" gint : Read / Write "fill-color" gchar* : Read / Write "fill-color-rgba" guint : Read / Write "line-width" gdouble : Read / Write "maintain-aspect" gboolean : Read / Write "outline-color" gchar* : Read / Write "outline-color-rgba" guint : Read / Write
By default "fill-color" and "outline-color" properties are disabled. These should be set at construction time in order to see the zoom box.
CrZoomer* cr_zoomer_new (CrCanvas *canvas, const gchar *first_arg_name, ...);
A factory to create a CrZoomer object and connect it to a CrCanvas in one step.
|
The canvas widget to operate on. |
|
A list of object argument name/value pairs, NULL-terminated, used to configure the item. |
|
|
Returns : |
A newly created CrZoomer object. You must call g_object_unref when finished with it. |
"active"
property"active" gboolean : Read / Write
Active/Deactivate the zoomer object or check the activation status.
Default value: FALSE
"corner-to-corner"
property"corner-to-corner" gboolean : Read / Write
If the zoombox should be made by dragging from corner to corner. The default is to drag from the center.
Default value: FALSE
"cursor"
property"cursor" gint : Read / Write
GDK Cursor to use when zoombox is selected.
Allowed values: [0,153]
Default value: 64
"fill-color"
property"fill-color" gchar* : Read / Write
A string color such as 'red', or '#123456' to be used to fill the zoombox.
Default value: NULL
"fill-color-rgba"
property"fill-color-rgba" guint : Read / Write
Zoombox Fill Color RGBA.
Default value: 0
"line-width"
property"line-width" gdouble : Read / Write
Line width in user units.
Default value: 2
"maintain-aspect"
property"maintain-aspect" gboolean : Read / Write
If the aspect ratio of the rectangle should match the aspect of the canvas widget.
Default value: TRUE
"outline-color"
property"outline-color" gchar* : Read / Write
A string color such as 'red', or '#123456' to be used to sroke the zoombox.
Default value: NULL
"outline-color-rgba"
property"outline-color-rgba" guint : Read / Write
Zoombox Outline Color RGBA.
Default value: 0
"activate"
signalvoid user_function (CrZoomer *zoomer, gpointer user_data) : Run First
This signal is emitted whenever the zoombox is first activated.
|
|
|
user data set when the signal handler was connected. |
"deactivate"
signalvoid user_function (CrZoomer *zoomer, gpointer user_data) : Run First
This signal is emitted whenever the zoombox is deactivated. It can be used to get to a callback from a zoombox selection.
|
|
|
user data set when the signal handler was connected. |
"select"
signalgboolean user_function (CrZoomer *zoomer, gdouble cx, gdouble cy, gdouble w, gdouble h, gpointer user_data) : Run Last
This signal is emitted just prior to zooming the canvas. It can be intercepted and used to change the default behavior of the zoomer to possibly do something other than zoom the canvas.
|
|
|
The selected area center x coordinate. |
|
The selected area center y coordinate. |
|
The selected area width. |
|
The selected area height. |
|
user data set when the signal handler was connected. |
Returns : |
True to stop the canvas from being zoomed. False to allow the canvas to be zoomed. |