32 ClickBox::ClickBox (Gtk::Adjustment *adjp,
const string &
name,
bool round_to_steps)
35 layout = create_pango_layout (
"");
40 add_events (Gdk::BUTTON_RELEASE_MASK|
41 Gdk::BUTTON_PRESS_MASK|
42 Gdk::ENTER_NOTIFY_MASK|
43 Gdk::LEAVE_NOTIFY_MASK);
100 layout->context_changed ();
114 Gtk::DrawingArea::on_expose_event (ev);
116 Glib::RefPtr<Gtk::Style> style (get_style());
117 Glib::RefPtr<Gdk::GC> fg_gc (style->get_fg_gc (Gtk::STATE_NORMAL));
118 Glib::RefPtr<Gdk::GC> bg_gc (style->get_bg_gc (Gtk::STATE_NORMAL));
119 Glib::RefPtr<Gdk::Window> win (get_window());
121 GdkRectangle base_rect;
122 GdkRectangle draw_rect;
123 gint x, y, width, height, depth;
125 win->get_geometry (x, y, width, height, depth);
127 base_rect.width = width;
128 base_rect.height = height;
132 gdk_rectangle_intersect (&ev->area, &base_rect, &draw_rect);
133 win->draw_rectangle (bg_gc,
true, draw_rect.x, draw_rect.y, draw_rect.width, draw_rect.height);
Glib::RefPtr< Pango::Layout > layout
gint button_press(GdkEventButton *)
bool on_expose_event(GdkEventExpose *)
void style_changed(const Glib::RefPtr< Gtk::Style > &)
bool button_press_handler(GdkEventButton *)
void set_printer(sigc::slot< bool, char *, Gtk::Adjustment & >)
bool button_release_handler(GdkEventButton *)
sigc::slot< bool, char *, Gtk::Adjustment & > _printer
gint stop_spinning(GdkEventButton *ignored_but_here_for_clicked)
Gtk::Adjustment & get_adjustment()
static LilvNode * get_value(LilvWorld *world, const LilvNode *subject, const LilvNode *predicate)