## GogTool

GogTool

## Synopsis

                        GogTool;
    struct              GogToolAction;
    void                gog_tool_action_double_click        (GogToolAction *action);
    void                gog_tool_action_free                (GogToolAction *action);
    void                gog_tool_action_move                (GogToolAction *action,
                                                             double x,
                                                             double y);
    GogToolAction *     gog_tool_action_new                 (GogView *view,
                                                             GogTool *tool,
                                                             double x,
                                                             double y);

## Object Hierarchy

      GBoxed
       +----GogToolAction

## Description

## Details

### GogTool

    typedef struct {
    	char const 	*name;

    	/* GdkCursorType	 cursor_type; Not compatible with --without-gtk */
    	int	 	cursor_type;

    	gboolean 	(*point) 	(GogView *view, double x, double y, GogObject **object);
    	void 		(*render) (GogView *view);
    	void 		(*init)		(GogToolAction *action);
    	void 		(*move)		(GogToolAction *action, double x, double y);
    	void		(*double_click) (GogToolAction *action);
    	void 		(*destroy) (GogToolAction *action);
    } GogTool;

char const *`name`; | tool name.
int `cursor_type`; | pointer cursor type for the tool.
`point` () | points an object.
`render` () | displays the tool.
`init` () | initalizes an action.
`move` () | callback for pointer move.
`double_click` () | callback on double click.
`destroy` () | destroys the action.

### struct GogToolAction

    struct GogToolAction {
    	double 		 start_x, start_y;
    	GogView 	*view;
    	GogTool 	*tool;
    	gpointer	 data;
    	/* private */
    	unsigned ref_count;
    };

double `start_x`; | initial pointer horizontal position.
double `start_y`; | initial pointer vertical position.
GogView *`view`; | GogView
GogTool *`tool`; | GogTool
gpointer `data`; | user data.

### gog_tool_action_double_click ()

    void                gog_tool_action_double_click        (GogToolAction *action);

### gog_tool_action_free ()

    void                gog_tool_action_free                (GogToolAction *action);

### gog_tool_action_move ()

    void                gog_tool_action_move                (GogToolAction *action,
                                                             double x,
                                                             double y);

### gog_tool_action_new ()

    GogToolAction *     gog_tool_action_new                 (GogView *view,
                                                             GogTool *tool,
                                                             double x,
                                                             double y);