gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
SelectionColumn Class Reference

#include <Selection.H>

Inheritance diagram for SelectionColumn:
[legend]
Collaboration diagram for SelectionColumn:
[legend]

Public Member Functions

 SelectionColumn (const char *title, int number_)
 
virtual ~SelectionColumn (void)
 
void setTitleAlignment (float align)
 Set the alignment of the column title in the header Sets the alignment of the column heading to 0.0 for left and 1.0 for right, (0.5 center). More...
 
void setAlignment (float xAlign, float yAlign)
 Set the alignment of the column contents Sets the alignment of the column contents - applies to all renderers. More...
 
SelectionColumnadd (string *name, GType whichType, GtkCellRenderer *renderer, int source, gboolean expand=true)
 
SelectionColumnoperator<< (pair< string *, GtkCellRendererText *> detail)
 
SelectionColumnoperator<< (pair< string *, GtkCellRendererPixbuf *> detail)
 
GtkTreeViewColumn * getColumn (void)
 
int getNumber (void)
 
void setSizing (GtkTreeViewColumnSizing sz)
 
GtkTreeViewColumnSizing getSizing (void)
 

Private Attributes

GtkTreeViewColumn * column
 
int number
 The number of this column. More...
 

Additional Inherited Members

Detailed Description

Column setup for a Selection Inherits from a LinkList of paired name and type. This allows each column to handle many renderers, with string and type identifiers Column title and contents default to center justification.

Examples:
SelectionTest2.C, and SelectionTest3.C.

Definition at line 40 of file Selection.H.

Constructor & Destructor Documentation

◆ SelectionColumn()

SelectionColumn::SelectionColumn ( const char *  title,
int  number_ 
)
inline

Create an empty column with a title

Parameters
titleThe title to show for this column
number_The column number to use, starting from 0

Definition at line 48 of file Selection.H.

◆ ~SelectionColumn()

virtual SelectionColumn::~SelectionColumn ( void  )
inlinevirtual

destructor

Definition at line 57 of file Selection.H.

Member Function Documentation

◆ add()

SelectionColumn& SelectionColumn::add ( string *  name,
GType  whichType,
GtkCellRenderer *  renderer,
int  source,
gboolean  expand = true 
)
inline

Add a renderer to the column. Defaults with middle alignment.

Parameters
nameis the text identification of the renderer to be added to the column.
whichTypeThe GType of the column which is to be added.
rendereris the GtkCellRenderer * to be use for rendering the item to the column
sourceis the column which contains the source data to be rendered in this column. This number may be a different column to the current column, if the source is the other column.
expandwhether the expand within the column during render
Returns
a reference to this class.

Definition at line 121 of file Selection.H.

◆ getColumn()

GtkTreeViewColumn* SelectionColumn::getColumn ( void  )
inline

Get the GtkTreeViewColumn *

Returns
the underlying GtkTreeViewColumn *

Definition at line 164 of file Selection.H.

◆ getNumber()

int SelectionColumn::getNumber ( void  )
inline

Get the column number.

Returns
the column number

Definition at line 171 of file Selection.H.

◆ getSizing()

GtkTreeViewColumnSizing SelectionColumn::getSizing ( void  )
inline

Get the way the columns are sizing.

See also
setSizing
Returns
The way in which the columns are sized, GtkTreeViewColumnSizing type

Definition at line 193 of file Selection.H.

◆ operator<<() [1/2]

SelectionColumn& SelectionColumn::operator<< ( pair< string *, GtkCellRendererText *>  detail)
inline

Add a renderer to the column. This operator uses this column as the source, and doesn't expand during render

Parameters
detailget<0>(detail) is the name, get<1>(detail) is the renderer, get<2>(detail) is the source, get<3>(detail) is the expansion Add a renderer to the column. This operator uses this column as the source, and doesn't expand during render
detailget<0>(detail) is the name, get<1>(detail) is the renderer, get<2>(detail) is the source Add a text renderer to the column. This operator uses this column as the source, and doesn't expand during render
detailpair.first is the name, pair.second is the renderer

Definition at line 149 of file Selection.H.

◆ operator<<() [2/2]

SelectionColumn& SelectionColumn::operator<< ( pair< string *, GtkCellRendererPixbuf *>  detail)
inline

Add a GdkPixbuf renderer to the column. This operator uses this column as the source, and doesn't expand during render

Parameters
detailpair.first is the name, pair.second is the renderer

Definition at line 157 of file Selection.H.

◆ setAlignment()

void SelectionColumn::setAlignment ( float  xAlign,
float  yAlign 
)
inline

Set the alignment of the column contents Sets the alignment of the column contents - applies to all renderers.

Parameters
xAlignThe x alignment 0.0 for left and 1.0 for right, (0.5 center).
yAlignThe y alignment 0.0 for left and 1.0 for right, (0.5 center).

Definition at line 77 of file Selection.H.

◆ setSizing()

void SelectionColumn::setSizing ( GtkTreeViewColumnSizing  sz)
inline

Set the way the column changes size/

GTK_TREE_VIEW_COLUMN_GROW_ONLY Columns only get bigger in reaction to changes in the model
GTK_TREE_VIEW_COLUMN_AUTOSIZE Columns resize to be the optimal size everytime the model changes.
GTK_TREE_VIEW_COLUMN_FIXED Columns are a fixed numbers of pixels wide.
Parameters
szthe sizing style {GTK_TREE_VIEW_COLUMN_GROW_ONLY, GTK_TREE_VIEW_COLUMN_AUTOSIZE, GTK_TREE_VIEW_COLUMN_FIXED}

Definition at line 185 of file Selection.H.

◆ setTitleAlignment()

void SelectionColumn::setTitleAlignment ( float  align)
inline

Set the alignment of the column title in the header Sets the alignment of the column heading to 0.0 for left and 1.0 for right, (0.5 center).

Definition at line 68 of file Selection.H.

Member Data Documentation

◆ column

GtkTreeViewColumn* SelectionColumn::column
private

Definition at line 41 of file Selection.H.

◆ number

int SelectionColumn::number
private

The number of this column.

Definition at line 42 of file Selection.H.


The documentation for this class was generated from the following file:
gtkIOStream: SelectionColumn Class Reference
GTK+ IOStream  Beta