4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef GNOME_PIXBUTTON
13 #define GNOME_PIXBUTTON
15 #include <gtk--/button.h>
16 #include <gtk--/box.h>
17 #include <gtk--/label.h>
18 #include <gnome--/pixmap.h>
19 #include <gnome--/stock.h>
21 /* Button class used in LyX Gnome frontend for buttons with pixmaps and
26 class PixButton: public Gtk::Button
29 PixButton(string label, string pixname): Button()
31 Gtk::Box * b = manage( new Gtk::HBox() );
32 l = manage( new Gtk::Label(label) );
33 Gnome::Pixmap * p = Gtk::wrap( GNOME_PIXMAP( gnome_stock_pixmap_widget(0, pixname.c_str()) ) );
36 b->children().push_back(Gtk::Box_Helpers::Element(*p, false, false));
37 b->children().push_back(Gtk::Box_Helpers::Element(*l, false, false));
41 accelkey_ = l->parse_uline(label);
48 guint get_accelkey() { return accelkey_; }
50 void set_text(string const & newlabel) { l->set_text(newlabel); }