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
CFWL_ListBox Class Reference

#include <cfwl_listbox.h>

+ Inheritance diagram for CFWL_ListBox:
+ Collaboration diagram for CFWL_ListBox:

Classes

class  Item
 

Public Member Functions

 ~CFWL_ListBox () override
 
void Trace (cppgc::Visitor *visitor) const override
 
FWL_Type GetClassID () const override
 
void Update () override
 
FWL_WidgetHit HitTest (const CFX_PointF &point) override
 
void DrawWidget (CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
 
void OnProcessMessage (CFWL_Message *pMessage) override
 
void OnProcessEvent (CFWL_Event *pEvent) override
 
void OnDrawWidget (CFGAS_GEGraphics *pGraphics, const CFX_Matrix &matrix) override
 
int32_t CountItems (const CFWL_Widget *pWidget) const
 
ItemGetItem (const CFWL_Widget *pWidget, int32_t nIndex) const
 
int32_t GetItemIndex (CFWL_Widget *pWidget, Item *pItem)
 
ItemAddString (const WideString &wsAdd)
 
void RemoveAt (int32_t iIndex)
 
void DeleteString (Item *pItem)
 
void DeleteAll ()
 
int32_t CountSelItems ()
 
ItemGetSelItem (int32_t nIndexSel)
 
int32_t GetSelIndex (int32_t nIndex)
 
void SetSelItem (Item *hItem, bool bSelect)
 
float CalcItemHeight ()
 
- Public Member Functions inherited from CFWL_Widget
 ~CFWL_Widget () override
 
virtual void PreFinalize ()
 
void Trace (cppgc::Visitor *visitor) const override
 
virtual bool IsForm () const
 
virtual CFX_RectF GetAutosizedWidgetRect ()
 
virtual CFX_RectF GetWidgetRect ()
 
virtual CFX_RectF GetClientRect ()
 
virtual void ModifyStyleExts (uint32_t dwStyleExtsAdded, uint32_t dwStyleExtsRemoved)
 
virtual void SetStates (uint32_t dwStates)
 
virtual void RemoveStates (uint32_t dwStates)
 
void OnProcessMessage (CFWL_Message *pMessage) override
 
void OnProcessEvent (CFWL_Event *pEvent) override
 
void InflateWidgetRect (CFX_RectF &rect)
 
void SetWidgetRect (const CFX_RectF &rect)
 
bool IsVisible () const
 
bool IsOverLapper () const
 
bool IsPopup () const
 
bool IsChild () const
 
CFWL_WidgetMgrGetWidgetMgr () const
 
CFWL_WidgetGetOuter () const
 
CFWL_WidgetGetOutmost () const
 
void ModifyStyles (uint32_t dwStylesAdded, uint32_t dwStylesRemoved)
 
uint32_t GetStyleExts () const
 
uint32_t GetStates () const
 
CFX_PointF TransformTo (CFWL_Widget *pWidget, const CFX_PointF &point)
 
CFX_Matrix GetMatrix () const
 
IFWL_ThemeProviderGetThemeProvider () const
 
void SetDelegate (IFWL_WidgetDelegate *delegate)
 
IFWL_WidgetDelegateGetDelegate ()
 
const IFWL_WidgetDelegateGetDelegate () const
 
CFWL_AppGetFWLApp () const
 
uint64_t GetEventKey () const
 
void SetEventKey (uint64_t key)
 
AdapterIfaceGetAdapterIface () const
 
void SetAdapterIface (AdapterIface *pItem)
 
void RepaintRect (const CFX_RectF &pRect)
 
- Public Member Functions inherited from IFWL_WidgetDelegate
virtual ~IFWL_WidgetDelegate ()=default
 

Public Attributes

 CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
 
- Public Attributes inherited from CFWL_Widget
 CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED
 

Protected Member Functions

 CFWL_ListBox (CFWL_App *pApp, const Properties &properties, CFWL_Widget *pOuter)
 
ItemGetListItem (Item *hItem, XFA_FWL_VKEYCODE dwKeyCode)
 
void SetSelection (Item *hStart, Item *hEnd, bool bSelected)
 
ItemGetItemAtPoint (const CFX_PointF &point)
 
bool ScrollToVisible (Item *hItem)
 
void InitVerticalScrollBar ()
 
void InitHorizontalScrollBar ()
 
bool IsShowVertScrollBar () const
 
bool IsShowHorzScrollBar () const
 
bool ScrollBarPropertiesPresent () const
 
CFWL_ScrollBarGetVertScrollBar () const
 
const CFX_RectFGetRTClient () const
 
- Protected Member Functions inherited from CFWL_Widget
 CFWL_Widget (CFWL_App *app, const Properties &properties, CFWL_Widget *pOuter)
 
bool IsEnabled () const
 
bool IsLocked () const
 
bool HasBorder () const
 
CFX_RectF GetEdgeRect () const
 
float GetCXBorderSize () const
 
float GetCYBorderSize () const
 
CFX_RectF GetRelativeRect () const
 
CFX_SizeF CalcTextSize (const WideString &wsText, bool bMultiLine)
 
void CalcTextRect (const WideString &wsText, const FDE_TextStyle &dwTTOStyles, FDE_TextAlignment iTTOAlign, CFX_RectF *pRect)
 
void SetGrab (bool bSet)
 
void UnregisterEventTarget ()
 
void DispatchEvent (CFWL_Event *pEvent)
 
void DrawBorder (CFGAS_GEGraphics *pGraphics, CFWL_ThemePart::Part iPartBorder, const CFX_Matrix &pMatrix)
 

Additional Inherited Members

- Protected Attributes inherited from CFWL_Widget
Properties m_Properties
 
CFX_RectF m_WidgetRect
 

Detailed Description

Definition at line 30 of file cfwl_listbox.h.

Constructor & Destructor Documentation

◆ ~CFWL_ListBox()

CFWL_ListBox::~CFWL_ListBox ( )
overridedefault

◆ CFWL_ListBox()

CFWL_ListBox::CFWL_ListBox ( CFWL_App * pApp,
const Properties & properties,
CFWL_Widget * pOuter )
protected

Definition at line 34 of file cfwl_listbox.cpp.

References CFWL_Widget::CFWL_Widget().

+ Here is the call graph for this function:

Member Function Documentation

◆ AddString()

CFWL_ListBox::Item * CFWL_ListBox::AddString ( const WideString & wsAdd)

Definition at line 831 of file cfwl_listbox.cpp.

◆ CalcItemHeight()

float CFWL_ListBox::CalcItemHeight ( )

Definition at line 547 of file cfwl_listbox.cpp.

References CFWL_Widget::GetThemeProvider(), and CFWL_ThemePart::kNone.

Referenced by CFWL_ComboBox::ShowDropDownList().

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

◆ CountItems()

int32_t CFWL_ListBox::CountItems ( const CFWL_Widget * pWidget) const

Definition at line 810 of file cfwl_listbox.cpp.

Referenced by CountSelItems(), DeleteString(), GetItem(), GetItemAtPoint(), GetListItem(), GetSelIndex(), CFWL_ComboList::MatchItem(), SetSelection(), and CFWL_ComboBox::ShowDropDownList().

+ Here is the caller graph for this function:

◆ CountSelItems()

int32_t CFWL_ListBox::CountSelItems ( )

Definition at line 110 of file cfwl_listbox.cpp.

References CountItems(), GetItem(), and CFWL_ListBox::Item::IsSelected().

+ Here is the call graph for this function:

◆ DeleteAll()

void CFWL_ListBox::DeleteAll ( )

Definition at line 858 of file cfwl_listbox.cpp.

◆ DeleteString()

void CFWL_ListBox::DeleteString ( Item * pItem)

Definition at line 842 of file cfwl_listbox.cpp.

References CountItems(), GetItem(), GetItemIndex(), and CFWL_ListBox::Item::SetSelected().

+ Here is the call graph for this function:

◆ DrawWidget()

void CFWL_ListBox::DrawWidget ( CFGAS_GEGraphics * pGraphics,
const CFX_Matrix & matrix )
overridevirtual

Implements CFWL_Widget.

Definition at line 88 of file cfwl_listbox.cpp.

References CFX_RectF::CFX_RectF(), CFGAS_GEGraphics::StateRestorer::StateRestorer(), CFWL_Widget::DrawBorder(), CFWL_Widget::HasBorder(), CFX_RectF::height, IsShowHorzScrollBar(), IsShowVertScrollBar(), CFWL_ThemePart::kBorder, CFWL_Widget::Properties::m_dwStyles, CFWL_Widget::m_Properties, CFGAS_GEGraphics::SetClipRect(), CFX_Matrix::TransformRect(), and CFX_RectF::width.

Referenced by OnDrawWidget().

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

◆ GetClassID()

FWL_Type CFWL_ListBox::GetClassID ( ) const
overridevirtual

Implements CFWL_Widget.

Definition at line 47 of file cfwl_listbox.cpp.

References ListBox.

◆ GetItem()

CFWL_ListBox::Item * CFWL_ListBox::GetItem ( const CFWL_Widget * pWidget,
int32_t nIndex ) const

Definition at line 814 of file cfwl_listbox.cpp.

References CountItems().

Referenced by CFWL_ComboList::ChangeSelected(), CountSelItems(), DeleteString(), GetItemAtPoint(), GetListItem(), GetSelIndex(), GetSelItem(), CFWL_ComboList::MatchItem(), and SetSelection().

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

◆ GetItemAtPoint()

CFWL_ListBox::Item * CFWL_ListBox::GetItemAtPoint ( const CFX_PointF & point)
protected

Definition at line 266 of file cfwl_listbox.cpp.

References CountItems(), GetItem(), CFWL_ListBox::Item::GetRect(), and CFX_RectF::Offset().

+ Here is the call graph for this function:

◆ GetItemIndex()

int32_t CFWL_ListBox::GetItemIndex ( CFWL_Widget * pWidget,
Item * pItem )

Definition at line 821 of file cfwl_listbox.cpp.

Referenced by CFWL_ComboList::ChangeSelected(), DeleteString(), GetListItem(), and SetSelection().

+ Here is the caller graph for this function:

◆ GetListItem()

CFWL_ListBox::Item * CFWL_ListBox::GetListItem ( Item * hItem,
XFA_FWL_VKEYCODE dwKeyCode )
protected

Definition at line 160 of file cfwl_listbox.cpp.

References CountItems(), GetItem(), GetItemIndex(), XFA_FWL_VKEY_Down, XFA_FWL_VKEY_End, XFA_FWL_VKEY_Home, and XFA_FWL_VKEY_Up.

+ Here is the call graph for this function:

◆ GetRTClient()

const CFX_RectF & CFWL_ListBox::GetRTClient ( ) const
inlineprotected

Definition at line 95 of file cfwl_listbox.h.

◆ GetSelIndex()

int32_t CFWL_ListBox::GetSelIndex ( int32_t nIndex)

Definition at line 128 of file cfwl_listbox.cpp.

References CountItems(), GetItem(), and CFWL_ListBox::Item::IsSelected().

Referenced by GetSelItem().

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

◆ GetSelItem()

CFWL_ListBox::Item * CFWL_ListBox::GetSelItem ( int32_t nIndexSel)

Definition at line 121 of file cfwl_listbox.cpp.

References GetItem(), and GetSelIndex().

Referenced by CFWL_ComboList::ChangeSelected().

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

◆ GetVertScrollBar()

CFWL_ScrollBar * CFWL_ListBox::GetVertScrollBar ( ) const
inlineprotected

Definition at line 94 of file cfwl_listbox.h.

Referenced by CFWL_ComboList::OnProcessMessage().

+ Here is the caller graph for this function:

◆ HitTest()

FWL_WidgetHit CFWL_ListBox::HitTest ( const CFX_PointF & point)
overridevirtual

Reimplemented from CFWL_Widget.

Definition at line 72 of file cfwl_listbox.cpp.

References Client, CFX_RectF::Contains(), HScrollBar, IsShowHorzScrollBar(), IsShowVertScrollBar(), Unknown, and VScrollBar.

+ Here is the call graph for this function:

◆ InitHorizontalScrollBar()

void CFWL_ListBox::InitHorizontalScrollBar ( )
protected

Definition at line 561 of file cfwl_listbox.cpp.

◆ InitVerticalScrollBar()

void CFWL_ListBox::InitVerticalScrollBar ( )
protected

Definition at line 552 of file cfwl_listbox.cpp.

◆ IsShowHorzScrollBar()

bool CFWL_ListBox::IsShowHorzScrollBar ( ) const
protected

Definition at line 575 of file cfwl_listbox.cpp.

Referenced by DrawWidget(), and HitTest().

+ Here is the caller graph for this function:

◆ IsShowVertScrollBar()

bool CFWL_ListBox::IsShowVertScrollBar ( ) const
protected

Definition at line 570 of file cfwl_listbox.cpp.

Referenced by DrawWidget(), HitTest(), and CFWL_ComboList::OnProcessMessage().

+ Here is the caller graph for this function:

◆ OnDrawWidget()

void CFWL_ListBox::OnDrawWidget ( CFGAS_GEGraphics * pGraphics,
const CFX_Matrix & matrix )
overridevirtual

Implements IFWL_WidgetDelegate.

Definition at line 640 of file cfwl_listbox.cpp.

References DrawWidget().

+ Here is the call graph for this function:

◆ OnProcessEvent()

void CFWL_ListBox::OnProcessEvent ( CFWL_Event * pEvent)
overridevirtual

Implements IFWL_WidgetDelegate.

Definition at line 625 of file cfwl_listbox.cpp.

References CFWL_EventScroll::GetPos(), CFWL_EventScroll::GetScrollCode(), CFWL_Event::GetSrcTarget(), CFWL_Event::GetType(), and CFWL_Event::Scroll.

+ Here is the call graph for this function:

◆ OnProcessMessage()

void CFWL_ListBox::OnProcessMessage ( CFWL_Message * pMessage)
overridevirtual

Implements IFWL_WidgetDelegate.

Definition at line 585 of file cfwl_listbox.cpp.

References CFWL_Message::GetDstTarget(), CFWL_Message::GetType(), CFWL_Widget::IsEnabled(), CFWL_Message::kKey, CFWL_MessageKey::kKeyDown, CFWL_Message::kKillFocus, CFWL_MessageMouse::kLeftButtonDown, CFWL_MessageMouse::kLeftButtonUp, CFWL_Message::kMouse, CFWL_Message::kMouseWheel, CFWL_Message::kSetFocus, CFWL_MessageKey::m_dwCmd, CFWL_MessageMouse::m_dwCmd, and CFWL_Widget::OnProcessMessage().

Referenced by CFWL_ComboList::OnProcessMessage().

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

◆ RemoveAt()

void CFWL_ListBox::RemoveAt ( int32_t iIndex)

Definition at line 836 of file cfwl_listbox.cpp.

◆ ScrollBarPropertiesPresent()

bool CFWL_ListBox::ScrollBarPropertiesPresent ( ) const
protected

◆ ScrollToVisible()

bool CFWL_ListBox::ScrollToVisible ( Item * hItem)
protected

Definition at line 290 of file cfwl_listbox.cpp.

References CFX_RectF::CFX_RectF(), CFX_RectF::bottom(), CFWL_ListBox::Item::GetRect(), CFX_RectF::Offset(), CFWL_Widget::RepaintRect(), and CFX_RectF::top.

+ Here is the call graph for this function:

◆ SetSelection()

void CFWL_ListBox::SetSelection ( Item * hStart,
Item * hEnd,
bool bSelected )
protected

Definition at line 190 of file cfwl_listbox.cpp.

References CountItems(), GetItem(), GetItemIndex(), and CFWL_ListBox::Item::SetSelected().

Referenced by SetSelItem().

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

◆ SetSelItem()

void CFWL_ListBox::SetSelItem ( Item * hItem,
bool bSelect )

Definition at line 144 of file cfwl_listbox.cpp.

References CFWL_ListBox::Item::SetSelected(), and SetSelection().

Referenced by CFWL_ComboList::ChangeSelected().

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

◆ Trace()

void CFWL_ListBox::Trace ( cppgc::Visitor * visitor) const
override

Definition at line 41 of file cfwl_listbox.cpp.

◆ Update()

void CFWL_ListBox::Update ( )
overridevirtual

Implements CFWL_Widget.

Definition at line 51 of file cfwl_listbox.cpp.

References CFWL_Widget::IsLocked(), kCenter, kCenterLeft, kCenterRight, CFWL_Widget::Properties::m_dwStyleExts, CFWL_Widget::m_Properties, and FDE_TextStyle::single_line_.

+ Here is the call graph for this function:

Member Data Documentation

◆ CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED

CFWL_ListBox::CONSTRUCT_VIA_MAKE_GARBAGE_COLLECTED

Definition at line 52 of file cfwl_listbox.h.


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