provide C API for rounded rectangle cairo utility
[ardour.git] / libs / gtkmm2ext / gtkmm2ext / cairocell.h
index ad84c4c7a394df5bd48f334b6fd365517d98ecab..2839d4266bdf8e327a670d2f60737b86b2919f04 100644 (file)
@@ -27,7 +27,7 @@
 #include <boost/shared_ptr.hpp>
 
 #include <cairomm/cairomm.h>
-#include <gtkmm.h>
+#include <gtkmm/misc.h>
 
 class CairoCell
 {
@@ -79,24 +79,30 @@ class CairoFontDescription {
                              Cairo::FontWeight w,
                              double sz)
                : face (f)
-               , slant (s)
-               , weight (w)
+               , _slant (s)
+               , _weight (w)
                , _size (sz)
        {}
        CairoFontDescription (Pango::FontDescription&);
 
        void apply (Cairo::RefPtr<Cairo::Context> context) {
-               context->select_font_face (face, slant, weight);
+               context->select_font_face (face, _slant, _weight);
                context->set_font_size (_size);
        }
 
        void set_size (double sz) { _size = sz; }
        double size() const { return _size; }
 
+       Cairo::FontSlant slant() const { return _slant; }
+       void set_slant (Cairo::FontSlant sl) { _slant = sl; }
+
+       Cairo::FontWeight weight() const { return _weight; }
+       void set_weight (Cairo::FontWeight w) { _weight = w; }
+
   private:
        std::string face;
-       Cairo::FontSlant slant;
-       Cairo::FontWeight weight;
+       Cairo::FontSlant _slant;
+        Cairo::FontWeight _weight;
        double _size;
 };