## GtkPlotCanvas GtkPlotCanvas |

## Functions

GtkWidget * | gtk_plot_canvas_new ()
void | gtk_plot_canvas_construct ()
GtkPlotCanvasFlags | gtk_plot_canvas_flags ()
void | gtk_plot_canvas_set_flags ()
void | gtk_plot_canvas_unset_flags ()
void | gtk_plot_canvas_set_pc ()
void | gtk_plot_canvas_paint ()
void | gtk_plot_canvas_refresh ()
void | gtk_plot_canvas_freeze ()
void | gtk_plot_canvas_thaw ()
void | gtk_plot_canvas_grid_set_visible ()
void | gtk_plot_canvas_grid_set_step ()
void | gtk_plot_canvas_grid_set_attributes ()
void | gtk_plot_canvas_cancel_action ()
void | gtk_plot_canvas_unselect ()
GtkPlotCanvasChild * | gtk_plot_canvas_get_active_item ()
void | gtk_plot_canvas_set_size ()
void | gtk_plot_canvas_set_magnification ()
void | gtk_plot_canvas_set_transparent ()
gboolean | gtk_plot_canvas_transparent ()
void | gtk_plot_canvas_set_background ()
void | gtk_plot_canvas_get_pixel ()
void | gtk_plot_canvas_get_position ()
void | gtk_plot_canvas_put_child ()
void | gtk_plot_canvas_remove_child ()
void | gtk_plot_canvas_child_move ()
void | gtk_plot_canvas_child_move_resize ()
void | gtk_plot_canvas_child_set_selection ()
void | gtk_plot_canvas_child_set_selection_mode ()
gboolean | gtk_plot_canvas_child_get_position ()
void | gtk_plot_canvas_set_line_attributes ()

## Properties

gpointer | color-bg | Read / Write
gint | flags | Read / Write
gdouble | grid-step | Read / Write
gint | height | Read / Write
gpointer | line-grid | Read / Write
gdouble | magnification | Read / Write
gboolean | show-grid | Read / Write
gboolean | transparent | Read / Write
gint | width | Read / Write

## Signals

void | add-item | Run Last
void | changed | Run Last
gboolean | delete-item | Run Last
gboolean | move-item | Run Last
gboolean | resize-item | Run Last
gboolean | select-item | Run Last
void | select-region | Run Last

## Types and Values

struct | GtkPlotCanvas
enum | GtkPlotCanvasFlags
enum | GtkPlotCanvasAction
enum | GtkPlotCanvasFlag
enum | GtkPlotCanvasSelection
enum | GtkPlotCanvasSelectionMode
enum | GtkPlotCanvasPos
struct | GtkPlotCanvasChild
enum | GtkPlotCanvasChildFlags

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkObject
                ├── GtkPlotCanvasChild
                │   ├── GtkPlotCanvasEllipse
                │   ├── GtkPlotCanvasPixmap
                │   ├── GtkPlotCanvasPlot
                │   ├── GtkPlotCanvasRectangle
                │   ╰── GtkPlotCanvasText
                ╰── GtkWidget
                    ╰── GtkContainer
                        ╰── GtkFixed
                            ╰── GtkPlotCanvas

## Implemented Interfaces

GtkPlotCanvas implements AtkImplementorIface and GtkBuildable.

## Includes

    #include <gtkextra.h>

## Description

FIXME:: need long description.

## Functions

### gtk_plot_canvas_new ()

    GtkWidget *
    gtk_plot_canvas_new (gint width,
                         gint height,
                         gdouble magnification);

### gtk_plot_canvas_construct ()

    void
    gtk_plot_canvas_construct (GtkPlotCanvas *canvas,
                               gint width,
                               gint height,
                               gdouble magnification);

#### Parameters

canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_flags ()

    GtkPlotCanvasFlags
    gtk_plot_canvas_flags (GtkPlotCanvas *canvas);

### gtk_plot_canvas_set_flags ()

    void
    gtk_plot_canvas_set_flags (GtkPlotCanvas *canvas,
                               GtkPlotCanvasFlags flags);

