LibreOffice Module vcl (master) 1
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ListBox Class Reference

A widget used to choose from a list of items and which has no entry. More...

#include <lstbox.hxx>

Inheritance diagram for ListBox:
[legend]
Collaboration diagram for ListBox:
[legend]

Public Member Functions

 ListBox (vcl::Window *pParent, WinBits nStyle=WB_BORDER)
 
virtual ~ListBox () override
 
virtual void dispose () override
 This is intended to be used to clear any locally held references to other Window-subclass objects. More...
 
virtual void ApplySettings (vcl::RenderContext &rRenderContext) override
 
virtual void Draw (OutputDevice *pDev, const Point &rPos, SystemTextColorFlags nFlags) override
 
virtual void Resize () override
 
virtual bool PreNotify (NotifyEvent &rNEvt) override
 
virtual void StateChanged (StateChangedType nType) override
 
virtual void DataChanged (const DataChangedEvent &rDCEvt) override
 
void Select ()
 
void DoubleClick ()
 
virtual void GetFocus () override
 
virtual void LoseFocus () override
 
virtual const WallpaperGetDisplayBackground () const override
 
virtual void setPosSizePixel (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags=PosSizeFlags::All) override
 
tools::Rectangle GetDropDownPosSizePixel () const
 
void AdaptDropDownLineCountToMaximum ()
 
void SetDropDownLineCount (sal_uInt16 nLines)
 
sal_uInt16 GetDropDownLineCount () const
 
void EnableAutoSize (bool bAuto)
 
bool IsAutoSizeEnabled () const
 
sal_Int32 InsertEntry (const OUString &rStr, sal_Int32 nPos=LISTBOX_APPEND)
 
sal_Int32 InsertEntry (const OUString &rStr, const Image &rImage, sal_Int32 nPos=LISTBOX_APPEND)
 
void RemoveEntry (sal_Int32 nPos)
 
void Clear ()
 
sal_Int32 GetEntryPos (std::u16string_view rStr) const
 
Image GetEntryImage (sal_Int32 nPos) const
 
OUString GetEntry (sal_Int32 nPos) const
 
sal_Int32 GetEntryCount () const
 
void SelectEntry (std::u16string_view rStr, bool bSelect=true)
 
void SelectEntryPos (sal_Int32 nPos, bool bSelect=true)
 
void SelectEntriesPos (const std::vector< sal_Int32 > &rPositions, bool bSelect=true)
 
sal_Int32 GetSelectedEntryCount () const
 
OUString GetSelectedEntry (sal_Int32 nSelIndex=0) const
 
sal_Int32 GetSelectedEntryPos (sal_Int32 nSelIndex=0) const
 
bool IsEntryPosSelected (sal_Int32 nPos) const
 
void SetNoSelection ()
 
void SetEntryData (sal_Int32 nPos, void *pNewData)
 
void * GetEntryData (sal_Int32 nPos) const
 
void SetEntryFlags (sal_Int32 nPos, ListBoxEntryFlags nFlags)
 this methods stores a combination of flags from the ListBoxEntryFlags::* defines at the given entry. More...
 
void SetTopEntry (sal_Int32 nPos)
 
sal_Int32 GetTopEntry () const
 
void SetSeparatorPos (sal_Int32 n)
 Removes existing separators, and sets the position of the one and only separator. More...
 
sal_Int32 GetSeparatorPos () const
 Gets the position of the separator which was added first. More...
 
void AddSeparator (sal_Int32 n)
 Adds a new separator at the given position n. More...
 
bool IsTravelSelect () const
 
bool IsInDropDown () const
 
void ToggleDropDown ()
 
void EnableMultiSelection (bool bMulti)
 
bool IsMultiSelectionEnabled () const
 
void SetHighlightColor (const Color &rColor)
 
void SetHighlightTextColor (const Color &rColor)
 
void SetReadOnly (bool bReadOnly=true)
 
bool IsReadOnly () const
 
tools::Rectangle GetBoundingRectangle (sal_Int32 nItem) const
 
void SetSelectHdl (const Link< ListBox &, void > &rLink)
 
Size CalcSubEditSize () const
 
Size CalcMinimumSize () const
 
virtual Size GetOptimalSize () const override
 
Size CalcAdjustedSize (const Size &rPrefSize) const
 
Size CalcBlockSize (sal_uInt16 nColumns, sal_uInt16 nLines) const
 
void GetMaxVisColumnsAndLines (sal_uInt16 &rnCols, sal_uInt16 &rnLines) const
 
sal_uInt16 GetDisplayLineCount () const
 
tools::Long GetIndexForPoint (const Point &rPoint, sal_Int32 &rPos) const
 
void setMaxWidthChars (sal_Int32 nWidth)
 
virtual bool set_property (const OUString &rKey, const OUString &rValue) override
 
virtual FactoryFunction GetUITestFactory () const override
 
virtual void DumpAsPropertyTree (tools::JsonWriter &) override
 Dumps itself and potentially its children to a property tree, to be written easily to JSON. More...
 
tools::Long GetIndexForPoint (const Point &rPoint) const
 checks whether a certain point lies within the bounds of a listbox item and returns the item as well as the character position the point is at. More...
 
- Public Member Functions inherited from Control
SAL_DLLPRIVATE void ImplClearLayoutData () const
 
SAL_DLLPRIVATE void ImplDrawFrame (OutputDevice *pDev, tools::Rectangle &rRect)
 draws a frame around the give rectangle, onto the given device More...
 
 Control (vcl::Window *pParent, WinBits nWinStyle=0)
 
virtual ~Control () override
 
virtual void dispose () override
 This is intended to be used to clear any locally held references to other Window-subclass objects. More...
 
virtual void EnableRTL (bool bEnable=true) override
 
virtual bool EventNotify (NotifyEvent &rNEvt) override
 
virtual void StateChanged (StateChangedType nStateChange) override
 
virtual void Resize () override
 
virtual void SetText (const OUString &rStr) override
 
virtual OUString GetDisplayText () const override
 
tools::Rectangle GetCharacterBounds (tools::Long nIndex) const
 
tools::Long GetIndexForPoint (const Point &rPoint) const
 
Pair GetLineStartEnd (tools::Long nLine) const
 
tools::Long ToRelativeLineIndex (tools::Long nIndex) const
 ToRelativeLineIndex changes a layout data index to a count relative to its line. More...
 
void SetLoseFocusHdl (const Link< Control &, void > &rLink)
 
bool HasControlFocus () const
 determines whether the control currently has the focus More...
 
void SetLayoutDataParent (const Control *pParent) const
 
virtual Size GetOptimalSize () const override
 
void SetReferenceDevice (OutputDevice *_referenceDevice)
 sets a reference device used for rendering control text More...
 
OutputDeviceGetReferenceDevice () const
 
vcl::Font GetUnzoomedControlPointFont () const
 
void SetShowAccelerator (bool val)
 
virtual void LogicInvalidate (const tools::Rectangle *pRectangle) override
 Notify the LOK client about an invalidated area. More...
 
- Public Member Functions inherited from vcl::Window
 DECL_DLLPRIVATE_LINK (ImplHandlePaintHdl, Timer *, void)
 
 DECL_DLLPRIVATE_LINK (ImplGenerateMouseMoveHdl, void *, void)
 
 DECL_DLLPRIVATE_LINK (ImplTrackTimerHdl, Timer *, void)
 
 DECL_DLLPRIVATE_LINK (ImplAsyncFocusHdl, void *, void)
 
 DECL_DLLPRIVATE_LINK (ImplHandleResizeTimerHdl, Timer *, void)
 
SAL_DLLPRIVATE vcl::WindowImplGetFrameWindow () const
 
