class Window

An abstract user interface window. More...

Contains pure virtuals
Full nameTelEngine::Window
Definition#include <yatecbase.h>
InheritsTelEngine::GenObject [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods

Protected Methods

Protected Members


Detailed Description

A window is the basic user interface element. Everything inside is implementation specific functionality.

explicit  Window (const char* id = 0)

Window

Constructor, creates a new windows with an ID

Parameters:
idString identifier of the new window

 ~Window ()

~Window

[virtual]

Destructor

const String&  toString ()

toString

[const virtual]

Retrieve the standard name of this Window, used to search in lists

Returns: Identifier of this window

Reimplemented from GenObject.

void  title (const String& text)

title

[virtual]

void  context (const String& text)

context

[virtual]

Set the contextual information previously associated with this window

Parameters:
textNew contextual information

bool  setParams (const NamedList& params)

setParams

[virtual]

Set window parameters or widget contents

Parameters:
paramsList of parameters to set in the window and its widgets

Returns: True if all parameters could be set

void  setOver (const Window* parent)

setOver

[pure virtual]

Force this window on top of another one which becomes its parent

Parameters:
parentWindow to force as parent of this one

bool  hasElement (const String& name)

hasElement

[pure virtual]

Check if this window has an element by name

Parameters:
nameName of the element to search for

Returns: True if one element with the given name exists

bool  setActive (const String& name, bool active)

setActive

[pure virtual]

Set an element as interactive in the window

Parameters:
nameName of the element
activeTrue to make interactive, false to disallow interaction

Returns: True if the operation was successfull

bool  setFocus (const String& name, bool select = false)

setFocus

[pure virtual]

Set an element as receiving input in the window

Parameters:
nameName of the element
selectAlso select the content of the focused element

Returns: True if the operation was successfull

bool  setShow (const String& name, bool visible)

setShow

[pure virtual]

Set the visibility of an element in the window

Parameters:
nameName of the element
visibleTrue to make element visible, false to hide it

Returns: True if the operation was successfull

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

setText

[pure virtual]

Set the displayed text of an element in the window

Parameters:
nameName of the element
textText value to set in the element
richTextTrue if the text contains format data

Returns: True if the operation was successfull

bool  setCheck (const String& name, bool checked)

setCheck

[pure virtual]

Set the checked or toggled status of an element in the window

Parameters:
nameName of the element
checkedTrue to make element checked or toggled

Returns: True if the operation was successfull

bool  setSelect (const String& name, const String& item)

setSelect

[pure virtual]

Set the selection of an item in an element in the window

Parameters:
nameName of the element
itemName of the item that should be selected

Returns: True if the operation was successfull

bool  setUrgent (const String& name, bool urgent)

setUrgent

[pure virtual]

Flag an element as requiring immediate attention

Parameters:
nameName of the element
urgentTrue if the element requires immediate attention

Returns: True if the operation was successfull

bool  hasOption (const String& name, const String& item)

hasOption

[pure virtual]

Check if an element has an item by its name

Parameters:
nameName of the element to search for
itemName of the item that should be searched

Returns: True if one item with the given name exists in the element

bool  addOption (const String& name, const String& item, bool atStart = false, const String& text = String::empty())

addOption

[pure virtual]

Add an item to an element that supports such an operation (list)

Parameters:
nameName of the element
itemName of the item to add
atStartTrue to insert item on the first position, false to append
textDisplayed text to associate with the item (not all lists support it)

Returns: True if the operation was successfull

bool  getOptions (const String& name, NamedList* items)

getOptions

[pure virtual]

Get an element's items

Parameters:
nameName of the element to search for
itemsList to fill with element's items

Returns: True if the element exists

bool  delOption (const String& name, const String& item)

delOption

[pure virtual]

Remove an item from an element (list)

Parameters:
nameName of the element
itemName of the item to remove

Returns: True if the operation was successfull

bool  addLines (const String& name, const NamedList* lines, unsigned int max, bool atStart = false)

addLines

[virtual]

Append or insert text lines to a widget

Parameters:
nameThe name of the widget
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

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

addTableRow

[virtual]

Add a row to a table owned by this window

Parameters:
nameName of the element
itemName of the item to add
dataTable's columns to set
atStartTrue to insert, false to append

Returns: True if the operation was successfull

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

setMultipleRows

[virtual]

Append or update several table rows at once

Parameters:
nameName of the element
dataParameters to initialize the rows with
prefixPrefix to match (and remove) in parameter names

Returns: True if all the operations were successfull

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

insertTableRow

[virtual]

Insert a row into a table owned by this window

Parameters:
nameName of the element
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

bool  delTableRow (const String& name, const String& item)

delTableRow

[virtual]

Delete a row from a table owned by this window

Parameters:
nameName of the element
itemName of the item to remove

Returns: True if the operation was successfull

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

setTableRow

[virtual]

Update a row from a table owned by this window

Parameters:
nameName of the element
itemName of the item to update
dataData to update

Returns: True if the operation was successfull

bool  updateTableRow (const String& name, const String& item, const NamedList* data = 0, bool atStart = false)

updateTableRow

[virtual]

Set a table row or add a new one if not found

Parameters:
nameName of the element
itemTable item to set/add
dataOptional list of parameters used to set row data
atStartTrue to add item at start, false to add them to the end

Returns: True if the operation was successfull

bool  updateTableRows (const String& name, 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:
nameName of the table
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

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

getTableRow

[virtual]

Retrieve a row from a table owned by this window

Parameters:
nameName of the element
itemName of the item to retrieve
dataList to fill with table's columns contents

Returns: True if the operation was successfull

bool  clearTable (const String& name)

clearTable

[virtual]

Clear (delete all rows) a table owned by this window

Parameters:
nameName of the element

Returns: True if the operation was successfull

bool  getText (const String& name, String& text, bool richText = false)

getText

[pure virtual]

Get an element's text

Parameters:
nameName of the element
textThe destination string
richTextTrue to get the element's roch text if supported.

Returns: True if the operation was successfull

bool  getCheck (const String& name, bool& checked)

getCheck

[pure virtual]

Get the checked state of a checkable control

Parameters:
nameName of the element
checkedThe checked state of the control

Returns: True if the operation was successfull

bool  getSelect (const String& name, String& item)

getSelect

[pure virtual]

Retrieve an element's selection

Parameters:
nameName of the element
itemString to fill with selection's contents

Returns: True if the operation was successfull

bool  buildMenu (const NamedList& params)

buildMenu

[pure virtual]

Build a menu from a list of parameters. See Client::buildMenu() for more info

Parameters:
paramsMenu build parameters

Returns: True on success

bool  removeMenu (const NamedList& params)

removeMenu

[pure virtual]

Remove a menu (from UI and memory) See Client::removeMenu() for more info

Parameters:
paramsMenu remove parameters

Returns: True on success

bool  setImage (const String& name, const String& image, bool fit = false)

setImage

[pure virtual]

Set an element's image

Parameters:
nameName of the element
imageImage to set
fitFit image in element (defaults to false)

Returns: True on success

bool  setProperty (const String& name, const String& item, const String& value)

setProperty

[virtual]

Set a property for this window or for a widget owned by it

Parameters:
nameName of the element
itemProperty's name
valueProperty's value

Returns: True on success

bool  getProperty (const String& name, const String& item, String& value)

getProperty

[virtual]

Get a property from this window or from a widget owned by it

Parameters:
nameName of the element
itemProperty's name
valueProperty's value

Returns: True on success

inline void  populate ()

populate

Populate the window if not already done

inline void  init ()

init

Initialize the window if not already done

void  show ()

show

[pure virtual]

Show this window

void  hide ()

hide

[pure virtual]

Hide this window

void  size (int width, int height)

size

[pure virtual]

Resize this window

Parameters:
widthThe new width
heightThe new width

void  move (int x, int y)

move

[pure virtual]

Move this window

Parameters:
xThe x coordinate of the upper left corner
yThe y coordinate of the upper left corner

void  moveRel (int dx, int dy)

moveRel

[pure virtual]

Move this window related to its current position

Parameters:
dxThe value to be added to the current x coordinate of the upper left corner
dyThe value to be added to the current y coordinate of the upper left corner

bool  related (const Window* wnd)

related

[const virtual]

Checkes if this window is related to the given window

Parameters:
wndThe window to check for any relation

Returns: False if wnd is this window or a master one

void  menu (int x, int y)

menu

[pure virtual]

bool  canClose ()

canClose

[virtual]

Check if this window can be closed

Returns: True if this window can be closed, false to prevent hiding it

inline const String&  id ()

id

[const]

Retrieve the standard name of this Window

Returns: Identifier of this window

inline const String&  title ()

title

[const]

inline const String&  context ()

context

[const]

Get the contextual information previously associated with this window

Returns: String contextual information

inline bool  visible ()

visible

[const]

Get the visibility status of this window

Returns: True if window is visible, false if it's hidden

inline void  visible (bool yes)

visible

Set the visibility status of this window

Parameters:
yesTrue if window should be visible

inline bool  active ()

active

[const]

Check if this window is the active one

Returns: True if window is active

inline bool  master ()

master

[const]

Check if this window is a master (topmost) window

Returns: True if this window is topmost

inline bool  popup ()

popup

[const]

Check if this window is a popup window

Returns: True if this window is initially hidden

bool  createDialog (const String& name, const String& title, const String& alias = String::empty(), const NamedList* params = 0)

createDialog

[pure virtual]

Create a modal dialog

Parameters:
nameDialog name (resource config section)
titleDialog title
aliasOptional dialog alias (used as dialog object name)
paramsOptional dialog parameters

Returns: True on success

bool  closeDialog (const String& name)

closeDialog

[pure virtual]

Destroy a modal dialog

Parameters:
nameDialog name

Returns: True on success

bool  isValidParamPrefix (const String& prefix)

isValidParamPrefix

[static]

Check if a string is a parameter prefix handled by setParams(). Exact prefix match is not a valid one

Parameters:
prefixString to check

Returns: True if the given prefix is a valid one

void  doPopulate ()

doPopulate

[protected pure virtual]

void  doInit ()

doInit

[protected pure virtual]

String m_id

m_id

[protected]

String m_title

m_title

[protected]

String m_context

m_context

[protected]

bool m_visible

m_visible

[protected]

bool m_active

m_active

[protected]

bool m_master

m_master

[protected]

bool m_popup

m_popup

[protected]

bool m_saveOnClose

m_saveOnClose

[protected]


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