Ardour  8.7-14-g57a6773833
Gtk::CellLayout Class Reference

#include <celllayout.h>

Inheritance diagram for Gtk::CellLayout:
[legend]

Public Types

typedef sigc::slot< void, const TreeModel::const_iterator & > SlotCellData
 

Public Member Functions

virtual ~CellLayout ()
 
GtkCellLayoutgobj ()
 Provides access to the underlying C GObject. More...
 
const GtkCellLayoutgobj () const
 Provides access to the underlying C GObject. More...
 
template<class ColumnType >
void pack_start (const TreeModelColumn< ColumnType > &model_column, bool expand=true)
 
void pack_start (CellRenderer &cell, bool expand=true)
 
void pack_end (CellRenderer &cell, bool expand=true)
 
Glib::ListHandle< CellRenderer * > get_cells ()
 
Glib::ListHandle< const CellRenderer * > get_cells () const
 
void clear ()
 
void add_attribute (CellRenderer &cell, const Glib::ustring &attribute, int column)
 
void add_attribute (const Glib::PropertyProxy_Base &property, const TreeModelColumnBase &column)
 
void add_attribute (CellRenderer &cell, const Glib::ustring &attribute, const TreeModelColumnBase &column)
 
void set_cell_data_func (CellRenderer &cell, const SlotCellData &slot)
 
void clear_attributes (CellRenderer &cell)
 
void reorder (CellRenderer &cell, int position)
 
template<class T_ModelColumnType >
void pack_start (const TreeModelColumn< T_ModelColumnType > &column, bool expand)
 

Static Public Member Functions

static void add_interface (GType gtype_implementer)
 
static GType get_type () G_GNUC_CONST
 

Protected Member Functions

 CellLayout ()
 
virtual void pack_start_vfunc (CellRenderer *cell, bool expand)
 
virtual void pack_end_vfunc (CellRenderer *cell, bool expand)
 
virtual void clear_vfunc ()
 
virtual void add_attribute_vfunc (CellRenderer *cell, const Glib::ustring &attribute, int column)
 
virtual void clear_attributes_vfunc (CellRenderer *cell)
 
virtual void reorder_vfunc (CellRenderer *cell, int position)
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gtk::CellLayoutwrap (GtkCellLayout *object, bool take_copy=false)
 

Detailed Description

An interface for packing cells. CellLayout is an interface to be implemented by all objects which want to provide a TreeView::Column-like API for packing cells, setting attributes and data funcs.

Definition at line 62 of file celllayout.h.

Member Typedef Documentation

◆ SlotCellData

typedef sigc::slot<void, const TreeModel::const_iterator&> Gtk::CellLayout::SlotCellData

Definition at line 195 of file celllayout.h.

Constructor & Destructor Documentation

◆ CellLayout()

Gtk::CellLayout::CellLayout ( )
protected

You should derive from this class to use it.

◆ ~CellLayout()

virtual Gtk::CellLayout::~CellLayout ( )
virtual

Member Function Documentation

◆ add_attribute() [1/3]

void Gtk::CellLayout::add_attribute ( CellRenderer cell,
const Glib::ustring &  attribute,
const TreeModelColumnBase column 
)

◆ add_attribute() [2/3]

void Gtk::CellLayout::add_attribute ( CellRenderer cell,
const Glib::ustring &  attribute,
int  column 
)

Adds an attribute mapping to the list in cell_layout. The column is the column of the model to get a value from, and the attribute is the parameter on cell to be set from the value. So for example if column 2 of the model contains strings, you could have the "text" attribute of a Gtk::CellRendererText get its values from column 2.

Parameters
cellA Gtk::CellRenderer.
attributeAn attribute on the renderer.
columnThe column position on the model to get the attribute from.

◆ add_attribute() [3/3]

void Gtk::CellLayout::add_attribute ( const Glib::PropertyProxy_Base &  property,
const TreeModelColumnBase column 
)

◆ add_attribute_vfunc()