weld::WindowGetFrameWeld () const
 
vcl::WindowGetFrameWindow () const
 
SalFrameImplGetFrame () const
 
SAL_DLLPRIVATE ImplFrameDataImplGetFrameData ()
 
vcl::WindowImplGetWindow () const
 if this is a proxy return the client, otherwise itself More...
 
SAL_DLLPRIVATE ImplWinDataImplGetWinData () const
 
SAL_DLLPRIVATE vcl::WindowImplGetClientWindow () const
 
SAL_DLLPRIVATE vcl::WindowImplGetDlgWindow (sal_uInt16 n, GetDlgWindowType nType, sal_uInt16 nStart=0, sal_uInt16 nEnd=0xFFFF, sal_uInt16 *pIndex=nullptr)
 
SAL_DLLPRIVATE vcl::WindowImplGetParent () const
 
SAL_DLLPRIVATE vcl::WindowImplFindWindow (const Point &rFramePos)
 
SAL_DLLPRIVATE void ImplInvalidateFrameRegion (const vcl::Region *pRegion, InvalidateFlags nFlags)
 
SAL_DLLPRIVATE void ImplInvalidateOverlapFrameRegion (const vcl::Region &rRegion)
 
SAL_DLLPRIVATE bool ImplSetClipFlag (bool bSysObjOnlySmaller=false)
 
SAL_DLLPRIVATE bool ImplIsWindowOrChild (const vcl::Window *pWindow, bool bSystemWindow=false) const
 
SAL_DLLPRIVATE bool ImplIsChild (const vcl::Window *pWindow, bool bSystemWindow=false) const
 
SAL_DLLPRIVATE bool ImplIsFloatingWindow () const
 
SAL_DLLPRIVATE bool ImplIsPushButton () const
 
SAL_DLLPRIVATE bool ImplIsSplitter () const
 
SAL_DLLPRIVATE bool ImplIsOverlapWindow () const
 
SAL_DLLPRIVATE void ImplIsInTaskPaneList (bool mbIsInTaskList)
 
SAL_DLLPRIVATE WindowImplImplGetWindowImpl () const
 
SAL_DLLPRIVATE void ImplGrabFocus (GetFocusFlags nFlags)
 
SAL_DLLPRIVATE void ImplGrabFocusToDocument (GetFocusFlags nFlags)
 
SAL_DLLPRIVATE void ImplInvertFocus (const tools::Rectangle &rRect)
 
SAL_DLLPRIVATE PointerStyle ImplGetMousePointer () const
 
SAL_DLLPRIVATE void ImplCallMouseMove (sal_uInt16 nMouseCode, bool bModChanged=false)
 
SAL_DLLPRIVATE void ImplGenerateMouseMove ()
 
SAL_DLLPRIVATE void ImplNotifyKeyMouseCommandEventListeners (NotifyEvent &rNEvt)
 
SAL_DLLPRIVATE void ImplNotifyIconifiedState (bool bIconified)
 
SAL_DLLPRIVATE void ImplUpdateAll ()
 
SAL_DLLPRIVATE void ImplControlFocus (GetFocusFlags nFlags=GetFocusFlags::NONE)
 
SAL_DLLPRIVATE void ImplMirrorFramePos (Point &pt) const
 
SAL_DLLPRIVATE void ImplPosSizeWindow (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags)
 
SAL_DLLPRIVATE void ImplCallResize ()
 
SAL_DLLPRIVATE void ImplCallMove ()
 
SAL_DLLPRIVATE void CompatGetFocus ()
 
SAL_DLLPRIVATE void CompatLoseFocus ()
 
SAL_DLLPRIVATE void CompatStateChanged (StateChangedType nStateChange)
 
SAL_DLLPRIVATE void CompatDataChanged (const DataChangedEvent &rDCEvt)
 
SAL_DLLPRIVATE bool CompatPreNotify (NotifyEvent &rNEvt)
 
SAL_DLLPRIVATE bool CompatNotify (NotifyEvent &rNEvt)
 
void IncModalCount ()
 
void DecModalCount ()
 
 Window (vcl::Window *pParent, WinBits nStyle=0)
 
virtual ~Window () override
 
::OutputDevice const * GetOutDev () const
 
::OutputDeviceGetOutDev ()
 
Color GetBackgroundColor () const
 
const WallpaperGetBackground () const
 
bool IsBackground () const
 
const MapModeGetMapMode () const
 
void SetBackground ()
 
void SetBackground (const Wallpaper &rBackground)
 
virtual void MouseMove (const MouseEvent &rMEvt)
 
virtual void MouseButtonDown (const MouseEvent &rMEvt)
 
virtual void MouseButtonUp (const MouseEvent &rMEvt)
 
virtual void KeyInput (const KeyEvent &rKEvt)
 
virtual void KeyUp (const KeyEvent &rKEvt)
 
virtual void PrePaint (vcl::RenderContext &rRenderContext)
 
virtual void Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
 
virtual void PostPaint (vcl::RenderContext &rRenderContext)
 
void Erase (vcl::RenderContext &rRenderContext)
 
virtual void Draw (::OutputDevice *pDev, const Point &rPos, SystemTextColorFlags nFlags)
 
virtual void Move ()
 
virtual void Resize ()
 
virtual void Activate ()
 
virtual void Deactivate ()
 
virtual void GetFocus ()
 
virtual void LoseFocus ()
 
virtual void RequestHelp (const HelpEvent &rHEvt)
 
virtual void Command (const CommandEvent &rCEvt)
 
virtual void Tracking (const TrackingEvent &rTEvt)
 
virtual void StateChanged (StateChangedType nStateChange)
 
virtual void DataChanged (const DataChangedEvent &rDCEvt)
 
virtual bool PreNotify (NotifyEvent &rNEvt)
 
virtual bool EventNotify (NotifyEvent &rNEvt)
 
void AddEventListener (const Link< VclWindowEvent &, void > &rEventListener)
 
void RemoveEventListener (const Link< VclWindowEvent &, void > &rEventListener)
 
void AddChildEventListener (const Link< VclWindowEvent &, void > &rEventListener)
 
void RemoveChildEventListener (const Link< VclWindowEvent &, void > &rEventListener)
 
