canvas-grid.h revision 59a0ba05e8bea8ef8d8c905eb0232c5980ac9afa
5aefb6555731130ca4fd295960123d71f2d21fe8rie * Inkscape::CXYGrid
5aefb6555731130ca4fd295960123d71f2d21fe8rie * Generic (and quite unintelligent) grid item for gnome canvas
5aefb6555731130ca4fd295960123d71f2d21fe8rie * Copyright (C) Johan Engelen 2006 <johan@shouraizou.nl>
5aefb6555731130ca4fd295960123d71f2d21fe8rie * Copyright (C) Lauris Kaplinski 2000
5aefb6555731130ca4fd295960123d71f2d21fe8rie#define INKSCAPE_TYPE_GRID_CANVASITEM (Inkscape::grid_canvasitem_get_type ())
5aefb6555731130ca4fd295960123d71f2d21fe8rie#define INKSCAPE_GRID_CANVASITEM(obj) (GTK_CHECK_CAST ((obj), INKSCAPE_TYPE_GRID_CANVASITEM, GridCanvasItem))
5aefb6555731130ca4fd295960123d71f2d21fe8rie#define INKSCAPE_GRID_CANVASITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), INKSCAPE_TYPE_GRID_CANVASITEM, GridCanvasItem))
5aefb6555731130ca4fd295960123d71f2d21fe8rie#define INKSCAPE_IS_GRID_CANVASITEM(obj) (GTK_CHECK_TYPE ((obj), INKSCAPE_TYPE_GRID_CANVASITEM))
5aefb6555731130ca4fd295960123d71f2d21fe8rie#define INKSCAPE_IS_GRID_CANVASITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), INKSCAPE_TYPE_GRID_CANVASITEM))
981a172d53aeb81520fcfecf6ab2615277c7bd18ab/** \brief All the variables that are tracked for a grid specific
981a172d53aeb81520fcfecf6ab2615277c7bd18ab canvas item. */
981a172d53aeb81520fcfecf6ab2615277c7bd18ab/* Standard Gtk function */
981a172d53aeb81520fcfecf6ab2615277c7bd18ab CanvasGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr);
981a172d53aeb81520fcfecf6ab2615277c7bd18ab static CanvasGrid* NewGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr, const char * gridtype);
981a172d53aeb81520fcfecf6ab2615277c7bd18ab static void writeNewGridToRepr(Inkscape::XML::Node * repr, const char * gridtype);
981a172d53aeb81520fcfecf6ab2615277c7bd18ab virtual void Update (NR::Matrix const &affine, unsigned int flags) = 0;
981a172d53aeb81520fcfecf6ab2615277c7bd18ab virtual void onReprAttrChanged (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive) {};
981a172d53aeb81520fcfecf6ab2615277c7bd18ab static void on_repr_attr_changed (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive, void * data);
981a172d53aeb81520fcfecf6ab2615277c7bd18ab CanvasXYGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr);
5aefb6555731130ca4fd295960123d71f2d21fe8rie void Update (NR::Matrix const &affine, unsigned int flags);
5aefb6555731130ca4fd295960123d71f2d21fe8rie void onReprAttrChanged (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive);
5aefb6555731130ca4fd295960123d71f2d21fe8rie NR::Point spacing; /**< Spacing between elements of the grid */
5aefb6555731130ca4fd295960123d71f2d21fe8rie bool scaled[2]; /**< Whether the grid is in scaled mode, which can
5aefb6555731130ca4fd295960123d71f2d21fe8rie be different in the X or Y direction, hense two
5aefb6555731130ca4fd295960123d71f2d21fe8rie variables */
5aefb6555731130ca4fd295960123d71f2d21fe8rie NR::Point ow; /**< Transformed origin by the affine for the zoom */
5aefb6555731130ca4fd295960123d71f2d21fe8rie NR::Point sw; /**< Transformed spacing by the affine for the zoom */
981a172d53aeb81520fcfecf6ab2615277c7bd18ab Inkscape::UI::Widget::RegisteredCheckButton _rcbgrid, _rcbsnbb, _rcbsnnod;
981a172d53aeb81520fcfecf6ab2615277c7bd18ab Inkscape::UI::Widget::RegisteredScalarUnit _rsu_ox, _rsu_oy, _rsu_sx, _rsu_sy;
981a172d53aeb81520fcfecf6ab2615277c7bd18ab Inkscape::UI::Widget::RegisteredColorPicker _rcp_gcol, _rcp_gmcol;
981a172d53aeb81520fcfecf6ab2615277c7bd18ab CanvasXYGridSnapper(CanvasXYGrid *grid, SPNamedView const *nv, NR::Coord const d);
981a172d53aeb81520fcfecf6ab2615277c7bd18ab}; /* namespace Inkscape */