[gtkmm] Gtk::Assistant: Add child properties and a ctor with use_header_bar
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::Assistant: Add child properties and a ctor with use_header_bar
- Date: Sun, 5 Mar 2017 14:53:05 +0000 (UTC)
commit 6362307fd61a8babb0895f0413427938ea706083
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Sun Mar 5 15:47:03 2017 +0100
Gtk::Assistant: Add child properties and a ctor with use_header_bar
property_use_header_bar() is construct-only. It should be possible to set
it in a constructor. A similar constructor was added to Gtk::Dialog as a
result of bug 738513.
gtk/src/assistant.ccg | 8 ++++++++
gtk/src/assistant.hg | 17 ++++++++++++++---
2 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/gtk/src/assistant.ccg b/gtk/src/assistant.ccg
index 4bd2172..d7802f8 100644
--- a/gtk/src/assistant.ccg
+++ b/gtk/src/assistant.ccg
@@ -44,6 +44,14 @@ static void SignalProxy_SlotForwardPage_gtk_callback_destroy(void* data)
namespace Gtk
{
+// use-header-bar is construct-only. It must be set in the constructor,
+// if you don't want the default value.
+Assistant::Assistant(bool use_header_bar)
+:
+ _CONSTRUCT("use-header-bar", static_cast<int>(use_header_bar))
+{
+}
+
void Assistant::set_forward_page_func(const SlotForwardPage& slot)
{
// Create a copy of the slot object. A pointer to this will be passed
diff --git a/gtk/src/assistant.hg b/gtk/src/assistant.hg
index 2373bea..3642cb1 100644
--- a/gtk/src/assistant.hg
+++ b/gtk/src/assistant.hg
@@ -29,7 +29,7 @@ _WRAP_ENUM(AssistantPageType, GtkAssistantPageType)
/** A widget used to guide users through multi-step operations.
*
- * A Gtk::Assistant is a widget used to represent a generally complex
+ * A %Gtk::Assistant is a widget used to represent a generally complex
* operation split into several steps, guiding the user through its
* pages and controlling the page flow to collect the necessary data.
*
@@ -43,6 +43,15 @@ class Assistant : public Window
public:
_CTOR_DEFAULT()
+ /** Constructor.
+ *
+ * @param use_header_bar <tt>true</tt> if the assistant shall use a HeaderBar
+ * for action buttons instead of the action-area.
+ *
+ * @newin{3,90}
+ */
+ explicit Assistant(bool use_header_bar);
+
_WRAP_METHOD(void next_page(), gtk_assistant_next_page)
_WRAP_METHOD(void previous_page(), gtk_assistant_previous_page)
@@ -86,8 +95,10 @@ public:
_WRAP_PROPERTY("use-header-bar", bool)
- //There are no normal properties.
- //TODO: Child properties?
+ _WRAP_CHILD_PROPERTY("page-type", AssistantPageType, newin "3,90")
+ _WRAP_CHILD_PROPERTY("title", Glib::ustring, newin "3,90")
+ _WRAP_CHILD_PROPERTY("complete", bool, newin "3,90")
+ _WRAP_CHILD_PROPERTY("has-padding", bool, newin "3,90")
};
} // namespace Gtk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]