[gtkmm-documentation] examples: Use Gtk::Box instead of Gtk::ButtonBox
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation] examples: Use Gtk::Box instead of Gtk::ButtonBox
- Date: Fri, 8 Feb 2019 15:01:00 +0000 (UTC)
commit 1bdb20601137e2af218479a081ab890ef708cdb9
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Fri Feb 8 15:57:39 2019 +0100
examples: Use Gtk::Box instead of Gtk::ButtonBox
And remove the ButtonBox example.
docs/tutorial/C/figures/buttonbox.png | Bin 30922 -> 0 bytes
docs/tutorial/Makefile.am | 1 -
examples/Makefile.am | 8 --
examples/book/buttonbox/examplebuttonbox.cc | 48 ------------
examples/book/buttonbox/examplebuttonbox.h | 36 ---------
examples/book/buttonbox/examplewindow.cc | 83 ---------------------
examples/book/buttonbox/examplewindow.h | 40 ----------
examples/book/buttonbox/main.cc | 28 -------
examples/book/clipboard/ideal/examplewindow.cc | 3 +-
examples/book/clipboard/ideal/examplewindow.h | 2 +-
examples/book/clipboard/simple/examplewindow.cc | 3 +-
examples/book/clipboard/simple/examplewindow.h | 2 +-
.../book/custom/custom_container/examplewindow.cc | 3 +-
.../book/custom/custom_container/examplewindow.h | 2 +-
.../book/custom/custom_widget/examplewindow.cc | 3 +-
examples/book/custom/custom_widget/examplewindow.h | 2 +-
examples/book/dialogs/aboutdialog/examplewindow.cc | 3 +-
examples/book/dialogs/aboutdialog/examplewindow.h | 4 +-
.../book/dialogs/filechooserdialog/examplewindow.h | 4 +-
.../book/dialogs/filechoosernative/examplewindow.h | 2 +-
.../book/dialogs/fontchooserdialog/examplewindow.h | 4 +-
.../book/dialogs/messagedialog/examplewindow.h | 4 +-
examples/book/iconview/examplewindow.cc | 3 +-
examples/book/iconview/examplewindow.h | 4 +-
examples/book/infobar/examplewindow.cc | 3 +-
examples/book/infobar/examplewindow.h | 2 +-
examples/book/multithread/examplewindow.cc | 3 +-
examples/book/multithread/examplewindow.h | 2 +-
examples/book/notebook/examplewindow.cc | 2 +
examples/book/notebook/examplewindow.h | 4 +-
examples/book/textview/examplewindow.cc | 3 +-
examples/book/textview/examplewindow.h | 4 +-
examples/book/toolbar/examplewindow.cc | 4 +-
examples/book/toolbar/examplewindow.h | 4 +-
.../book/treeview/combo_renderer/examplewindow.cc | 3 +-
.../book/treeview/combo_renderer/examplewindow.h | 4 +-
.../book/treeview/drag_and_drop/examplewindow.cc | 3 +-
.../book/treeview/drag_and_drop/examplewindow.h | 4 +-
.../book/treeview/editable_cells/examplewindow.cc | 3 +-
.../book/treeview/editable_cells/examplewindow.h | 4 +-
examples/book/treeview/filter/examplewindow.cc | 3 +-
examples/book/treeview/filter/examplewindow.h | 4 +-
.../book/treeview/filter_modify/examplewindow.cc | 3 +-
.../book/treeview/filter_modify/examplewindow.h | 4 +-
examples/book/treeview/list/examplewindow.cc | 3 +-
examples/book/treeview/list/examplewindow.h | 4 +-
.../book/treeview/listviewtext/examplewindow.cc | 3 +-
.../book/treeview/listviewtext/examplewindow.h | 5 +-
examples/book/treeview/modelsort/examplewindow.cc | 3 +-
examples/book/treeview/modelsort/examplewindow.h | 4 +-
examples/book/treeview/popup/examplewindow.cc | 3 +-
examples/book/treeview/popup/examplewindow.h | 4 +-
examples/book/treeview/tree/examplewindow.cc | 3 +-
examples/book/treeview/tree/examplewindow.h | 4 +-
examples/book/update_ui/examplewindow.cc | 3 +-
examples/book/update_ui/examplewindow.h | 4 +-
examples/others/calendar/calendar.cc | 10 ++-
examples/others/treemodelcustom/examplewindow.cc | 3 +-
examples/others/treemodelcustom/examplewindow.h | 4 +-
59 files changed, 80 insertions(+), 338 deletions(-)
---
diff --git a/docs/tutorial/Makefile.am b/docs/tutorial/Makefile.am
index e5f1088..126d31d 100644
--- a/docs/tutorial/Makefile.am
+++ b/docs/tutorial/Makefile.am
@@ -38,7 +38,6 @@ HELP_MEDIA = \
figures/buildapp_search_bar.png \
figures/buildapp_side_bar.png \
figures/buildapp_trivial_app.png \
- figures/buttonbox.png \
figures/buttons.png \
figures/cairo_clock.png \
figures/cairo_joins.png \
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 664f8ec..5d7630d 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -19,7 +19,6 @@ check_PROGRAMS = \
book/box/example \
book/builder/basic/example \
book/builder/derived/example \
- book/buttonbox/example \
book/buttons/button/buttons \
book/buttons/checkbutton/example \
book/buttons/filechooserbutton/example \
@@ -198,13 +197,6 @@ book_builder_derived_example_SOURCES = \
book/builder/derived/deriveddialog.h \
book/builder/derived/main.cc
-book_buttonbox_example_SOURCES = \
- book/buttonbox/examplebuttonbox.cc \
- book/buttonbox/examplebuttonbox.h \
- book/buttonbox/examplewindow.cc \
- book/buttonbox/examplewindow.h \
- book/buttonbox/main.cc
-
book_buttons_button_buttons_SOURCES = \
book/buttons/button/buttons.cc \
book/buttons/button/buttons.h \
diff --git a/examples/book/clipboard/ideal/examplewindow.cc b/examples/book/clipboard/ideal/examplewindow.cc
index 8cbf7e6..80fd286 100644
--- a/examples/book/clipboard/ideal/examplewindow.cc
+++ b/examples/book/clipboard/ideal/examplewindow.cc
@@ -56,8 +56,9 @@ ExampleWindow::ExampleWindow()
m_VBox.set_spacing(6);
//Fill ButtonBox:
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
m_ButtonBox.add(m_Button_Copy);
+ m_Button_Copy.set_hexpand(true);
+ m_Button_Copy.set_halign(Gtk::Align::END);
m_Button_Copy.signal_clicked().connect(sigc::mem_fun(*this,
&ExampleWindow::on_button_copy) );
m_ButtonBox.add(m_Button_Paste);
diff --git a/examples/book/clipboard/ideal/examplewindow.h b/examples/book/clipboard/ideal/examplewindow.h
index b047181..5c2b90d 100644
--- a/examples/book/clipboard/ideal/examplewindow.h
+++ b/examples/book/clipboard/ideal/examplewindow.h
@@ -45,7 +45,7 @@ protected:
Gtk::Grid m_Grid;
Gtk::ToggleButton m_ButtonA1, m_ButtonA2, m_ButtonB1, m_ButtonB2;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Copy, m_Button_Paste;
};
diff --git a/examples/book/clipboard/simple/examplewindow.cc b/examples/book/clipboard/simple/examplewindow.cc
index 7bc3a6c..4794176 100644
--- a/examples/book/clipboard/simple/examplewindow.cc
+++ b/examples/book/clipboard/simple/examplewindow.cc
@@ -46,8 +46,9 @@ ExampleWindow::ExampleWindow()
m_VBox.set_spacing(6);
//Fill ButtonBox:
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
m_ButtonBox.add(m_Button_Copy);
+ m_Button_Copy.set_hexpand(true);
+ m_Button_Copy.set_halign(Gtk::Align::END);
m_Button_Copy.signal_clicked().connect(sigc::mem_fun(*this,
&ExampleWindow::on_button_copy) );
m_ButtonBox.add(m_Button_Paste);
diff --git a/examples/book/clipboard/simple/examplewindow.h b/examples/book/clipboard/simple/examplewindow.h
index 44bae10..b0584c5 100644
--- a/examples/book/clipboard/simple/examplewindow.h
+++ b/examples/book/clipboard/simple/examplewindow.h
@@ -40,7 +40,7 @@ protected:
Gtk::Grid m_Grid;
Gtk::ToggleButton m_ButtonA1, m_ButtonA2, m_ButtonB1, m_ButtonB2;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Copy, m_Button_Paste;
};
diff --git a/examples/book/custom/custom_container/examplewindow.cc
b/examples/book/custom/custom_container/examplewindow.cc
index 8ffdf94..adae209 100644
--- a/examples/book/custom/custom_container/examplewindow.cc
+++ b/examples/book/custom/custom_container/examplewindow.cc
@@ -38,7 +38,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(6);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect( sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
}
diff --git a/examples/book/custom/custom_container/examplewindow.h
b/examples/book/custom/custom_container/examplewindow.h
index e8458e3..5d50f1b 100644
--- a/examples/book/custom/custom_container/examplewindow.h
+++ b/examples/book/custom/custom_container/examplewindow.h
@@ -37,7 +37,7 @@ protected:
// A restriction with MyContainer is that it must be deleted before
// its children, meaning that it must be declared after its children.
MyContainer m_MyContainer;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/book/custom/custom_widget/examplewindow.cc
b/examples/book/custom/custom_widget/examplewindow.cc
index 800ee50..29956b0 100644
--- a/examples/book/custom/custom_widget/examplewindow.cc
+++ b/examples/book/custom/custom_widget/examplewindow.cc
@@ -35,7 +35,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(6);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect( sigc::mem_fun(*this, &ExampleWindow::on_button_quit) );
}
diff --git a/examples/book/custom/custom_widget/examplewindow.h
b/examples/book/custom/custom_widget/examplewindow.h
index d6ac5bd..cca81e9 100644
--- a/examples/book/custom/custom_widget/examplewindow.h
+++ b/examples/book/custom/custom_widget/examplewindow.h
@@ -34,7 +34,7 @@ protected:
Gtk::Grid m_Grid;
MyWidget m_MyWidgetS1;
MyWidget m_MyWidgetS2;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/book/dialogs/aboutdialog/examplewindow.cc
b/examples/book/dialogs/aboutdialog/examplewindow.cc
index e3831fb..659d56b 100644
--- a/examples/book/dialogs/aboutdialog/examplewindow.cc
+++ b/examples/book/dialogs/aboutdialog/examplewindow.cc
@@ -34,9 +34,10 @@ ExampleWindow::ExampleWindow()
m_Label.set_selectable(true);
m_VBox.add(m_ButtonBox);
- m_ButtonBox.set_expand(true);
m_ButtonBox.add(m_Button);
m_Button.set_expand(true);
+ m_Button.set_halign(Gtk::Align::CENTER);
+ m_Button.set_valign(Gtk::Align::CENTER);
m_Button.signal_clicked().connect(sigc::mem_fun(*this,
&ExampleWindow::on_button_clicked) );
diff --git a/examples/book/dialogs/aboutdialog/examplewindow.h
b/examples/book/dialogs/aboutdialog/examplewindow.h
index 9d1c4a3..2faf4d2 100644
--- a/examples/book/dialogs/aboutdialog/examplewindow.h
+++ b/examples/book/dialogs/aboutdialog/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -35,7 +33,7 @@ protected:
//Child widgets:
Gtk::Box m_VBox;
Gtk::Label m_Label;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button;
Gtk::AboutDialog m_Dialog;
};
diff --git a/examples/book/dialogs/filechooserdialog/examplewindow.h
b/examples/book/dialogs/filechooserdialog/examplewindow.h
index e7712ae..c5fafa8 100644
--- a/examples/book/dialogs/filechooserdialog/examplewindow.h
+++ b/examples/book/dialogs/filechooserdialog/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -33,7 +31,7 @@ protected:
void on_button_folder_clicked();
//Child widgets:
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_File, m_Button_Folder;
};
diff --git a/examples/book/dialogs/filechoosernative/examplewindow.h
b/examples/book/dialogs/filechoosernative/examplewindow.h
index 57688f2..f705b85 100644
--- a/examples/book/dialogs/filechoosernative/examplewindow.h
+++ b/examples/book/dialogs/filechoosernative/examplewindow.h
@@ -29,7 +29,7 @@ protected:
void on_button_file_clicked(Gtk::FileChooser::Action action);
// Child widgets:
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_File_Open;
Gtk::Button m_Button_File_Save;
};
diff --git a/examples/book/dialogs/fontchooserdialog/examplewindow.h
b/examples/book/dialogs/fontchooserdialog/examplewindow.h
index a3de2cd..e7ad9f1 100644
--- a/examples/book/dialogs/fontchooserdialog/examplewindow.h
+++ b/examples/book/dialogs/fontchooserdialog/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -33,7 +31,7 @@ protected:
void on_button_dialog_clicked();
//Child widgets:
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::FontButton m_FontButton;
Gtk::Button m_Button_Dialog;
};
diff --git a/examples/book/dialogs/messagedialog/examplewindow.h
b/examples/book/dialogs/messagedialog/examplewindow.h
index 14a7676..172b667 100644
--- a/examples/book/dialogs/messagedialog/examplewindow.h
+++ b/examples/book/dialogs/messagedialog/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -33,7 +31,7 @@ protected:
void on_button_question_clicked();
//Child widgets:
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Info, m_Button_Question;
};
diff --git a/examples/book/iconview/examplewindow.cc b/examples/book/iconview/examplewindow.cc
index 63c4584..797790f 100644
--- a/examples/book/iconview/examplewindow.cc
+++ b/examples/book/iconview/examplewindow.cc
@@ -58,7 +58,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(6);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect(sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
diff --git a/examples/book/iconview/examplewindow.h b/examples/book/iconview/examplewindow.h
index ff15c80..728f4de 100644
--- a/examples/book/iconview/examplewindow.h
+++ b/examples/book/iconview/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2006 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -64,7 +62,7 @@ protected:
Gtk::IconView m_IconView;
Glib::RefPtr<Gtk::ListStore> m_refListModel;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/book/infobar/examplewindow.cc b/examples/book/infobar/examplewindow.cc
index f7f390b..30bbb38 100644
--- a/examples/book/infobar/examplewindow.cc
+++ b/examples/book/infobar/examplewindow.cc
@@ -58,7 +58,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Clear);
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_spacing(6);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Clear.set_hexpand(true);
+ m_Button_Clear.set_halign(Gtk::Align::END);
// Connect signals:
m_InfoBar.signal_response().connect(sigc::mem_fun(*this,
diff --git a/examples/book/infobar/examplewindow.h b/examples/book/infobar/examplewindow.h
index 20ddf0f..2f6fe24 100644
--- a/examples/book/infobar/examplewindow.h
+++ b/examples/book/infobar/examplewindow.h
@@ -43,7 +43,7 @@ protected:
Gtk::InfoBar m_InfoBar;
Gtk::Label m_Message_Label;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit, m_Button_Clear;
};
diff --git a/examples/book/multithread/examplewindow.cc b/examples/book/multithread/examplewindow.cc
index c8c3dd4..6373821 100644
--- a/examples/book/multithread/examplewindow.cc
+++ b/examples/book/multithread/examplewindow.cc
@@ -60,7 +60,8 @@ ExampleWindow::ExampleWindow() :
m_ButtonBox.add(m_ButtonQuit);
m_ButtonBox.set_margin(5);
m_ButtonBox.set_spacing(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_ButtonStart.set_hexpand(true);
+ m_ButtonStart.set_halign(Gtk::Align::END);
// Connect the signal handlers to the buttons.
m_ButtonStart.signal_clicked().connect(sigc::mem_fun(*this, &ExampleWindow::on_start_button_clicked));
diff --git a/examples/book/multithread/examplewindow.h b/examples/book/multithread/examplewindow.h
index 7a02f0c..c802f8d 100644
--- a/examples/book/multithread/examplewindow.h
+++ b/examples/book/multithread/examplewindow.h
@@ -41,7 +41,7 @@ private:
// Member data.
Gtk::Box m_VBox;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_ButtonStart;
Gtk::Button m_ButtonStop;
Gtk::Button m_ButtonQuit;
diff --git a/examples/book/notebook/examplewindow.cc b/examples/book/notebook/examplewindow.cc
index 9a8fa6d..18740fd 100644
--- a/examples/book/notebook/examplewindow.cc
+++ b/examples/book/notebook/examplewindow.cc
@@ -36,6 +36,8 @@ ExampleWindow::ExampleWindow()
m_VBox.add(m_ButtonBox);
m_ButtonBox.add(m_Button_Quit);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::CENTER);
m_Button_Quit.signal_clicked().connect(sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
diff --git a/examples/book/notebook/examplewindow.h b/examples/book/notebook/examplewindow.h
index dc3b4a2..499515c 100644
--- a/examples/book/notebook/examplewindow.h
+++ b/examples/book/notebook/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 810 2007-03-30 10:10:25Z murrayc $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -37,7 +35,7 @@ protected:
Gtk::Notebook m_Notebook;
Gtk::Label m_Label1, m_Label2;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/book/textview/examplewindow.cc b/examples/book/textview/examplewindow.cc
index 48a346a..1d1e97e 100644
--- a/examples/book/textview/examplewindow.cc
+++ b/examples/book/textview/examplewindow.cc
@@ -40,12 +40,13 @@ ExampleWindow::ExampleWindow()
//Add buttons:
m_VBox.add(m_ButtonBox);
+ m_Button_Buffer1.set_hexpand(true);
+ m_Button_Buffer1.set_halign(Gtk::Align::END);
m_ButtonBox.add(m_Button_Buffer1);
m_ButtonBox.add(m_Button_Buffer2);
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(5);
m_ButtonBox.set_spacing(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
//Connect signals:
m_Button_Quit.signal_clicked().connect(sigc::mem_fun(*this,
diff --git a/examples/book/textview/examplewindow.h b/examples/book/textview/examplewindow.h
index c72fb36..7a5af10 100644
--- a/examples/book/textview/examplewindow.h
+++ b/examples/book/textview/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -44,7 +42,7 @@ protected:
Glib::RefPtr<Gtk::TextBuffer> m_refTextBuffer1, m_refTextBuffer2;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit, m_Button_Buffer1, m_Button_Buffer2;
};
diff --git a/examples/book/toolbar/examplewindow.cc b/examples/book/toolbar/examplewindow.cc
index dbc552a..4a8fe2b 100644
--- a/examples/book/toolbar/examplewindow.cc
+++ b/examples/book/toolbar/examplewindow.cc
@@ -30,10 +30,12 @@ ExampleWindow::ExampleWindow()
//Put a toolbar at the top, and a button underneath:
m_VBox.add(m_Toolbar);
m_ButtonBox.set_margin(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
m_VBox.add(m_ButtonBox);
m_ButtonBox.add(m_Button_Close);
+ m_Button_Close.set_expand(true);
+ m_Button_Close.set_halign(Gtk::Align::END);
+ m_Button_Close.set_valign(Gtk::Align::END);
m_Button_Close.signal_clicked().connect( sigc::mem_fun(*this,
&ExampleWindow::on_button_close) );
diff --git a/examples/book/toolbar/examplewindow.h b/examples/book/toolbar/examplewindow.h
index 8a90727..be1eba9 100644
--- a/examples/book/toolbar/examplewindow.h
+++ b/examples/book/toolbar/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -34,7 +32,7 @@ protected:
//Child widgets:
Gtk::Box m_VBox;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Toolbar m_Toolbar;
Gtk::Button m_Button_Close;
};
diff --git a/examples/book/treeview/combo_renderer/examplewindow.cc
b/examples/book/treeview/combo_renderer/examplewindow.cc
index 2f9b03d..cde9ea7 100644
--- a/examples/book/treeview/combo_renderer/examplewindow.cc
+++ b/examples/book/treeview/combo_renderer/examplewindow.cc
@@ -39,7 +39,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect( sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
diff --git a/examples/book/treeview/combo_renderer/examplewindow.h
b/examples/book/treeview/combo_renderer/examplewindow.h
index 66d6954..42ac821 100644
--- a/examples/book/treeview/combo_renderer/examplewindow.h
+++ b/examples/book/treeview/combo_renderer/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -72,7 +70,7 @@ protected:
Glib::RefPtr<Gtk::ListStore> m_refTreeModelCombo1, m_refTreeModelCombo2;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/book/treeview/drag_and_drop/examplewindow.cc
b/examples/book/treeview/drag_and_drop/examplewindow.cc
index b630043..a6bcb3c 100644
--- a/examples/book/treeview/drag_and_drop/examplewindow.cc
+++ b/examples/book/treeview/drag_and_drop/examplewindow.cc
@@ -39,7 +39,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect(sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
diff --git a/examples/book/treeview/drag_and_drop/examplewindow.h
b/examples/book/treeview/drag_and_drop/examplewindow.h
index 2fea96a..7e5c259 100644
--- a/examples/book/treeview/drag_and_drop/examplewindow.h
+++ b/examples/book/treeview/drag_and_drop/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -41,7 +39,7 @@ protected:
Gtk::TreeView m_TreeView;
Glib::RefPtr<TreeModel_Dnd> m_refTreeModel;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/book/treeview/editable_cells/examplewindow.cc
b/examples/book/treeview/editable_cells/examplewindow.cc
index 3d4cc36..0fbb8e6 100644
--- a/examples/book/treeview/editable_cells/examplewindow.cc
+++ b/examples/book/treeview/editable_cells/examplewindow.cc
@@ -45,7 +45,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect( sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
diff --git a/examples/book/treeview/editable_cells/examplewindow.h
b/examples/book/treeview/editable_cells/examplewindow.h
index e8ff1cb..b3dd4d9 100644
--- a/examples/book/treeview/editable_cells/examplewindow.h
+++ b/examples/book/treeview/editable_cells/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 858 2007-06-22 08:37:15Z murrayc $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -59,7 +57,7 @@ protected:
Gtk::TreeView m_TreeView;
Glib::RefPtr<Gtk::ListStore> m_refTreeModel;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
//For the validated column:
diff --git a/examples/book/treeview/filter/examplewindow.cc b/examples/book/treeview/filter/examplewindow.cc
index fbeaee8..670a7c2 100644
--- a/examples/book/treeview/filter/examplewindow.cc
+++ b/examples/book/treeview/filter/examplewindow.cc
@@ -39,7 +39,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect( sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
diff --git a/examples/book/treeview/filter/examplewindow.h b/examples/book/treeview/filter/examplewindow.h
index a879a5f..1ec0419 100644
--- a/examples/book/treeview/filter/examplewindow.h
+++ b/examples/book/treeview/filter/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -54,7 +52,7 @@ protected:
Glib::RefPtr<Gtk::ListStore> m_refTreeModel;
Glib::RefPtr<Gtk::TreeModelFilter> m_refTreeModelFilter;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/book/treeview/filter_modify/examplewindow.cc
b/examples/book/treeview/filter_modify/examplewindow.cc
index bdb76fe..d3e2e77 100644
--- a/examples/book/treeview/filter_modify/examplewindow.cc
+++ b/examples/book/treeview/filter_modify/examplewindow.cc
@@ -39,7 +39,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect( sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
diff --git a/examples/book/treeview/filter_modify/examplewindow.h
b/examples/book/treeview/filter_modify/examplewindow.h
index 2620cd3..31d67f0 100644
--- a/examples/book/treeview/filter_modify/examplewindow.h
+++ b/examples/book/treeview/filter_modify/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -75,7 +73,7 @@ protected:
Glib::RefPtr<Gtk::ListStore> m_refTreeModel;
Glib::RefPtr<Gtk::TreeModelFilter> m_refTreeModelFilter;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/book/treeview/list/examplewindow.cc b/examples/book/treeview/list/examplewindow.cc
index 89ce3d2..583c6e4 100644
--- a/examples/book/treeview/list/examplewindow.cc
+++ b/examples/book/treeview/list/examplewindow.cc
@@ -39,7 +39,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect( sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
diff --git a/examples/book/treeview/list/examplewindow.h b/examples/book/treeview/list/examplewindow.h
index f0aa710..689a394 100644
--- a/examples/book/treeview/list/examplewindow.h
+++ b/examples/book/treeview/list/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -54,7 +52,7 @@ protected:
Gtk::TreeView m_TreeView;
Glib::RefPtr<Gtk::ListStore> m_refTreeModel;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/book/treeview/listviewtext/examplewindow.cc
b/examples/book/treeview/listviewtext/examplewindow.cc
index 300d839..33e58c5 100644
--- a/examples/book/treeview/listviewtext/examplewindow.cc
+++ b/examples/book/treeview/listviewtext/examplewindow.cc
@@ -40,7 +40,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect( sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
diff --git a/examples/book/treeview/listviewtext/examplewindow.h
b/examples/book/treeview/listviewtext/examplewindow.h
index 8504ed0..c534df7 100644
--- a/examples/book/treeview/listviewtext/examplewindow.h
+++ b/examples/book/treeview/listviewtext/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 654 2006-06-14 01:00:12Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2006 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -22,7 +20,6 @@
#include <gtkmm/box.h>
#include <gtkmm/window.h>
#include <gtkmm/button.h>
-#include <gtkmm/buttonbox.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/listviewtext.h>
@@ -42,7 +39,7 @@ protected:
Gtk::ScrolledWindow m_ScrolledWindow;
Gtk::ListViewText m_ListViewText;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/book/treeview/modelsort/examplewindow.cc
b/examples/book/treeview/modelsort/examplewindow.cc
index 0d4d2c8..cbda0f7 100644
--- a/examples/book/treeview/modelsort/examplewindow.cc
+++ b/examples/book/treeview/modelsort/examplewindow.cc
@@ -44,7 +44,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect( sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
diff --git a/examples/book/treeview/modelsort/examplewindow.h
b/examples/book/treeview/modelsort/examplewindow.h
index fcb5655..4406cd6 100644
--- a/examples/book/treeview/modelsort/examplewindow.h
+++ b/examples/book/treeview/modelsort/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -54,7 +52,7 @@ protected:
Glib::RefPtr<Gtk::ListStore> m_refTreeModel;
Glib::RefPtr<Gtk::TreeModelSort> m_refTreeModelSort1, m_refTreeModelSort2;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/book/treeview/popup/examplewindow.cc b/examples/book/treeview/popup/examplewindow.cc
index 8a05f63..b62427d 100644
--- a/examples/book/treeview/popup/examplewindow.cc
+++ b/examples/book/treeview/popup/examplewindow.cc
@@ -39,7 +39,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect( sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
}
diff --git a/examples/book/treeview/popup/examplewindow.h b/examples/book/treeview/popup/examplewindow.h
index b0fdebb..569d185 100644
--- a/examples/book/treeview/popup/examplewindow.h
+++ b/examples/book/treeview/popup/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -40,7 +38,7 @@ protected:
Gtk::ScrolledWindow m_ScrolledWindow;
TreeView_WithPopup m_TreeView;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/book/treeview/tree/examplewindow.cc b/examples/book/treeview/tree/examplewindow.cc
index 4264120..9201b2a 100644
--- a/examples/book/treeview/tree/examplewindow.cc
+++ b/examples/book/treeview/tree/examplewindow.cc
@@ -39,7 +39,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect(sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
diff --git a/examples/book/treeview/tree/examplewindow.h b/examples/book/treeview/tree/examplewindow.h
index 24db4ba..6e32067 100644
--- a/examples/book/treeview/tree/examplewindow.h
+++ b/examples/book/treeview/tree/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -53,7 +51,7 @@ protected:
Gtk::TreeView m_TreeView;
Glib::RefPtr<Gtk::TreeStore> m_refTreeModel;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/book/update_ui/examplewindow.cc b/examples/book/update_ui/examplewindow.cc
index 8504e8a..55dafad 100644
--- a/examples/book/update_ui/examplewindow.cc
+++ b/examples/book/update_ui/examplewindow.cc
@@ -34,7 +34,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.add(m_Button_Start);
m_ButtonBox.set_margin(6);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect(sigc::mem_fun(*this,
&ExampleWindow::on_button_quit) );
m_Button_Start.signal_clicked().connect(sigc::mem_fun(*this,
diff --git a/examples/book/update_ui/examplewindow.h b/examples/book/update_ui/examplewindow.h
index 6ae7db0..4e02d1b 100644
--- a/examples/book/update_ui/examplewindow.h
+++ b/examples/book/update_ui/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -38,7 +36,7 @@ protected:
Gtk::ProgressBar m_ProgressBar;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Start;
Gtk::Button m_Button_Quit;
};
diff --git a/examples/others/calendar/calendar.cc b/examples/others/calendar/calendar.cc
index 28b7b5c..dffa71c 100644
--- a/examples/others/calendar/calendar.cc
+++ b/examples/others/calendar/calendar.cc
@@ -185,10 +185,9 @@ CalendarExample::CalendarExample()
auto hbox = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::HORIZONTAL, DEF_PAD);
vbox->add(*hbox);
- auto hbbox = Gtk::make_managed<Gtk::ButtonBox>();
+ auto hbbox = Gtk::make_managed<Gtk::Box>();
hbox->add(*hbbox);
hbbox->set_margin_end(DEF_PAD);
- hbbox->set_layout(Gtk::ButtonBoxStyle::SPREAD);
hbbox->set_spacing(5);
/* Calendar widget */
@@ -196,6 +195,8 @@ CalendarExample::CalendarExample()
hbbox->add(*frame);
frame->set_margin_start(DEF_PAD);
frame->set_margin_end(DEF_PAD);
+ frame->set_hexpand();
+ frame->set_halign(Gtk::Align::CENTER);
calendar_ = new Gtk::Calendar();
set_flags();
calendar_->mark_day(19);
@@ -284,14 +285,15 @@ CalendarExample::CalendarExample()
label_month_ = new Gtk::Label("");
hbox->add(*label_month_);
- auto bbox = Gtk::make_managed<Gtk::ButtonBox>();
+ auto bbox = Gtk::make_managed<Gtk::Box>();
vbox->add(*bbox);
- bbox->set_layout(Gtk::ButtonBoxStyle::END);
auto button = Gtk::make_managed<Gtk::Button>("Close");
button->signal_clicked().connect(
sigc::mem_fun(*this, &CalendarExample::on_button_close));
bbox->add(*button);
+ button->set_hexpand();
+ button->set_halign(Gtk::Align::END);
button->set_can_default();
button->grab_default();
}
diff --git a/examples/others/treemodelcustom/examplewindow.cc
b/examples/others/treemodelcustom/examplewindow.cc
index 3449ed0..e427102 100644
--- a/examples/others/treemodelcustom/examplewindow.cc
+++ b/examples/others/treemodelcustom/examplewindow.cc
@@ -39,7 +39,8 @@ ExampleWindow::ExampleWindow()
m_ButtonBox.add(m_Button_Quit);
m_ButtonBox.set_margin(5);
- m_ButtonBox.set_layout(Gtk::ButtonBoxStyle::END);
+ m_Button_Quit.set_hexpand(true);
+ m_Button_Quit.set_halign(Gtk::Align::END);
m_Button_Quit.signal_clicked().connect( sigc::mem_fun(*this, &ExampleWindow::on_button_quit) );
//Create the Tree model:
diff --git a/examples/others/treemodelcustom/examplewindow.h b/examples/others/treemodelcustom/examplewindow.h
index 0ccdfa3..57743d1 100644
--- a/examples/others/treemodelcustom/examplewindow.h
+++ b/examples/others/treemodelcustom/examplewindow.h
@@ -1,5 +1,3 @@
-//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-
-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
@@ -40,7 +38,7 @@ protected:
//Our custom tree model:
Glib::RefPtr<ExampleTreeModel> m_refTreeModel;
- Gtk::ButtonBox m_ButtonBox;
+ Gtk::Box m_ButtonBox;
Gtk::Button m_Button_Quit;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]