TomoeCanvas

## TomoeCanvas TomoeCanvas — A canvas widget for viewing and drawing strokes of hand-writing. |

## Synopsis

                        TomoeCanvas;
    GtkWidget*          tomoe_canvas_new                    (void);
    void                tomoe_canvas_set_context            (TomoeCanvas *canvas,
                                                             TomoeContext *context);
    void                tomoe_canvas_set_writing            (TomoeCanvas *canvas,
                                                             TomoeWriting *writing);
    TomoeWriting*       tomoe_canvas_get_writing            (TomoeCanvas *canvas);
    void                tomoe_canvas_set_locked             (TomoeCanvas *canvas,
                                                             gboolean lock);
    gboolean            tomoe_canvas_is_locked              (TomoeCanvas *canvas);
    void                tomoe_canvas_set_auto_find_time     (TomoeCanvas *canvas,
                                                             gint time_msec);
    gint                tomoe_canvas_get_auto_find_time     (TomoeCanvas *canvas);
    void                tomoe_canvas_set_handwriting_line_color
                                                            (TomoeCanvas *canvas,
                                                             GdkColor *color);
    void                tomoe_canvas_set_adjusted_line_color
                                                            (TomoeCanvas *canvas,
                                                             GdkColor *color);
    void                tomoe_canvas_set_annotation_color   (TomoeCanvas *canvas,
                                                             GdkColor *color);
    void                tomoe_canvas_set_axis_color         (TomoeCanvas *canvas,
                                                             GdkColor *color);
    void                tomoe_canvas_find                   (TomoeCanvas *canvas);
    guint               tomoe_canvas_get_n_candidates       (TomoeCanvas *canvas);
    TomoeChar*          tomoe_canvas_get_nth_candidate      (TomoeCanvas *canvas,
                                                             guint nth);
    const GList*        tomoe_canvas_get_candidates         (TomoeCanvas *canvas);
    void                tomoe_canvas_revert_stroke          (TomoeCanvas *canvas);
    void                tomoe_canvas_clear                  (TomoeCanvas *canvas);
    void                tomoe_canvas_normalize              (TomoeCanvas *canvas);
    gboolean            tomoe_canvas_has_stroke             (TomoeCanvas *canvas);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----TomoeCanvas

## Implemented Interfaces

TomoeCanvas implements AtkImplementorIface.

## Properties

      "adjusted-line-color"      GdkColor              : Write
      "annotation-color"         GdkColor              : Write
      "auto-find-time"           gint                  : Read / Write
      "axis-color"               GdkColor              : Write
      "handwriting-line-color"   GdkColor              : Write
      "locked"                   gboolean              : Read / Write
      "tomoe-context"            TomoeContext          : Write
      "writing"                  TomoeWriting          : Read / Write

## Signals

      "clear"                                          : Run Last
      "find"                                           : Run Last
      "normalize"                                      : Run Last
      "stroke-added"                                   : Run Last
      "stroke-reverted"                                : Run Last

## Description

## Details

### TomoeCanvas

    typedef struct _TomoeCanvas TomoeCanvas;

The TomoeCanvas struct contains only private fields and should not be directly accessed.

### tomoe_canvas_new ()

    GtkWidget*          tomoe_canvas_new                    (void);

Returns : |

### tomoe_canvas_set_context ()

    void                tomoe_canvas_set_context            (TomoeCanvas *canvas,
                                                             TomoeContext *context);

`canvas` : |
`context` : |

### tomoe_canvas_set_writing ()

    void                tomoe_canvas_set_writing            (TomoeCanvas *canvas,
                                                             TomoeWriting *writing);

`canvas` : |
`writing` : |

### tomoe_canvas_get_writing ()

    TomoeWriting*       tomoe_canvas_get_writing            (TomoeCanvas *canvas);

`canvas` : |
Returns : |

### tomoe_canvas_set_locked ()

    void                tomoe_canvas_set_locked             (TomoeCanvas *canvas,
                                                             gboolean lock);

`canvas` : |
`lock` : |

### tomoe_canvas_is_locked ()

    gboolean            tomoe_canvas_is_locked              (TomoeCanvas *canvas);

`canvas` : |
Returns : |

### tomoe_canvas_set_auto_find_time ()

    void                tomoe_canvas_set_auto_find_time     (TomoeCanvas *canvas,
                                                             gint time_msec);

`canvas` : |
`time_msec` : |

