Ardour  9.0-pre0-582-g084a23a80d
StripableTreeModel Class Reference

#include <stripable_treemodel.h>

Inheritance diagram for StripableTreeModel:
[legend]

Classes

struct  Columns
 
struct  Glue
 

Public Types

typedef Gtk::TreeModelColumn< std::string > StringColumn
 
typedef Gtk::TreeModelColumn< bool > BoolColumn
 
typedef Gtk::TreeModelColumn< uint32_t > UnsignedColumn
 
typedef Gtk::TreeModelColumn< AxisView * > AVColumn
 
typedef Gtk::TreeModelColumn< std::shared_ptr< ARDOUR::Stripable > > StripableColumn
 
- Public Types inherited from Gtk::TreeModel
typedef TreeModelColumnRecord ColumnRecord
 
typedef TreeNodeChildren Children
 
typedef Children::iterator iterator
 
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
 
typedef sigc::slot< bool, const TreeModel::iterator & > SlotForeachIter
 
typedef sigc::slot< bool, const TreeModel::Path & > SlotForeachPath
 
typedef sigc::slot< bool, const TreeModel::Path &, const TreeModel::iterator & > SlotForeachPathAndIter
 

Public Member Functions

void set_session (ARDOUR::Session &)
 
- Public Member Functions inherited from Gtk::TreeModel
virtual ~TreeModel ()
 
GtkTreeModelgobj ()
 Provides access to the underlying C GObject. More...
 
const GtkTreeModelgobj () const
 Provides access to the underlying C GObject. More...
 
iterator get_iter (const Path &path)
 
iterator get_iter (const Glib::ustring &path_string)
 
Children children ()
 This returns an STL-like container API, for iterating over the rows. More...
 
Children children () const
 This returns an STL-like container API, for iterating over the rows. More...
 
void foreach_iter (const SlotForeachIter &slot)
 
void foreach_path (const SlotForeachPath &slot)
 
void foreach (const SlotForeachPathAndIter &slot)
 
TreeModelFlags get_flags () const
 
int get_n_columns () const
 
GType get_column_type (int index) const
 
TreeModel::Path get_path (const iterator &iter) const
 
void row_changed (const Path &path, const iterator &iter)
 
void row_inserted (const Path &path, const iterator &iter)
 
void row_has_child_toggled (const Path &path, const iterator &iter)
 
void row_deleted (const Path &path)
 
void rows_reordered (const Path &path, const iterator &iter, const Glib::ArrayHandle< int > &new_order)
 
void rows_reordered (const Path &path, const Glib::ArrayHandle< int > &new_order)
 
void rows_reordered (const Path &path, const iterator &iter, int *new_order)
 
Glib::ustring get_string (const iterator &iter) const
 
Glib::SignalProxy2< void, const TreeModel::Path &, const TreeModel::iterator & > signal_row_changed ()
 
Glib::SignalProxy2< void, const TreeModel::Path &, const TreeModel::iterator & > signal_row_inserted ()
 
Glib::SignalProxy2< void, const TreeModel::Path &, const TreeModel::iterator & > signal_row_has_child_toggled ()
 
Glib::SignalProxy1< void, const TreeModel::Path & > signal_row_deleted ()
 
Glib::SignalProxy3< void, const TreeModel::Path &, const TreeModel::iterator &, int * > signal_rows_reordered ()
 

Static Public Member Functions

static Glib::RefPtr< StripableTreeModelcreate (AxisViewProvider &)
 
- Static Public Member Functions inherited from Gtk::TreeModel
static void add_interface (GType gtype_implementer)
 
static GType get_type () G_GNUC_CONST
 

Public Attributes

Columns columns
 

Protected Member Functions

 StripableTreeModel (AxisViewProvider &)
 
virtual ~StripableTreeModel ()
 
Gtk::TreeModelFlags get_flags_vfunc () const
 
int get_n_columns_vfunc () const
 
GType get_column_type_vfunc (int index) const
 
void get_value_vfunc (const TreeModel::iterator &iter, int column, Glib::ValueBase &value) const
 
bool iter_next_vfunc (const iterator &iter, iterator &iter_next) const
 
bool iter_children_vfunc (const iterator &parent, iterator &iter) const
 
bool iter_has_child_vfunc (const iterator &iter) const
 
int iter_n_children_vfunc (const iterator &iter) const
 
int iter_n_root_children_vfunc () const
 
bool iter_nth_child_vfunc (const iterator &parent, int n, iterator &iter) const
 
bool iter_nth_root_child_vfunc (int n, iterator &iter) const
 
bool iter_parent_vfunc (const iterator &child, iterator &iter) const
 
Path get_path_vfunc (const iterator &iter) const
 
bool get_iter_vfunc (const Path &path, iterator &iter) const
 
