2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995-2000 The LyX Team.
9 * ======================================================
11 * Author: Baruch Even <baruch@lyx.org>
17 #include "ButtonController.h"
29 class gnomeBC : public ButtonControllerBase
33 gnomeBC(string const & cancel, string const & close);
35 /* Initialise Button Functions */
36 /// Call refresh() when finished setting the buttons.
37 void setOK(Gtk::Button * obj) {
41 void setApply(Gtk::Button * obj) {
45 void setCancel(Gtk::Button * obj) {
49 void setUndoAll(Gtk::Button * obj) {
53 void addReadOnly(Gtk::Widget * obj) {
54 read_only_.push_front(obj);
57 void eraseReadOnly() {
61 /* Action Functions */
62 /// force a refresh of the buttons
63 virtual void refresh();
66 /// Updates the button sensitivity (enabled/disabled)
67 void setSensitive(Gtk::Button * btn, ButtonPolicy::Button id);
73 Gtk::Button * cancel_;
75 Gtk::Button * undo_all_;
76 /// List of items to be deactivated when in one of the read-only states
77 typedef std::list<Gtk::Widget *> WidgetList;
78 WidgetList read_only_;