A combination of an edit text box and a drop down list box.
![]() | StringSorting Option for the strings in the choice box. |
![]() | PComboBox ( PInteractor * parent, StringSorting sorted = NotSorted ) Create a combo-box with optional sorting of the list box items. |
![]() | PComboBox ( PInteractorLayout * parent, PRESOURCE_ID ctlID, const PNotifier & notify, PString * valuePtr ) Create control from interactor layout with the specified control ID. |
![]() | ~PComboBox () Destroy the combo-box and its contents. |
![]() | OnEndInput () The system calls this whenever the system wishes to change focus to another interactor in a given PTitledWindow or PInteractorLayout. |
![]() | TransferValue ( int option ) This function transfers the value of the control to or from the variable pointed to by the value pointer member variable. |
![]() | SetText ( const PString & str ) Set the text in the edit text part of the combo-box. |
![]() | GetText () const Get the text in the edit text part of the combo-box. |
![]() | GetValuePointer () const Get the current value pointer associated with the control. |
![]() | SetValuePointer ( PString * ptr ) Set the current value pointer associated with the control. |
![]() | SetMaxText ( PINDEX max ) Set the maximum amount of text that the user may enter in the combo-box edit text part. |
![]() | GetLength () const Get the current length of the text entered into the edit box. |
![]() | SetSelection ( PINDEX start = 0, PINDEX finish = P_MAX_INDEX ) Set the selected region in the text within the edit box. |
![]() | GetSelection ( PINDEX * start = NULL, PINDEX * finish = NULL ) const Get the selected region in the text in the edit box. |
![]() | Cut () Cut the selected text to the clipboard. |
![]() | Copy () const Copy the selected text to the clipboard. |
![]() | Paste () Paste into the edit control from the clipboard into the edit box at the current caret position. |
![]() | Clear () Delete the selected text. |
![]() | AddString ( const PString & str ) Add a new string to the list box. |
![]() | AddStrings ( const PCollection & objects ) Add a collection of new entries to the combo-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 combo-box. |
![]() | DeleteAllStrings () Delete all the strings in the list 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 combo-box. |
![]() | SetCurrent ( PINDEX index ) Set the current selection to the string specified by the index. |
![]() | GetCurrent () const Get the current selection. |
![]() | Codes passed to the PNotifier function when the specified notification events occur |
![]() | Overrides from class PInteractor |
![]() | Overrides from class PControl |
![]() | New functions for class |
![]() | sort The coice box strings are sorted. |
PNotifier codes
Member variables
Overrides from class PObject
System callback functions.
A combination of an edit text box and a drop down list box. This is typically used for arbitrary text entry with the ability to select from a set of pre-defined strings.The exact appearence of a check box is platform dependent, however, they all have a section for entring the editable text and some mechanism for displaying the list of strings.
This function in conjunction with the keyboard focus changing and the
PInteractor::SetFocusInteractor() function controls the transfer
of focus from one interactor in a logical group (eg dialog) to another.
It is primarily used for field level validation. For example the
PIntegerEditBox control uses this to prevent the user from
exiting the control until a valid entry hash been made. Note that the focus does actually change with appropriate
calls to the PInteractor::OnGainFocus() and
PInteractor::OnLostFocus() functions. The focus gets set back to
the original interactor when this function disallows the focus change. For edit boxes this will execute the notification function before
returning TRUE.
If start and finish are equal then there is
no selected region. However, the caret is placed immediately before
that position, ie so that the next character entered will be at
start offset into the resultant string. If finish is less than start it is set to the
same value as start. If either value is greater than the
current length of the edit box, then they are set to the position of
the end of the string.
If there is no current selection then this function does nothing.
If there is no current selection then this function does nothing.
If the paste would add so many characters that the limit set with
SetMaxText() would be exceeded then the paste does not take
place. Also, if there is no text in the clipboard then this function does
nothing.
If there is no current selection then this function does nothing.
If the collection is not of string objects then they are translated into
a string by the use of the operator<< function.
PComboBox( PInteractorLayout * parent, PRESOURCE_ID ctlID, const PNotifier & notify, PString * 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. ~PComboBox()
Codes passed to the PNotifier function when the specified notification events occur
EditChange
EndEdit
NewSelection
Overrides from class PInteractor
virtual BOOL OnEndInput()
Overrides from class PControl
virtual void TransferValue( int option )
New functions for class
void SetText( const PString & str )
PString GetText() const
PString* GetValuePointer() const
void SetValuePointer( PString * ptr )
void SetMaxText( PINDEX max )
PINDEX GetLength() const
void SetSelection( PINDEX start = 0, PINDEX finish = P_MAX_INDEX )
finish - Finish index position of selected text.BOOL GetSelection( PINDEX * start = NULL, PINDEX * finish = NULL ) const
finish - Pointer to receive finishing position of selected text.void Cut()
void Copy() const
void Paste()
void Clear()
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
void SetCurrent( PINDEX index )
PINDEX GetCurrent() const
Alphabetic index HTML hierarchy of classes or Java