[gtkmm-documentation/gtkmm-2-24] Update for the removal of ComboBoxEntry.



commit d267259358de473b316c7d3a108d022cdbffe348
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              |   40 ++++++++-----------
 examples/Makefile.am                               |   20 +++++-----
 .../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, 37 insertions(+), 33 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7957459..2cb6950 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2011-03-31  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.
+
+2011-03-31  Murray Cumming  <murrayc murrayc com>
+
 	Fix the build.
 
 	* Makefile.am: Don't mention README.SUN because it was removed.
diff --git a/docs/tutorial/C/gtkmm-tutorial-in.xml b/docs/tutorial/C/gtkmm-tutorial-in.xml
index b975395..44e4f76 100644
--- a/docs/tutorial/C/gtkmm-tutorial-in.xml
+++ b/docs/tutorial/C/gtkmm-tutorial-in.xml
@@ -3409,18 +3409,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>
@@ -3434,9 +3431,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>
@@ -3452,18 +3449,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 &quot;changed&quot; signal. For instance:
 </para>
 <programlisting>m_combo.signal_changed().connect( sigc::mem_fun(*this,
       &amp;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>
@@ -3474,9 +3471,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>
@@ -3487,20 +3484,17 @@ 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>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_entry_text_column()</methodname>. For instance:
-<programlisting>m_combo.set_entry_text_column(m_columns.m_col_name);</programlisting>
+<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>
 When you select a choice from the drop-down menu, the value from this column will be placed in the <classname>Entry</classname>.
@@ -3522,7 +3516,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>
 
@@ -3535,7 +3529,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 d5de20b..810d990 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -24,8 +24,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		\
@@ -214,15 +214,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	\
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]