[gtkmm-documentation] Update for the removal of ComboBoxEntry.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation] Update for the removal of ComboBoxEntry.
- Date: Mon, 18 Oct 2010 11:27:16 +0000 (UTC)
commit 127ad5f829d825161cd1fdc0b74d31ea242cd7f9
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Oct 18 12:53:09 2010 +0200
Update for the removal of ComboBoxEntry.
* examples/Makefile.am:
* examples/book/comboboxentry/: Move these text/ and complex/ examples to
* examples/book/combobox/entry_text/entry_text/ and entry_complex.
* docs/tutorial/C/gtkmm-tutorial-in.xml: Combo Boxes: Update the examples
paths and change the ComboBoxEntry section to a has-entry section.
ChangeLog | 10 +++++
docs/tutorial/C/gtkmm-tutorial-in.xml | 37 ++++++++-----------
examples/Makefile.am | 24 ++++++------
.../entry_complex}/examplewindow.cc | 0
.../entry_complex}/examplewindow.h | 0
.../complex => combobox/entry_complex}/main.cc | 0
.../text => combobox/entry_text}/examplewindow.cc | 0
.../text => combobox/entry_text}/examplewindow.h | 0
.../text => combobox/entry_text}/main.cc | 0
9 files changed, 38 insertions(+), 33 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9774239..2662601 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2010-10-18 Murray Cumming <murrayc murrayc com>
+ Update for the removal of ComboBoxEntry.
+
+ * examples/Makefile.am:
+ * examples/book/comboboxentry/: Move these text/ and complex/ examples to
+ * examples/book/combobox/entry_text/entry_text/ and entry_complex.
+ * docs/tutorial/C/gtkmm-tutorial-in.xml: Combo Boxes: Update the examples
+ paths and change the ComboBoxEntry section to a has-entry section.
+
+2010-10-18 Murray Cumming <murrayc murrayc com>
+
Fix the build with latest gtkmm.
* examples/book/comboboxentry/complex/examplewindow.[h|cc]:
diff --git a/docs/tutorial/C/gtkmm-tutorial-in.xml b/docs/tutorial/C/gtkmm-tutorial-in.xml
index 8558e55..2e8f7b0 100644
--- a/docs/tutorial/C/gtkmm-tutorial-in.xml
+++ b/docs/tutorial/C/gtkmm-tutorial-in.xml
@@ -3398,18 +3398,15 @@ section.
<chapter id="chapter-combobox">
<title>Combo Boxes</title>
-<para>The <classname>ComboBox</classname> and <classname>ComboBoxEntry</classname> widgets offers a list (or tree) of choices in a dropdown menu. If appropriate, they can show extra information about each item, such as text, a picture, a checkbox, or a progress bar. The <classname>ComboBox</classname> widget restricts the user to the available choices, but the <classname>ComboBoxEntry</classname> contains an <classname>Entry</classname>, allowing the user to enter arbitrary text if the none of the available choices are suitable.
+<para>The <classname>ComboBox</classname> widgets offers a list (or tree) of choices in a dropdown menu. If appropriate, it can show extra information about each item, such as text, a picture, a checkbox, or a progress bar. The <classname>ComboBox</classname> widget usually restricts the user to the available choices, but it can optionally have an <classname>Entry</classname>, allowing the user to enter arbitrary text if the none of the available choices are suitable.
</para>
-<para>For both widgets, the list is provided via a <classname>TreeModel</classname>, and columns from this model are added to the ComboBox's view with the <methodname>ComboBox::pack_start()</methodname>. This provides a great deal of flexibility and compile-time type-safety, but the <classname>ComboBoxText</classname> and <classname>ComboBoxEntryText</classname> classes provide a simple text-based specialisation in case that flexibility is not required.
+<para>The list is provided via a <classname>TreeModel</classname>, and columns from this model are added to the ComboBox's view with the <methodname>ComboBox::pack_start()</methodname> method. This provides flexibility and compile-time type-safety, but the <classname>ComboBoxText</classname> class provides a simpler text-based specialization in case that flexibility is not required.
</para>
-<sect1 id="sec-combobox">
-<title>ComboBox</title>
-
<para><ulink url="&url_refdocs_base_gtk;ComboBox.html">Reference</ulink></para>
-<sect2 id="sec-combobox-model">
+<sect1 id="sec-combobox-model">
<title>The model</title>
<para>The model for a ComboBox can be defined and filled exactly as for a <classname>TreeView</classname>. For instance, you might derive a ComboBox class with one integer and one text columns, like so:
</para>
@@ -3423,9 +3420,9 @@ section.
ModelColumns m_columns;</programlisting>
<para>After appending rows to this model, you should provide the model to the <classname>ComboBox</classname> with the <methodname>set_model()</methodname> method. Then use the <methodname>pack_start()</methodname> or <methodname>pack_end()</methodname> methods to specify what methods will be displayed in the ComboBox. As with the TreeView you may either use the default cell renderer by passing the <classname>TreeModelColumn</classname> to the pack methods, or you may instantiate a specific <classname>CellRenderer</classname> and specify a particular mapping with either <methodname>add_attribute()</methodname> or <methodname>set_cell_data_func()</methodname>. Note that these methods are in the <classname>CellLayout</classname> base class.</para>
-</sect2>
+</sect1>
-<sect2 id="sec-combobox-get">
+<sect1 id="sec-combobox-get">
<title>The chosen item</title>
<para>To discover what item, if any, the user has chosen from the ComboBox, call <methodname>ComboBox::get_active()</methodname>. This returns a <classname>TreeModel::iterator</classname> that you can dereference to a <classname>Row</classname> in order to read the values in your columns. For instance, you might read an integer ID value from the model, even though you have chosen only to show the human-readable description in the Combo. For instance:
</para>
@@ -3441,18 +3438,18 @@ if(iter)
}
else
set_nothing_chosen(); //Your own function.</programlisting>
-</sect2>
+</sect1>
-<sect2 id="sec-combobox-changes">
+<sect1 id="sec-combobox-changes">
<title>Responding to changes</title>
<para>
You might need to react to every change of selection in the ComboBox, for instance to update other widgets. To do so, you should handle the "changed" signal. For instance:
</para>
<programlisting>m_combo.signal_changed().connect( sigc::mem_fun(*this,
&ExampleWindow::on_combo_changed) );</programlisting>
-</sect2>
+</sect1>
-<sect2 id="combobox-example-full"><title>Full Example</title>
+<sect1 id="combobox-example-full"><title>Full Example</title>
<figure id="figure-combobox-complex">
<title>ComboBox</title>
@@ -3463,9 +3460,9 @@ You might need to react to every change of selection in the ComboBox, for instan
<para><ulink url="&url_examples_base;combobox/complex">Source Code</ulink></para>
-</sect2>
+</sect1>
-<sect2 id="combobox-example-simple"><title>Simple Text Example</title>
+<sect1 id="combobox-example-simple"><title>Simple Text Example</title>
<figure id="figure-combobox-text">
<title>ComboBox</title>
@@ -3476,18 +3473,16 @@ You might need to react to every change of selection in the ComboBox, for instan
<para><ulink url="&url_examples_base;combobox/text">Source Code</ulink></para>
-</sect2>
-
</sect1>
<sect1 id="sec-comboboxentry">
-<title>ComboBoxEntry</title>
+<title>ComboBox with an Entry</title>
-<para><ulink url="&url_refdocs_base_gtk;ComboBoxEntry.html">Reference</ulink></para>
+<para>A <classname>ComboBox</classname> may contain an <classname>Entry</classname> widget for entering of arbitrary text, by specify true for the constructor's <literal>has_entry</literal> parameter.</para>
<sect2 id="sec-comboboxentry-text-column">
<title>The text column</title>
-<para>Unlike a regular <classname>ComboBox</classname>, a <classname>ComboBoxEntry</classname> contains a <classname>Entry</classname> widget for entering of arbitrary text. So that this Entry can interact with the drop-down list of choices, you must specify which of your model columns are the text column, with <methodname>set_text_column()</methodname>. For instance:
+<para>So that the Entry can interact with the drop-down list of choices, you must specify which of your model columns are the text column, with <methodname>set_text_column()</methodname>. For instance:
<programlisting>m_combo.set_text_column(m_columns.m_col_name);</programlisting>
</para>
<para>
@@ -3510,7 +3505,7 @@ When you select a choice from the drop-down menu, the value from this column wil
</screenshot>
</figure>
-<para><ulink url="&url_examples_base;comboboxentry/complex">Source Code</ulink></para>
+<para><ulink url="&url_examples_base;combobox/entry_complex">Source Code</ulink></para>
</sect2>
@@ -3523,7 +3518,7 @@ When you select a choice from the drop-down menu, the value from this column wil
</screenshot>
</figure>
-<para><ulink url="&url_examples_base;comboboxentry/text">Source Code</ulink></para>
+<para><ulink url="&url_examples_base;combobox/entry_text">Source Code</ulink></para>
</sect2>
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 5aa6eed..c3c5b08 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -23,8 +23,8 @@ check_PROGRAMS = \
book/clipboard/simple/example \
book/combobox/complex/example \
book/combobox/text/example \
- book/comboboxentry/complex/example \
- book/comboboxentry/text/example \
+ book/combobox/entry_complex/example \
+ book/combobox/entry_text/example \
book/custom/custom_container/example \
book/custom/custom_widget/example \
book/dialogs/aboutdialog/example \
@@ -212,15 +212,15 @@ book_combobox_text_example_SOURCES = \
book/combobox/text/examplewindow.h \
book/combobox/text/main.cc
-book_comboboxentry_complex_example_SOURCES = \
- book/comboboxentry/complex/examplewindow.cc \
- book/comboboxentry/complex/examplewindow.h \
- book/comboboxentry/complex/main.cc
+book_combobox_entry_complex_example_SOURCES = \
+ book/combobox/entry_complex/examplewindow.cc \
+ book/combobox/entry_complex/examplewindow.h \
+ book/combobox/entry_complex/main.cc
-book_comboboxentry_text_example_SOURCES = \
- book/comboboxentry/text/examplewindow.cc \
- book/comboboxentry/text/examplewindow.h \
- book/comboboxentry/text/main.cc
+book_combobox_entry_text_example_SOURCES = \
+ book/combobox/entry_text/examplewindow.cc \
+ book/combobox/entry_text/examplewindow.h \
+ book/combobox/entry_text/main.cc
book_custom_custom_container_example_SOURCES = \
book/custom/custom_container/examplewindow.cc \
@@ -613,8 +613,8 @@ others_dnd_testdnd_SOURCES = \
others_exception_exceptiontest_SOURCES = \
others/exception/exceptiontest.cc
-others_gdk_radar_SOURCES = \
- others/gdk/radar.cc
+#others_gdk_radar_SOURCES = \
+# others/gdk/radar.cc
others_idle_idle_SOURCES = \
others/idle/idle.cc
diff --git a/examples/book/comboboxentry/complex/examplewindow.cc b/examples/book/combobox/entry_complex/examplewindow.cc
similarity index 100%
rename from examples/book/comboboxentry/complex/examplewindow.cc
rename to examples/book/combobox/entry_complex/examplewindow.cc
diff --git a/examples/book/comboboxentry/complex/examplewindow.h b/examples/book/combobox/entry_complex/examplewindow.h
similarity index 100%
rename from examples/book/comboboxentry/complex/examplewindow.h
rename to examples/book/combobox/entry_complex/examplewindow.h
diff --git a/examples/book/comboboxentry/complex/main.cc b/examples/book/combobox/entry_complex/main.cc
similarity index 100%
rename from examples/book/comboboxentry/complex/main.cc
rename to examples/book/combobox/entry_complex/main.cc
diff --git a/examples/book/comboboxentry/text/examplewindow.cc b/examples/book/combobox/entry_text/examplewindow.cc
similarity index 100%
rename from examples/book/comboboxentry/text/examplewindow.cc
rename to examples/book/combobox/entry_text/examplewindow.cc
diff --git a/examples/book/comboboxentry/text/examplewindow.h b/examples/book/combobox/entry_text/examplewindow.h
similarity index 100%
rename from examples/book/comboboxentry/text/examplewindow.h
rename to examples/book/combobox/entry_text/examplewindow.h
diff --git a/examples/book/comboboxentry/text/main.cc b/examples/book/combobox/entry_text/main.cc
similarity index 100%
rename from examples/book/comboboxentry/text/main.cc
rename to examples/book/combobox/entry_text/main.cc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]