Pop-Up Buttons
PBPopUpButton
Opaque object handle:
This is a subclass of PBElement. You can safely cast from PBPopUpButton to PBElement. To cast from PBElement to PBPopUpButton, call PBPopUpButtonCast; this performs a runtime assertion to check the cast is possible. This function is thread-safe.
This object maintains an internal reference count. When the reference count reaches zero, the object will be automatically deallocated. To increment the reference count, call PBElementRetain; to decrement the reference count, call PBElementRelease. These functions are thread-safe.
PBMessagePopUpButtonGetItem
Structure:
Fields
[in] itemIndex (uint32_t
):
flags (PBPopUpButtonItemFlags):
string (string buffer):
PBMessagePopUpButtonAdjustMenu
Structure:
Fields
[in] commandList (referenced PBCommandList):
PBPopUpButtonFlags
Enumeration/bitset of type uint32_t:
Constants
PBPopUpButton_NO_FOCUS
PBPopUpButton_NO_FOCUS = 1<<1
Or any of the values from PBElementFlags.
PBPopUpButtonItemFlags
Enumeration/bitset of type uint32_t:
Constants
PBPopUpButton_ITEM_SEPARATOR
PBPopUpButton_ITEM_SEPARATOR = 1<<0
PBPopUpButton_ITEM_HEADING
PBPopUpButton_ITEM_HEADING = 1<<1
PBPopUpButtonCreate
Function:
Syntax (C/C++)
PBPopUpButtonPtr _Nullable PBPopUpButtonCreate(PBElementRef parent,
PBPopUpButtonFlags flags, uint32_t itemCount, uint32_t selectedItemIndex,
PBElementMessageHandler handler);
Syntax (Python)
PopUpButtonCreate(parent, flags, itemCount, selectedItemIndex, handler) -> (button)
Parameters and Return Values
[in] parent (referenced PBElement):
[in] flags (PBPopUpButtonFlags):
[in] itemCount (uint32_t
):
[in] selectedItemIndex (uint32_t
):
[in] handler (PBElementMessageHandler):
[out] button (nullable owned PBPopUpButton):
PBPopUpButtonSetItemCount
Function:
Syntax (C/C++)
void PBPopUpButtonSetItemCount(PBPopUpButtonRef button, uint32_t itemCount);
Syntax (Python)
PopUpButtonSetItemCount(button, itemCount)
Parameters and Return Values
[in] button (referenced PBPopUpButton):
[in] itemCount (uint32_t
):
PBPopUpButtonGetItemCount
Function:
Syntax (C/C++)
uint32_t PBPopUpButtonGetItemCount(PBPopUpButtonRef button);
Syntax (Python)
PopUpButtonGetItemCount(button) -> (itemCount)
Parameters and Return Values
[in] button (referenced PBPopUpButton):
[out] itemCount (uint32_t
):
PBPopUpButtonGetSelectedItem
Function:
Syntax (C/C++)
uint32_t PBPopUpButtonGetSelectedItem(PBPopUpButtonRef button);
Syntax (Python)
PopUpButtonGetSelectedItem(button) -> (itemIndex)
Parameters and Return Values
[in] button (referenced PBPopUpButton):
[out] itemIndex (uint32_t
):
PBPopUpButtonSetSelectedItem
Function:
Syntax (C/C++)
void PBPopUpButtonSetSelectedItem(PBPopUpButtonRef button, uint32_t itemIndex,
bool sendValueChangedMessage);
Syntax (Python)
PopUpButtonSetSelectedItem(button, itemIndex, sendValueChangedMessage)
Parameters and Return Values
[in] button (referenced PBPopUpButton):
[in] itemIndex (uint32_t
):
[in] sendValueChangedMessage (bool
):
PBPopUpButtonInvalidate
Function:
Syntax (C/C++)
void PBPopUpButtonInvalidate(PBPopUpButtonRef button);
Syntax (Python)
PopUpButtonInvalidate(button)
Parameters and Return Values
[in] button (referenced PBPopUpButton):