3
* Copyright (C) 2001-2004 Murray Cumming
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License as
7
* published by the Free Software Foundation; either version 2 of the
8
* License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* General Public License for more details.
15
* You should have received a copy of the GNU General Public
16
* License along with this program; if not, write to the
17
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
* Boston, MA 02111-1307, USA.
21
#ifndef GLOM_BOX_WITHBUTTONS_H
22
#define GLOM_BOX_WITHBUTTONS_H
25
#include "utility_widgets/adddel/adddel_withbuttons.h"
27
#include <glom/libglom/document/document_glom.h>
28
#include <glom/libglom/connectionpool.h>
29
#include <glom/libglom/appstate.h>
31
#include <bakery/Utilities/BusyCursor.h>
32
#include <libglademm.h>
37
/** A Gtk::VBox base widget class,
38
* with some extra signals to allow derived classes to be used generically in
39
* Dialog_Glom, allowing the dialog to respond to buttons in the box.
41
class Box_WithButtons :
46
Box_WithButtons(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
48
///For use with libglademm's get_widget_derived():
49
Box_WithButtons(BaseObjectType* cobject);
51
virtual ~Box_WithButtons();
53
Gtk::Window* get_app_window();
54
const Gtk::Window* get_app_window() const;
56
//void show_hint(); //Public so that it can be called *after* this widget is added to its container.
58
void set_button_cancel(Gtk::Button& button);
61
sigc::signal<void, Glib::ustring> signal_selected; //When an item is selected.
62
sigc::signal<void> signal_cancelled; //When the cancel button is clicked.
65
virtual void on_Button_Cancel();
67
virtual Gtk::Widget* get_default_button();
72
//virtual void hint_set(const Glib::ustring& strText);
75
//Glib::ustring m_strHint; //Help text.
77
Gtk::HBox m_Box_Buttons;
78
Gtk::Button m_Button_Cancel; //Derived classes can use it if it's necessary.
83
#endif //GLOM_BOX_WITHBUTTONS_H