![]() | InDesign SDK 20.5 |
#include <IListBoxController.h>

Public Types | |
| enum | { kNoSelection = -1 } |
| enum | { kDefaultIID = IID_ILISTBOXCONTROLLER } |
Public Member Functions | |
Item selection | |
| virtual void | Select (int32 index, bool16 invalidate=kTrue, bool16 notifyOfChange=kTrue)=0 |
| virtual void | SelectAll (bool16 invalidate=kTrue, bool16 notifyOfChange=kTrue)=0 |
| virtual void | Deselect (int32 index=-1, bool16 invalidate=kTrue, bool16 notifyOfChange=kTrue)=0 |
| virtual void | DeselectAll (bool16 invalidate=kTrue, bool16 notifyOfChange=kTrue)=0 |
| virtual bool16 | IsSelected (int32 index) const =0 |
| virtual int32 | GetSelected () const =0 |
| virtual void | GetSelected (K2Vector< int32 > &multipleSelection) const =0 |
| virtual void | GetCheckedItems (K2Vector< int32 > &checkedItems) const =0 |
| virtual void | SetCheckedItems (const K2Vector< int32 > &vecIndices, bool16 bInvalidate=kTrue, bool16 bNotify=kTrue)=0 |
| virtual void | SetMasterItem (int32 itemNumber)=0 |
| virtual int32 | GetMasterItem () const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
ListBox Use | |
| enum | eListBoxPart { kInNothing = 0, kInScrollbar, kInList, kInListBelowItems, kInTopAutoScrollArea } |
| enum | eScrollDirection { kNoScroll = 0, kScrollUp, kScrollUpSlow, kScrollDown, kScrollDownSlow, kScrollLeft, kScrollLeftSlow, kScrollRight, kScrollRightSlow, kInsideDoNothing } |
| virtual void | SetClickItem (int32 itemNumber)=0 |
| virtual int32 | GetClickItem () const =0 |
| virtual int32 | FindRowHit (const PMPoint &clickPoint)=0 |
| virtual eListBoxPart | ClickedWhichPart (const PMPoint &clickPoint)=0 |
| virtual void | ScrollList (const eScrollDirection direction)=0 |
| virtual void | ScrollItemIntoView (int32 itemNumber)=0 |
| virtual int32 | GetFirstVisibleItem () const =0 |
| virtual int32 | GetMaximumVisibleItems () const =0 |
| virtual int32 | Search (const PMString &subString) const =0 |
| virtual PMString | GetNthItemString (int32 n) const =0 |
| virtual void | GetVisibleItemBounds (int32 item, PMRect &newBounds)=0 |
| virtual eScrollDirection | CheckScrollDirection (eScrollDirection direction)=0 |
| virtual eScrollDirection | CheckDragScroll (const PMPoint &where)=0 |
| virtual void | SetSelected (const K2Vector< int32 > &vecIndices, bool16 bInvalidate=kTrue, bool16 bNotify=kTrue)=0 |
| virtual void | ProcessSelectionRules (IEvent *event, int32 index)=0 |
Interface to access/set list-box selection and other state. There may be cases where you want to override this to provide a custom search; see the Search() method on this interface for more detail.
Identify part of list box clicked
Identify scrolling state
| pure virtual |
Internal use.
| pure virtual |
Internal use.
| pure virtual |
Given a point, ClickedWhichPart will tell you what part of the list was clicked on.
| pure virtual |
Deselect the element at the given position in the list.
| index | position of item to unselect |
| invalidate | whether control should be invalidated |
| notifyOfChange | specify whether registered observers should be notified of this change |
| pure virtual |
Deselect all elements.
| invalidate | whether control should be invalidated |
| notifyOfChange | specify whether registered observers should be notified of this change |
| pure virtual |
Given a point, FindRowHit returns the list row under the point
| pure virtual |
Fills in collection with indices of elements from the list with checkbox value ticked. Checked item list is different from the selected items The elements are in the order the user checked items.
| checkedItems | OUT parameter, holds indices of cheched items |
| pure virtual |
Return the item number of the last item clicked, or -1 for no item
| pure virtual |
returns the zero based index of the first visible item at the top of the list box
| pure virtual |
Determine the index of master item in the listbox, if it exists
| pure virtual |
returns the numbers of "slots" completely visible in the list box
| pure virtual |
Given a list index, return the name of it. Used by Search() function for typeahead. By default returns empty string, so typeahead if off by default.
| pure virtual |
Get index of the currently selected element.
| pure virtual |
Fills in collection with indexes of selected elements. The elements are in the order the user selected the items.
| multipleSelection | OUT parameter, holds indices of selected elements |
| pure virtual |
Internal use.
| pure virtual |
Return true if the item with index is selected.
| pure virtual |
Let the underlying tree control process the selection rules for a mouse event. This is only supported in list controls that are based on the tree control.
| pure virtual |
automatically scroll the list so that item "itemNumber" is visible
| pure virtual |
depending upon "direction", the list is scrolled one way or the other
| pure virtual |
Used when a listbox has focus and user types: Search first looks through all the items of the list looking for an item that has a name that begins with "subString."
If such an item is found, the index of the item is returned. If no item is found, this function then looks for an item that has a name that contains "subString." If such an item is found, the index of the item is returned. If no item is found, Search returns -1.
Typically, subclassers will override GetNthItemString because only they know how to interpret their list control data or widget hierarchy stored in the list. But Search can also be overridden if default search algorithm described above doesn't meet your needs.
By default, this function always returns -1 unless the GetNthItemString function is provided.
| pure virtual |
Select the element at the given position in the list.
| index | specifies position of item to select |
| invalidate | whether control should be invalidated |
| notifyOfChange | specify whether registered observers should be notified of this change |
| pure virtual |
Select all elements of the list.
| invalidate | whether control should be invalidated |
| notifyOfChange | specify whether registered observers should be notified of this change |
| pure virtual |
Sets the checkbox values of the items with indexes matching from vecIndices Do it only, when the dropdown list has checkboxes in it (would be the case if multiple selection with checkboxes enabled) The elements are in the order the user checked items.
| vecIndices | list of items of the dropdown, whose checkbox values needs to be ticked |
| invalidate | whether control should be invalidated |
| bNotify | specify whether registered observers should be notified of this change |
| pure virtual |
Set the item number of the last item clicked on
| pure virtual |
Item can never be deselected, -1 for no item
| itemNumber | specifies an item that is always to be selected |
| pure virtual |
Select the set of indices in the specified vector. Generally faster than writing the loop yourself for reasonably large selections (>25).