Wt  3.3.8
Public Member Functions | List of all members
Wt::WTableColumn Class Reference

A table column. More...

#include <Wt/WTableColumn>

Inheritance diagram for Wt::WTableColumn:
Inheritance graph
[legend]

Public Member Functions

 WTableColumn ()
 Creates a new table column. More...
 
 ~WTableColumn ()
 Destructor.
 
WTabletable () const
 Returns the table to which this column belongs. More...
 
WTableCellelementAt (int row)
 Access the column element at the given row. More...
 
int columnNum () const
 Returns the column number of this column in the table. More...
 
void setWidth (const WLength &width)
 Sets the column width. More...
 
WLength width () const
 Returns the column width. More...
 
void setStyleClass (const WString &style)
 Sets the CSS style class for this column. More...
 
const WStringstyleClass () const
 Returns the CSS style class for this column. More...
 
void setId (const std::string &id)
 Sets the CSS Id. More...
 
virtual const std::string id () const
 Returns the (unique) identifier for this object. More...
 
- Public Member Functions inherited from Wt::WObject
 WObject (WObject *parent=0)
 Create a WObject with a given parent object. More...
 
virtual ~WObject ()
 Destructor. More...
 
virtual void setObjectName (const std::string &name)
 Sets an object name. More...
 
virtual std::string objectName () const
 Returns the object name. More...
 
void resetLearnedSlots ()
 Resets learned stateless slot implementations. More...
 
template<class T >
void resetLearnedSlot (void(T::*method)())
 Resets a learned stateless slot implementation. More...
 
template<class T >
WStatelessSlot * implementStateless (void(T::*method)())
 Declares a slot to be stateless and learn client-side behaviour on first invocation. More...
 
template<class T >
WStatelessSlot * implementStateless (void(T::*method)(), void(T::*undoMethod)())
 Declares a slot to be stateless and learn client-side behaviour in advance. More...
 
void isNotStateless ()
 Marks the current function as not stateless. More...
 
template<class T >
WStatelessSlot * implementJavaScript (void(T::*method)(), const std::string &jsCode)
 Provides a JavaScript implementation for a method. More...
 
void addChild (WObject *child)
 Adds a child object. More...
 
virtual void removeChild (WObject *child)
 Removes a child object. More...
 
const std::vector< WObject * > & children () const
 Returns the children.
 
WObjectparent () const
 Returns the parent object.
 

Additional Inherited Members

- Public Types inherited from Wt::WObject
typedef void(WObject::* Method) ()
 Typedef for a WObject method without arguments.
 
- Protected Member Functions inherited from Wt::WObject
virtual WStatelessSlot * getStateless (Method method)
 On-demand stateless slot implementation. More...
 
- Static Protected Member Functions inherited from Wt::WObject
static WObjectsender ()
 Returns the sender of the current slot call. More...
 

Detailed Description

A table column.

A WTableColumn is returned by WTable::columnAt() and managing various properties of a single column in a table (it is however not a widget).

A table column corresponds to the HTML <col> tag.

See also
WTable, WTableRow

Constructor & Destructor Documentation

Wt::WTableColumn::WTableColumn ( )

Creates a new table column.

Table columns must be added to a table using WTable::insertColumn() before you can access contents in it using elementAt().

Member Function Documentation

int Wt::WTableColumn::columnNum ( ) const

Returns the column number of this column in the table.

Returns -1 if the column is not yet part of a table.

See also
WTable::columnAt()
WTableCell * Wt::WTableColumn::elementAt ( int  row)

Access the column element at the given row.

Like WTable::elementAt(), if the row is beyond the current table dimensions, then the table is expanded automatically.

The column must be inserted within a table first.

const std::string Wt::WTableColumn::id ( ) const
virtual

Returns the (unique) identifier for this object.

For a WWidget, this corresponds to the id of the DOM element that represents the widget. This is not entirely unique, since a composite widget shares the same id as its implementation.

By default, the id is auto-generated, unless a custom id is set for a widget using WWidget::setId(). The auto-generated id is created by concatenating objectName() with a unique number.

See also
WWidget::jsRef()

Reimplemented from Wt::WObject.

void Wt::WTableColumn::setId ( const std::string &  id)

Sets the CSS Id.

Sets a custom Id. Note that the Id must be unique across the whole widget tree, can only be set right after construction and cannot be changed.

See also
WObject::id()
void Wt::WTableColumn::setStyleClass ( const WString style)

Sets the CSS style class for this column.

The style is inherited by all table cells in this column.

See also
styleClass(), WWidget::setStyleClass()
void Wt::WTableColumn::setWidth ( const WLength width)

Sets the column width.

The default column width is WLength::Auto.

See also
width(), WWidget::resize()
const WString& Wt::WTableColumn::styleClass ( ) const

Returns the CSS style class for this column.

See also
styleClass(), WWidget::styleClass()
WTable* Wt::WTableColumn::table ( ) const

Returns the table to which this column belongs.

See also
WTable::rowAt()
WLength Wt::WTableColumn::width ( ) const

Returns the column width.

See also
setWidth(const WLength&)

Generated on Mon Sep 4 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11