### tomoe_canvas_get_auto_find_time ()

    gint                tomoe_canvas_get_auto_find_time     (TomoeCanvas *canvas);

`canvas` : |
Returns : |

### tomoe_canvas_set_handwriting_line_color ()

    void                tomoe_canvas_set_handwriting_line_color
                                                            (TomoeCanvas *canvas,
                                                             GdkColor *color);

`canvas` : |
`color` : |

### tomoe_canvas_set_adjusted_line_color ()

    void                tomoe_canvas_set_adjusted_line_color
                                                            (TomoeCanvas *canvas,
                                                             GdkColor *color);

`canvas` : |
`color` : |

### tomoe_canvas_set_annotation_color ()

    void                tomoe_canvas_set_annotation_color   (TomoeCanvas *canvas,
                                                             GdkColor *color);

`canvas` : |
`color` : |

### tomoe_canvas_set_axis_color ()

    void                tomoe_canvas_set_axis_color         (TomoeCanvas *canvas,
                                                             GdkColor *color);

`canvas` : |
`color` : |

### tomoe_canvas_find ()

    void                tomoe_canvas_find                   (TomoeCanvas *canvas);

`canvas` : |

### tomoe_canvas_get_n_candidates ()

    guint               tomoe_canvas_get_n_candidates       (TomoeCanvas *canvas);

`canvas` : |
Returns : |

### tomoe_canvas_get_nth_candidate ()

    TomoeChar*          tomoe_canvas_get_nth_candidate      (TomoeCanvas *canvas,
                                                             guint nth);

`canvas` : |
`nth` : |
Returns : |

### tomoe_canvas_get_candidates ()

    const GList*        tomoe_canvas_get_candidates         (TomoeCanvas *canvas);

`canvas` : |
Returns : |

### tomoe_canvas_revert_stroke ()

    void                tomoe_canvas_revert_stroke          (TomoeCanvas *canvas);

`canvas` : |

### tomoe_canvas_clear ()

    void                tomoe_canvas_clear                  (TomoeCanvas *canvas);

`canvas` : |

### tomoe_canvas_normalize ()

    void                tomoe_canvas_normalize              (TomoeCanvas *canvas);

`canvas` : |

### tomoe_canvas_has_stroke ()

    gboolean            tomoe_canvas_has_stroke             (TomoeCanvas *canvas);

`canvas` : |
Returns : |

## Property Details

### The "`adjusted-line-color`" property

      "adjusted-line-color"      GdkColor              : Write

The color of adjusted handwriting lines.

### The "`annotation-color`" property

      "annotation-color"         GdkColor              : Write

The color of annotation strings.

### The "`auto-find-time`" property

      "auto-find-time"           gint                  : Read / Write

Delay time from releasing mouse button to starting auto finding. Set 0 to find immediatly. Set -1 to disable auto finding.

Allowed values: >= -1

Default value: 0

### The "`axis-color`" property

      "axis-color"               GdkColor              : Write

The color of axis lines.

### The "`handwriting-line-color`" property

      "handwriting-line-color"   GdkColor              : Write

The color of handwriting lines.

### The "`locked`" property

      "locked"                   gboolean              : Read / Write

Whether the canvas is locked drawing or not.

Default value: FALSE

### The "`tomoe-context`" property

      "tomoe-context"            TomoeContext          : Write

A TomoeContext which stores handwriting dictionaries. TomoeCanvas doesn't always require TomoeContext. For example it isn't needed on viewer mode.

### The "`writing`" property

      "writing"                  TomoeWriting          : Read / Write

Strokes of a character to show on this canvas.

## Signal Details

### The "clear" signal

    void                user_function                      (TomoeCanvas *tomoecanvas,
                                                            gpointer     user_data)        : Run Last

`tomoecanvas` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "find" signal

    void                user_function                      (TomoeCanvas *tomoecanvas,
                                                            gpointer     user_data)        : Run Last

`tomoecanvas` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "normalize" signal

    void                user_function                      (TomoeCanvas *tomoecanvas,
                                                            gpointer     user_data)        : Run Last

`tomoecanvas` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "stroke-added" signal

    void                user_function                      (TomoeCanvas *tomoecanvas,
                                                            gpointer     user_data)        : Run Last

`tomoecanvas` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "stroke-reverted" signal

    void                user_function                      (TomoeCanvas *tomoecanvas,
                                                            gpointer     user_data)        : Run Last

`tomoecanvas` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.