LibreOffice
LibreOffice 24.2 SDK API Reference
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:
UnoControlComboBoxModel UnoControlListBoxModel ComboBox ListBox DatabaseComboBox DatabaseListBox BindableDatabaseComboBox BindableDatabaseListBox

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

◆ addItemListListener()

void addItemListListener ( [in] XItemListListener  Listener)

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

◆ getAllItems()

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

retrieves the texts and images of all items in the list

◆ getItemData()

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

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

Parameters
Positionthe 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::IndexOutOfBoundsExceptionif Position is invalid.
See also
setItemData

◆ getItemImage()

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

retrieves the URL of the image of an existing item

Parameters
Positionthe 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::IndexOutOfBoundsExceptionif Position is invalid.

◆ getItemText()

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

retrieves the text of an existing item

Parameters
Positionthe 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::IndexOutOfBoundsExceptionif Position is invalid.

◆ getItemTextAndImage()

::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
Positionthe 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::IndexOutOfBoundsExceptionif Position is invalid.

◆ insertItem()

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
Positionthe position at which the item should be inserted. Must be greater or equal to 0, and lesser than or equal to ItemCount.
ItemTextthe text of the item to be inserted.
ItemImageURLthe URL of the image to display for the item
Exceptions
com::sun::star::lang::IndexOutOfBoundsExceptionif Position is invalid.

◆ insertItemImage()

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
Positionthe position at which the item should be inserted. Must be greater or equal to 0, and lesser than or equal to ItemCount.
ItemImageURLthe URL of the image to display for the item
Exceptions
com::sun::star::lang::IndexOutOfBoundsExceptionif Position is invalid.

◆ insertItemText()

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
Positionthe position at which the item should be inserted. Must be greater or equal to 0, and lesser than or equal to ItemCount.
ItemTextthe text of the item to be inserted.
Exceptions
com::sun::star::lang::IndexOutOfBoundsExceptionif Position is invalid.

◆ removeAllItems()

void removeAllItems ( )

removes all items from the list

◆ removeItem()

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

removes an item from the list

Parameters
Positionthe position of the item which should be removed. Must be greater or equal to 0, and lesser than ItemCount.
Exceptions
com::sun::star::lang::IndexOutOfBoundsExceptionif Position is invalid.

◆ removeItemListListener()

void removeItemListListener ( [in] XItemListListener  Listener)

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

◆ setItemData()

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
Positionthe position of the item whose data value should be set. Must be greater or equal to 0, and lesser than ItemCount.
ItemDatathe data to associate with the list item
Exceptions
com::sun::star::lang::IndexOutOfBoundsExceptionif Position is invalid.
See also
getItemData

◆ setItemImage()

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

sets a new image for an existing item

Parameters
Positionthe position of the item whose image is to be changed. Must be greater or equal to 0, and lesser than ItemCount.
ItemImageURLthe new URL of the image to display for the item
Exceptions
com::sun::star::lang::IndexOutOfBoundsExceptionif Position is invalid.

◆ setItemText()

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

sets a new text for an existing item

Parameters
Positionthe position of the item whose text is to be changed. Must be greater or equal to 0, and lesser than ItemCount.
ItemTextthe new text of the item
Exceptions
com::sun::star::lang::IndexOutOfBoundsExceptionif Position is invalid.

◆ setItemTextAndImage()

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
Positionthe position of the item whose text and image is to be changed. Must be greater or equal to 0, and lesser than ItemCount.
ItemTextthe new text of the item
ItemImageURLthe new URL of the image to display for the item
Exceptions
com::sun::star::lang::IndexOutOfBoundsExceptionif Position is invalid.

Member Data Documentation

◆ ItemCount

long ItemCount
attributereadonly

is the number of items in the list


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