### gtk_plot_canvas_unset_flags ()

    void
    gtk_plot_canvas_unset_flags (GtkPlotCanvas *canvas,
                                 GtkPlotCanvasFlags flags);

### gtk_plot_canvas_set_pc ()

    void
    gtk_plot_canvas_set_pc (GtkPlotCanvas *canvas,
                            GtkPlotPC *pc);

### gtk_plot_canvas_paint ()

    void
    gtk_plot_canvas_paint (GtkPlotCanvas *canvas);

#### Parameters

canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_refresh ()

    void
    gtk_plot_canvas_refresh (GtkPlotCanvas *canvas);

#### Parameters

canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_freeze ()

    void
    gtk_plot_canvas_freeze (GtkPlotCanvas *canvas);

#### Parameters

canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_thaw ()

    void
    gtk_plot_canvas_thaw (GtkPlotCanvas *canvas);

#### Parameters

canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_grid_set_visible ()

    void
    gtk_plot_canvas_grid_set_visible (GtkPlotCanvas *canvas,
                                      gboolean visible);

#### Parameters

canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_grid_set_step ()

    void
    gtk_plot_canvas_grid_set_step (GtkPlotCanvas *canvas,
                                   gdouble step);

#### Parameters

canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_grid_set_attributes ()

    void
    gtk_plot_canvas_grid_set_attributes (GtkPlotCanvas *canvas,
                                         GtkPlotLineStyle style,
                                         gint width,
                                         const GdkColor *color);

#### Parameters

canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_cancel_action ()

    void
    gtk_plot_canvas_cancel_action (GtkPlotCanvas *plot_canvas);

#### Parameters

plot_canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_unselect ()

    void
    gtk_plot_canvas_unselect (GtkPlotCanvas *plot_canvas);

#### Parameters

plot_canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_get_active_item ()

    GtkPlotCanvasChild *
    gtk_plot_canvas_get_active_item (GtkPlotCanvas *canvas);

#### Parameters

canvas | a GtkPlotCanvas. |

#### Returns

the active GtkPlotCanvasChild.

[transfer none]

### gtk_plot_canvas_set_size ()

    void
    gtk_plot_canvas_set_size (GtkPlotCanvas *canvas,
                              gint width,
                              gint height);

### gtk_plot_canvas_set_magnification ()

    void
    gtk_plot_canvas_set_magnification (GtkPlotCanvas *canvas,
                                       gdouble magnification);

#### Parameters

canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_set_transparent ()

    void
    gtk_plot_canvas_set_transparent (GtkPlotCanvas *canvas,
                                     gboolean transparent);

#### Parameters

canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_transparent ()

    gboolean
    gtk_plot_canvas_transparent (GtkPlotCanvas *canvas);

### gtk_plot_canvas_set_background ()

    void
    gtk_plot_canvas_set_background (GtkPlotCanvas *canvas,
                                    const GdkColor *bg_color);

#### Parameters

canvas | a GtkPlotCanvas. |
bg_color | a GdkColor. |

### gtk_plot_canvas_get_pixel ()

    void
    gtk_plot_canvas_get_pixel (GtkPlotCanvas *canvas,
                               gdouble px,
                               gdouble py,
                               gint *x,
                               gint *y);

#### Parameters

canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_get_position ()

    void
    gtk_plot_canvas_get_position (GtkPlotCanvas *plot_canvas,
                                  gint x,
                                  gint y,
                                  gdouble *px,
                                  gdouble *py);

#### Parameters

plot_canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_put_child ()

    void
    gtk_plot_canvas_put_child (GtkPlotCanvas *canvas,
                               GtkPlotCanvasChild *child,
                               gdouble x1,
                               gdouble y1,
                               gdouble x2,
                               gdouble y2);

#### Parameters

canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_remove_child ()

    void
    gtk_plot_canvas_remove_child (GtkPlotCanvas *canvas,
                                  GtkPlotCanvasChild *child);

#### Parameters

