Yate
Public Member Functions
UIWidget Class Reference
Inheritance diagram for UIWidget:
String GenObject

List of all members.

Public Member Functions

 UIWidget (const char *name=0)
virtual ~UIWidget ()
const Stringname () 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)

Constructor & Destructor Documentation

UIWidget ( const char *  name = 0) [inline, explicit]

Constructor, creates a new widget

Parameters:
nameThe widget's name
virtual ~UIWidget ( ) [inline, virtual]

Destructor


Member Function Documentation

virtual bool addLines ( const NamedList lines,
unsigned int  max,
bool  atStart = false 
) [inline, virtual]

Append or insert text lines to this widget

Parameters:
linesList containing the lines
maxThe maximum number of lines allowed to be displayed. Set to 0 to ignore
atStartTrue to insert, false to append
Returns:
True on success
virtual bool addTableRow ( const String item,
const NamedList data = 0,
bool  atStart = false 
) [inline, virtual]

Add a row to a table

Parameters:
itemName of the item to add
dataTable's columns to set
atStartTrue to insert, false to append
Returns:
True if the operation was successfull
virtual bool clearTable ( ) [inline, virtual]

Clear (delete all rows) a table

Returns:
True if the operation was successfull
virtual bool delTableRow ( const String item) [inline, virtual]

Delete a row from a table

Parameters:
itemName of the item to remove
Returns:
True if the operation was successfull
virtual bool getOptions ( NamedList items) [inline, virtual]

Get widget's items

Parameters:
itemsList to fill with widget's items
Returns:
False on failure (e.g. not initialized)
virtual bool getSelect ( String item) [inline, virtual]

Retrieve the widget's selection

Parameters:
itemString to fill with selection's contents
Returns:
True if the operation was successfull
virtual bool getTableRow ( const String item,
NamedList data = 0 
) [inline, virtual]

Retrieve a row from a table

Parameters:
itemName of the item to retrieve
dataList to fill with table's columns contents
Returns:
True if the operation was successfull
virtual bool getText ( String text,
bool  richText = false 
) [inline, virtual]

Retrieve the displayed text of this widget

Parameters:
textText value
richTextTrue to retrieve formatted data
Returns:
True on success
virtual bool insertTableRow ( const String item,
const String before,
const NamedList data = 0 
) [inline, virtual]

Insert a row into a table

Parameters:
itemName of the item to insert
beforeName of the item to insert before
dataTable's columns to set
Returns:
True if the operation was successfull
const String& name ( ) const [inline]

Retrieve the standard name of this Window

Returns:
Identifier of this window
virtual bool setMultipleRows ( const NamedList data,
const String prefix = String::empty() 
) [inline, virtual]

Append or update several table rows at once

Parameters:
dataParameters to initialize the rows with
prefixPrefix to match (and remove) in parameter names
Returns:
True if all the operations were successfull
virtual bool setParams ( const NamedList params) [inline, virtual]

Set widget's parameters

Parameters:
paramsList of parameters
Returns:
True if all parameters could be set
virtual bool setSelect ( const String item) [inline, virtual]

Set the widget's selection

Parameters:
itemString containing the new selection
Returns:
True if the operation was successfull
virtual bool setTableRow ( const String item,
const NamedList data 
) [inline, virtual]

Update a table's row

Parameters:
itemName of the item to update
dataData to update
Returns:
True if the operation was successfull
virtual bool setText ( const String text,
bool  richText = false 
) [inline, virtual]

Set the displayed text of this widget

Parameters:
textText value to set
richTextTrue if the text contains format data
Returns:
True on success
virtual bool updateTableRows ( const NamedList data,
bool  atStart = false 
) [inline, 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:
dataThe list of items to add/set/delete
atStartTrue to add new items at start, false to add them to the end
Returns:
True if the operation was successfull

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