ImplSVEventPostUserEvent (const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
 
void RemoveUserEvent (ImplSVEvent *nUserEvent)
 
LanguageType GetInputLanguage () const
 
void SetStyle (WinBits nStyle)
 
WinBits GetStyle () const
 
WinBits GetPrevStyle () const
 
void SetExtendedStyle (WindowExtendedStyle nExtendedStyle)
 
WindowExtendedStyle GetExtendedStyle () const
 
void SetType (WindowType nType)
 
WindowType GetType () const
 
bool IsSystemWindow () const
 
bool IsDockingWindow () const
 
bool IsDialog () const
 
bool IsMenuFloatingWindow () const
 
bool IsToolbarFloatingWindow () const
 
bool IsTopWindow () const
 
SystemWindowGetSystemWindow () const
 
bool SupportsDoubleBuffering () const
 Can the widget derived from this Window do the double-buffering via RenderContext properly? More...
 
void RequestDoubleBuffering (bool bRequest)
 Enable/disable double-buffering of the frame window and all its children. More...
 
void EnableAllResize ()
 
void SetBorderStyle (WindowBorderStyle nBorderStyle)
 
WindowBorderStyle GetBorderStyle () const
 
void GetBorder (sal_Int32 &rLeftBorder, sal_Int32 &rTopBorder, sal_Int32 &rRightBorder, sal_Int32 &rBottomBorder) const
 
Size CalcWindowSize (const Size &rOutSz) const
 
Size CalcOutputSize (const Size &rWinSz) const
 
tools::Long CalcTitleWidth () const
 
void EnableClipSiblings (bool bClipSiblings=true)
 
void EnableChildTransparentMode (bool bEnable=true)
 
bool IsChildTransparentModeEnabled () const
 
void SetMouseTransparent (bool bTransparent)
 
bool IsMouseTransparent () const
 
void SetPaintTransparent (bool bTransparent)
 
bool IsPaintTransparent () const
 
void SetDialogControlStart (bool bStart)
 
bool IsDialogControlStart () const
 
void SetDialogControlFlags (DialogControlFlags nFlags)
 
DialogControlFlags GetDialogControlFlags () const
 
PointerState GetPointerState ()
 
bool IsMouseOver () const
 
void SetInputContext (const InputContext &rInputContext)
 
const InputContextGetInputContext () const
 
void PostExtTextInputEvent (VclEventId nType, const OUString &rText)
 
void EndExtTextInput ()
 
void SetCursorRect (const tools::Rectangle *pRect=nullptr, tools::Long nExtTextInputWidth=0)
 
const tools::RectangleGetCursorRect () const
 
tools::Long GetCursorExtTextInputWidth () const
 
void SetCompositionCharRect (const tools::Rectangle *pRect, tools::Long nCompositionLength, bool bVertical=false)
 
void UpdateSettings (const AllSettings &rSettings, bool bChild=false)
 
void NotifyAllChildren (DataChangedEvent &rDCEvt)
 
void SetPointFont (vcl::RenderContext &rRenderContext, const vcl::Font &rFont)
 
vcl::Font GetPointFont (vcl::RenderContext const &rRenderContext) const
 
void SetZoomedPointFont (vcl::RenderContext &rRenderContext, const vcl::Font &rFont)
 
tools::Long GetDrawPixel (::OutputDevice const *pDev, tools::Long nPixels) const
 
vcl::Font GetDrawPixelFont (::OutputDevice const *pDev) const
 
void SetControlFont ()
 
void SetControlFont (const vcl::Font &rFont)
 
vcl::Font GetControlFont () const
 
bool IsControlFont () const
 
void ApplyControlFont (vcl::RenderContext &rRenderContext, const vcl::Font &rDefaultFont)
 
void SetControlForeground ()
 
void SetControlForeground (const Color &rColor)
 
const ColorGetControlForeground () const
 
bool IsControlForeground () const
 
void ApplyControlForeground (vcl::RenderContext &rRenderContext, const Color &rDefaultColor)
 
void SetControlBackground ()
 
void SetControlBackground (const Color &rColor)
 
const ColorGetControlBackground () const
 
bool IsControlBackground () const
 
void ApplyControlBackground (vcl::RenderContext &rRenderContext, const Color &rDefaultColor)
 
void SetParentClipMode (ParentClipMode nMode=ParentClipMode::NONE)
 
ParentClipMode GetParentClipMode () const
 
void SetWindowRegionPixel ()
 
void SetWindowRegionPixel (const vcl::Region &rRegion)
 
vcl::Region GetWindowClipRegionPixel () const
 
vcl::Region GetPaintRegion () const
 
bool IsInPaint () const
 
void ExpandPaintClipRegion (const vcl::Region &rRegion)
 
void SetParent (vcl::Window *pNewParent)
 
vcl::WindowGetParent () const
 
DialogGetParentDialog () const
 
bool IsAncestorOf (const vcl::Window &rWindow) const
 
void Show (bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
 
void Hide ()
 
bool IsVisible () const
 
bool IsReallyVisible () const
 
bool IsReallyShown () const
 
bool IsInInitShow () const
 
void Enable (bool bEnable=true, bool bChild=true)
 
void Disable (bool bChild=true)
 
bool IsEnabled () const
 
void EnableInput (bool bEnable=true, bool bChild=true)
 
void EnableInput (bool bEnable, const vcl::Window *pExcludeWindow)
 
bool IsInputEnabled () const
 
void AlwaysEnableInput (bool bAlways, bool bChild=true)
 Override EnableInput. More...
 
bool IsAlwaysEnableInput () const
 returns the current AlwaysEnableInput state More...
 
bool IsInModalMode () const
 A window is in modal mode if one of its children or subchildren is a running modal window (a modal dialog) More...
 
void SetActivateMode (ActivateModeFlags nMode)
 
ActivateModeFlags GetActivateMode () const
 
void ToTop (ToTopFlags nFlags=ToTopFlags::NONE)
 
void SetZOrder (vcl::Window *pRefWindow, ZOrderFlags nFlags)
 
void EnableAlwaysOnTop (bool bEnable=true)
 
bool IsAlwaysOnTopEnabled () const
 
virtual void setPosSizePixel (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags=PosSizeFlags::All)
 
virtual void SetPosPixel (const Point &rNewPos)
 
virtual Point GetPosPixel () const
 
virtual void SetSizePixel (const Size &rNewSize)
 
virtual Size GetSizePixel () const
 
virtual void SetPosSizePixel (const Point &rNewPos, const Size &rNewSize)
 
virtual void SetOutputSizePixel (const Size &rNewSize)
 
bool IsDefaultPos () const
 
bool IsDefaultSize () const
 
Point GetOffsetPixelFrom (const vcl::Window &rWindow) const
 
Point OutputToScreenPixel (const Point &rPos) const
 
Point ScreenToOutputPixel (const Point &rPos) const
 
Point OutputToNormalizedScreenPixel (const Point &rPos) const
 
Point NormalizedScreenToOutputPixel (const Point &rPos) const
 
Point OutputToAbsoluteScreenPixel (const Point &rPos) const
 
Point AbsoluteScreenToOutputPixel (const Point &rPos) const
 
tools::Rectangle GetDesktopRectPixel () const
 
tools::Rectangle GetWindowExtentsRelative (const vcl::Window &rRelativeWindow) const
 
tools::Rectangle GetWindowExtentsAbsolute () const
 
bool IsScrollable () const
 
virtual void Scroll (tools::Long nHorzScroll, tools::Long nVertScroll, ScrollFlags nFlags=ScrollFlags::NONE)
 
void Scroll (tools::Long nHorzScroll, tools::Long nVertScroll, const tools::Rectangle &rRect, ScrollFlags nFlags=ScrollFlags::NONE)
 
void Invalidate (InvalidateFlags nFlags=InvalidateFlags::NONE)
 
void Invalidate (const tools::Rectangle &rRect, InvalidateFlags nFlags=InvalidateFlags::NONE)
 
void Invalidate (const vcl::Region &rRegion, InvalidateFlags nFlags=InvalidateFlags::NONE)
 
virtual void LogicInvalidate (const tools::Rectangle *pRectangle)
 Notification about some rectangle of the output device got invalidated.Used for the main document window. More...
 
virtual void PixelInvalidate (const tools::Rectangle *pRectangle)
 Notification about some rectangle of the output device got invalidated. More...
 
void Validate ()
 
bool HasPaintEvent () const
 
void PaintImmediately ()
 
void EnableDocking (bool bEnable=true)
 
void EnablePaint (bool bEnable)
 
bool IsPaintEnabled () const
 
void SetUpdateMode (bool bUpdate)
 
bool IsUpdateMode () const
 
void SetParentUpdateMode (bool bUpdate)
 
void GrabFocus ()
 
bool HasFocus () const
 
bool HasChildPathFocus (bool bSystemWindow=false) const
 
bool IsActive () const
 
bool HasActiveChildFrame () const
 
GetFocusFlags GetGetFocusFlags () const
 
void GrabFocusToDocument ()
 
VclPtr< vcl::WindowGetFocusedWindow () const
 
void SetFakeFocus (bool bFocus)
 Set this when you need to act as if the window has focus even if it doesn't. More...
 
bool IsCompoundControl () const
 
void LocalStartDrag ()
 
void CaptureMouse ()
 
void ReleaseMouse ()
 
bool IsMouseCaptured () const
 
virtual void SetPointer (PointerStyle)
 
PointerStyle GetPointer () const
 
void EnableChildPointerOverwrite (bool bOverwrite)
 
void SetPointerPosPixel (const Point &rPos)
 
Point GetPointerPosPixel ()
 
Point GetLastPointerPosPixel ()
 
void SetLastMousePos (const Point &rPos)
 Similar to SetPointerPosPixel(), but sets the frame data's last mouse position instead. More...
 
void ShowPointer (bool bVisible)
 
void EnterWait ()
 
void LeaveWait ()
 
bool IsWait () const
 
void SetCursor (vcl::Cursor *pCursor)
 
vcl::CursorGetCursor () const
 
void SetZoom (const Fraction &rZoom)
 
const FractionGetZoom () const
 
bool IsZoom () const
 
tools::Long CalcZoom (tools::Long n) const
 
virtual void SetText (const OUString &rStr)
 
virtual OUString GetText () const
 
virtual OUString GetDisplayText () const
 
virtual const WallpaperGetDisplayBackground () const
 
void SetHelpText (const OUString &rHelpText)
 
const OUString & GetHelpText () const
 
void SetQuickHelpText (const OUString &rHelpText)
 
const OUString & GetQuickHelpText () const
 
void SetHelpId (const OUString &)
 
const OUString & GetHelpId () const
 
sal_uInt16 GetChildCount () const
 
vcl::WindowGetChild (sal_uInt16 nChild) const
 
vcl::WindowGetWindow (GetWindowType nType) const
 
bool IsChild (const vcl::Window *pWindow) const
 
bool IsWindowOrChild (const vcl::Window *pWindow, bool bSystemWindow=false) const
 
SAL_DLLPRIVATE void CollectChildren (::std::vector< vcl::Window * > &rAllChildren)
 Add all children to rAllChildren recursively. More...
 
virtual void ShowFocus (const tools::Rectangle &rRect)
 
void HideFocus ()
 
void DrawSelectionBackground (const tools::Rectangle &rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder)
 
void ShowTracking (const tools::Rectangle &rRect, ShowTrackFlags nFlags=ShowTrackFlags::Small)
 
void HideTracking ()
 
void InvertTracking (const tools::Rectangle &rRect, ShowTrackFlags nFlags)
 
void StartTracking (StartTrackingFlags nFlags=StartTrackingFlags::NONE)
 
void EndTracking (TrackingEventFlags nFlags=TrackingEventFlags::NONE)
 
bool IsTracking () const
 
void StartAutoScroll (StartAutoScrollFlags nFlags)
 
void EndAutoScroll ()
 
bool HandleScrollCommand (const CommandEvent &rCmd, Scrollable *pHScrl, Scrollable *pVScrl)
 
virtual const SystemEnvDataGetSystemData () const
 
virtual css::uno::Reference< css::awt::XVclWindowPeer > GetComponentInterface (bool bCreate=true)
 
void SetComponentInterface (css::uno::Reference< css::awt::XVclWindowPeer > const &xIFace)
 
void SetUseFrameData (bool bUseFrameData)
 
void SetLOKNotifier (const vcl::ILibreOfficeKitNotifier *pNotifier, bool bParent=false)
 Interface to register for dialog / window tunneling. More...
 
const vcl::ILibreOfficeKitNotifierGetLOKNotifier () const
 
vcl::LOKWindowId GetLOKWindowId () const
 
VclPtr< vcl::WindowGetParentWithLOKNotifier ()
 Find the nearest parent with LOK Notifier; can be itself if this Window has LOK notifier set. More...
 
void ReleaseLOKNotifier ()
 Indicate that LOK is not going to use this dialog any more. More...
 
virtual void DumpAsPropertyTree (tools::JsonWriter &)
 Dumps itself and potentially its children to a property tree, to be written easily to JSON. More...
 
void RecordLayoutData (vcl::ControlLayoutData *pLayout, const tools::Rectangle &rRect)
 
VCLXWindowGetWindowPeer () const
 
void SetWindowPeer (css::uno::Reference< css::awt::XVclWindowPeer > const &xPeer, VCLXWindow *pVCLXWindow)
 
bool IsCreatedWithToolkit () const
 
void SetCreatedWithToolkit (bool b)
 
css::uno::Reference< css::datatransfer::dnd::XDropTarget > GetDropTarget ()
 
css::uno::Reference< css::datatransfer::dnd::XDragSource > GetDragSource ()
 
css::uno::Reference< css::datatransfer::dnd::XDragGestureRecognizer > GetDragGestureRecognizer ()
 
css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard ()
 
void SetClipboard (css::uno::Reference< css::datatransfer::clipboard::XClipboard > const &xClipboard)
 Sets a custom clipboard for the window's frame, instead of creating it on-demand using css::datatransfer::clipboard::SystemClipboard. More...
 
virtual void queue_resize (StateChangedType eReason=StateChangedType::Layout)
 
void set_height_request (sal_Int32 nHeightRequest)
 
sal_Int32 get_height_request () const
 
void set_width_request (sal_Int32 nWidthRequest)
 
sal_Int32 get_width_request () const
 
Size get_preferred_size () const
 
VclAlign get_halign () const
 
void set_halign (VclAlign eAlign)
 
VclAlign get_valign () const
 
void set_valign (VclAlign eAlign)
 
bool get_hexpand () const
 
void set_hexpand (bool bExpand)
 
bool get_vexpand () const
 
void set_vexpand (bool bExpand)
 
bool get_expand () const
 
void set_expand (bool bExpand)
 
bool get_fill () const
 
void set_fill (bool bFill)
 
void set_border_width (sal_Int32 nBorderWidth)
 
sal_Int32 get_border_width () const
 
void set_margin_start (sal_Int32 nWidth)
 
sal_Int32 get_margin_start () const
 
void set_margin_end (sal_Int32 nWidth)
 
sal_Int32 get_margin_end () const
 
void set_margin_top (sal_Int32 nWidth)
 
sal_Int32 get_margin_top () const
 
void set_margin_bottom (sal_Int32 nWidth)
 
sal_Int32 get_margin_bottom () const
 
VclPackType get_pack_type () const
 
void set_pack_type (VclPackType ePackType)
 
sal_Int32 get_padding () const
 
void set_padding (sal_Int32 nPadding)
 
sal_Int32 get_grid_width () const
 
void set_grid_width (sal_Int32 nCols)
 
sal_Int32 get_grid_left_attach () const
 
void set_grid_left_attach (sal_Int32 nAttach)
 
sal_Int32 get_grid_height () const
 
void set_grid_height (sal_Int32 nRows)
 
sal_Int32 get_grid_top_attach () const
 
void set_grid_top_attach (sal_Int32 nAttach)
 
bool get_secondary () const
 
void set_secondary (bool bSecondary)
 
bool get_non_homogeneous () const
 
void set_non_homogeneous (bool bNonHomogeneous)
 
virtual bool set_property (const OUString &rKey, const OUString &rValue)
 
bool set_font_attribute (const OUString &rKey, std::u16string_view rValue)
 
void add_to_size_group (const std::shared_ptr< VclSizeGroup > &xGroup)
 
void remove_from_all_size_groups ()
 
void add_mnemonic_label (FixedText *pLabel)
 
void remove_mnemonic_label (FixedText *pLabel)
 
const std::vector< VclPtr< FixedText > > & list_mnemonic_labels () const
 
void reorderWithinParent (sal_uInt16 nNewPosition)
 
void set_id (const OUString &rID)
 Sets an ID. More...
 
const OUString & get_id () const
 Get the ID of the window. More...
 
void EnableNativeWidget (bool bEnable=true)
 
bool IsNativeWidgetEnabled () const
 
void PaintToDevice (::OutputDevice *pDevice, const Point &rPos)
 
KeyIndicatorState GetIndicatorState () const
 Query the states of keyboard indicators - Caps Lock, Num Lock and Scroll Lock. More...
 
void SimulateKeyPress (sal_uInt16 nKeyCode) const
 
virtual OUString GetSurroundingText () const
 
virtual Selection GetSurroundingTextSelection () const
 
virtual bool DeleteSurroundingText (const Selection &rSelection)
 
virtual FactoryFunction GetUITestFactory () const
 
virtual bool IsChart () const
 
virtual bool IsStarMath () const
 
void SetHelpHdl (const Link< vcl::Window &, bool > &rLink)
 
void SetMnemonicActivateHdl (const Link< vcl::Window &, bool > &rLink)
 
void SetModalHierarchyHdl (const Link< bool, void > &rLink)
 
void SetDumpAsPropertyTreeHdl (const Link< tools::JsonWriter &, void > &rLink)
 
Size GetOutputSizePixel () const
 
tools::Rectangle GetOutputRectPixel () const
 
Point LogicToPixel (const Point &rLogicPt) const
 
Size LogicToPixel (const Size &rLogicSize) const
 
tools::Rectangle LogicToPixel (const tools::Rectangle &rLogicRect) const
 
vcl::Region LogicToPixel (const vcl::Region &rLogicRegion) const
 
Point LogicToPixel (const Point &rLogicPt, const MapMode &rMapMode) const
 
Size LogicToPixel (const Size &rLogicSize, const MapMode &rMapMode) const
 
tools::Rectangle LogicToPixel (const tools::Rectangle &rLogicRect, const MapMode &rMapMode) const
 
Point PixelToLogic (const Point &rDevicePt) const
 
Size PixelToLogic (const Size &rDeviceSize) const
 
tools::Rectangle PixelToLogic (const tools::Rectangle &rDeviceRect) const
 
tools::PolyPolygon PixelToLogic (const tools::PolyPolygon &rDevicePolyPoly) const
 
vcl::Region PixelToLogic (const vcl::Region &rDeviceRegion) const
 
Point PixelToLogic (const Point &rDevicePt, const MapMode &rMapMode) const
 
Size PixelToLogic (const Size &rDeviceSize, const MapMode &rMapMode) const
 
tools::Rectangle PixelToLogic (const tools::Rectangle &rDeviceRect, const MapMode &rMapMode) const
 
Size LogicToLogic (const Size &rSzSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
 
const AllSettingsGetSettings () const
 
void SetSettings (const AllSettings &rSettings)
 
void SetSettings (const AllSettings &rSettings, bool bChild)
 
tools::Rectangle GetTextRect (const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
 
float GetDPIScaleFactor () const
 
tools::Long GetOutOffXPixel () const
 
tools::Long GetOutOffYPixel () const
 
void EnableMapMode (bool bEnable=true)
 
bool IsMapModeEnabled () const
 
void SetMapMode ()
 
void SetMapMode (const MapMode &rNewMapMode)
 
virtual void EnableRTL (bool bEnable=true)
 
bool IsRTLEnabled () const
 
void SetFont (const vcl::Font &rNewFont)
 
const vcl::FontGetFont () const
 
tools::Long GetTextWidth (const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
 Width of the text. More...
 
tools::Long GetTextHeight () const
 Height where any character of the current font fits; in logic coordinates. More...
 
float approximate_digit_width () const
 
void SetTextColor (const Color &rColor)
 
const ColorGetTextColor () const
 
void SetTextFillColor ()
 
void SetTextFillColor (const Color &rColor)
 
Color GetTextFillColor () const
 
bool IsTextFillColor () const
 
void SetTextLineColor ()
 
void SetTextLineColor (const Color &rColor)
 
const ColorGetTextLineColor () const
 
bool IsTextLineColor () const
 
void SetOverlineColor ()
 
void SetOverlineColor (const Color &rColor)
 
const ColorGetOverlineColor () const
 
bool IsOverlineColor () const
 
void SetTextAlign (TextAlign eAlign)
 
TextAlign GetTextAlign () const
 
bool IsNativeControlSupported (ControlType nType, ControlPart nPart) const
 Query the platform layer for control support. More...
 
bool GetNativeControlRegion (ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) const
 Query the native control's actual drawing region (including adornment) More...
 
css::uno::Reference< css::accessibility::XAccessible > GetAccessible (bool bCreate=true)
 
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible ()
 
void SetAccessible (const css::uno::Reference< css::accessibility::XAccessible > &)
 
vcl::WindowGetAccessibleParentWindow () const
 
sal_uInt16 GetAccessibleChildWindowCount ()
 
vcl::WindowGetAccessibleChildWindow (sal_uInt16 n)
 
void SetAccessibleRole (sal_uInt16 nRole)
 
sal_uInt16 GetAccessibleRole () const
 
void SetAccessibleName (const OUString &rName)
 
OUString GetAccessibleName () const
 
void SetAccessibleDescription (const OUString &rDescr)
 
OUString GetAccessibleDescription () const
 
void SetAccessibleRelationLabeledBy (vcl::Window *pLabeledBy)
 
vcl::WindowGetAccessibleRelationLabeledBy () const
 
void SetAccessibleRelationLabelFor (vcl::Window *pLabelFor)
 
vcl::WindowGetAccessibleRelationLabelFor () const
 
vcl::WindowGetAccessibleRelationMemberOf () const
 
bool IsAccessibilityEventsSuppressed (bool bTraverseParentPath=true)
 
void SetAccessibilityEventsSuppressed (bool bSuppressed)
 
KeyEvent GetActivationKey () const
 
- Public Member Functions inherited from VclReferenceBase
void acquire () const
 
void release () const
 
sal_Int32 getRefCount () const
 
void disposeOnce ()
 
bool isDisposed () const
 

Protected Member Functions

SAL_DLLPRIVATE void ImplInit (vcl::Window *pParent, WinBits nStyle)
 
bool IsDropDownBox () const
 
 ListBox (WindowType nType)
 
virtual void FillLayoutData () const override
 
- Protected Member Functions inherited from Control
 Control (WindowType nType)
 
virtual void FillLayoutData () const
 
void AppendLayoutData (const Control &rSubControl) const
 
void CreateLayoutData () const
 creates the mpData->mpLayoutData structure More...
 
bool HasLayoutData () const
 determines whether we currently have layout data More...
 
bool ImplCallEventListenersAndHandler (VclEventId nEvent, std::function< void()> const &callHandler)
 this calls both our event listeners, and a specified handler More...
 
void CallEventListeners (VclEventId nEvent, void *pData=nullptr)
 
tools::Rectangle DrawControlText (OutputDevice &_rTargetDevice, const tools::Rectangle &_rRect, const OUString &_rStr, DrawTextFlags _nStyle, std::vector< tools::Rectangle > *_pVector, OUString *_pDisplayText, const Size *i_pDeviceSize=nullptr) const
 draws the given text onto the given device More...
 
tools::Rectangle GetControlTextRect (OutputDevice &_rTargetDevice, const tools::Rectangle &rRect, const OUString &_rStr, DrawTextFlags _nStyle, Size *o_pDeviceSize=nullptr) const
 
virtual const vcl::FontGetCanonicalFont (const StyleSettings &_rStyle) const
 
virtual const ColorGetCanonicalTextColor (const StyleSettings &_rStyle) const
 
void ImplInitSettings ()
 
virtual void ApplySettings (vcl::RenderContext &rRenderContext) override
 
virtual bool FocusWindowBelongsToControl (const vcl::Window *pFocusWin) const
 
- Protected Member Functions inherited from vcl::Window
virtual void dispose () override
 This is intended to be used to clear any locally held references to other Window-subclass objects. More...
 
SAL_DLLPRIVATE void ImplInit (vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
 
SAL_DLLPRIVATE void ImplInvalidateParentFrameRegion (const vcl::Region &rRegion)
 
SAL_DLLPRIVATE void ImplValidateFrameRegion (const vcl::Region *rRegion, ValidateFlags nFlags)
 
SAL_DLLPRIVATE void ImplValidate ()
 
SAL_DLLPRIVATE void ImplMoveInvalidateRegion (const tools::Rectangle &rRect, tools::Long nHorzScroll, tools::Long nVertScroll, bool bChildren)
 
SAL_DLLPRIVATE void ImplMoveAllInvalidateRegions (const tools::Rectangle &rRect, tools::Long nHorzScroll, tools::Long nVertScroll, bool bChildren)
 
SAL_DLLPRIVATE vcl::WindowImplGetBorderWindow () const
 
virtual void ImplInvalidate (const vcl::Region *pRegion, InvalidateFlags nFlags)
 
virtual WindowHitTest ImplHitTest (const Point &rFramePos)
 
SAL_DLLPRIVATE void ImplSetMouseTransparent (bool bTransparent)
 
SAL_DLLPRIVATE void ImplScroll (const tools::Rectangle &rRect, tools::Long nHorzScroll, tools::Long nVertScroll, ScrollFlags nFlags)
 
SAL_DLLPRIVATE bool ImplSetClipFlagChildren (bool bSysObjOnlySmaller)
 
SAL_DLLPRIVATE bool ImplSetClipFlagOverlapWindows (bool bSysObjOnlySmaller=false)
 
SAL_DLLPRIVATE void PushPaintHelper (PaintHelper *pHelper, vcl::RenderContext &rRenderContext)
 
SAL_DLLPRIVATE void PopPaintHelper (PaintHelper const *pHelper)
 
 Window (WindowType nType)
 
void SetCompoundControl (bool bCompound)
 
void CallEventListeners (VclEventId nEvent, void *pData=nullptr)
 
virtual void ImplAdjustNWFSizes ()
 
virtual void ApplySettings (vcl::RenderContext &rRenderContext)
 
SAL_DLLPRIVATE float approximate_char_width () const
 
SAL_DLLPRIVATE vcl::WindowgetLegacyNonLayoutAccessibleRelationMemberOf () const
 
SAL_DLLPRIVATE vcl::WindowgetLegacyNonLayoutAccessibleRelationLabeledBy () const
 
SAL_DLLPRIVATE vcl::WindowgetLegacyNonLayoutAccessibleRelationLabelFor () const
 
virtual vcl::WindowgetAccessibleRelationLabelFor () const
 
virtual sal_uInt16 getDefaultAccessibleRole () const
 
virtual OUString getDefaultAccessibleName () const
 
void InvalidateSizeCache ()
 clear OptimalSize cache More...
 
- Protected Member Functions inherited from VclReferenceBase
 VclReferenceBase ()
 
virtual ~VclReferenceBase ()
 
virtual void dispose ()
 

Static Protected Member Functions

static SAL_DLLPRIVATE WinBits ImplInitStyle (WinBits nStyle)
 

Private Member Functions

SAL_DLLPRIVATE void ImplInitListBoxData ()
 
 DECL_DLLPRIVATE_LINK (ImplSelectHdl, LinkParamNone *, void)
 
 DECL_DLLPRIVATE_LINK (ImplScrollHdl, ImplListBox *, void)
 
 DECL_DLLPRIVATE_LINK (ImplCancelHdl, LinkParamNone *, void)
 
 DECL_DLLPRIVATE_LINK (ImplDoubleClickHdl, ImplListBoxWindow *, void)
 
 DECL_DLLPRIVATE_LINK (ImplPopupModeEndHdl, FloatingWindow *, void)
 
 DECL_DLLPRIVATE_LINK (ImplSelectionChangedHdl, sal_Int32, void)
 
 DECL_DLLPRIVATE_LINK (ImplFocusHdl, sal_Int32, void)
 
 DECL_DLLPRIVATE_LINK (ImplListItemSelectHdl, LinkParamNone *, void)
 
 DECL_DLLPRIVATE_LINK (ImplClickBtnHdl, void *, void)
 

Private Attributes

VclPtr< ImplListBoxmpImplLB
 
VclPtr< ImplListBoxFloatingWindowmpFloatWin
 
VclPtr< ImplWinmpImplWin
 
VclPtr< ImplBtnmpBtn
 
sal_uInt16 mnDDHeight
 
sal_Int32 m_nMaxWidthChars
 
Link< ListBox &, void > maSelectHdl
 
sal_uInt16 mnLineCount
 
bool mbDDAutoSize: 1
 

Additional Inherited Members

- Static Public Member Functions inherited from vcl::Window
static SAL_DLLPRIVATE void ImplInitAppFontData (vcl::Window const *pWindow)
 
static SAL_DLLPRIVATE void ImplCalcSymbolRect (tools::Rectangle &rRect)
 
static DockingManagerGetDockingManager ()
 
static VclPtr< vcl::WindowSaveFocus ()
 
static void EndSaveFocus (const VclPtr< vcl::Window > &xFocusWin)
 
static VclPtr< vcl::WindowFindLOKWindow (vcl::LOKWindowId nWindowId)
 Find an existing Window based on the LOKWindowId. More...
 
static bool IsLOKWindowsEmpty ()
 check if LOK Window container is empty More...
 
- Protected Attributes inherited from Control
std::optional< vcl::ControlLayoutDatamxLayoutData
 
VclPtr< OutputDevicempReferenceDevice
 

Detailed Description

A widget used to choose from a list of items and which has no entry.

Definition at line 82 of file lstbox.hxx.

Constructor & Destructor Documentation

◆ ListBox() [1/2]

ListBox::ListBox ( WindowType  nType)
explicitprotected

Definition at line 37 of file listbox.cxx.

References ImplInitListBoxData(), and nType.

◆ ListBox() [2/2]

ListBox::ListBox ( vcl::Window pParent,
WinBits  nStyle = WB_BORDER 
)
explicit

Definition at line 44 of file listbox.cxx.

References ImplInit(), ImplInitListBoxData(), and LISTBOX.

◆ ~ListBox()

ListBox::~ListBox ( )
overridevirtual

Definition at line 50 of file listbox.cxx.

References VclReferenceBase::disposeOnce().

Member Function Documentation

◆ AdaptDropDownLineCountToMaximum()

void ListBox::AdaptDropDownLineCountToMaximum ( )

◆ AddSeparator()

void ListBox::AddSeparator ( sal_Int32  n)

Adds a new separator at the given position n.

Definition at line 1366 of file listbox.cxx.

References ImplListBox::AddSeparator(), mpImplLB, and n.

Referenced by SalInstanceComboBoxWithoutEdit::insert_separator().

◆ ApplySettings()

void ListBox::ApplySettings ( vcl::RenderContext rRenderContext)
overridevirtual

Reimplemented from Control.

Definition at line 312 of file listbox.cxx.

References OutputDevice::SetBackground().

◆ CalcAdjustedSize()

Size ListBox::CalcAdjustedSize ( const Size rPrefSize) const

◆ CalcBlockSize()

Size ListBox::CalcBlockSize ( sal_uInt16  nColumns,
sal_uInt16  nLines 
) const

◆ CalcMinimumSize()

Size ListBox::CalcMinimumSize ( ) const

◆ CalcSubEditSize()

Size ListBox::CalcSubEditSize ( ) const

◆ Clear()

void ListBox::Clear ( )

◆ DataChanged()

void ListBox::DataChanged ( const DataChangedEvent rDCEvt)
overridevirtual

◆ DECL_DLLPRIVATE_LINK() [1/9]

ListBox::DECL_DLLPRIVATE_LINK ( ImplCancelHdl  ,
LinkParamNone ,
void   
)
private

◆ DECL_DLLPRIVATE_LINK() [2/9]

ListBox::DECL_DLLPRIVATE_LINK ( ImplClickBtnHdl  ,
void *  ,
void   
)
private

◆ DECL_DLLPRIVATE_LINK() [3/9]

ListBox::DECL_DLLPRIVATE_LINK ( ImplDoubleClickHdl  ,
ImplListBoxWindow ,
void   
)
private

◆ DECL_DLLPRIVATE_LINK() [4/9]

ListBox::DECL_DLLPRIVATE_LINK ( ImplFocusHdl  ,
sal_Int32  ,
void   
)
private

◆ DECL_DLLPRIVATE_LINK() [5/9]

ListBox::DECL_DLLPRIVATE_LINK ( ImplListItemSelectHdl  ,
LinkParamNone ,
void   
)
private

◆ DECL_DLLPRIVATE_LINK() [6/9]

ListBox::DECL_DLLPRIVATE_LINK ( ImplPopupModeEndHdl  ,
FloatingWindow ,
void   
)
private

◆ DECL_DLLPRIVATE_LINK() [7/9]

ListBox::DECL_DLLPRIVATE_LINK ( ImplScrollHdl  ,
ImplListBox ,
void   
)
private

◆ DECL_DLLPRIVATE_LINK() [8/9]

ListBox::DECL_DLLPRIVATE_LINK ( ImplSelectHdl  ,
LinkParamNone ,
void   
)
private

◆ DECL_DLLPRIVATE_LINK() [9/9]

ListBox::DECL_DLLPRIVATE_LINK ( ImplSelectionChangedHdl  ,
sal_Int32  ,
void   
)
private

◆ dispose()

void ListBox::dispose ( void  )
overridevirtual

This is intended to be used to clear any locally held references to other Window-subclass objects.

Reimplemented from Control.

Definition at line 55 of file listbox.cxx.

References Control::CallEventListeners(), Control::dispose(), VclPtr< reference_type >::disposeAndClear(), mpBtn, mpFloatWin, mpImplLB, mpImplWin, and ObjectDying.

◆ DoubleClick()

void ListBox::DoubleClick ( )

Definition at line 908 of file listbox.cxx.

References Control::ImplCallEventListenersAndHandler(), and ListboxDoubleClick.

◆ Draw()

void ListBox::Draw ( OutputDevice pDev,
const Point rPos,
SystemTextColorFlags  nFlags 
)
overridevirtual

◆ DumpAsPropertyTree()

void ListBox::DumpAsPropertyTree ( tools::JsonWriter rJsonWriter)
overridevirtual

Dumps itself and potentially its children to a property tree, to be written easily to JSON.

Reimplemented from vcl::Window.

Definition at line 1425 of file listbox.cxx.

References vcl::Window::DumpAsPropertyTree(), GetEntry(), GetEntryCount(), GetSelectedEntryCount(), GetSelectedEntryPos(), i, tools::JsonWriter::put(), tools::JsonWriter::putSimpleValue(), and tools::JsonWriter::startArray().

◆ EnableAutoSize()

void ListBox::EnableAutoSize ( bool  bAuto)

◆ EnableMultiSelection()

void ListBox::EnableMultiSelection ( bool  bMulti)

◆ FillLayoutData()

void ListBox::FillLayoutData ( ) const
overrideprotectedvirtual

◆ GetBoundingRectangle()

tools::Rectangle ListBox::GetBoundingRectangle ( sal_Int32  nItem) const

◆ GetDisplayBackground()

const Wallpaper & ListBox::GetDisplayBackground ( ) const
overridevirtual

Reimplemented from vcl::Window.

Definition at line 1381 of file listbox.cxx.

References ImplListBox::GetDisplayBackground(), and mpImplLB.

◆ GetDisplayLineCount()

sal_uInt16 ListBox::GetDisplayLineCount ( ) const

Definition at line 1371 of file listbox.cxx.

References ImplListBox::GetDisplayLineCount(), and mpImplLB.

◆ GetDropDownLineCount()

sal_uInt16 ListBox::GetDropDownLineCount ( ) const

◆ GetDropDownPosSizePixel()

tools::Rectangle ListBox::GetDropDownPosSizePixel ( ) const

Definition at line 1376 of file listbox.cxx.

References vcl::Window::GetWindowExtentsRelative(), and mpFloatWin.

◆ GetEntry()

OUString ListBox::GetEntry ( sal_Int32  nPos) const

◆ GetEntryCount()

sal_Int32 ListBox::GetEntryCount ( ) const

◆ GetEntryData()

void * ListBox::GetEntryData ( sal_Int32  nPos) const

◆ GetEntryImage()

Image ListBox::GetEntryImage ( sal_Int32  nPos) const

◆ GetEntryPos()

sal_Int32 ListBox::GetEntryPos ( std::u16string_view  rStr) const

◆ GetFocus()

void ListBox::GetFocus ( )
overridevirtual

Reimplemented from vcl::Window.

Definition at line 439 of file listbox.cxx.

References vcl::Window::GetFocus(), vcl::Window::GrabFocus(), IsDropDownBox(), mpImplLB, and mpImplWin.

◆ GetIndexForPoint() [1/2]

tools::Long Control::GetIndexForPoint ( const Point rPoint) const

checks whether a certain point lies within the bounds of a listbox item and returns the item as well as the character position the point is at.

If the point is inside an item the item pos is put into rPos and the item-relative character index is returned. If the point is not inside an item -1 is returned and rPos is unchanged.

Parameters
rPointtells the point for which an item is requested.
rPosgets the item at the specified point rPoint
Returns
the item-relative character index at point rPos or -1 if no item is at that point.

Definition at line 194 of file ctrl.cxx.

◆ GetIndexForPoint() [2/2]

tools::Long ListBox::GetIndexForPoint ( const Point rPoint,
sal_Int32 &  rPos 
) const

◆ GetMaxVisColumnsAndLines()

void ListBox::GetMaxVisColumnsAndLines ( sal_uInt16 &  rnCols,
sal_uInt16 &  rnLines 
) const

◆ GetOptimalSize()

Size ListBox::GetOptimalSize ( ) const
overridevirtual

Reimplemented from Control.

Definition at line 1256 of file listbox.cxx.

References CalcMinimumSize().

◆ GetSelectedEntry()

OUString ListBox::GetSelectedEntry ( sal_Int32  nSelIndex = 0) const

◆ GetSelectedEntryCount()

sal_Int32 ListBox::GetSelectedEntryCount ( ) const

◆ GetSelectedEntryPos()

sal_Int32 ListBox::GetSelectedEntryPos ( sal_Int32  nSelIndex = 0) const

◆ GetSeparatorPos()

sal_Int32 ListBox::GetSeparatorPos ( ) const

Gets the position of the separator which was added first.

Returns LISTBOX_ENTRY_NOTFOUND if there is no separator.

Definition at line 1361 of file listbox.cxx.

References ImplListBox::GetSeparatorPos(), and mpImplLB.

◆ GetTopEntry()

sal_Int32 ListBox::GetTopEntry ( ) const

◆ GetUITestFactory()

FactoryFunction ListBox::GetUITestFactory ( ) const
overridevirtual

Reimplemented from vcl::Window.

Definition at line 1420 of file listbox.cxx.

References ListBoxUIObject::create().

◆ ImplInit()

void ListBox::ImplInit ( vcl::Window pParent,
WinBits  nStyle 
)
protected

◆ ImplInitListBoxData()

void ListBox::ImplInitListBoxData ( )
private

Definition at line 67 of file listbox.cxx.

References m_nMaxWidthChars, mbDDAutoSize, mnDDHeight, mnLineCount, mpBtn, mpFloatWin, and mpImplWin.

Referenced by ListBox().

◆ ImplInitStyle()

WinBits ListBox::ImplInitStyle ( WinBits  nStyle)
staticprotected

Definition at line 158 of file listbox.cxx.

References WB_GROUP, WB_NOGROUP, WB_NOTABSTOP, and WB_TABSTOP.

Referenced by ImplInit(), and StateChanged().

◆ InsertEntry() [1/2]

sal_Int32 ListBox::InsertEntry ( const OUString &  rStr,
const Image rImage,
sal_Int32  nPos = LISTBOX_APPEND 
)

◆ InsertEntry() [2/2]

sal_Int32 ListBox::InsertEntry ( const OUString &  rStr,
sal_Int32  nPos = LISTBOX_APPEND 
)

◆ IsAutoSizeEnabled()

bool ListBox::IsAutoSizeEnabled ( ) const
inline

Definition at line 150 of file lstbox.hxx.

Referenced by setPosSizePixel().

◆ IsDropDownBox()

bool ListBox::IsDropDownBox ( ) const
inlineprotected

◆ IsEntryPosSelected()

bool ListBox::IsEntryPosSelected ( sal_Int32  nPos) const

◆ IsInDropDown()

bool ListBox::IsInDropDown ( ) const

◆ IsMultiSelectionEnabled()

bool ListBox::IsMultiSelectionEnabled ( ) const

Definition at line 1144 of file listbox.cxx.

References ImplListBox::IsMultiSelectionEnabled(), and mpImplLB.

Referenced by ListBoxUIObject::get_state().

◆ IsReadOnly()

bool ListBox::IsReadOnly ( ) const

Definition at line 1351 of file listbox.cxx.

References ImplListBox::IsReadOnly(), and mpImplLB.

Referenced by ListBoxUIObject::get_state(), and StateChanged().

◆ IsTravelSelect()

bool ListBox::IsTravelSelect ( ) const

Definition at line 1109 of file listbox.cxx.

References ImplListBox::IsTravelSelect(), and mpImplLB.

◆ LoseFocus()

void ListBox::LoseFocus ( )
overridevirtual

Reimplemented from vcl::Window.

Definition at line 452 of file listbox.cxx.

References vcl::Window::HideFocus(), IsDropDownBox(), vcl::Window::LoseFocus(), mpImplLB, and mpImplWin.

◆ PreNotify()

bool ListBox::PreNotify ( NotifyEvent rNEvt)
overridevirtual

◆ RemoveEntry()

void ListBox::RemoveEntry ( sal_Int32  nPos)

◆ Resize()

void ListBox::Resize ( )
overridevirtual

◆ Select()

void ListBox::Select ( )

◆ SelectEntriesPos()

void ListBox::SelectEntriesPos ( const std::vector< sal_Int32 > &  rPositions,
bool  bSelect = true 
)

◆ SelectEntry()

void ListBox::SelectEntry ( std::u16string_view  rStr,
bool  bSelect = true 
)

Definition at line 1027 of file listbox.cxx.

References GetEntryPos(), and SelectEntryPos().

Referenced by ListBoxUIObject::execute().

◆ SelectEntryPos()

void ListBox::SelectEntryPos ( sal_Int32  nPos,
bool  bSelect = true 
)

◆ set_property()

bool ListBox::set_property ( const OUString &  rKey,
const OUString &  rValue 
)
overridevirtual

◆ SetDropDownLineCount()

void ListBox::SetDropDownLineCount ( sal_uInt16  nLines)

◆ SetEntryData()

void ListBox::SetEntryData ( sal_Int32  nPos,
void *  pNewData 
)

◆ SetEntryFlags()

void ListBox::SetEntryFlags ( sal_Int32  nPos,
ListBoxEntryFlags  nFlags 
)

this methods stores a combination of flags from the ListBoxEntryFlags::* defines at the given entry.

See description of the possible ListBoxEntryFlags::* flags for details. Do not use these flags for user data as they are reserved to change the internal behaviour of the ListBox implementation for specific entries.

Definition at line 1091 of file listbox.cxx.

References ImplListBox::GetEntryList(), ImplEntryList::GetMRUCount(), mpImplLB, nPos, and ImplListBox::SetEntryFlags().

◆ SetHighlightColor()

void ListBox::SetHighlightColor ( const Color rColor)

◆ SetHighlightTextColor()

void ListBox::SetHighlightTextColor ( const Color rColor)

◆ setMaxWidthChars()

void ListBox::setMaxWidthChars ( sal_Int32  nWidth)

Definition at line 1388 of file listbox.cxx.

References m_nMaxWidthChars, and vcl::Window::queue_resize().

Referenced by set_property().

◆ SetNoSelection()

void ListBox::SetNoSelection ( )

◆ setPosSizePixel()

void ListBox::setPosSizePixel ( tools::Long  nX,
tools::Long  nY,
tools::Long  nWidth,
tools::Long  nHeight,
PosSizeFlags  nFlags = PosSizeFlags::All 
)
overridevirtual

◆ SetReadOnly()

void ListBox::SetReadOnly ( bool  bReadOnly = true)

◆ SetSelectHdl()

void ListBox::SetSelectHdl ( const Link< ListBox &, void > &  rLink)
inline

◆ SetSeparatorPos()

void ListBox::SetSeparatorPos ( sal_Int32  n)

Removes existing separators, and sets the position of the one and only separator.

Definition at line 1356 of file listbox.cxx.

References mpImplLB, n, and ImplListBox::SetSeparatorPos().

◆ SetTopEntry()

void ListBox::SetTopEntry ( sal_Int32  nPos)

◆ StateChanged()

void ListBox::StateChanged ( StateChangedType  nType)
overridevirtual

◆ ToggleDropDown()

void ListBox::ToggleDropDown ( )

Member Data Documentation

◆ m_nMaxWidthChars

sal_Int32 ListBox::m_nMaxWidthChars
private

Definition at line 90 of file lstbox.hxx.

Referenced by CalcSubEditSize(), ImplInitListBoxData(), and setMaxWidthChars().

◆ maSelectHdl

Link<ListBox&,void> ListBox::maSelectHdl
private

Definition at line 91 of file lstbox.hxx.

Referenced by Select().

◆ mbDDAutoSize

bool ListBox::mbDDAutoSize
private

Definition at line 94 of file lstbox.hxx.

Referenced by EnableAutoSize(), and ImplInitListBoxData().

◆ mnDDHeight

sal_uInt16 ListBox::mnDDHeight
private

◆ mnLineCount

sal_uInt16 ListBox::mnLineCount
private

◆ mpBtn

VclPtr<ImplBtn> ListBox::mpBtn
private

◆ mpFloatWin

VclPtr<ImplListBoxFloatingWindow> ListBox::mpFloatWin
private

◆ mpImplLB

VclPtr<ImplListBox> ListBox::mpImplLB
private

◆ mpImplWin

VclPtr<ImplWin> ListBox::mpImplWin
private

The documentation for this class was generated from the following files: