]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/GBC.C
Wrap most of the frontend code up inside namespace lyx::frontend.
[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 namespace lyx {
19 namespace frontend {
20
21 GBC::GBC(ButtonController const & parent,
22          string const & cancel, string const & close)
23         : GuiBC<Gtk::Button, Gtk::Widget>(parent, cancel, close)
24 {
25 }
26
27
28 void GBC::setButtonEnabled(Gtk::Button * btn, bool enabled) const
29 {
30         btn->set_sensitive(enabled);
31 }
32
33
34 void GBC::setWidgetEnabled(Gtk::Widget * widget, bool enabled) const
35 {
36         widget->set_sensitive(enabled);
37 }
38
39
40 void GBC::setButtonLabel(Gtk::Button * btn, string const & label) const
41 {
42         btn->set_label(Glib::locale_to_utf8(label));
43 }
44
45 } // namespace frontend
46 } // namespace lyx