HTML_CustomItem Class
This class provides an abstract item API to access any supported item type contained in a custom item view (HTML_CustomItemView Class.) This item class inherits the HTML_Object Class. (See How to set up Support for Complex Widgets for how this API can be used to support those custom item view widgets which Squish doesn't support as standard.)
HTML_CustomItem HTML_CustomItem.childItem()
HTML_CustomItem HTML_CustomItem.childItem(column)
Returns a reference to this item's first child item (of type HTML_CustomItem Class) or returns 0 if there isn't one.
The column
is optional (and not all item's support it), but if it is specified (and supported), then the item's first child item in the given column
is returned if there is one; otherwise 0 is returned.
int HTML_CustomItem.column
This read-only property holds the item's column or -1 if this property isn't supported by the relevant HTML extension.
HTML_CustomItem HTML_CustomItem.findItem(row, column)
This function returns a reference to the child item at the given row
and column
. If the item isn't found or if the extension doesn't support this function, the function returns 0.
HTML_Object HTML_CustomItem.itemHandle()
This function returns a reference to this item's handle (as type HTML_Object Class), or returns 0 if this item doesn't have an item handle.
HTML_CustomItemView HTML_CustomItem.itemView()
This function returns the view (of type HTML_CustomItemView Class) that contains this item.
HTML_CustomItem HTML_CustomItem.nextSibling()
HTML_CustomItem HTML_CustomItem.nextSibling(column)
Returns a reference to this item's next "sibling" item (of type HTML_CustomItem Class); or returns 0 if there isn't one.
The column
is optional (and not all item's support it), but if it is specified (and supported), then the function returns the item in the given column
in the following row; or 0 if there isn't one.
int HTML_CustomItem.numRows
This read-only property holds the how many immediate child items this item has (for items in tree views). The value will be 0 if the item has no children (or the item isn't in a tree view), and -1 if this property isn't supported by the relevant HTML extension.
This is a synthetic property, see Synthetic Properties in Web Objects for more information.
Boolean HTML_CustomItem.open
This property holds true
if this item is open (i.e., expanded—in which case this item's children will be visible); otherwise it holds false
.
If this property is set to true
, it opens (expands) this item so that any children it has become visible. And if this property is set to false
, it closes (collapses) this item so that any children it has become hidden.
HTML_CustomItem HTML_CustomItem.parentItem()
HTML_CustomItem HTML_CustomItem.parentItem(column)
Returns a reference to this item's parent item (of type HTML_CustomItem Class); or returns 0 if there isn't one, that is, if this is the root item.
The column
is optional (and not all item's support it), but if it is specified (and supported), then the item's parent item for the given column
is returned if there is one; otherwise 0 is returned.
String HTML_CustomItem.realType
This read-only property holds the type name of the actual (i.e., real) type wrapped by this API as a string. The name could be the view's type name rather than the item's type name, depending on the implementation. (The example shipped with Squish returns the view's type name.)
The type name returned might be, for example "gwttree", or "itmilltree", or "dojotree", and so on.
int HTML_CustomItem.row
This read-only property holds the item's row. For items in tree views the row is relative to the view for a top-level item or relative to the item's parent otherwise. For items not in tree views it is the item's row in the view. The value could be -1 if this property isn't supported by the relevant HTML extension.
Boolean HTML_CustomItem.selected
This property holds true
if this item is selected; otherwise it holds false
.
If this property is set to true
this item is selected. If this property is set to false
this item is deselected.
String HTML_CustomItem.text
This read-only property holds the item's text as a string.
If the extension provides an itemText
function, that function's return value is returned; otherwise the item's innerText
property's value is returned.
© 2024 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.