bool iter_is_valid (const iterator &iter) const
 
- Protected Member Functions inherited from Gtk::TreeModel
 TreeModel ()
 
virtual void ref_node_vfunc (const iterator &iter) const
 
virtual void unref_node_vfunc (const iterator &iter) const
 
virtual void get_value_vfunc (const iterator &iter, int column, Glib::ValueBase &value) const
 
virtual void set_value_impl (const iterator &row, int column, const Glib::ValueBase &value)
 
virtual void get_value_impl (const iterator &row, int column, Glib::ValueBase &value) const
 
virtual void on_row_changed (const TreeModel::Path &path, const TreeModel::iterator &iter)
 This is a default handler for the signal signal_row_changed(). More...
 
virtual void on_row_inserted (const TreeModel::Path &path, const TreeModel::iterator &iter)
 This is a default handler for the signal signal_row_inserted(). More...
 
virtual void on_row_has_child_toggled (const TreeModel::Path &path, const TreeModel::iterator &iter)
 This is a default handler for the signal signal_row_has_child_toggled(). More...
 
virtual void on_row_deleted (const TreeModel::Path &path)
 This is a default handler for the signal signal_row_deleted(). More...
 
virtual void on_rows_reordered (const TreeModel::Path &path, const TreeModel::iterator &iter, int *new_order)
 This is a default handler for the signal signal_rows_reordered(). More...
 

Private Types

typedef std::set< Glue * > GlueList
 

Private Member Functions

void text_value (std::shared_ptr< ARDOUR::Stripable > stripable, Glib::ValueBase &value) const
 
void remember_glue_item (Glue *) const
 

Private Attributes

ARDOUR::Session_session
 
AxisViewProvideraxis_view_provider
 
int n_columns
 
GlueList glue_list
 

Additional Inherited Members

Detailed Description

Definition at line 37 of file stripable_treemodel.h.

Member Typedef Documentation

◆ AVColumn

◆ BoolColumn

◆ GlueList

typedef std::set<Glue*> StripableTreeModel::GlueList
private

Definition at line 128 of file stripable_treemodel.h.

◆ StringColumn

Definition at line 65 of file stripable_treemodel.h.

◆ StripableColumn

◆ UnsignedColumn

Constructor & Destructor Documentation

◆ StripableTreeModel()

StripableTreeModel::StripableTreeModel ( AxisViewProvider )
protected

◆ ~StripableTreeModel()

virtual StripableTreeModel::~StripableTreeModel ( )
protectedvirtual

Member Function Documentation

◆ create()

static Glib::RefPtr<StripableTreeModel> StripableTreeModel::create ( AxisViewProvider )
static

◆ get_column_type_vfunc()

GType StripableTreeModel::get_column_type_vfunc ( int  index) const
protectedvirtual

Reimplemented from Gtk::TreeModel.

◆ get_flags_vfunc()

Gtk::TreeModelFlags StripableTreeModel::get_flags_vfunc ( ) const
protectedvirtual

Reimplemented from Gtk::TreeModel.

◆ get_iter_vfunc()

bool StripableTreeModel::get_iter_vfunc ( const Path path,
iterator iter 
) const
protectedvirtual

Override and implement this in a derived TreeModel class. Sets iter to a valid iterator pointing to path

Parameters
pathAn path to a node.
iterAn iterator that will be set to refer to a node to the path, or will be set as invalid.
Returns
true if the operation was possible.

Reimplemented from Gtk::TreeModel.

◆ get_n_columns_vfunc()

int StripableTreeModel::get_n_columns_vfunc ( ) const
protectedvirtual

Reimplemented from Gtk::TreeModel.

◆ get_path_vfunc()

Path StripableTreeModel::get_path_vfunc ( const iterator iter) const
protectedvirtual

Override and implement this in a derived TreeModel class. Returns a Path referenced by iter.

Parameters
iterThe iterator.
Returns
The path.

Reimplemented from Gtk::TreeModel.

◆ get_value_vfunc()

void StripableTreeModel::get_value_vfunc ( const TreeModel::iterator &  iter,
int  column,
Glib::ValueBase &  value 
) const
protected

◆ iter_children_vfunc()

bool StripableTreeModel::iter_children_vfunc ( const iterator parent,
iterator iter 
) const
protectedvirtual

Override and implement this in a derived TreeModel class. Sets iter to refer to the first child of parent. If parent has no children, false is returned and iter is set to be invalid.

Parameters
parentAn iterator.
iterAn iterator that will be set to refer to the firt child node, or will be set as invalid.
Returns
true if the operation was possible.

Reimplemented from Gtk::TreeModel.

◆ iter_has_child_vfunc()

bool StripableTreeModel::iter_has_child_vfunc ( const iterator iter) const
protectedvirtual

Override and implement this in a derived TreeModel class. Returns true if iter has children, false otherwise.

