25 #ifndef GCHEMPAINT_VIEW_H
26 #define GCHEMPAINT_VIEW_H
55 #define GCHEMPAINT_ATOM_NAME "application/x-gchempaint"
56 extern GtkTargetEntry
const targets[];
180 bool OnKeyPress (GtkWidget* w, GdkEventKey* event);
209 void OnReceive (GtkClipboard* clipboard, GtkSelectionData* selection_data);
232 void ExportImage (std::string
const &filename,
const char* type,
int resolution = -1);
249 GdkPixbuf *
BuildPixbuf (
int resolution,
bool transparent =
true);
260 void Zoom (
double zoom);
276 void Render (cairo_t *cr);
305 void GetVisibleArea (
double &x0,
double &y0,
double &x1,
double &y1);
311 GtkWidget* m_pWidget;
312 std::list<GtkWidget*> m_Widgets;
313 PangoFontDescription* m_PangoFontDesc, *m_PangoSmallFontDesc;
314 double m_dFontHeight;
315 gchar* m_sFontName, *m_sSmallFontName;
316 int m_width, m_height;
317 double m_lastx, m_lasty;
350 void on_receive (GtkClipboard *clipboard, GtkSelectionData *selection_data,
View * pView);
354 #endif // GCHEMPAINT_VIEW_H
the base class for objects associated with a canvas item.
The document associated with the canvas.
bool OnLeaveNotify(unsigned state)
gchar * GetSmallFontName()
#define GCU_RO_PROP(type, member)
void SetTextActive(gccv::Text *item)
void GetVisibleArea(double &x0, double &y0, double &x1, double &y1)
PangoFontDescription * GetPangoFontDesc()
bool OnKeyRelease(GtkWidget *w, GdkEventKey *event)
void SetSelectionState(gcu::Object *object, int state)
bool OnButtonReleased(gccv::ItemClient *client, unsigned button, double x, double y, unsigned state)
void Remove(gcu::Object *pObject)
void OnReceive(GtkClipboard *clipboard, GtkSelectionData *selection_data)
bool OnMotion(gccv::ItemClient *client, double x, double y, unsigned state)
void OnCutSelection(GtkWidget *w, GtkClipboard *clipboard)
void OnDeleteSelection(GtkWidget *w)
bool OnKeyPress(GtkWidget *w, GdkEventKey *event)
void Update(gcu::Object *pObject)
void on_receive(GtkClipboard *clipboard, GtkSelectionData *selection_data, View *pView)
void OnCopySelection(GtkWidget *w, GtkClipboard *clipboard)
void ShowCursor(bool show)
void ExportImage(std::string const &filename, const char *type, int resolution=-1)
GtkWidget * CreateNewWidget()
View(Document *pDoc, bool Embedded)
bool OnDrag(gccv::ItemClient *client, double x, double y, unsigned state)
PangoFontDescription * GetPangoSmallFontDesc()
GdkPixbuf * BuildPixbuf(int resolution, bool transparent=true)
void AddObject(gcu::Object *pObject)
bool OnButtonPressed(gccv::ItemClient *client, unsigned button, double x, double y, unsigned state)
void OnDestroy(GtkWidget *widget)
void OnPasteSelection(GtkWidget *w, GtkClipboard *clipboard)