sodipodi-ctrl.h revision ed4a2556d05cd99153de4af87e4816af5aae15ee
b93ce4197e7f5026a1c8deeb79cbd00aa3f86d91JazzyNico#ifndef INKSCAPE_CTRL_H
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches#define INKSCAPE_CTRL_H
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches/* sodipodi-ctrl
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches *
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches * It is simply small square, which does not scale nor rotate
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches *
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches */
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches#include <gtk/gtkenums.h>
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches#include "sp-canvas.h"
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches#include <gdk-pixbuf/gdk-pixbuf.h>
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches#include <libnr/nr-rect-l.h>
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches
107e00c8104649437b9520d0ba298dba659e7cd7JazzyNico#define SP_TYPE_CTRL (sp_ctrl_get_type ())
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches#define SP_CTRL(obj) (GTK_CHECK_CAST ((obj), SP_TYPE_CTRL, SPCtrl))
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches#define SP_CTRL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), SP_TYPE_CTRL, SPCtrlClass))
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches#define SP_IS_CTRL(obj) (GTK_CHECK_TYPE ((obj), SP_TYPE_CTRL))
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches#define SP_IS_CTRL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SP_TYPE_CTRL))
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanchestypedef enum {
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches SP_CTRL_SHAPE_SQUARE,
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches SP_CTRL_SHAPE_DIAMOND,
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches SP_CTRL_SHAPE_CIRCLE,
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches SP_CTRL_SHAPE_CROSS,
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches SP_CTRL_SHAPE_BITMAP,
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches SP_CTRL_SHAPE_IMAGE
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches} SPCtrlShapeType;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanchestypedef enum {
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches SP_CTRL_MODE_COLOR,
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches SP_CTRL_MODE_XOR
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches} SPCtrlModeType;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanchesstruct SPCtrl : public SPCanvasItem{
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches SPCtrlShapeType shape;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches SPCtrlModeType mode;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches GtkAnchorType anchor;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches gint span;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches guint defined : 1;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches guint shown : 1;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches guint build : 1;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches guint filled : 1;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches guint stroked : 1;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches guint32 fill_color;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches guint32 stroke_color;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches bool _moved;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches NRRectL box; /* NB! x1 & y1 are included */
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches cairo_surface_t *cache;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches GdkPixbuf * pixbuf;
24db7b4ad7915f5f79ed265e2c2bddf0d8cf9611Felipe C. da S. Sanches
void moveto(Geom::Point const p);
Geom::Point _point;
};
struct SPCtrlClass : public SPCanvasItemClass{
};
/* Standard Gtk function */
GtkType sp_ctrl_get_type (void);
#endif /* !INKSCAPE_CTRL_H */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :