]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GBC.C
Joao latest bits
[lyx.git] / src / frontends / gtk / GBC.C
1 /**
2  * \file GBC.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Huang Ying
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12 #include <gtkmm.h>
13
14 #include "GBC.h"
15
16 using std::string;
17
18
19 GBC::GBC(ButtonController const & parent,
20          string const & cancel, string const & close)
21         : GuiBC<Gtk::Button, Gtk::Widget>(parent, cancel, close)
22 {
23 }
24
25
26 void GBC::setButtonEnabled(Gtk::Button * btn, bool enabled) const
27 {
28         btn->set_sensitive(enabled);
29 }
30
31
32 void GBC::setWidgetEnabled(Gtk::Widget * widget, bool enabled) const
33 {
34         widget->set_sensitive(enabled);
35 }
36
37
38 void GBC::setButtonLabel(Gtk::Button * btn, string const & label) const
39 {
40         btn->set_label(Glib::locale_to_utf8(label));
41 }