canvas.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef GCCV_CANVAS_H
00026 #define GCCV_CANVAS_H
00027
00028 #include <gcu/macros.h>
00029 #include <gtk/gtk.h>
00030
00038 namespace gccv {
00039
00040 class Client;
00041 class Group;
00042 class Item;
00043
00052 class CanvasPrivate;
00053 class Canvas
00054 {
00055 friend class CanvasPrivate;
00056 public:
00063 Canvas (Client *client);
00075 virtual ~Canvas();
00076
00085 Item *GetItemAt (double x, double y);
00089 GtkWidget *GetWidget () {return m_Widget;}
00097 void Invalidate (double x0, double y0, double x1, double y1);
00103 void SetBackgroundColor (GOColor color);
00109 void SetZoom (double zoom);
00116 void Render (cairo_t *cr, bool is_vector);
00117
00118 private:
00119 GtkWidget *m_Widget;
00120 Client *m_Client;
00121 bool m_Dragging;
00122
00126 GCU_RO_PROP (double, Zoom)
00130 GCU_RO_PROP (Group *, Root)
00148 GCU_PROP (double, Gap)
00152 GCU_RO_PROP (GOColor, BackgroundColor)
00156 GCU_RO_PROP (unsigned, LastEventState)
00157 };
00158
00159 }
00160
00161 #endif // GCCV_CANVAS_H