logo top
Main Page   Widgets   Namespaces   Book  

Gtk::CellLayout Class Reference

Inheritance diagram for Gtk::CellLayout:

Inheritance graph
[legend]
List of all members.

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.


Public Types

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

Public Member Functions

void add_attribute (CellRenderer& cell, const Glib::ustring& attribute, const TreeModelColumnBase& column)
void add_attribute (CellRenderer& cell, const Glib::ustring& attribute, int column)
 Adds an attribute mapping to the list in cell_layout .
void clear ()
 Unsets all the mappings on all renderers on cell_layout and removes all renderers from cell_layout .
void clear_attributes (CellRenderer& cell)
 Clears all existing attributes previously set with set_attributes().
const GtkCellLayout* gobj () const
 Provides access to the underlying C GObject.
GtkCellLayout* gobj ()
 Provides access to the underlying C GObject.
void pack_end (CellRenderer& cell, bool expand=true)
 Adds the cell to the end of cell_layout .
void pack_start (CellRenderer& cell, bool expand=true)
 Packs the cell into the beginning of cell_layout .
template<class ColumnType>
void pack_start (const TreeModelColumn<ColumnType>& model_column, bool expand=true)
void reorder (CellRenderer& cell, int position)
 Re-inserts cell at position .
void set_cell_data_func (CellRenderer& cell, const SlotCellData& slot)
virtual ~CellLayout ()

Static Public Member Functions

static void add_interface (GType gtype_implementer)

Related Functions

(Note that these are not member functions.)

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


Member Typedef Documentation

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


Constructor & Destructor Documentation

virtual Gtk::CellLayout::~CellLayout (  )  [virtual]


Member Function Documentation

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

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:
cell A Gtk::CellRenderer.
attribute An attribute on the renderer.
column The column position on the model to get the attribute from.

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

void Gtk::CellLayout::clear (  ) 

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

Reimplemented in Gtk::ComboBoxEntryText, and Gtk::ComboBoxText.

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

Clears all existing attributes previously set with set_attributes().

Parameters:
cell A Gtk::CellRenderer to clear the attribute mapping on.

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

Provides access to the underlying C GObject.

Reimplemented in Gtk::CellView, Gtk::ComboBox, and Gtk::ComboBoxEntry.

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

Provides access to the underlying C GObject.

Reimplemented in Gtk::CellView, Gtk::ComboBox, and Gtk::ComboBoxEntry.

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.

Parameters:
cell A Gtk::CellRenderer.
expand true if cell is to be given extra space allocated to cell_layout .

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.

Parameters:
cell A Gtk::CellRenderer.
expand true if cell is to be given extra space allocated to cell_layout .

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

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:
cell A Gtk::CellRenderer to reorder.
position New position to insert cell at.

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


Friends And Related Function Documentation

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

Parameters:
object The C instance

Parameters:
take_copy False 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:
Generated for gtkmm 2.4 by Doxygen 1.5.1 © 1997-2001