# class UIWidget |
Full name | `TelEngine::UIWidget`
Definition | `#include <yatecbase.h>`
Inherits | TelEngine::String [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- inline explicit UIWidget (const char* name = 0)
- virtual ~UIWidget ()
- inline const String& name () const
- virtual bool setParams (const NamedList& params)
- virtual bool getOptions (NamedList& items)
- virtual bool addTableRow (const String& item, const NamedList* data = 0, bool atStart = false)
- virtual bool setMultipleRows (const NamedList& data, const String& prefix = String::empty())
- virtual bool updateTableRows (const NamedList* data, bool atStart = false)
- virtual bool insertTableRow (const String& item, const String& before, const NamedList* data = 0)
- virtual bool delTableRow (const String& item)
- virtual bool setTableRow (const String& item, const NamedList* data)
- virtual bool getTableRow (const String& item, NamedList* data = 0)
- virtual bool clearTable ()
- virtual bool setSelect (const String& item)
- virtual bool getSelect (String& item)
- virtual bool addLines (const NamedList& lines, unsigned int max, bool atStart = false)
- virtual bool setText (const String& text, bool richText = false)
- virtual bool getText (String& text, bool richText = false)

## Detailed Description

inline explicit UIWidget (const char* name = 0) | ### UIWidget

Constructor, creates a new widget

Parameters:

name | The widget's name

~UIWidget () | ### ~UIWidget

[virtual]

Destructor

inline const String& name () | ### name

[const]

Retrieve the standard name of this Window

Returns: Identifier of this window

bool setParams (const NamedList& params) | ### setParams

[virtual]

Set widget's parameters

Parameters:

params | List of parameters

Returns: True if all parameters could be set

bool getOptions (NamedList& items) | ### getOptions

[virtual]

Get widget's items

Parameters:

items | List to fill with widget's items

Returns: False on failure (e.g. not initialized)

bool addTableRow (const String& item, const NamedList* data = 0, bool atStart = false) | ### addTableRow

[virtual]

Add a row to a table

Parameters:

item | Name of the item to add
data | Table's columns to set
atStart | True to insert, false to append

Returns: True if the operation was successfull

bool setMultipleRows (const NamedList& data, const String& prefix = String::empty()) | ### setMultipleRows

[virtual]

Append or update several table rows at once

Parameters:

data | Parameters to initialize the rows with
prefix | Prefix to match (and remove) in parameter names

Returns: True if all the operations were successfull

bool updateTableRows (const NamedList* data, bool atStart = false) | ### updateTableRows

[virtual]

Add or set one or more table row(s). Screen update is locked while changing the table. Each data list element is a NamedPointer carrying a NamedList with item parameters. The name of an element is the item to update. Set element's value to boolean value 'true' to add a new item if not found or 'false' to set an existing one. Set it to empty string to delete the item

Parameters:

data | The list of items to add/set/delete
atStart | True to add new items at start, false to add them to the end

Returns: True if the operation was successfull

bool insertTableRow (const String& item, const String& before, const NamedList* data = 0) | ### insertTableRow

[virtual]

Insert a row into a table

Parameters:

item | Name of the item to insert
before | Name of the item to insert before
data | Table's columns to set

Returns: True if the operation was successfull

bool delTableRow (const String& item) | ### delTableRow

[virtual]

Delete a row from a table

Parameters:

item | Name of the item to remove

Returns: True if the operation was successfull

bool setTableRow (const String& item, const NamedList* data) | ### setTableRow

[virtual]

Update a table's row

Parameters:

item | Name of the item to update
data | Data to update

Returns: True if the operation was successfull

bool getTableRow (const String& item, NamedList* data = 0) | ### getTableRow

[virtual]

Retrieve a row from a table

Parameters:

item | Name of the item to retrieve
data | List to fill with table's columns contents

Returns: True if the operation was successfull

bool clearTable () | ### clearTable

[virtual]

Clear (delete all rows) a table

Returns: True if the operation was successfull

bool setSelect (const String& item) | ### setSelect

[virtual]

Set the widget's selection

Parameters:

item | String containing the new selection

Returns: True if the operation was successfull

bool getSelect (String& item) | ### getSelect

[virtual]

Retrieve the widget's selection

Parameters:

item | String to fill with selection's contents

Returns: True if the operation was successfull

bool addLines (const NamedList& lines, unsigned int max, bool atStart = false) | ### addLines

[virtual]

Append or insert text lines to this widget

Parameters:

lines | List containing the lines
max | The maximum number of lines allowed to be displayed. Set to 0 to ignore
atStart | True to insert, false to append

Returns: True on success

bool setText (const String& text, bool richText = false) | ### setText

[virtual]

Set the displayed text of this widget

Parameters:

text | Text value to set
richText | True if the text contains format data

Returns: True on success

bool getText (String& text, bool richText = false) | ### getText

[virtual]

Retrieve the displayed text of this widget

Parameters:

text | Text value
richText | True to retrieve formatted data

Returns: True on success

Generated by: paulc on bussard on Fri Dec 21 16:28:34 2012, using kdoc 2.0a54.