Parameters
iterThe iterator to test for children.
Returns
true if iter has children.

Reimplemented from Gtk::TreeModel.

◆ iter_is_valid()

bool StripableTreeModel::iter_is_valid ( const iterator iter) const
protectedvirtual

Override and implement this in a derived TreeModel class.

Note
This virtual method is not recommended. To check whether an iterator is valid, call TreeStore::iter_is_valid(), ListStore::iter_is_valid() or TreeModelSort::iter_is_valid() directly instead. Because these methods are intended to be used only for debugging and/or testing purposes, it doesn't make sense to provide an abstract interface to them.
Returns
true if the iterator is valid.

Reimplemented from Gtk::TreeModel.

◆ iter_n_children_vfunc()

int StripableTreeModel::iter_n_children_vfunc ( const iterator iter) const
protectedvirtual

Override and implement this in a derived TreeModel class. Returns the number of children that iter has. See also iter_n_root_children_vfunc().

Parameters
iterThe iterator to test for children.
Returns
The number of children of iter.

Reimplemented from Gtk::TreeModel.

◆ iter_n_root_children_vfunc()

int StripableTreeModel::iter_n_root_children_vfunc ( ) const
protectedvirtual

Override and implement this in a derived TreeModel class. Returns the number of toplevel nodes. See also iter_n_children().

Returns
The number of children at the root level.

Reimplemented from Gtk::TreeModel.

◆ iter_next_vfunc()

bool StripableTreeModel::iter_next_vfunc ( const iterator iter,
iterator iter_next 
) const
protectedvirtual

Override and implement this in a derived TreeModel class. Sets iter_next to refer to the node following iter it at the current level. If there is no next iter, false is returned and iter_next is set to be invalid.

Parameters
iterAn iterator.
iter_nextAn iterator that will be set to refer to the next node, or will be set as invalid.
Returns
true if the operation was possible.

Reimplemented from Gtk::TreeModel.

◆ iter_nth_child_vfunc()

bool StripableTreeModel::iter_nth_child_vfunc ( const iterator parent,
int  n,
iterator iter 
) const
protectedvirtual

Override and implement this in a derived TreeModel class. Sets iter to be the child of parent using the given index. The first index is 0. If n is too big, or parent has no children, iter is set to an invalid iterator and false is returned. See also iter_nth_root_child_vfunc()

Parameters
parentAn iterator.
nThe index of the child node to which iter should be set.
iterAn iterator that will be set to refer to the nth node, or will be set as invalid.
Returns
true if the operation was possible.

Reimplemented from Gtk::TreeModel.

◆ iter_nth_root_child_vfunc()

bool StripableTreeModel::iter_nth_root_child_vfunc ( int  n,
iterator iter 
) const
protectedvirtual

Override and implement this in a derived TreeModel class. Sets iter to be the child of at the root level using the given index. The first index is 0. If n is too big, or if there are no children, iter is set to an invalid iterator and false is returned. See also iter_nth_child_vfunc().

Parameters
nThe index of the child node to which iter should be set.
iterAn iterator that will be set to refer to the nth node, or will be set as invalid.
Returns
true if the operation was possible.

Reimplemented from Gtk::TreeModel.

◆ iter_parent_vfunc()

bool StripableTreeModel::iter_parent_vfunc ( const iterator child,
iterator iter 
) const
protectedvirtual

Override and implement this in a derived TreeModel class. Sets iter to be the parent of child. If child is at the toplevel, and doesn't have a parent, then iter is set to an invalid iterator and false is returned.

Parameters
childAn iterator.
iterAn iterator that will be set to refer to the parent node, or will be set as invalid.
Returns
true if the operation was possible.

Reimplemented from Gtk::TreeModel.

◆ remember_glue_item()

void StripableTreeModel::remember_glue_item ( Glue ) const
private

◆ set_session()

void StripableTreeModel::set_session ( ARDOUR::Session )

◆ text_value()

void StripableTreeModel::text_value ( std::shared_ptr< ARDOUR::Stripable stripable,
Glib::ValueBase &  value 
) const
private

Member Data Documentation

◆ _session

ARDOUR::Session* StripableTreeModel::_session
private

Definition at line 114 of file stripable_treemodel.h.

◆ axis_view_provider

AxisViewProvider& StripableTreeModel::axis_view_provider
private

Definition at line 115 of file stripable_treemodel.h.

◆ columns

Columns StripableTreeModel::columns

Definition at line 111 of file stripable_treemodel.h.

◆ glue_list

GlueList StripableTreeModel::glue_list
mutableprivate

Definition at line 129 of file stripable_treemodel.h.

◆ n_columns

int StripableTreeModel::n_columns
private

Definition at line 117 of file stripable_treemodel.h.


The documentation for this class was generated from the following file: