25 #ifndef GCHEMPAINT_VIEW_H 26 #define GCHEMPAINT_VIEW_H 55 #define GCHEMPAINT_ATOM_NAME "application/x-gchempaint" 56 extern GtkTargetEntry
const targets[];
105 GtkWidget* CreateNewWidget ();
111 void OnDestroy (GtkWidget* widget);
115 double GetZoomFactor ();
151 void OnDeleteSelection (GtkWidget* w);
158 void OnCopySelection (GtkWidget* w, GtkClipboard* clipboard);
165 void OnPasteSelection (GtkWidget* w, GtkClipboard* clipboard);
172 void OnCutSelection (GtkWidget* w, GtkClipboard* clipboard);
180 bool OnKeyPress (GtkWidget* w, GdkEventKey* event);
188 bool OnKeyRelease (GtkWidget* w, GdkEventKey* event);
202 bool PrepareUnselect ();
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);
266 void ShowCursor (
bool show);
276 void Render (cairo_t *cr);
283 void SetSelectionState (
gcu::Object *
object,
int state);
286 bool OnButtonPressed (
gccv::ItemClient *client,
unsigned button,
double x,
double y,
unsigned state);
287 bool OnButtonReleased (
gccv::ItemClient *client,
unsigned button,
double x,
double y,
unsigned state);
289 bool OnMotion (
gccv::ItemClient *client,
double x,
double y,
unsigned state);
290 bool OnLeaveNotify (
unsigned state);
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.
The Gtk using base classes.
GChemPaint specific C++ classes.
gchar * GetSmallFontName()
#define GCU_RO_PROP(type, member)
PangoFontDescription * GetPangoFontDesc()
Gnome Chemistry Canvas library namespace.
The Gnome Chemistry Utils C++ classes.
void on_receive(GtkClipboard *clipboard, GtkSelectionData *selection_data, View *pView)
PangoFontDescription * GetPangoSmallFontDesc()