/* Copyright (C) 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
_DEFS(gtkmm,gtk)
#include
#include
namespace Gtk
{
/** Typedefed as Gtk::TreeModel::RowReference.
* This reference will keep pointing to
* the node pointed to by the Path, so long as it exists. It listens to all
* signals emitted by the Model, and updates its Path appropriately.
* @ingroup TreeView
*/
class GTKMM_API TreeRowReference
{
_CLASS_BOXEDTYPE(TreeRowReference, GtkTreeRowReference, NONE, gtk_tree_row_reference_copy, gtk_tree_row_reference_free, GTKMM_API)
_IGNORE(gtk_tree_row_reference_new, gtk_tree_row_reference_copy, gtk_tree_row_reference_free)
public:
TreeRowReference(const Glib::RefPtr& model, const TreeModel::Path& path);
_DEPRECATE_IFDEF_START
/** This typedef is just to make it more obvious that
* our operator const void* should be used like operator bool().
*
* @deprecated Use the explicit operator bool() instead.
*/
typedef const void* BoolExpr;
/** The same as is_valid().
* For instance,
* @code
* if(treerowreference)
* do_something()
* @endcode
*
* @deprecated Use the explicit operator bool() instead.
*/
operator BoolExpr() const;
_DEPRECATE_IFDEF_END
/** The same as is_valid().
* For instance,
* @code
* if(treerowreference)
* do_something()
* @endcode
*
* @newin{3,22}
*/
explicit operator bool() const;
_WRAP_METHOD(TreeModel::Path get_path() const, gtk_tree_row_reference_get_path)
_WRAP_METHOD(Glib::RefPtr get_model(), gtk_tree_row_reference_get_model, refreturn)
_WRAP_METHOD(Glib::RefPtr get_model() const, gtk_tree_row_reference_get_model, refreturn, constversion)
_WRAP_METHOD(bool is_valid() const, gtk_tree_row_reference_valid)
};
} // namespace Gtk