Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
CPWL_ListBox Class Reference

#include <cpwl_list_box.h>

Inheritance diagram for CPWL_ListBox:
Collaboration diagram for CPWL_ListBox:

Public Member Functions

 CPWL_ListBox (const CreateParams &cp, std::unique_ptr< IPWL_FillerNotify::PerWindowData > pAttachedData)
 ~CPWL_ListBox () override
void OnCreated () override
void OnDestroy () override
void DrawThisAppearance (CFX_RenderDevice *pDevice, const CFX_Matrix &mtUser2Device) override
bool OnKeyDown (FWL_VKEYCODE nKeyCode, Mask< FWL_EVENTFLAG > nFlag) override
bool OnChar (uint16_t nChar, Mask< FWL_EVENTFLAG > nFlag) override
bool OnLButtonDown (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
bool OnLButtonUp (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
bool OnMouseMove (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point) override
bool OnMouseWheel (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point, const CFX_Vector &delta) override
WideString GetText () override
void SetScrollInfo (const PWL_SCROLL_INFO &info) override
void SetScrollPosition (float pos) override
void ScrollWindowVertically (float pos) override
bool RepositionChildWnd () override
CFX_FloatRect GetFocusRect () const override
void SetFontSize (float fFontSize) override
float GetFontSize () const override
void OnSetScrollInfoY (float fPlateMin, float fPlateMax, float fContentMin, float fContentMax, float fSmallStep, float fBigStep) override
void OnSetScrollPosY (float fy) override
bool OnInvalidateRect (const CFX_FloatRect &pRect) override
bool OnNotifySelectionChanged (bool bKeyDown, Mask< FWL_EVENTFLAG > nFlag)
void AddString (const WideString &str)
void SetTopVisibleIndex (int32_t nItemIndex)
void ScrollToListItem (int32_t nItemIndex)
void Select (int32_t nItemIndex)
void Deselect (int32_t nItemIndex)
void SetCaret (int32_t nItemIndex)
void SetHoverSel (bool bHoverSel)
int32_t GetCount () const
bool IsMultipleSel () const
int32_t GetCaretIndex () const
int32_t GetCurSel () const
bool IsItemSelected (int32_t nItemIndex) const
int32_t GetTopVisibleIndex () const
CFX_FloatRect GetContentRect () const
float GetFirstHeight () const
CFX_FloatRect GetListRect () const
Public Member Functions inherited from CPWL_Wnd
 CPWL_Wnd (const CreateParams &cp, std::unique_ptr< IPWL_FillerNotify::PerWindowData > pAttachedData)
virtual ~CPWL_Wnd ()
virtual bool InvalidateRect (const CFX_FloatRect *pRect)
virtual bool OnLButtonDblClk (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point)
virtual bool OnRButtonDown (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point)
virtual bool OnRButtonUp (Mask< FWL_EVENTFLAG > nFlag, const CFX_PointF &point)
virtual void NotifyLButtonDown (CPWL_Wnd *child, const CFX_PointF &pos)
virtual void NotifyLButtonUp (CPWL_Wnd *child, const CFX_PointF &pos)
virtual void NotifyMouseMove (CPWL_Wnd *child, const CFX_PointF &pos)
virtual void SetFocus ()
virtual void KillFocus ()
virtual void SetCursor ()
virtual bool SetVisible (bool bVisible)
virtual WideString GetSelectedText ()
virtual void ReplaceAndKeepSelection (const WideString &text)
virtual void ReplaceSelection (const WideString &text)
virtual bool SelectAllText ()
virtual bool CanUndo ()
virtual bool CanRedo ()
virtual bool Undo ()
virtual bool Redo ()
virtual CFX_FloatRect GetClientRect () const
virtual void OnSetFocus ()
virtual void OnKillFocus ()
void AddChild (std::unique_ptr< CPWL_Wnd > pWnd)
void RemoveChild (CPWL_Wnd *pWnd)
void Realize ()
void Destroy ()
bool Move (const CFX_FloatRect &rcNew, bool bReset, bool bRefresh)
void InvalidateProvider (ProviderIface *provider)
void DrawAppearance (CFX_RenderDevice *pDevice, const CFX_Matrix &mtUser2Device)
int32_t GetBorderWidth () const
CFX_FloatRect GetWindowRect () const
bool IsVisible () const
bool HasFlag (uint32_t dwFlags) const
void RemoveFlag (uint32_t dwFlags)
void SetClipRect (const CFX_FloatRect &rect)
IPWL_FillerNotify::PerWindowDataGetAttachedData () const
std::unique_ptr< IPWL_FillerNotify::PerWindowDataCloneAttachedData () const
std::vector< UnownedPtr< CPWL_Wnd > > GetAncestors ()
bool WndHitTest (const CFX_PointF &point) const
bool ClientHitTest (const CFX_PointF &point) const
bool IsCaptureMouse () const
bool IsFocused () const
bool IsReadOnly () const
void SetTransparency (int32_t nTransparency)
CFX_Matrix GetWindowMatrix () const
Public Member Functions inherited from fxcrt::Observable
 Observable ()
 Observable (const Observable &that)=delete
Observableoperator= (const Observable &that)=delete
 ~Observable ()
void AddObserver (ObserverIface *pObserver)
void RemoveObserver (ObserverIface *pObserver)
void NotifyObservers ()
Public Member Functions inherited from CPWL_ListCtrl::NotifyIface
virtual ~NotifyIface ()

Protected Attributes

bool m_bMouseDown = false
bool m_bHoverSel = false
std::unique_ptr< CPWL_ListCtrlm_pListCtrl

Additional Inherited Members

Static Public Member Functions inherited from CPWL_Wnd
static bool IsSHIFTKeyDown (Mask< FWL_EVENTFLAG > nFlag)
static bool IsCTRLKeyDown (Mask< FWL_EVENTFLAG > nFlag)
static bool IsALTKeyDown (Mask< FWL_EVENTFLAG > nFlag)
static bool IsMETAKeyDown (Mask< FWL_EVENTFLAG > nFlag)
static bool IsPlatformShortcutKey (Mask< FWL_EVENTFLAG > nFlag)
Static Public Attributes inherited from CPWL_Wnd
static const CFX_Color kDefaultBlackColor
static const CFX_Color kDefaultWhiteColor
Protected Member Functions inherited from CPWL_Wnd
virtual void CreateChildWnd (const CreateParams &cp)
bool IsValid () const
CreateParamsGetCreationParams ()
ProviderIfaceGetProvider () const
CFX_Timer::HandlerIfaceGetTimerHandler () const
IPWL_FillerNotifyGetFillerNotify () const
CPWL_WndGetParentWindow () const
CPWL_ScrollBarGetVScrollBar () const
bool InvalidateRectMove (const CFX_FloatRect &rcOld, const CFX_FloatRect &rcNew)
void SetCapture ()
void ReleaseCapture ()
bool IsWndCaptureMouse (const CPWL_Wnd *pWnd) const
bool IsWndCaptureKeyboard (const CPWL_Wnd *pWnd) const
CFX_Color GetBackgroundColor () const
CFX_Color GetBorderColor () const
CFX_Color GetTextColor () const
CFX_Color GetBorderLeftTopColor (BorderStyle nBorderStyle) const
CFX_Color GetBorderRightBottomColor (BorderStyle nBorderStyle) const
BorderStyle GetBorderStyle () const
const CPWL_DashGetBorderDash () const
int32_t GetTransparency ()
int32_t GetInnerBorderWidth () const
CFX_PointF GetCenterPoint () const
const CFX_FloatRectGetClipRect () const
IPVT_FontMapGetFontMap () const
Protected Member Functions inherited from fxcrt::Observable
size_t ActiveObserversForTesting () const

Detailed Description

Definition at line 18 of file cpwl_list_box.h.

Constructor & Destructor Documentation

◆ CPWL_ListBox()

CPWL_ListBox::CPWL_ListBox ( const CreateParams & cp,
std::unique_ptr< IPWL_FillerNotify::PerWindowData > pAttachedData )

Definition at line 20 of file cpwl_list_box.cpp.

References CPWL_ListBox().

Referenced by CPWL_ListBox().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~CPWL_ListBox()

CPWL_ListBox::~CPWL_ListBox ( )
overridedefault

Member Function Documentation

◆ AddString()

void CPWL_ListBox::AddString ( const WideString & str)

Definition at line 233 of file cpwl_list_box.cpp.

◆ Deselect()

void CPWL_ListBox::Deselect ( int32_t nItemIndex)

Definition at line 293 of file cpwl_list_box.cpp.

Referenced by CFFL_ListBox::SetIndexSelected().

Here is the caller graph for this function:

◆ DrawThisAppearance()

void CPWL_ListBox::DrawThisAppearance ( CFX_RenderDevice * pDevice,
const CFX_Matrix & mtUser2Device )
overridevirtual

◆ GetCaretIndex()

int32_t CPWL_ListBox::GetCaretIndex ( ) const

Definition at line 313 of file cpwl_list_box.cpp.

◆ GetContentRect()

CFX_FloatRect CPWL_ListBox::GetContentRect ( ) const

Definition at line 334 of file cpwl_list_box.cpp.

◆ GetCount()

int32_t CPWL_ListBox::GetCount ( ) const

Definition at line 330 of file cpwl_list_box.cpp.

Referenced by testing.tools.safetynet_conclusions.ComparisonSummary::GetOutputDict(), CFFL_ListBox::IsDataChanged(), and CFFL_ListBox::SavePWLWindowState().

Here is the caller graph for this function:

◆ GetCurSel()

int32_t CPWL_ListBox::GetCurSel ( ) const

Definition at line 317 of file cpwl_list_box.cpp.

Referenced by CFFL_ListBox::GetActionData().

Here is the caller graph for this function:

◆ GetFirstHeight()

float CPWL_ListBox::GetFirstHeight ( ) const

Definition at line 338 of file cpwl_list_box.cpp.

◆ GetFocusRect()

CFX_FloatRect CPWL_ListBox::GetFocusRect ( ) const
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 223 of file cpwl_list_box.cpp.

References CPWL_Wnd::GetClientRect(), CPWL_Wnd::GetFocusRect(), and CFX_FloatRect::Intersect().

Here is the call graph for this function:

◆ GetFontSize()

float CPWL_ListBox::GetFontSize ( ) const
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 245 of file cpwl_list_box.cpp.

◆ GetListRect()

CFX_FloatRect CPWL_ListBox::GetListRect ( ) const

Definition at line 342 of file cpwl_list_box.cpp.

References CPWL_Wnd::GetBorderWidth(), CPWL_Wnd::GetInnerBorderWidth(), and CPWL_Wnd::GetWindowRect().

Referenced by DrawThisAppearance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetText()

WideString CPWL_ListBox::GetText ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 237 of file cpwl_list_box.cpp.

◆ GetTopVisibleIndex()

int32_t CPWL_ListBox::GetTopVisibleIndex ( ) const

Definition at line 325 of file cpwl_list_box.cpp.

Referenced by CFFL_ListBox::SaveData().

Here is the caller graph for this function:

◆ IsItemSelected()

bool CPWL_ListBox::IsItemSelected ( int32_t nItemIndex) const

Definition at line 321 of file cpwl_list_box.cpp.

Referenced by CFFL_ListBox::IsDataChanged(), and CFFL_ListBox::IsIndexSelected().

Here is the caller graph for this function:

◆ IsMultipleSel()

bool CPWL_ListBox::IsMultipleSel ( ) const

Definition at line 309 of file cpwl_list_box.cpp.

◆ OnChar()

bool CPWL_ListBox::OnChar ( uint16_t nChar,
Mask< FWL_EVENTFLAG > nFlag )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 128 of file cpwl_list_box.cpp.

References CPWL_Wnd::OnChar(), and OnNotifySelectionChanged().

Here is the call graph for this function:

◆ OnCreated()

void CPWL_ListBox::OnCreated ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 28 of file cpwl_list_box.cpp.

References CPWL_Wnd::HasFlag(), m_bHoverSel, and SetHoverSel().

Here is the call graph for this function:

◆ OnDestroy()

void CPWL_ListBox::OnDestroy ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 39 of file cpwl_list_box.cpp.

◆ OnInvalidateRect()

bool CPWL_ListBox::OnInvalidateRect ( const CFX_FloatRect & pRect)
nodiscardoverridevirtual

Implements CPWL_ListCtrl::NotifyIface.

Definition at line 285 of file cpwl_list_box.cpp.

References CPWL_Wnd::InvalidateRect().

Here is the call graph for this function:

◆ OnKeyDown()

bool CPWL_ListBox::OnKeyDown ( FWL_VKEYCODE nKeyCode,
Mask< FWL_EVENTFLAG > nFlag )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 87 of file cpwl_list_box.cpp.

References FWL_VKEY_Down, FWL_VKEY_End, FWL_VKEY_Home, FWL_VKEY_Left, FWL_VKEY_Right, FWL_VKEY_Up, CPWL_Wnd::OnKeyDown(), and OnNotifySelectionChanged().

Here is the call graph for this function:

◆ OnLButtonDown()

bool CPWL_ListBox::OnLButtonDown ( Mask< FWL_EVENTFLAG > nFlag,
const CFX_PointF & point )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 138 of file cpwl_list_box.cpp.

References CPWL_Wnd::ClientHitTest(), m_bMouseDown, CPWL_Wnd::OnLButtonDown(), CPWL_Wnd::SetCapture(), and CPWL_Wnd::SetFocus().

Here is the call graph for this function:

◆ OnLButtonUp()

bool CPWL_ListBox::OnLButtonUp ( Mask< FWL_EVENTFLAG > nFlag,
const CFX_PointF & point )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 154 of file cpwl_list_box.cpp.

References m_bMouseDown, CPWL_Wnd::OnLButtonUp(), OnNotifySelectionChanged(), and CPWL_Wnd::ReleaseCapture().

Here is the call graph for this function:

◆ OnMouseMove()

bool CPWL_ListBox::OnMouseMove ( Mask< FWL_EVENTFLAG > nFlag,
const CFX_PointF & point )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 170 of file cpwl_list_box.cpp.

References CPWL_Wnd::OnMouseMove().

Here is the call graph for this function:

◆ OnMouseWheel()

bool CPWL_ListBox::OnMouseWheel ( Mask< FWL_EVENTFLAG > nFlag,
const CFX_PointF & point,
const CFX_Vector & delta )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 347 of file cpwl_list_box.cpp.

References OnNotifySelectionChanged().

Here is the call graph for this function:

◆ OnNotifySelectionChanged()

bool CPWL_ListBox::OnNotifySelectionChanged ( bool bKeyDown,
Mask< FWL_EVENTFLAG > nFlag )

Definition at line 206 of file cpwl_list_box.cpp.

References IPWL_FillerNotify::BeforeKeystrokeResult::exit.

Referenced by OnChar(), CPWL_CBListBox::OnCharNotify(), OnKeyDown(), CPWL_CBListBox::OnLButtonUp(), OnLButtonUp(), OnMouseWheel(), and CPWL_CBListBox::OnMovementKeyDown().

Here is the caller graph for this function:

◆ OnSetScrollInfoY()

void CPWL_ListBox::OnSetScrollInfoY ( float fPlateMin,
float fPlateMax,
float fContentMin,
float fContentMax,
float fSmallStep,
float fBigStep )
overridevirtual

Implements CPWL_ListCtrl::NotifyIface.

Definition at line 249 of file cpwl_list_box.cpp.

References PWL_SCROLL_INFO::fBigStep, PWL_SCROLL_INFO::fContentMax, PWL_SCROLL_INFO::fContentMin, PWL_SCROLL_INFO::fPlateWidth, PWL_SCROLL_INFO::fSmallStep, CPWL_Wnd::GetVScrollBar(), CPWL_Wnd::IsVisible(), RepositionChildWnd(), SetScrollInfo(), and CPWL_Wnd::SetVisible().

Here is the call graph for this function:

◆ OnSetScrollPosY()

void CPWL_ListBox::OnSetScrollPosY ( float fy)
overridevirtual

Implements CPWL_ListCtrl::NotifyIface.

Definition at line 281 of file cpwl_list_box.cpp.

References SetScrollPosition().

Here is the call graph for this function:

◆ RepositionChildWnd()

bool CPWL_ListBox::RepositionChildWnd ( )
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 197 of file cpwl_list_box.cpp.

References CPWL_Wnd::RepositionChildWnd().

Referenced by OnSetScrollInfoY().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScrollToListItem()

void CPWL_ListBox::ScrollToListItem ( int32_t nItemIndex)

Definition at line 305 of file cpwl_list_box.cpp.

◆ ScrollWindowVertically()

void CPWL_ListBox::ScrollWindowVertically ( float pos)
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 193 of file cpwl_list_box.cpp.

◆ Select()

void CPWL_ListBox::Select ( int32_t nItemIndex)

Definition at line 289 of file cpwl_list_box.cpp.

Referenced by CFFL_ListBox::SetIndexSelected().

Here is the caller graph for this function:

◆ SetCaret()

void CPWL_ListBox::SetCaret ( int32_t nItemIndex)

Definition at line 297 of file cpwl_list_box.cpp.

Referenced by CFFL_ListBox::SetIndexSelected().

Here is the caller graph for this function:

◆ SetFontSize()

void CPWL_ListBox::SetFontSize ( float fFontSize)
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 241 of file cpwl_list_box.cpp.

◆ SetHoverSel()

void CPWL_ListBox::SetHoverSel ( bool bHoverSel)

Definition at line 166 of file cpwl_list_box.cpp.

References m_bHoverSel.

Referenced by OnCreated().

Here is the caller graph for this function:

◆ SetScrollInfo()

void CPWL_ListBox::SetScrollInfo ( const PWL_SCROLL_INFO & info)
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 183 of file cpwl_list_box.cpp.

References CPWL_Wnd::GetVScrollBar(), and CPWL_Wnd::SetScrollInfo().

Referenced by OnSetScrollInfoY().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetScrollPosition()

void CPWL_ListBox::SetScrollPosition ( float pos)
overridevirtual

Reimplemented from CPWL_Wnd.

Definition at line 188 of file cpwl_list_box.cpp.

References CPWL_Wnd::GetVScrollBar(), and CPWL_Wnd::SetScrollPosition().

Referenced by OnSetScrollPosY().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetTopVisibleIndex()

void CPWL_ListBox::SetTopVisibleIndex ( int32_t nItemIndex)

Definition at line 301 of file cpwl_list_box.cpp.

Member Data Documentation

◆ m_bHoverSel

bool CPWL_ListBox::m_bHoverSel = false
protected

Definition at line 80 of file cpwl_list_box.h.

Referenced by OnCreated(), and SetHoverSel().

◆ m_bMouseDown

bool CPWL_ListBox::m_bMouseDown = false
protected

Definition at line 79 of file cpwl_list_box.h.

Referenced by OnLButtonDown(), CPWL_CBListBox::OnLButtonUp(), and OnLButtonUp().

◆ m_pListCtrl

std::unique_ptr<CPWL_ListCtrl> CPWL_ListBox::m_pListCtrl
protected

Definition at line 81 of file cpwl_list_box.h.


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