LibreOffice: XItemList Interface Reference

LibreOffice LibreOffice 4.4 SDK API Reference

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
XItemList Interface Reference

provides convenient access to the list of items in a list box More...

`import"XItemList.idl";`

Inheritance diagram for XItemList:

## Public Member Functions
void | insertItem ([in] long Position, [in] string ItemText, [in] string ItemImageURL) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| inserts a new item into the list More...
void | insertItemText ([in] long Position, [in] string ItemText) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| inserts an item which has only a text, but no image More...
void | insertItemImage ([in] long Position, [in] string ItemImageURL) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| inserts an item which has only an image, but no text More...
void | removeItem ([in] long Position) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| removes an item from the list More...
void | removeAllItems ()
| removes all items from the list More...
void | setItemText ([in] long Position, [in] string ItemText) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| sets a new text for an existing item More...
void | setItemImage ([in] long Position, [in] string ItemImageURL) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| sets a new image for an existing item More...
void | setItemTextAndImage ([in] long Position, [in] string ItemText, [in] string ItemImageURL) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| sets both a new position and text for an existing item More...
void | setItemData ([in] long Position, [in] any ItemData) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| associates an implementation dependent value with the given list item. More...
string | getItemText ([in] long Position) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves the text of an existing item More...
string | getItemImage ([in] long Position) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves the URL of the image of an existing item More...
::com::sun::star::beans::Pair< string, string > | getItemTextAndImage ([in] long Position) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves both the text and the image URL of an existing item More...
any | getItemData ([in] long Position) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves the implementation dependent value associated with the given list item. More...
sequence< ::com::sun::star::beans::Pair< string, string > > | getAllItems ()
| retrieves the texts and images of all items in the list More...
void | addItemListListener ([in] XItemListListener Listener)
| registers a listener which is notified about changes in the item list. More...
void | removeItemListListener ([in] XItemListListener Listener)
| revokes a listener which is notified about changes in the item list. More...

## Public Attributes
long | ItemCount
| is the number of items in the list More...

## Detailed Description

provides convenient access to the list of items in a list box

## Member Function Documentation

void addItemListListener | ( | [in] XItemListListener | Listener | ) |

registers a listener which is notified about changes in the item list.

sequence< ::com::sun::star::beans::Pair< string, string > > getAllItems | ( |  | ) |

retrieves the texts and images of all items in the list

any getItemData | ( | [in] long | Position | ) |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

retrieves the implementation dependent value associated with the given list item.

Parameters

  Position | the position of the item whose data value should be retrieved. Must be greater or equal to 0, and lesser than ItemCount.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if `Position` is invalid.

See also
  setItemData

string getItemImage | ( | [in] long | Position | ) |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

retrieves the URL of the image of an existing item

Parameters

  Position | the position of the item whose image should be retrieved. Must be greater or equal to 0, and lesser than ItemCount.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if `Position` is invalid.

string getItemText | ( | [in] long | Position | ) |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

retrieves the text of an existing item

Parameters

  Position | the position of the item whose text should be retrieved. Must be greater or equal to 0, and lesser than ItemCount.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if `Position` is invalid.

::com::sun::star::beans::Pair< string, string > getItemTextAndImage | ( | [in] long | Position | ) |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

retrieves both the text and the image URL of an existing item

Parameters

  Position | the position of the item whose text and image should be retrieved. Must be greater or equal to 0, and lesser than ItemCount.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if `Position` is invalid.

void insertItem | ( | [in] long | Position,
|  | [in] string | ItemText,
|  | [in] string | ItemImageURL
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

inserts a new item into the list

Parameters

  Position | the position at which the item should be inserted. Must be greater or equal to 0, and lesser than or equal to ItemCount.
  ItemText | the text of the item to be inserted.
  ItemImageURL | the URL of the image to display for the item

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if `Position` is invalid.

void insertItemImage | ( | [in] long | Position,
|  | [in] string | ItemImageURL
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

inserts an item which has only an image, but no text

Parameters

  Position | the position at which the item should be inserted. Must be greater or equal to 0, and lesser than or equal to ItemCount.
  ItemImageURL | the URL of the image to display for the item

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if `Position` is invalid.

void insertItemText | ( | [in] long | Position,
|  | [in] string | ItemText
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

inserts an item which has only a text, but no image

Parameters

  Position | the position at which the item should be inserted. Must be greater or equal to 0, and lesser than or equal to ItemCount.
  ItemText | the text of the item to be inserted.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if `Position` is invalid.

void removeAllItems | ( |  | ) |

removes all items from the list

void removeItem | ( | [in] long | Position | ) |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

removes an item from the list

Parameters

  Position | the position of the item which should be removed. Must be greater or equal to 0, and lesser than ItemCount.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if `Position` is invalid.

void removeItemListListener | ( | [in] XItemListListener | Listener | ) |

revokes a listener which is notified about changes in the item list.

void setItemData | ( | [in] long | Position,
|  | [in] any | ItemData
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

associates an implementation dependent value with the given list item.

You can use this to store data for an item which does not interfere with the displayed text and image, but can be used by the client of the list box for an arbitrary purpose.

Parameters

  Position | the position of the item whose data value should be set. Must be greater or equal to 0, and lesser than ItemCount.
  ItemData | the data to associate with the list item

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if `Position` is invalid.

See also
  getItemData

void setItemImage | ( | [in] long | Position,
|  | [in] string | ItemImageURL
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

sets a new image for an existing item

Parameters

  Position | the position of the item whose image is to be changed. Must be greater or equal to 0, and lesser than ItemCount.
  ItemImageURL | the new URL of the image to display for the item

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if `Position` is invalid.

void setItemText | ( | [in] long | Position,
|  | [in] string | ItemText
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

sets a new text for an existing item

Parameters

  Position | the position of the item whose text is to be changed. Must be greater or equal to 0, and lesser than ItemCount.
  ItemText | the new text of the item

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if `Position` is invalid.

void setItemTextAndImage | ( | [in] long | Position,
|  | [in] string | ItemText,
|  | [in] string | ItemImageURL
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

sets both a new position and text for an existing item

Parameters

  Position | the position of the item whose text and image is to be changed. Must be greater or equal to 0, and lesser than ItemCount.
  ItemText | the new text of the item
  ItemImageURL | the new URL of the image to display for the item

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if `Position` is invalid.

## Member Data Documentation

long ItemCount
| attributereadonly

is the number of items in the list

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

- com/sun/star/awt/XItemList.idl