3 #ifndef _LIBGNOMECANVASMM_CANVAS_H 4 #define _LIBGNOMECANVASMM_CANVAS_H 34 #include <libgnomecanvas/gnome-canvas.h> 36 #include <gtkmm/layout.h> 37 #include <gdkmm/color.h> 40 #ifndef DOXYGEN_SHOULD_SKIP_THIS 41 typedef struct _GnomeCanvas GnomeCanvas;
42 typedef struct _GnomeCanvasClass GnomeCanvasClass;
50 {
class Canvas_Class; }
71 #ifndef DOXYGEN_SHOULD_SKIP_THIS 72 typedef Canvas CppObjectType;
73 typedef Canvas_Class CppClassType;
74 typedef GnomeCanvas BaseObjectType;
75 typedef GnomeCanvasClass BaseClassType;
80 #ifndef DOXYGEN_SHOULD_SKIP_THIS 83 friend class Canvas_Class;
84 static CppClassType canvas_class_;
91 explicit Canvas(
const Glib::ConstructParams& construct_params);
92 explicit Canvas(GnomeCanvas* castitem);
97 #ifndef DOXYGEN_SHOULD_SKIP_THIS 98 static GType get_type() G_GNUC_CONST;
99 static GType get_base_type() G_GNUC_CONST;
103 GnomeCanvas*
gobj() {
return reinterpret_cast<GnomeCanvas*
>(gobject_); }
106 const GnomeCanvas*
gobj()
const {
return reinterpret_cast<GnomeCanvas*
>(gobject_); }
111 #ifdef GLIBMM_VFUNCS_ENABLED 112 #endif //GLIBMM_VFUNCS_ENABLED 116 #ifdef GLIBMM_VFUNCS_ENABLED 117 #endif //GLIBMM_VFUNCS_ENABLED 120 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 121 virtual void on_draw_background(
const Glib::RefPtr<Gdk::Drawable>& drawable,
int x,
int y,
int width,
int height);
122 virtual void on_render_background(GnomeCanvasBuf* buf);
123 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 151 void set_scroll_region(
double x1,
double y1,
double x2,
double y2);
161 void get_scroll_region(
double& x1,
double& y1,
double& x2,
double& y2)
const;
171 void set_center_scroll_region(
bool center);
178 bool get_center_scroll_region()
const;
195 void set_pixels_per_unit(
double n = 1.0);
211 void scroll_to(
int x,
int y);
220 void get_scroll_offsets(
int& cx,
int& cy)
const;
246 Item* get_item_at(
double x,
double y)
const;
262 void request_redraw(
int x1,
int y1,
int x2,
int y2);
271 void request_redraw(ArtUta* uta);
287 void w2c(
double wx,
double wy,
int& cx,
int& cy)
const;
296 void w2c(
double wx,
double wy,
double& cx,
double& cy)
const;
306 void c2w(
int cx,
int cy,
double& wx,
double& wy)
const;
320 void window_to_world (
double winx,
double winy,
double& worldx,
double& worldy)
const;
332 void world_to_window (
double worldx,
double worldy,
double& winx,
double& winy)
const;
335 bool get_color(
const Glib::ustring& spec, Gdk::Color& color)
const;
345 gulong get_color_pixel(guint rgba)
const;
352 void set_stipple_origin(
const Glib::RefPtr<Gdk::GC>& gc);
360 void set_dither(Gdk::RgbDither dither);
365 Gdk::RgbDither get_dither()
const;
375 void update_svp(ArtSVP** p_svp, ArtSVP* new_svp);
383 void update_svp_clip(ArtSVP** p_svp, ArtSVP* new_svp, ArtSVP* clip_svp);
388 double get_pixels_per_unit()
const;
398 Glib::SignalProxy5< void,const Glib::RefPtr<Gdk::Drawable>&,int,int,int,
int > signal_draw_background();
410 Glib::SignalProxy1< void,GnomeCanvasBuf* > signal_render_background();
413 #ifdef GLIBMM_VFUNCS_ENABLED 414 virtual void request_update_vfunc();
415 #endif //GLIBMM_VFUNCS_ENABLED 419 #ifdef GLIBMM_PROPERTIES_ENABLED 426 Glib::PropertyProxy_ReadOnly<bool> property_aa()
const;
427 #endif //#GLIBMM_PROPERTIES_ENABLED 438 explicit CanvasAA(GnomeCanvas* castitem);
Definition: affinetrans.h:29
Definition: affinetrans.h:36
const GnomeCanvas * gobj() const
Provides access to the underlying C GtkObject.
Definition: canvas.h:106
Canvas functions usually operate in either World coordinates (units for the entire canvas)...
Definition: canvas.h:68
GnomeCanvas * gobj()
Provides access to the underlying C GtkObject.
Definition: canvas.h:103