GTK+ IOStream  Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
SelectionColumn Class Reference

#include <Selection.H>

Inheritance diagram for SelectionColumn:
Inheritance graph
[legend]
Collaboration diagram for SelectionColumn:
Collaboration graph
[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)
 Set the justification of the text column contents Justify the text renderer contents with respect to the edges of the column. More...
 
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.

Definition at line 37 of file Selection.H.

Constructor & Destructor Documentation

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 45 of file Selection.H.

virtual SelectionColumn::~SelectionColumn ( void  )
inlinevirtual

destructor

Definition at line 54 of file Selection.H.

Member Function Documentation

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

Set the justification of the text column contents Justify the text renderer contents with respect to the edges of the column.

Parameters
justificationThe justification 0.0 for left and 1.0 for right, (0.5 center).Set the justification of the text column contents Justify the text renderer contents with respect to the edges of the column.
justificationThe justification PangoAlignment = {PANGO_ALIGN_LEFT, PANGO_ALIGN_CENTER, PANGO_ALIGN_RIGHT}; Add a renderer to the column Defaults with middle alignment.
nameis the text identification of the renderer to be added to the column.
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

Definition at line 116 of file Selection.H.

GtkTreeViewColumn* SelectionColumn::getColumn ( void  )
inline
Get the GtkTreeViewColumn *
Returns
the underlying GtkTreeViewColumn *

Definition at line 159 of file Selection.H.

int SelectionColumn::getNumber ( void  )
inline
Get the column number
Returns
the column number

Definition at line 166 of file Selection.H.

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 188 of file Selection.H.

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 144 of file Selection.H.

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 152 of file Selection.H.

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 74 of file Selection.H.

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
sz,thesizing style {GTK_TREE_VIEW_COLUMN_GROW_ONLY, GTK_TREE_VIEW_COLUMN_AUTOSIZE, GTK_TREE_VIEW_COLUMN_FIXED}

Definition at line 180 of file Selection.H.

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 65 of file Selection.H.

Member Data Documentation

GtkTreeViewColumn* SelectionColumn::column
private

Definition at line 38 of file Selection.H.

int SelectionColumn::number
private

The number of this column.

Definition at line 39 of file Selection.H.


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