A control for selecting one of a number of choices, similar to radio buttons but typically for larger numbers of options in a smaller space.
![]() | StringSorting Option for the strings in the choice box. |
![]() | PChoiceBox ( PInteractor * parent, StringSorting sorted = NotSorted ) Create a choice box with optional sorting of the list elements. |
![]() | PChoiceBox ( PInteractorLayout * parent, PRESOURCE_ID ctlID, const PNotifier & notify, PINDEX * valuePtr ) Create control from interactor layout with the specified control ID. |
![]() | ~PChoiceBox () Destroy the choice box and its contents. |
![]() | TransferValue ( int option ) This function transfers the value of the control to or from the variable pointed to by the value pointer member variable. |
![]() | SetSelection ( PINDEX newValue ) Set the index of the string that is currently selected and visible in the non-popped up state. |
![]() | GetSelection () const Get the index of the string that is currently selected. |
![]() | GetValuePointer () const Get the current value pointer associated with the control. |
![]() | SetValuePointer ( PINDEX * ptr ) Set the current value pointer associated with the control. |
![]() | AddString ( const PString & str ) Add a new string to the list box. |
![]() | AddStrings ( const PCollection & objects ) Add a collection of new entries to the choice box. |
![]() | InsertString ( const PString & str, PINDEX index ) Insert a string at the specified location. |
![]() | DeleteString ( PINDEX index ) Delete a string from the list of choices in the choice box. |
![]() | DeleteAllStrings () Delete all the strings in the list of choices in the choice box. |
![]() | FindString ( const PString & str, PINDEX startIndex = P_MAX_INDEX, BOOL exact = FALSE ) const Find the string in the list of choices starting at the entry after the specified starting index. |
![]() | SetString ( const PString & str, PINDEX index ) Set the string at the index position. |
![]() | GetString ( PINDEX index ) const Get the string at the index. |
![]() | GetCount () const Get the count of the number of items in the list of choices in the choice box. |
![]() | Codes passed to the PNotifier function when the specified notification events occur |
![]() | Overrides from class PControl |
![]() | New functions for class |
![]() | sort The coice box strings are sorted. |
PNotifier codes
Overrides from class PInteractor
Overrides from class PInteractor
Member variables
Overrides from class PObject
System callback functions.
A control for selecting one of a number of choices, similar to radio buttons but typically for larger numbers of options in a smaller space.The exact appearence of a choice box is platform dependent, for example, in MS-Windows this is a fixed combo-box, in Mac-OS it is a popup menu.
If the collection is not of string objects then they are translated into
a string by the use of the operator<< function.
PChoiceBox( PInteractorLayout * parent, PRESOURCE_ID ctlID, const PNotifier & notify, PINDEX * valuePtr )
ctlID - Identifier for the control in the layout.
notify - Function to call when changes state.
valuePtr - Variable to change to the check box state.virtual ~PChoiceBox()
Codes passed to the PNotifier function when the specified notification events occur
NewSelection
Overrides from class PControl
virtual void TransferValue( int option )
New functions for class
void SetSelection( PINDEX newValue )
PINDEX GetSelection() const
PINDEX* GetValuePointer() const
void SetValuePointer( PINDEX * ptr )
PINDEX AddString( const PString & str )
void AddStrings( const PCollection & objects )
void InsertString( const PString & str, PINDEX index )
index - Position in list to place the new string.void DeleteString( PINDEX index )
void DeleteAllStrings()
PINDEX FindString( const PString & str, PINDEX startIndex = P_MAX_INDEX, BOOL exact = FALSE ) const
startIndex - Index into list to start search.
exact - Flag for whether search is exact or partial.void SetString( const PString & str, PINDEX index )
index - Position in the list of choices to set.PString GetString( PINDEX index ) const
PINDEX GetCount() const
Alphabetic index HTML hierarchy of classes or Java