22 #ifndef GtkCRNDrawingPanel_HEADER
23 #define GtkCRNDrawingPanel_HEADER
25 #include <libgtkcrnmm_config.h>
27 #ifndef CRN_USING_GTKMM3
57 Glib::RefPtr<Gtk::ActionGroup>
get_actions() {
return actions; }
65 #ifdef CRN_USING_GTKMM3
71 #ifdef CRN_USING_GTKMM3
77 #ifdef CRN_USING_GTKMM3
83 #ifdef CRN_USING_GTKMM3
96 bool on_button_press(GdkEventButton *ev);
98 bool on_motion(GdkEventMotion *ev);
100 #ifdef CRN_USING_GTKMM3
101 bool on_expose(
const Cairo::RefPtr<Cairo::Context> &);
103 bool on_expose(GdkEventExpose *ev);
106 void modify_thickness(
double val);
108 void on_thickness_set();
112 std::vector<std::vector<crn::Point2DDouble>> stroke_list;
114 Glib::RefPtr<Gtk::ActionGroup> actions;
115 #ifndef CRN_USING_GTKMM3
116 Glib::RefPtr<GtkCRN::ColorAction> bg_act, fg_act;
117 Glib::RefPtr<GtkCRN::ScaleAction> thick_act;
DrawingPanel()
Constructor.
Glib::RefPtr< Gdk::Pixbuf > create_image()
Renders the panel to a Pixbuf.
Glib::RefPtr< Gtk::ActionGroup > get_actions()
Returns actions associated to the drawing panel. Valid actions are:
Gdk::Color get_background() const
Gets the background color.
void set_zoom(double z)
Sets the zoom level.
void set_background(const Gdk::Color &col)
Sets the background color.
void clear()
Clears the panel.
A widget that allows to draw on it.
void set_foreground(const Gdk::Color &col)
Sets the foreground color.
virtual ~DrawingPanel() override
Gdk::Color get_foreground() const
Gets the foreground color.