![]() | ![]() | ![]() | DiaCanvas2 Reference Manual | ![]() |
---|
DiaTool — Tools are used to add special behaviour to a canvas view.
struct DiaTool; struct DiaPlacementTool; DiaTool* dia_placement_tool_new (GType object_type, const gchar *first_property_name, ...); struct DiaStackTool; DiaTool* dia_stack_tool_new (void); void dia_stack_tool_push (DiaStackTool *stack_tool, DiaTool *tool); void dia_stack_tool_pop (DiaStackTool *stack_tool);
GObject +----DiaTool
GObject +----DiaTool +----DiaPlacementTool
GObject +----DiaTool +----DiaStackTool
"button-press-event" gboolean user_function (DiaTool *diatool, DiaCanvasView *arg1, GdkEventButton *event, gpointer user_data); "button-release-event" gboolean user_function (DiaTool *diatool, DiaCanvasView *arg1, GdkEventButton *event, gpointer user_data); "key-press-event" gboolean user_function (DiaTool *diatool, DiaCanvasView *arg1, GdkEventKey *event, gpointer user_data); "key-release-event" gboolean user_function (DiaTool *diatool, DiaCanvasView *arg1, GdkEventKey *event, gpointer user_data); "motion-notify-event" gboolean user_function (DiaTool *diatool, DiaCanvasView *arg1, GdkEventMotion *event, gpointer user_data);
Very often, some non-default action should be taken (like adding an object to the canvas, or rubber band zooming). Tools can provide a DiaCanvasView with this behaviour.
struct DiaPlacementTool;
This is the default tool for object placement. You can give extra options to the constructor. Those options will be passed to the object constructor.
DiaTool* dia_placement_tool_new (GType object_type, const gchar *first_property_name, ...);
object_type : | |
first_property_name : | |
... : | |
Returns : |
void dia_stack_tool_push (DiaStackTool *stack_tool, DiaTool *tool);
stack_tool : | |
tool : |
gboolean user_function (DiaTool *diatool, DiaCanvasView *arg1, GdkEventButton *event, gpointer user_data);
diatool : | the object which received the signal. |
arg1 : | |
event : | |
user_data : | user data set when the signal handler was connected. |
Returns : |
gboolean user_function (DiaTool *diatool, DiaCanvasView *arg1, GdkEventButton *event, gpointer user_data);
diatool : | the object which received the signal. |
arg1 : | |
event : | |
user_data : | user data set when the signal handler was connected. |
Returns : |
gboolean user_function (DiaTool *diatool, DiaCanvasView *arg1, GdkEventKey *event, gpointer user_data);
diatool : | the object which received the signal. |
arg1 : | |
event : | |
user_data : | user data set when the signal handler was connected. |
Returns : |
gboolean user_function (DiaTool *diatool, DiaCanvasView *arg1, GdkEventKey *event, gpointer user_data);
diatool : | the object which received the signal. |
arg1 : | |
event : | |
user_data : | user data set when the signal handler was connected. |
Returns : |
gboolean user_function (DiaTool *diatool, DiaCanvasView *arg1, GdkEventMotion *event, gpointer user_data);
diatool : | the object which received the signal. |
arg1 : | |
event : | |
user_data : | user data set when the signal handler was connected. |
Returns : |
<< DiaCanvasViewItem | DiaHandleLayer >> |