25 #ifndef GCHEMPAINT_VIEW_H
26 #define GCHEMPAINT_VIEW_H
55 #define GCHEMPAINT_ATOM_NAME "application/x-gchempaint"
56 extern GtkTargetEntry
const targets[];
184 bool OnKeyPress (GtkWidget* w, GdkEventKey* event);
213 void OnReceive (GtkClipboard* clipboard, GtkSelectionData* selection_data);
236 void ExportImage (std::string
const &filename,
const char* type,
int resolution = -1);
253 GdkPixbuf *
BuildPixbuf (
int resolution,
bool transparent =
true);
264 void Zoom (
double zoom);
280 void Render (cairo_t *cr);
309 void GetVisibleArea (
double &x0,
double &y0,
double &x1,
double &y1);
315 GtkWidget* m_pWidget;
316 std::list<GtkWidget*> m_Widgets;
317 PangoFontDescription* m_PangoFontDesc, *m_PangoSmallFontDesc, *m_PangoTextFontDesc;
318 double m_dFontHeight;
319 gchar* m_sFontName, *m_sSmallFontName;
320 int m_width, m_height;
321 double m_lastx, m_lasty;
354 void on_receive (GtkClipboard *clipboard, GtkSelectionData *selection_data,
View * pView);
358 #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 * GetPangoTextFontDesc()
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)