![]() |
![]() |
![]() |
Netbook Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Properties | Signals |
NbtkDraggable; NbtkDraggableIface; enum NbtkDragAxis; enum NbtkDragContainment; void nbtk_draggable_set_axis (NbtkDraggable *draggable, NbtkDragAxis axis); NbtkDragAxis nbtk_draggable_get_axis (NbtkDraggable *draggable); void nbtk_draggable_set_drag_threshold (NbtkDraggable *draggable, guint threshold); guint nbtk_draggable_get_drag_threshold (NbtkDraggable *draggable); void nbtk_draggable_set_containment_type (NbtkDraggable *draggable, NbtkDragContainment containment); NbtkDragContainment nbtk_draggable_get_containment_type (NbtkDraggable *draggable); void nbtk_draggable_set_containment_area (NbtkDraggable *draggable, gfloat x_1, gfloat y_1, gfloat x_2, gfloat y_2); void nbtk_draggable_get_containment_area (NbtkDraggable *draggable, gfloat *x_1, gfloat *y_1, gfloat *x_2, gfloat *y_2); void nbtk_draggable_disable (NbtkDraggable *draggable); void nbtk_draggable_enable (NbtkDraggable *draggable); gboolean nbtk_draggable_is_enabled (NbtkDraggable *draggable);
"axis" NbtkDragAxis : Read / Write "containment-area" ClutterActorBox* : Read / Write "containment-type" NbtkDragContainment : Read / Write "drag-actor" ClutterActor* : Read / Write "drag-threshold" guint : Read / Write "enabled" gboolean : Read / Write
typedef struct { /* vfuncs, not signals */ void (* enable) (NbtkDraggable *draggable); void (* disable) (NbtkDraggable *draggable); /* signals */ void (* drag_begin) (NbtkDraggable *draggable, gfloat event_x, gfloat event_y, gint event_button, ClutterModifierType modifiers); void (* drag_motion) (NbtkDraggable *draggable, gfloat delta_x, gfloat delta_y); void (* drag_end) (NbtkDraggable *draggable, gfloat event_x, gfloat event_y); } NbtkDraggableIface;
Interface for draggable ClutterActors.
|
virtual function called when enabling a NbtkDraggable; NBTK already provides a default implementation |
|
virtual function called when disabling a NbtkDraggable; NBTK already provides a default implementation |
|
class handler for the "drag-begin" signal |
|
class handler for the "drag-motion" signal |
|
class handler for the "drag-end" signal |
typedef enum { NBTK_DISABLE_CONTAINMENT, NBTK_CONTAIN_IN_STAGE, NBTK_CONTAIN_IN_PARENT, NBTK_CONTAIN_IN_AREA } NbtkDragContainment;
void nbtk_draggable_set_axis (NbtkDraggable *draggable, NbtkDragAxis axis);
|
|
|
NbtkDragAxis nbtk_draggable_get_axis (NbtkDraggable *draggable);
|
|
Returns : |
void nbtk_draggable_set_drag_threshold (NbtkDraggable *draggable, guint threshold);
|
|
|
guint nbtk_draggable_get_drag_threshold (NbtkDraggable *draggable);
|
|
Returns : |
void nbtk_draggable_set_containment_type (NbtkDraggable *draggable, NbtkDragContainment containment);
|
|
|
NbtkDragContainment nbtk_draggable_get_containment_type (NbtkDraggable *draggable);
|
|
Returns : |
void nbtk_draggable_set_containment_area (NbtkDraggable *draggable, gfloat x_1, gfloat y_1, gfloat x_2, gfloat y_2);
|
|
|
|
|
|
|
|
|
void nbtk_draggable_get_containment_area (NbtkDraggable *draggable, gfloat *x_1, gfloat *y_1, gfloat *x_2, gfloat *y_2);
|
|
|
|
|
|
|
|
|
gboolean nbtk_draggable_is_enabled (NbtkDraggable *draggable);
|
|
Returns : |
"axis"
property"axis" NbtkDragAxis : Read / Write
The axis along which the dragging should be performed.
Default value: NBTK_NO_AXIS
"containment-area"
property"containment-area" ClutterActorBox* : Read / Write
The area to which the draggable is contained.
"containment-type"
property"containment-type" NbtkDragContainment : Read / Write
The type of containment to be used.
Default value: NBTK_DISABLE_CONTAINMENT
"drag-actor"
property"drag-actor" ClutterActor* : Read / Write
An actor to use in place of the draggable while dragging.
"drag-threshold"
property"drag-threshold" guint : Read / Write
The amount of pixels required to start dragging.
Default value: 0
"drag-begin"
signalvoid user_function (NbtkDraggable *nbtkdraggable, gfloat arg1, gfloat arg2, gint arg3, ClutterModifierType arg4, gpointer user_data) : Run First
|
the object which received the signal. |
|
|
|
|
|
|
|
|
|
user data set when the signal handler was connected. |
"drag-end"
signalvoid user_function (NbtkDraggable *nbtkdraggable, gfloat arg1, gfloat arg2, gpointer user_data) : Run First
|
the object which received the signal. |
|
|
|
|
|
user data set when the signal handler was connected. |
"drag-motion"
signalvoid user_function (NbtkDraggable *nbtkdraggable, gfloat arg1, gfloat arg2, gpointer user_data) : Run First
|
the object which received the signal. |
|
|
|
|
|
user data set when the signal handler was connected. |