canvas | a GtkPlotCanvas. |
child | a GtkPlotCanvasChild |

### gtk_plot_canvas_child_move ()

    void
    gtk_plot_canvas_child_move (GtkPlotCanvas *canvas,
                                GtkPlotCanvasChild *child,
                                gdouble x1,
                                gdouble y1);

#### Parameters

canvas | a GtkPlotCanvas. |
child | a GtkPlotCanvasChild |

### gtk_plot_canvas_child_move_resize ()

    void
    gtk_plot_canvas_child_move_resize (GtkPlotCanvas *canvas,
                                       GtkPlotCanvasChild *child,
                                       gdouble x1,
                                       gdouble y1,
                                       gdouble x2,
                                       gdouble y2);

#### Parameters

canvas | a GtkPlotCanvas. |

### gtk_plot_canvas_child_set_selection ()

    void
    gtk_plot_canvas_child_set_selection (GtkPlotCanvasChild *child,
                                         GtkPlotCanvasSelection selection);

### gtk_plot_canvas_child_set_selection_mode ()

    void
    gtk_plot_canvas_child_set_selection_mode
                                   (GtkPlotCanvasChild *child,
                                    GtkPlotCanvasSelectionMode mode);

#### Parameters

child | a GtkPlotCanvasChild. |

### gtk_plot_canvas_child_get_position ()

    gboolean
    gtk_plot_canvas_child_get_position (GtkPlotCanvas *canvas,
                                        GtkPlotCanvasChild *child,
                                        double *x1,
                                        double *y1,
                                        double *x2,
                                        double *y2);

#### Parameters

canvas | a GtkPlotCanvas. |
child | a GtkPlotCanvasChild. |

### gtk_plot_canvas_set_line_attributes ()

    void
    gtk_plot_canvas_set_line_attributes (GtkPlotCanvas *canvas,
                                         GtkPlotLine line);

#### Parameters

canvas | a GtkPlotCanvas. |

## Types and Values

### struct GtkPlotCanvas

    struct GtkPlotCanvas;

The GtkPlotCanvas struct contains only private data. It should only be accessed through the functions described below.

### enum GtkPlotCanvasFlags

Selection and DND mode of GtkPlotCanvas

#### Members

GTK_PLOT_CANVAS_CAN_SELECT | Select region |
GTK_PLOT_CANVAS_CAN_SELECT_ITEM | Select items |
GTK_PLOT_CANVAS_CAN_DND | DnD items |

### enum GtkPlotCanvasAction

#### Members

GTK_PLOT_CANVAS_ACTION_INACTIVE |  |
GTK_PLOT_CANVAS_ACTION_SELECTION |  |
GTK_PLOT_CANVAS_ACTION_DRAG |  |
GTK_PLOT_CANVAS_ACTION_RESIZE |  |

### enum GtkPlotCanvasFlag

`GtkPlotCanvasFlag` has been deprecated since version 3.1.6 and should not be used in newly-written code.

use GtkPlotCanvasChildFlags

Deprecated, Used for GtkPlotCanvasChild. Use GtkPlotCanvasChildFlags instead.

#### Members

GTK_PLOT_CANVAS_FROZEN | Child is frozen |
GTK_PLOT_CANVAS_CAN_MOVE | Child can be moved |
GTK_PLOT_CANVAS_CAN_RESIZE | Child can be resized |

### enum GtkPlotCanvasSelection

#### Members

GTK_PLOT_CANVAS_SELECT_NONE |  |
GTK_PLOT_CANVAS_SELECT_MARKERS |  |
GTK_PLOT_CANVAS_SELECT_TARGET |  |

### enum GtkPlotCanvasSelectionMode

#### Members

GTK_PLOT_CANVAS_SELECT_CLICK_1 |  |
GTK_PLOT_CANVAS_SELECT_CLICK_2 |  |

### enum GtkPlotCanvasPos

#### Members

