[gtkmm/gtkmm-2-22] More rearranging of includes for the undef in gdkmm/region.hg.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gtkmm-2-22] More rearranging of includes for the undef in gdkmm/region.hg.
- Date: Wed, 14 Jul 2010 08:37:17 +0000 (UTC)
commit 334cdeed2de588e06ec174efcb5f3cf5992ad423
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Jul 14 09:55:54 2010 +0200
More rearranging of includes for the undef in gdkmm/region.hg.
* gtk/gtkmm/menu_elems.[h|cc]:
* gtk/gtkmm/stock.[h|cc]:
* gtk/src/bin.[hg|ccg]:
* gtk/src/iconinfo.[hg|ccg]:
* gtk/src/liststore.hg:
* gtk/src/main.hg:
* gtk/src/stockitem.hg:
* gtk/src/tooltips.ccg:
* gtk/src/treedragsource.hg:
* gtk/src/treemodel.[hg|ccg]:
* gtk/src/treemodelfilter.[hg|ccg]:
* gtk/src/treemodelsort.hg:
* gtk/src/treepath.hg:
* gtk/src/treerowreference.hg:
* gtk/src/treeselection.hg:
* gtk/src/treestore.hg: Include treepath.h before others, such as
treemodel.h, so that gdkmm/region is (indirectly) included before the
others, so that is the first include of gdk/gdk.h, so our undef is used.
ChangeLog | 23 +++++++++++++++++++++++
gtk/gtkmm/menu_elems.cc | 11 +++++------
gtk/gtkmm/menu_elems.h | 6 +++---
gtk/gtkmm/stock.cc | 2 --
gtk/gtkmm/stock.h | 9 ++++-----
gtk/src/bin.ccg | 2 +-
gtk/src/bin.hg | 7 +++++++
gtk/src/iconinfo.ccg | 11 +++++------
gtk/src/iconinfo.hg | 5 ++---
gtk/src/liststore.hg | 11 +++++------
gtk/src/main.hg | 7 +++++++
gtk/src/stockitem.hg | 3 +--
gtk/src/tooltips.ccg | 4 +---
gtk/src/treedragsource.hg | 7 +++----
gtk/src/treemodel.ccg | 18 ++++++++----------
gtk/src/treemodel.hg | 34 +++++++++++++++++++---------------
gtk/src/treemodelfilter.ccg | 5 +----
gtk/src/treemodelfilter.hg | 16 ++++++++--------
gtk/src/treemodelsort.hg | 11 ++++++-----
gtk/src/treepath.hg | 15 +++++++--------
gtk/src/treerowreference.hg | 4 +---
gtk/src/treeselection.hg | 13 ++++++-------
gtk/src/treestore.hg | 10 +++++-----
23 files changed, 128 insertions(+), 106 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b073ba5..3663d43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2010-07-14 Murray Cumming <murrayc murrayc com>
+
+ More rearranging of includes for the undef in gdkmm/region.hg.
+
+ * gtk/gtkmm/menu_elems.[h|cc]:
+ * gtk/gtkmm/stock.[h|cc]:
+ * gtk/src/bin.[hg|ccg]:
+ * gtk/src/iconinfo.[hg|ccg]:
+ * gtk/src/liststore.hg:
+ * gtk/src/main.hg:
+ * gtk/src/stockitem.hg:
+ * gtk/src/tooltips.ccg:
+ * gtk/src/treedragsource.hg:
+ * gtk/src/treemodel.[hg|ccg]:
+ * gtk/src/treemodelfilter.[hg|ccg]:
+ * gtk/src/treemodelsort.hg:
+ * gtk/src/treepath.hg:
+ * gtk/src/treerowreference.hg:
+ * gtk/src/treeselection.hg:
+ * gtk/src/treestore.hg: Include treepath.h before others, such as
+ treemodel.h, so that gdkmm/region is (indirectly) included before the
+ others, so that is the first include of gdk/gdk.h, so our undef is used.
+
2010-07-13 Murray Cumming <murrayc murrayc com>
Yet more rearranging of includes for the undef in box.hg
diff --git a/gtk/gtkmm/menu_elems.cc b/gtk/gtkmm/menu_elems.cc
index b5fbc7f..7fd8083 100644
--- a/gtk/gtkmm/menu_elems.cc
+++ b/gtk/gtkmm/menu_elems.cc
@@ -1,7 +1,7 @@
// -*- c++ -*-
/* $Id$ */
-/*
+/*
*
* Copyright 1998-2002 The gtkmm Development Team
*
@@ -20,10 +20,10 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gtk/gtk.h>
-
#include <gtkmm/menu_elems.h>
#include <gtkmm/label.h>
+#include <gtk/gtk.h>
+
#ifndef GLIBMM_WIN32
#include <strings.h>
@@ -70,7 +70,7 @@ MenuElem::MenuElem(MenuItem& child)
: Element(child)
{}
-MenuElem::MenuElem(const Glib::ustring& label,
+MenuElem::MenuElem(const Glib::ustring& label,
const CallSlot& slot)
{
set_child( manage(new MenuItem(label, true)) );
@@ -97,7 +97,7 @@ MenuElem::MenuElem(const Glib::ustring& label, Menu& submenu)
child_->show();
}
-MenuElem::MenuElem(const Glib::ustring& label,
+MenuElem::MenuElem(const Glib::ustring& label,
const AccelKey& accel_key,
Gtk::Menu& submenu)
{
@@ -283,4 +283,3 @@ TearoffMenuElem::TearoffMenuElem(const AccelKey& accel_key,
} /* namespace Menu_Helpers */
} /* namespace Gtk */
-
diff --git a/gtk/gtkmm/menu_elems.h b/gtk/gtkmm/menu_elems.h
index cd0cb44..3efa9fe 100644
--- a/gtk/gtkmm/menu_elems.h
+++ b/gtk/gtkmm/menu_elems.h
@@ -2,7 +2,7 @@
#ifndef _GTKMM_MENU_ELEMS_H
#define _GTKMM_MENU_ELEMS_H
/* menu_elems.h
- *
+ *
* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -20,8 +20,6 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gdk/gdkkeysyms.h>
-
#include <gtkmm/container.h>
#include <gtkmm/menuitem.h>
#include <gtkmm/imagemenuitem.h>
@@ -31,6 +29,8 @@
#include <gtkmm/separatormenuitem.h>
#include <gtkmm/accelgroup.h>
#include <gtkmm/accelkey.h>
+#include <gdk/gdkkeysyms.h>
+
namespace Gtk
{
diff --git a/gtk/gtkmm/stock.cc b/gtk/gtkmm/stock.cc
index 2ab73f1..45c39ae 100644
--- a/gtk/gtkmm/stock.cc
+++ b/gtk/gtkmm/stock.cc
@@ -19,7 +19,6 @@
*/
#include <gtkmm/stock.h>
-#include <gtkmm/stockitem.h>
#include <gtk/gtk.h>
// Get rid of macro DELETE (from winnt.h). We have some macro
@@ -171,4 +170,3 @@ Glib::SListHandle<Gtk::StockID,Gtk::StockID_Traits> get_ids()
} // namespace Stock
} // namespace Gtk
-
diff --git a/gtk/gtkmm/stock.h b/gtk/gtkmm/stock.h
index 51842f6..d6e3c58 100644
--- a/gtk/gtkmm/stock.h
+++ b/gtk/gtkmm/stock.h
@@ -21,9 +21,9 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <gtkmm/iconset.h>
#include <gtkmm/stockitem.h>
#include <gtkmm/stockid.h>
-#include <gtkmm/iconset.h>
#include <gtkmm/image.h>
/* Shadow DELETE macro (from winnt.h).
@@ -183,8 +183,8 @@ extern GTKMM_API const Gtk::BuiltinStockID ZOOM_OUT; /*!< @image html gt
/** Add a stock item to the list of registered stock items.
* @param item StockItem to register.
- *
- * If an item already exists with the same stock ID the old item gets replaced.
+ *
+ * If an item already exists with the same stock ID the old item gets replaced.
*/
void add(const Gtk::StockItem& item);
@@ -210,7 +210,7 @@ bool lookup(const Gtk::StockID& stock_id, Gtk::IconSet& iconset);
* @param image: Image to fill.
*
* @return <tt>true</tt> if the item was found - <tt>false</tt> otherwise
- */
+ */
bool lookup(const Gtk::StockID& stock_id, Gtk::IconSize size, Gtk::Image& image);
/** Retrieves a list of all known stock IDs added to an IconFactory or registered with Stock::add().
@@ -225,4 +225,3 @@ Glib::SListHandle<Gtk::StockID,Gtk::StockID_Traits> get_ids();
#endif /* _GTKMM_STOCK_H */
-
diff --git a/gtk/src/bin.ccg b/gtk/src/bin.ccg
index d625863..7ca1a73 100644
--- a/gtk/src/bin.ccg
+++ b/gtk/src/bin.ccg
@@ -20,9 +20,9 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <gtkmm/box.h>
#include <gtkmm/adjustment.h>
#include <gtkmm/label.h>
-#include <gtkmm/box.h>
#include <gtkmm/image.h>
#include <gtk/gtk.h>
diff --git a/gtk/src/bin.hg b/gtk/src/bin.hg
index 185b740..b41dc4a 100644
--- a/gtk/src/bin.hg
+++ b/gtk/src/bin.hg
@@ -23,6 +23,13 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/container_p.h)
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Include this before the other headers, such as container.h,
+//so that the undef is used.
+#include <gtkmm/box.h>
+#m4 _POP()
+
+
namespace Gtk
{
diff --git a/gtk/src/iconinfo.ccg b/gtk/src/iconinfo.ccg
index e89352c..1fbae90 100644
--- a/gtk/src/iconinfo.ccg
+++ b/gtk/src/iconinfo.ccg
@@ -15,9 +15,9 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gtk/gtk.h>
#include <gtkmm/icontheme.h>
-
+#include <gtk/gtk.h>
+
namespace Gtk
{
@@ -34,9 +34,9 @@ bool IconInfo::get_attach_points(Glib::ArrayHandle<Gdk::Point>& /* points */) co
if(c_attach_points)
{
- //TODO: We can't use = with an ArrayHandle.
+ //TODO: We can't use = with an ArrayHandle.
//Investigate whether the bool return value has a special meaning - maybe we can just return an empty ArrayHandle.
- //points = Glib::ArrayHandle<Gdk::Point>(reinterpret_cast<Gdk::Point*>(c_attach_points), (size_t)n_points, Glib::OWNERSHIP_SHALLOW); //We use OWNERSHIP_SHALLOW because we just need to g_free() the array and nothing more.
+ //points = Glib::ArrayHandle<Gdk::Point>(reinterpret_cast<Gdk::Point*>(c_attach_points), (size_t)n_points, Glib::OWNERSHIP_SHALLOW); //We use OWNERSHIP_SHALLOW because we just need to g_free() the array and nothing more.
}
return result;
}
@@ -52,7 +52,6 @@ IconInfo::operator bool() const
{
return gobj() != 0;
}
-
-} // namespace Gtk
+} // namespace Gtk
diff --git a/gtk/src/iconinfo.hg b/gtk/src/iconinfo.hg
index e2667ea..7a2744b 100644
--- a/gtk/src/iconinfo.hg
+++ b/gtk/src/iconinfo.hg
@@ -15,12 +15,12 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gdkmm/rectangle.h>
#include <gdkmm/pixbuf.h>
+#include <gdkmm/rectangle.h>
#include <gdkmm/types.h>
//#include <gtk/gtkicontheme.h>
-
+
_DEFS(gtkmm,gtk)
namespace Gtk
@@ -57,4 +57,3 @@ public:
};
} // namespace Gtk
-
diff --git a/gtk/src/liststore.hg b/gtk/src/liststore.hg
index a4aa3e6..957601e 100644
--- a/gtk/src/liststore.hg
+++ b/gtk/src/liststore.hg
@@ -17,10 +17,10 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <gtkmm/treedragdest.h>
#include <gtkmm/treeiter.h>
#include <gtkmm/treemodel.h>
#include <gtkmm/treesortable.h>
-#include <gtkmm/treedragdest.h>
#include <gtkmm/treedragsource.h>
// We couldn't include it in treemodel.h, but doing it here makes it easier for people.
#include <gtkmm/treepath.h>
@@ -63,7 +63,7 @@ protected:
* constructor should only be used by derived classes.
*/
_CTOR_DEFAULT
-
+
explicit ListStore(const TreeModelColumnRecord& columns);
public:
@@ -76,7 +76,7 @@ public:
void set_column_types(const TreeModelColumnRecord& columns);
_IGNORE(gtk_list_store_set_column_types)
-
+
/** Removes the given row from the list store.
* @param iter The iterator to the row to be removed.
* @result An iterator to the next row, or end() if there is none.
@@ -91,7 +91,7 @@ public:
* See also prepend() and append().
*
* @param iter An iterator to the row before which the new row will be inserted.
- * @result An iterator to the new row.
+ * @result An iterator to the new row.
*/
iterator insert(const iterator& iter);
_IGNORE(gtk_list_store_insert_before)
@@ -107,7 +107,7 @@ public:
*/
iterator insert_after(const iterator& iter);
_IGNORE(gtk_list_store_insert_after)
-
+
/** Creates a new row at the start.
* The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value().
* See also insert() and append().
@@ -147,4 +147,3 @@ protected:
};
} // namespace Gtk
-
diff --git a/gtk/src/main.hg b/gtk/src/main.hg
index c9f4269..a677356 100644
--- a/gtk/src/main.hg
+++ b/gtk/src/main.hg
@@ -26,6 +26,13 @@
_DEFS(gtkmm,gtk)
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Include this before the other headers, such as main.h,
+//so that the undef is used.
+#include <gtkmm/window.h>
+#m4 _POP()
+
+
#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C"
{
diff --git a/gtk/src/stockitem.hg b/gtk/src/stockitem.hg
index 3bd99da..227a589 100644
--- a/gtk/src/stockitem.hg
+++ b/gtk/src/stockitem.hg
@@ -17,8 +17,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gdkmm/types.h>
#include <gtkmm/stockid.h>
+#include <gdkmm/types.h>
_DEFS(gtkmm,gtk)
@@ -51,4 +51,3 @@ public:
};
} // namespace Gtk
-
diff --git a/gtk/src/tooltips.ccg b/gtk/src/tooltips.ccg
index 4f24128..6e2dc91 100644
--- a/gtk/src/tooltips.ccg
+++ b/gtk/src/tooltips.ccg
@@ -18,10 +18,9 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gtk/gtk.h>
#include <gdkmm/color.h>
#include <gtkmm/widget.h>
-
+#include <gtk/gtk.h>
namespace Gtk
{
@@ -37,4 +36,3 @@ void Tooltips::unset_tip(Gtk::Widget& widget)
}
} // namespace Gtk
-
diff --git a/gtk/src/treedragsource.hg b/gtk/src/treedragsource.hg
index 3663c44..89e42ea 100644
--- a/gtk/src/treedragsource.hg
+++ b/gtk/src/treedragsource.hg
@@ -18,8 +18,8 @@
*/
#include <glibmm/interface.h>
-#include <gtkmm/treemodel.h>
#include <gtkmm/selectiondata.h>
+#include <gtkmm/treemodel.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/interface_p.h)
@@ -46,7 +46,7 @@ public:
_WRAP_METHOD(bool row_draggable(const TreeModel::Path& path) const, gtk_tree_drag_source_row_draggable)
_WRAP_METHOD(bool drag_data_get(const TreeModel::Path& path, SelectionData& selection_data), gtk_tree_drag_source_drag_data_get)
-
+
_WRAP_METHOD(bool drag_data_delete(const TreeModel::Path& path), gtk_tree_drag_source_drag_data_delete)
protected:
@@ -64,9 +64,8 @@ dnl// We want to hand-code these C vfunc callbacks,
//We hand-code this so that we can use a temporary instance for the SelectionData& output parameter:
virtual bool drag_data_get_vfunc(const TreeModel::Path& path, SelectionData& selection_data) const;
-
+
_WRAP_VFUNC(bool drag_data_delete(const TreeModel::Path& path), drag_data_delete)
};
} // namespace Gtk
-
diff --git a/gtk/src/treemodel.ccg b/gtk/src/treemodel.ccg
index dfdaf6c..ebfd47e 100644
--- a/gtk/src/treemodel.ccg
+++ b/gtk/src/treemodel.ccg
@@ -18,9 +18,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gtkmm/treeiter.h>
#include <gtkmm/treepath.h>
-#include <gtk/gtk.h>
+
namespace
{
@@ -106,7 +105,7 @@ TreeModel::Children TreeModel::children()
}
TreeModel::Children TreeModel::children() const
-{
+{
//TODO: Remove the const when we have a real const TreeNodeChildren, when we have a real const_iterator.
return TreeNodeChildren(const_cast<TreeModel*>(this));
}
@@ -147,7 +146,7 @@ bool TreeModel::iter_is_valid(const iterator& iter) const
//This method is overriden in TreeStore and ListStore.
//This implementation will only be used as a default for custom derived TreeModels,
//and when we wrap a C GtkTreeModel with a Gtk::TreeModel instance, without knowing what derived C type it is.
-
+
// This check is almost the same as the private VALID_ITER() macro in gtkliststore.c and
// gtktreestore.c.
return (!iter.is_end_ && iter.gobj()->stamp != 0);
@@ -207,7 +206,7 @@ gboolean TreeModel_Class::iter_next_vfunc_callback(GtkTreeModel* self, GtkTreeIt
bool TreeModel::iter_next_vfunc(const iterator& iter, iterator& iter_next) const
{
//Call the default C implementation:
-
+
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
@@ -317,7 +316,7 @@ gboolean TreeModel_Class::iter_children_vfunc_callback(GtkTreeModel* self, GtkTr
}
else
{
- //Normal case:
+ //Normal case:
Gtk::TreeModel::iterator parent_cpp(self, parent);
test = obj->iter_children_vfunc(parent_cpp, iter_out);
}
@@ -325,7 +324,7 @@ gboolean TreeModel_Class::iter_children_vfunc_callback(GtkTreeModel* self, GtkTr
//Copy the new iter value to the C output parameter:
if(test)
*iter = *(iter_out.gobj());
-
+
return test;
}
catch(...)
@@ -522,7 +521,7 @@ bool TreeModel::iter_nth_root_child_vfunc(int n, iterator& iter) const
if(base && base->iter_nth_child)
{
//This means that iter_nth_child(0) might be called by iter_children_vfunc_callback(),
- //but hopefully that's exactly the same thing. TODO: Ask why both vfuncs exist. murrayc.
+ //but hopefully that's exactly the same thing. TODO: Ask why both vfuncs exist. murrayc.
return (*base->iter_nth_child)( const_cast<GtkTreeModel*>(gobj()), iter.gobj(), 0 /* the null parent */, n );
}
@@ -607,7 +606,7 @@ void TreeModel::rows_reordered(const Path& path, const iterator& iter, const Gli
//The size of the array seems to be based on the known number of children. murrayc.
gtk_tree_model_rows_reordered(gobj(), const_cast<GtkTreePath*>((path).gobj()), const_cast<GtkTreeIter*>((iter).gobj()), const_cast<int*>(new_order.data()));
}
-
+
void TreeModel::rows_reordered(const Path& path, const Glib::ArrayHandle<int>& new_order)
{
//The size of the array seems to be based on the known number of children. murrayc.
@@ -615,4 +614,3 @@ void TreeModel::rows_reordered(const Path& path, const Glib::ArrayHandle<int>& n
}
} // namespace Gtk
-
diff --git a/gtk/src/treemodel.hg b/gtk/src/treemodel.hg
index 947f82f..378b6aa 100644
--- a/gtk/src/treemodel.hg
+++ b/gtk/src/treemodel.hg
@@ -17,14 +17,19 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-//#include <gtk/gtk.h>
#include <glibmm/interface.h>
#include <gtkmm/treeiter.h>
-#include <gtkmm/treemodelcolumn.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/interface_p.h)
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//Include this before the other headers, such as treeiter.h,
+//so that the undef in GdkRegion is used.
+#include <gtkmm/treepath.h>
+#m4 _POP()
+
+
namespace Gtk
{
@@ -83,7 +88,7 @@ class TreeModel : public Glib::Interface
_CLASS_INTERFACE(TreeModel, GtkTreeModel, GTK_TREE_MODEL, GtkTreeModelIface)
_IGNORE(
gtk_tree_model_iter_parent, gtk_tree_model_get_iter, gtk_tree_model_get,
- gtk_tree_model_get_iter_from_string, gtk_tree_model_get_string_from_iter,
+ gtk_tree_model_get_iter_from_string, gtk_tree_model_get_string_from_iter,
gtk_tree_model_iter_nth_child,
gtk_tree_model_ref_node, gtk_tree_model_get_valist,
gtk_tree_model_iter_next, gtk_tree_model_iter_has_child,
@@ -99,11 +104,11 @@ public:
typedef Children::reverse_iterator reverse_iterator;
typedef Children::const_iterator const_iterator;
typedef Children::const_reverse_iterator const_reverse_iterator;
-
+
typedef TreeRow Row;
typedef TreePath Path;
typedef TreeRowReference RowReference;
-
+
//These are part of GtkTreeModelFilter or GtkTreeModelSort, not GtkTreeModel:
_IGNORE(gtk_tree_model_filter_new, gtk_tree_model_sort_new_with_model, gtk_tree_model_filter_sort_new_with_model)
@@ -180,7 +185,7 @@ public:
_WRAP_METHOD(int get_n_columns() const, gtk_tree_model_get_n_columns)
_WRAP_METHOD(GType get_column_type(int index) const, gtk_tree_model_get_column_type)
//TODO: A C++-type version of get_column_type()?
-
+
_WRAP_METHOD(TreeModel::Path get_path(const iterator& iter) const, gtk_tree_model_get_path)
_WRAP_METHOD(void row_changed(const Path& path, const iterator& iter), gtk_tree_model_row_changed)
@@ -189,7 +194,7 @@ public:
_WRAP_METHOD(void row_deleted(const Path& path), gtk_tree_model_row_deleted)
/** Emits the "rows_reordered" signal on the tree model. This should be called by
- * custom models when their rows have been reordered.
+ * custom models when their rows have been reordered.
*
* @param path A tree path pointing to the tree node whose children have been reordered.
* @param iter A valid iterator pointing to the node whose children have been reordered. See also, rows_reordered(const Path& path, const Glib::ArrayHandle<int>& new_order), if the path has a depth of 0.
@@ -199,7 +204,7 @@ public:
void rows_reordered(const Path& path, const iterator& iter, const Glib::ArrayHandle<int>& new_order);
/** Emits the "rows_reordered" signal on the tree model. This should be called by
- * custom models when their rows have been reordered. This method overload is for nodes whose
+ * custom models when their rows have been reordered. This method overload is for nodes whose
* path has a depth of 0.
* @newin{2,10}
*
@@ -208,7 +213,7 @@ public:
* to its old position before the re-ordering, i.e. @a new_order<literal>[newpos] = oldpos.
*/
void rows_reordered(const Path& path, const Glib::ArrayHandle<int>& new_order);
-
+
_WRAP_METHOD(void rows_reordered(const Path& path, const iterator& iter, int* new_order), gtk_tree_model_rows_reordered)
_WRAP_METHOD(Glib::ustring get_string(const iterator& iter) const, gtk_tree_model_get_string_from_iter)
@@ -256,7 +261,7 @@ protected:
* @result true if the operation was possible.
*/
virtual bool iter_children_vfunc(const iterator& parent, iterator& iter) const;
-
+
/** Override and implement this in a derived TreeModel class.
* Sets @a iter to be the parent of @a child. If @a child is at the toplevel, and
* doesn't have a parent, then @a iter is set to an invalid iterator and false
@@ -293,8 +298,8 @@ protected:
*/
virtual bool iter_nth_root_child_vfunc(int n, iterator& iter) const;
-
-
+
+
#m4begin
dnl// We want to hand-code these C vfunc callbacks,
dnl// so that we can do forward them to C++ methods with different parameters and return types.
@@ -326,7 +331,7 @@ dnl
/** Override and implement this in a derived TreeModel class.
* Returns the number of children that @a iter has.
- * See also iter_n_root_children_vfunc().
+ * See also iter_n_root_children_vfunc().
*
* @param iter The iterator to test for children.
* @result The number of children of @a iter.
@@ -405,7 +410,7 @@ dnl
//Called by TreeRow, which is a friend class:
//The comment about set_row_changed() in the documentation is based on my reading of the source of
- //gtk_list_store_set_value() and gtk_tree_store_set_value().
+ //gtk_list_store_set_value() and gtk_tree_store_set_value().
/** Override and implement this in a derived TreeModel class, so that Row::operator() and
* Row::set_value() work.
* You can probably just implement this by calling set_value_vfunc().
@@ -422,4 +427,3 @@ dnl
};
} // namespace Gtk
-
diff --git a/gtk/src/treemodelfilter.ccg b/gtk/src/treemodelfilter.ccg
index 74f24ee..42550b6 100644
--- a/gtk/src/treemodelfilter.ccg
+++ b/gtk/src/treemodelfilter.ccg
@@ -18,8 +18,6 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gtk/gtk.h>
-
static gboolean SignalProxy_Visible_gtk_callback(GtkTreeModel* model, GtkTreeIter* iter, gpointer data)
{
@@ -54,7 +52,7 @@ static void SignalProxy_Modify_gtk_callback(GtkTreeModel* model, GtkTreeIter* it
Glib::ValueBase cppValue;
GType column_type = gtk_tree_model_get_column_type(model, column);
cppValue.init(column_type);
-
+
(*the_slot)( Gtk::TreeModel::const_iterator(model, iter), cppValue, column );
//GTK+ has already done this for us: g_value_init(value, column_type);
@@ -149,4 +147,3 @@ void TreeModelFilter::set_value_impl(const iterator& /* row */, int /* column */
} // namespace Gtk
-
diff --git a/gtk/src/treemodelfilter.hg b/gtk/src/treemodelfilter.hg
index 7f90d09..d70572a 100644
--- a/gtk/src/treemodelfilter.hg
+++ b/gtk/src/treemodelfilter.hg
@@ -17,20 +17,21 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gtkmm/treeiter.h>
-#include <gtkmm/treemodel.h>
// We couldn't include it in treemodel.h, but doing it here makes it easier for people.
#include <gtkmm/treepath.h>
+#include <gtkmm/treeiter.h>
+#include <gtkmm/treemodel.h>
+
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
namespace Gtk
{
-/**
+/**
* @ingroup TreeView
- *
+ *
*/
class TreeModelFilter :
public Glib::Object,
@@ -63,7 +64,7 @@ public:
/** For instance,
* bool on_visible(const TreeModel::const_iterator& iter);
* This should return true if the given row should be visible and false otherwise.
- */
+ */
typedef sigc::slot<bool, const TreeModel::const_iterator&> SlotVisible;
/** Sets the "visible" callback used when filtering the filter.
@@ -86,7 +87,7 @@ public:
*/
typedef sigc::slot<void, const Gtk::TreeModel::iterator& /* iter */, Glib::ValueBase& /* value */, int /* column */> SlotModify;
- /** Specify columns that will be provided by this model, and a callback that will provide data for these
+ /** Specify columns that will be provided by this model, and a callback that will provide data for these
* columns based on data in the columns of the child model.
* The modify function will get called for each data access.
*
@@ -95,7 +96,7 @@ public:
*/
void set_modify_func(const TreeModelColumnRecord& columns, const SlotModify& slot);
_IGNORE(gtk_tree_model_filter_set_modify_func)
-
+
_WRAP_METHOD(void set_visible_column(const TreeModelColumnBase& column), gtk_tree_model_filter_set_visible_column)
_WRAP_METHOD(void set_visible_column(int column), gtk_tree_model_filter_set_visible_column)
@@ -132,4 +133,3 @@ protected:
};
} // namespace Gtk
-
diff --git a/gtk/src/treemodelsort.hg b/gtk/src/treemodelsort.hg
index 2f76454..dc9124c 100644
--- a/gtk/src/treemodelsort.hg
+++ b/gtk/src/treemodelsort.hg
@@ -20,11 +20,13 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
+// We couldn't include it in treemodel.h, but doing it here makes it easier for people.
+#include <gtkmm/treepath.h>
+
#include <gtkmm/treeiter.h>
#include <gtkmm/treemodel.h>
#include <gtkmm/treesortable.h>
-// We couldn't include it in treemodel.h, but doing it here makes it easier for people.
-#include <gtkmm/treepath.h>
+
namespace Gtk
@@ -32,13 +34,13 @@ namespace Gtk
/** A wrapper which makes an underlying Gtk::TreeModel sortable.
*
- * The TreeModelSort is a model which implements the TreeSortable interface.
+ * The TreeModelSort is a model which implements the TreeSortable interface.
* It does not hold any data itself, but rather is created with
* a child model and proxies its data. It has identical column types to
* this child model, and the changes in the child are propagated. The
* primary purpose of this model is to provide a way to sort a different
* model without modifying it. Note that the sort function used by
- * TreeModelSort is not guaranteed to be stable.
+ * TreeModelSort is not guaranteed to be stable.
*
* For instance, you might create two TreeView widgets each with a
* view of the same data. If the model is wrapped by a
@@ -92,4 +94,3 @@ protected:
};
} // namespace Gtk
-
diff --git a/gtk/src/treepath.hg b/gtk/src/treepath.hg
index 8bf6154..493389c 100644
--- a/gtk/src/treepath.hg
+++ b/gtk/src/treepath.hg
@@ -23,8 +23,8 @@ _CONFIGINCLUDE(gtkmmconfig.h)
_DEFS(gtkmm,gtk)
-#include <gtkmm/treemodel.h>
#include <gtkmm/selectiondata.h>
+#include <gtkmm/treemodel.h>
namespace Gtk
{
@@ -135,13 +135,13 @@ public:
_WRAP_METHOD(void append_index(int index), gtk_tree_path_append_index, deprecated "replaced by push_back()")
_WRAP_METHOD(void prepend_index(int index), gtk_tree_path_prepend_index, deprecated "replaced by push_front().")
_WRAP_METHOD(int get_depth() const, gtk_tree_path_get_depth, deprecated "replaced by size().")
-
+
_DEPRECATE_IFDEF_START
/// @deprecated replaced by begin(), end(), and operator[]
Glib::ArrayHandle<int> get_indices() const;
_DEPRECATE_IFDEF_END
_IGNORE(gtk_tree_path_get_depth)
-
+
/**
* Obtains a Gtk::TreeModel and Gtk::TreeModel::Path from selection data of target type
* "GTK_TREE_MODEL_ROW". Normally called from a drag_data_received handler.
@@ -150,7 +150,7 @@ _DEPRECATE_IFDEF_END
* is being passed around. If you aren't in the same process, then you'll
* get memory corruption. In the Gtk::TreeDragDest drag_data_received signal handler,
* you can assume that selection data of type "GTK_TREE_MODEL_ROW" is
- * from the current process.
+ * from the current process.
*
* @param selection_data a #SelectionData
* @param model a Gtk::TreeModel
@@ -161,7 +161,7 @@ _DEPRECATE_IFDEF_END
**/
static bool get_from_selection_data(const SelectionData& selection_data, Glib::RefPtr<TreeModel>& model, TreePath& path);
//TODO: Add an override that takes a const TreeModel (and deprecate the current version).
-
+
/// See description in the other overload.
static bool get_from_selection_data(const SelectionData& selection_data, TreePath& path);
@@ -216,14 +216,13 @@ struct TreePath_Traits
{ return item; }
static CppType to_cpp_type(CType item)
- { return CppType(const_cast<CTypeNonConst>(item)); }
+ { return CppType(const_cast<CTypeNonConst>(item)); }
static void release_c_type(CType item)
- { gtk_tree_path_free(const_cast<CTypeNonConst>(item)); }
+ { gtk_tree_path_free(const_cast<CTypeNonConst>(item)); }
};
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
} // namespace Gtk
-
diff --git a/gtk/src/treerowreference.hg b/gtk/src/treerowreference.hg
index d42cf39..9b0d2f5 100644
--- a/gtk/src/treerowreference.hg
+++ b/gtk/src/treerowreference.hg
@@ -19,9 +19,8 @@
_DEFS(gtkmm,gtk)
-#include <gtkmm/treemodel.h>
#include <gtkmm/treepath.h>
-
+#include <gtkmm/treemodel.h>
namespace Gtk
{
@@ -51,4 +50,3 @@ public:
};
} // namespace Gtk
-
diff --git a/gtk/src/treeselection.hg b/gtk/src/treeselection.hg
index a95a33c..5fb3283 100644
--- a/gtk/src/treeselection.hg
+++ b/gtk/src/treeselection.hg
@@ -18,10 +18,10 @@
*/
+#include <gtkmm/treepath.h>
#include <gtkmm/enums.h>
#include <gtkmm/treemodel.h>
#include <gtkmm/treeiter.h>
-#include <gtkmm/treepath.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
@@ -60,10 +60,10 @@ class TreePath;
class TreeSelection : public Glib::Object
{
_CLASS_GOBJECT(TreeSelection, GtkTreeSelection, GTK_TREE_SELECTION, Glib::Object, GObject)
- _IGNORE(gtk_tree_selection_get_selected,
+ _IGNORE(gtk_tree_selection_get_selected,
gtk_tree_selection_get_selected_rows, gtk_tree_selection_count_selected_rows)
protected:
-
+
public:
_WRAP_METHOD(void set_mode(SelectionMode type), gtk_tree_selection_set_mode)
@@ -98,7 +98,7 @@ public:
Glib::RefPtr<const TreeModel> get_model() const; // convenience function, not in GTK+
//TODO: Add TreeModel::const_iterator get_selected() const, when we have a real const_iterator.
-
+
/** Get the currently selected row.
* @return The currently selected row.
* @note
@@ -200,12 +200,11 @@ public:
_WRAP_METHOD(bool is_selected(const TreeModel::Path& path) const, gtk_tree_selection_path_is_selected)
_WRAP_METHOD(bool is_selected(const TreeModel::iterator& iter) const, gtk_tree_selection_iter_is_selected)
-
+
_WRAP_METHOD(void select_all(), gtk_tree_selection_select_all)
_WRAP_METHOD(void unselect_all(), gtk_tree_selection_unselect_all)
-
+
_WRAP_SIGNAL(void changed(), "changed")
};
} // namespace Gtk
-
diff --git a/gtk/src/treestore.hg b/gtk/src/treestore.hg
index 8b76356..17d149d 100644
--- a/gtk/src/treestore.hg
+++ b/gtk/src/treestore.hg
@@ -17,13 +17,14 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+// We couldn't include it in treemodel.h, but doing it here makes it easier for people.
+#include <gtkmm/treepath.h>
+
#include <gtkmm/treeiter.h>
#include <gtkmm/treemodel.h>
#include <gtkmm/treesortable.h>
#include <gtkmm/treedragdest.h>
#include <gtkmm/treedragsource.h>
-// We couldn't include it in treemodel.h, but doing it here makes it easier for people.
-#include <gtkmm/treepath.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
@@ -58,7 +59,7 @@ protected:
* constructor should only be used by derived classes.
*/
_CTOR_DEFAULT
-
+
explicit TreeStore(const TreeModelColumnRecord& columns);
public:
@@ -133,7 +134,7 @@ public:
*
* @param node The list of the parent row's children, as returned by Gtk::TreeModel::iterator::children().
* @result An iterator to the new row.
- */
+ */
iterator append(const TreeNodeChildren& node);
_WRAP_METHOD(void iter_swap(const iterator& a, const iterator& b), gtk_tree_store_swap)
@@ -163,4 +164,3 @@ protected:
};
} // namespace Gtk
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]