virtual void Gtk::CellLayout::add_attribute_vfunc ( CellRenderer cell,
const Glib::ustring &  attribute,
int  column 
)
protectedvirtual

◆ add_interface()

static void Gtk::CellLayout::add_interface ( GType  gtype_implementer)
static

◆ clear()

void Gtk::CellLayout::clear ( )

Unsets all the mappings on all renderers on cell_layout and removes all renderers from cell_layout.

◆ clear_attributes()

void Gtk::CellLayout::clear_attributes ( CellRenderer cell)

Clears all existing attributes previously set with set_attributes().

Parameters
cellA Gtk::CellRenderer to clear the attribute mapping on.

◆ clear_attributes_vfunc()

virtual void Gtk::CellLayout::clear_attributes_vfunc ( CellRenderer cell)
protectedvirtual

◆ clear_vfunc()

virtual void Gtk::CellLayout::clear_vfunc ( )
protectedvirtual

◆ get_cells() [1/2]

Glib::ListHandle<CellRenderer*> Gtk::CellLayout::get_cells ( )

Return value: a list of cell renderers.

Returns
A list of cell renderers.

◆ get_cells() [2/2]

Glib::ListHandle<const CellRenderer*> Gtk::CellLayout::get_cells ( ) const

Return value: a list of cell renderers.

Returns
A list of cell renderers.

◆ get_type()

static GType Gtk::CellLayout::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

GtkCellLayout* Gtk::CellLayout::gobj ( )
inline

Provides access to the underlying C GObject.

Definition at line 120 of file celllayout.h.

◆ gobj() [2/2]

const GtkCellLayout* Gtk::CellLayout::gobj ( ) const
inline

Provides access to the underlying C GObject.

Definition at line 123 of file celllayout.h.

◆ pack_end()

void Gtk::CellLayout::pack_end ( CellRenderer cell,
bool  expand = true 
)

Adds the cell to the end of cell_layout. If expand is false, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true.

Note that reusing the same cell renderer is not supported.

Parameters
cellA Gtk::CellRenderer.
expandtrue if cell is to be given extra space allocated to cell_layout.

◆ pack_end_vfunc()

virtual void Gtk::CellLayout::pack_end_vfunc ( CellRenderer cell,
bool  expand 
)
protectedvirtual

◆ pack_start() [1/3]

void Gtk::CellLayout::pack_start ( CellRenderer cell,
bool  expand = true 
)

Packs the cell into the beginning of cell_layout. If expand is false, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true.

Note that reusing the same cell renderer is not supported.

Parameters
cellA Gtk::CellRenderer.
expandtrue if cell is to be given extra space allocated to cell_layout.

◆ pack_start() [2/3]

template<class ColumnType >
void Gtk::CellLayout::pack_start ( const TreeModelColumn< ColumnType > &  model_column,
bool  expand = true 
)
inline

◆ pack_start() [3/3]

template<class T_ModelColumnType >
void Gtk::CellLayout::pack_start ( const TreeModelColumn< T_ModelColumnType > &  column,
bool  expand 
)

Definition at line 247 of file celllayout.h.

◆ pack_start_vfunc()

virtual void Gtk::CellLayout::pack_start_vfunc ( CellRenderer cell,
bool  expand 
)
protectedvirtual

◆ reorder()

void Gtk::CellLayout::reorder ( CellRenderer cell,
int  position 
)

Re-inserts cell at position. Note that cell has already to be packed into cell_layout for this to function properly.

Parameters
cellA Gtk::CellRenderer to reorder.
positionNew position to insert cell at.

◆ reorder_vfunc()

virtual void Gtk::CellLayout::reorder_vfunc ( CellRenderer cell,
int  position 
)
protectedvirtual

◆ set_cell_data_func()

void Gtk::CellLayout::set_cell_data_func ( CellRenderer cell,
const SlotCellData slot 
)

Friends And Related Function Documentation

◆ wrap()

Glib::RefPtr< Gtk::CellLayout > wrap ( GtkCellLayout object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.

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