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 ();
155 void OnDeleteSelection (GtkWidget* w);
162 void OnCopySelection (GtkWidget* w, GtkClipboard* clipboard);
169 void OnPasteSelection (GtkWidget* w, GtkClipboard* clipboard);
176 void OnCutSelection (GtkWidget* w, GtkClipboard* clipboard);
184 bool OnKeyPress (GtkWidget* w, GdkEventKey* event);
192 bool OnKeyRelease (GtkWidget* w, GdkEventKey* event);
206 bool PrepareUnselect ();
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);
270 void ShowCursor (
bool show);
280 void Render (cairo_t *cr);
287 void SetSelectionState (
gcu::Object *
object,
int state);
290 bool OnButtonPressed (
gccv::ItemClient *client,
unsigned button,
double x,
double y,
unsigned state);
291 bool OnButtonReleased (
gccv::ItemClient *client,
unsigned button,
double x,
double y,
unsigned state);
293 bool OnMotion (
gccv::ItemClient *client,
double x,
double y,
unsigned state);
294 bool OnLeaveNotify (
unsigned state);
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.
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 * GetPangoTextFontDesc()
PangoFontDescription * GetPangoSmallFontDesc()