GTK_PLOT_CANVAS_OUT |  |
GTK_PLOT_CANVAS_IN |  |
GTK_PLOT_CANVAS_LEFT |  |
GTK_PLOT_CANVAS_RIGHT |  |
GTK_PLOT_CANVAS_TOP |  |
GTK_PLOT_CANVAS_BOTTOM |  |
GTK_PLOT_CANVAS_TOP_LEFT |  |
GTK_PLOT_CANVAS_TOP_RIGHT |  |
GTK_PLOT_CANVAS_BOTTOM_LEFT |  |
GTK_PLOT_CANVAS_BOTTOM_RIGHT |  |

### struct GtkPlotCanvasChild

    struct GtkPlotCanvasChild;

The GtkPlotCanvasChild struct contains only private data. It should only be accessed through the functions described below.

### enum GtkPlotCanvasChildFlags

move/resize-mode of GtkPlotCanvasChild

#### Members

GTK_PLOT_CANVAS_CHILD_FROZEN | Child is frozen |
GTK_PLOT_CANVAS_CHILD_CAN_MOVE | Child can be moved |
GTK_PLOT_CANVAS_CHILD_CAN_RESIZE | Child can be resized |

## Property Details

### The `“color-bg”` property

      “color-bg”                 gpointer

Background color.

Flags: Read / Write

### The `“flags”` property

      “flags”                    gint

PlotCanvas flags control selection and DND, see GtkPlotCanvasFlags.

Flags: Read / Write

Allowed values: >= 0

Default value: 0

### The `“grid-step”` property

      “grid-step”                gdouble

Distance between grid lines.

Flags: Read / Write

Allowed values: >= 0

Default value: 0

### The `“height”` property

      “height”                   gint

PlotCanvas height in pixels.

Flags: Read / Write

Allowed values: >= 0

Default value: 1

### The `“line-grid”` property

      “line-grid”                gpointer

Canvas line grid.

Flags: Read / Write

### The `“magnification”` property

      “magnification”            gdouble

PlotCanvas magnification factor

Flags: Read / Write

Allowed values: >= 0

Default value: 1

### The `“show-grid”` property

      “show-grid”                gboolean

Show grid.

Flags: Read / Write

Default value: FALSE

### The `“transparent”` property

      “transparent”              gboolean

Canvas transparency

Flags: Read / Write

Default value: TRUE

### The `“width”` property

      “width”                    gint

PlotCanvas width in pixels.

Flags: Read / Write

Allowed values: >= 0

Default value: 1

## Signal Details

### The `“add-item”` signal

    void
    user_function (GtkPlotCanvas      *plotcanvas,
                   GtkPlotCanvasChild *arg1,
                   gpointer            user_data)

#### Parameters

plotcanvas | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“changed”` signal

    void
    user_function (GtkPlotCanvas *canvas,
                   gpointer       user_data)

#### Parameters

user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“delete-item”` signal

    gboolean
    user_function (GtkPlotCanvas      *plotcanvas,
                   GtkPlotCanvasChild *arg1,
                   gpointer            user_data)

#### Parameters

plotcanvas | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“move-item”` signal

    gboolean
    user_function (GtkPlotCanvas      *plotcanvas,
                   GtkPlotCanvasChild *arg1,
                   gdouble             arg2,
                   gdouble             arg3,
                   gpointer            user_data)

#### Parameters

plotcanvas | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“resize-item”` signal

    gboolean
    user_function (GtkPlotCanvas      *plotcanvas,
                   GtkPlotCanvasChild *arg1,
                   gdouble             arg2,
                   gdouble             arg3,
                   gpointer            user_data)

#### Parameters

plotcanvas | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“select-item”` signal

    gboolean
    user_function (GtkPlotCanvas      *plotcanvas,
                   GdkEvent           *arg1,
                   GtkPlotCanvasChild *arg2,
                   gpointer            user_data)

#### Parameters

plotcanvas | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“select-region”` signal

    void
    user_function (GtkPlotCanvas *plotcanvas,
                   gdouble        arg1,
                   gdouble        arg2,
                   gdouble        arg3,
                   gdouble        arg4,
                   gpointer       user_data)

#### Parameters

plotcanvas | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last