Horizon
cell_renderer_color_box.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include "canvas/layer_display.hpp"
4 
5 namespace horizon {
6 class CellRendererColorBox : public Gtk::CellRenderer {
7 public:
9  virtual ~CellRendererColorBox(){};
10 
11  typedef Glib::Property<Gdk::RGBA> type_property_color;
12  Glib::PropertyProxy<Gdk::RGBA> property_color()
13  {
14  return p_property_color.get_proxy();
15  }
16 
17 protected:
18  virtual void render_vfunc(const Cairo::RefPtr<Cairo::Context> &cr, Gtk::Widget &widget,
19  const Gdk::Rectangle &background_area, const Gdk::Rectangle &cell_area,
20  Gtk::CellRendererState flags);
21 
22  virtual void get_preferred_width_vfunc(Gtk::Widget &widget, int &min_w, int &nat_w) const;
23 
24  virtual void get_preferred_height_vfunc(Gtk::Widget &widget, int &min_h, int &nat_h) const;
25 
26 private:
27  type_property_color p_property_color;
28 };
29 } // namespace horizon
horizon::CellRendererColorBox
Definition: cell_renderer_color_box.hpp:6