NovaTK::TableView Class Reference

Inheritance diagram for NovaTK::TableView:
Collaboration diagram for NovaTK::TableView:

List of all members.

Detailed Description

Presents a table or many tables in a scrollable view. It has two modes. OneTable is used when this TableView is meant to present just one continuous table. Sections is used when presenting multiple tables which are each their own section of a larger table of information. Each table will be containined in a Section widget with a caption.
If the mode is OneTable, the table is created when the TableView is created with the member function, Create(). A pointer to that table may be obtained with GetTable(0). However. If the mode is Sections, tables will only be created by InsertTable().

Public Member Functions

NOVATKAPI TableView (enum TblViewMode view_mode)
virtual NOVATKAPI void AllowColumnDrag (bool state)
virtual NOVATKAPI NStatus Create (Window *parent, int c_x, int c_y, int c_width, int c_height)
virtual NOVATKAPI void Destroy ()
virtual NOVATKAPI TableGetTable (uint table_num)
virtual NOVATKAPI TableInsertTable (const NString &name)
virtual NOVATKAPI bool IsHeaderShown () const
virtual NOVATKAPI void Resize (uint r_width, uint r_height)
virtual NOVATKAPI NStatus SetColumnName (uint col, const NString &name)
virtual NOVATKAPI void ShowHeader (bool state)

Constructor & Destructor Documentation

NovaTK::TableView::TableView ( enum TblViewMode  view_mode  ) 

Initializes the TableView as well as specifies the mode of the TableView with view_mode. If the mode is OneTable then the table will be created when Create is called, otherwise tables are created using InsertTable.

Member Function Documentation

void NovaTK::TableView::AllowColumnDrag ( bool  state  )  [virtual]

If state is TRUE then the user will be allowed to resize columns by dragging their borders in the header. Otherwise columns can only be resized by the application.

NStatus NovaTK::TableView::Create ( Window parent,
int  c_x,
int  c_y,
int  c_width,
int  c_height 
) [virtual]

This function is used by all widgets for initialization and to specify essential parameters. Each widget will reimplement this function but a few will have different parameters as needed(Such as Label). Most other member functions of all widgets cannot be called before calling this one except generally functions that specify attributes that must be known before creation of the widget.

parent Specifies the parent window.
c_x Specifies the location of the window's top-left corner along the X-axis relative to its parent.
c_y Specifies the location of the window's top-left corner along the Y-axis relative to its parent.
c_width Specifies the width of the window.
c_height Specifies the height of the window.
NOVATK_SUCCESS upon successful creation of the widget otherwise returns NOVATK_ERROR_GENERAL_FAILURE.
By default, the widget has no border. When a widget is given a border, the top-left corner of the border itself will be the window's X and Y position minus its border width. The actual width of the widget with its border will be its width plus the border width and the same for height.

Reimplemented from NovaTK::Widget.

void NovaTK::TableView::Destroy (  )  [virtual]

Destroys the widget.

Reimplemented from NovaTK::Widget.

Table * NovaTK::TableView::GetTable ( uint  table_num  )  [virtual]

A pointer to the table referenced by table_num. Note that table_num refers to the table's position with 0 being the top most table. If the mode of this TableView is OneTable then the ONLY valid value for table_num is zero.

Table * NovaTK::TableView::InsertTable ( const NString name  )  [virtual]

This function can only be used if the TableView mode is Sections. Creates a new section with the specified name and a new table.

A pointer to the new table.

bool NovaTK::TableView::IsHeaderShown (  )  const [virtual]

TRUE if the column header is currently shown otherwise returns FALSE.

void NovaTK::TableView::Resize ( uint  r_width,
uint  r_height 
) [virtual]

Changes the horiztonal size of the widget to r_w and the vertical size of the widget to r_h .

Reimplemented from NovaTK::Widget.

NStatus NovaTK::TableView::SetColumnName ( uint  col,
const NString name 
) [virtual]

Sets the name of the column specified by col which will be displayed in the column header.

NOVATK_SUCCESS upon success or NOVATK_ERROR_DOES_NOT_EXIST if col does not refer to a valid column.

void NovaTK::TableView::ShowHeader ( bool  state  )  [virtual]

If state is TRUE then the column header will be shown otherwise it will be hidden.

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

Generated on Sat Sep 13 22:34:24 2008 for NovaTK by  doxygen 1.5.5