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

#include <listbox.hxx>

Collaboration diagram for ImplEntryList:
[legend]

Public Member Functions

 ImplEntryList (vcl::Window *pWindow)
 
 ~ImplEntryList ()
 
sal_Int32 InsertEntry (sal_Int32 nPos, ImplEntryType *pNewEntry, bool bSort)
 
void RemoveEntry (sal_Int32 nPos)
 
const ImplEntryTypeGetEntryPtr (sal_Int32 nPos) const
 
ImplEntryTypeGetMutableEntryPtr (sal_Int32 nPos) const
 
void Clear ()
 
void dispose ()
 
sal_Int32 FindMatchingEntry (const OUString &rStr, sal_Int32 nStart, bool bLazy) const
 
sal_Int32 FindEntry (std::u16string_view rStr, bool bSearchMRUArea=false) const
 
tools::Long GetAddedHeight (sal_Int32 nEndIndex, sal_Int32 nBeginIndex) const
 helper: add up heights up to index nEndIndex. More...
 
tools::Long GetEntryHeight (sal_Int32 nPos) const
 
sal_Int32 GetEntryCount () const
 
bool HasImages () const
 
OUString GetEntryText (sal_Int32 nPos) const
 
bool HasEntryImage (sal_Int32 nPos) const
 
Image GetEntryImage (sal_Int32 nPos) const
 
void SetEntryData (sal_Int32 nPos, void *pNewData)
 
void * GetEntryData (sal_Int32 nPos) const
 
void SetEntryFlags (sal_Int32 nPos, ListBoxEntryFlags nFlags)
 
void SelectEntry (sal_Int32 nPos, bool bSelect)
 
sal_Int32 GetSelectedEntryCount () const
 
OUString GetSelectedEntry (sal_Int32 nIndex) const
 
sal_Int32 GetSelectedEntryPos (sal_Int32 nIndex) const
 
bool IsEntryPosSelected (sal_Int32 nIndex) const
 
void SetLastSelected (sal_Int32 nPos)
 
sal_Int32 GetLastSelected () const
 
void SetSelectionAnchor (sal_Int32 nPos)
 
sal_Int32 GetSelectionAnchor () const
 
void SetSelectionChangedHdl (const Link< sal_Int32, void > &rLnk)
 
void SetCallSelectionChangedHdl (bool bCall)
 
void SetMRUCount (sal_Int32 n)
 
sal_Int32 GetMRUCount () const
 
void SetMaxMRUCount (sal_Int32 n)
 
sal_Int32 GetMaxMRUCount () const
 
bool IsEntrySelectable (sal_Int32 nPos) const
 An Entry is selectable if its mnFlags does not have the ListBoxEntryFlags::DisableSelection flag set. More...
 
sal_Int32 FindFirstSelectable (sal_Int32 nPos, bool bForward=true) const
 

Private Member Functions

ImplEntryTypeGetEntry (sal_Int32 nPos) const
 

Private Attributes

VclPtr< vcl::WindowmpWindow
 For getting the current locale when matching strings. More...
 
sal_Int32 mnLastSelected
 
sal_Int32 mnSelectionAnchor
 
sal_Int32 mnImages
 
sal_Int32 mnMRUCount
 
sal_Int32 mnMaxMRUCount
 
Link< sal_Int32, void > maSelectionChangedHdl
 
bool mbCallSelectionChangedHdl
 
std::vector< std::unique_ptr< ImplEntryType > > maEntries
 

Detailed Description

Definition at line 87 of file listbox.hxx.

Constructor & Destructor Documentation

◆ ImplEntryList()

ImplEntryList::ImplEntryList ( vcl::Window pWindow)

◆ ~ImplEntryList()

ImplEntryList::~ImplEntryList ( )

Definition at line 72 of file imp_listbox.cxx.

References Clear().

Member Function Documentation

◆ Clear()

void ImplEntryList::Clear ( )

Definition at line 77 of file imp_listbox.cxx.

References maEntries, and mnImages.

Referenced by ImplListBoxWindow::Clear(), dispose(), and ~ImplEntryList().

◆ dispose()

void ImplEntryList::dispose ( void  )

Definition at line 83 of file imp_listbox.cxx.

References VclPtr< reference_type >::clear(), Clear(), and mpWindow.

Referenced by ImplListBoxWindow::dispose().

◆ FindEntry()

sal_Int32 ImplEntryList::FindEntry ( std::u16string_view  rStr,
bool  bSearchMRUArea = false 
) const

◆ FindFirstSelectable()

sal_Int32 ImplEntryList::FindFirstSelectable ( sal_Int32  nPos,
bool  bForward = true 
) const
Returns
the first entry found from the given position nPos that is selectable or LISTBOX_ENTRY_NOTFOUND if non is found. If the entry at nPos is not selectable, it returns the first selectable entry after nPos if bForward is true and the first selectable entry after nPos is bForward is false.

Definition at line 420 of file imp_listbox.cxx.

References GetEntryCount(), IsEntrySelectable(), LISTBOX_ENTRY_NOTFOUND, and nPos.

Referenced by ImplListBoxWindow::ProcessKeyInput().

◆ FindMatchingEntry()

sal_Int32 ImplEntryList::FindMatchingEntry ( const OUString &  rStr,
sal_Int32  nStart,
bool  bLazy 
) const

◆ GetAddedHeight()

tools::Long ImplEntryList::GetAddedHeight ( sal_Int32  nEndIndex,
sal_Int32  nBeginIndex 
) const

◆ GetEntry()

ImplEntryType * ImplEntryList::GetEntry ( sal_Int32  nPos) const
inlineprivate

◆ GetEntryCount()

sal_Int32 ImplEntryList::GetEntryCount ( ) const
inline

◆ GetEntryData()

void * ImplEntryList::GetEntryData ( sal_Int32  nPos) const

Definition at line 355 of file imp_listbox.cxx.

References GetEntry(), ImplEntryType::mpUserData, and nPos.

Referenced by ListBox::GetEntryData().

◆ GetEntryHeight()

tools::Long ImplEntryList::GetEntryHeight ( sal_Int32  nPos) const

◆ GetEntryImage()

Image ImplEntryList::GetEntryImage ( sal_Int32  nPos) const

◆ GetEntryPtr()

const ImplEntryType * ImplEntryList::GetEntryPtr ( sal_Int32  nPos) const
inline

◆ GetEntryText()

OUString ImplEntryList::GetEntryText ( sal_Int32  nPos) const

◆ GetLastSelected()

sal_Int32 ImplEntryList::GetLastSelected ( ) const
inline

Definition at line 151 of file listbox.hxx.

References mnLastSelected.

Referenced by ImplListBoxWindow::SelectEntries().

◆ GetMaxMRUCount()

sal_Int32 ImplEntryList::GetMaxMRUCount ( ) const
inline

Definition at line 163 of file listbox.hxx.

References mnMaxMRUCount.

Referenced by ImplListBox::GetMaxMRUCount().

◆ GetMRUCount()

sal_Int32 ImplEntryList::GetMRUCount ( ) const
inline

◆ GetMutableEntryPtr()

ImplEntryType * ImplEntryList::GetMutableEntryPtr ( sal_Int32  nPos) const
inline

Definition at line 116 of file listbox.hxx.

References GetEntry(), and nPos.

Referenced by ImplListBoxWindow::ImplCalcMetrics(), and ImplListBoxWindow::SetEntryFlags().

◆ GetSelectedEntry()

OUString ImplEntryList::GetSelectedEntry ( sal_Int32  nIndex) const

Definition at line 380 of file imp_listbox.cxx.

References GetEntryText(), GetSelectedEntryPos(), and nIndex.

◆ GetSelectedEntryCount()

sal_Int32 ImplEntryList::GetSelectedEntryCount ( ) const

◆ GetSelectedEntryPos()

sal_Int32 ImplEntryList::GetSelectedEntryPos ( sal_Int32  nIndex) const

◆ GetSelectionAnchor()

sal_Int32 ImplEntryList::GetSelectionAnchor ( ) const
inline

Definition at line 154 of file listbox.hxx.

References mnSelectionAnchor.

Referenced by ImplListBoxWindow::SelectEntries().

◆ HasEntryImage()

bool ImplEntryList::HasEntryImage ( sal_Int32  nPos) const

Definition at line 330 of file imp_listbox.cxx.

References GetEntry(), ImplEntryType::maImage, and nPos.

Referenced by ImplListBoxWindow::DrawEntry(), and ListBox::GetEntryImage().

◆ HasImages()

bool ImplEntryList::HasImages ( ) const
inline

Definition at line 131 of file listbox.hxx.

References mnImages.

Referenced by ImplListBoxWindow::DrawEntry(), IMPL_LINK(), and ImplListBoxWindow::ImplGetTextStyle().

◆ InsertEntry()

sal_Int32 ImplEntryList::InsertEntry ( sal_Int32  nPos,
ImplEntryType pNewEntry,
bool  bSort 
)

◆ IsEntryPosSelected()

bool ImplEntryList::IsEntryPosSelected ( sal_Int32  nIndex) const

◆ IsEntrySelectable()

bool ImplEntryList::IsEntrySelectable ( sal_Int32  nPos) const

◆ RemoveEntry()

void ImplEntryList::RemoveEntry ( sal_Int32  nPos)

Definition at line 226 of file imp_listbox.cxx.

References maEntries, o3tl::make_unsigned(), mnImages, and nPos.

Referenced by ImplListBoxWindow::RemoveEntry().

◆ SelectEntry()

void ImplEntryList::SelectEntry ( sal_Int32  nPos,
bool  bSelect 
)

◆ SetCallSelectionChangedHdl()

void ImplEntryList::SetCallSelectionChangedHdl ( bool  bCall)
inline

Definition at line 157 of file listbox.hxx.

References mbCallSelectionChangedHdl.

Referenced by ImplListBox::SetCallSelectionChangedHdl().

◆ SetEntryData()

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

Definition at line 348 of file imp_listbox.cxx.

References GetEntry(), ImplEntryType::mpUserData, and nPos.

Referenced by ImplListBox::SetEntryData().

◆ SetEntryFlags()

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

Definition at line 361 of file imp_listbox.cxx.

References GetEntry(), ImplEntryType::mnFlags, and nPos.

Referenced by ImplListBoxWindow::SetEntryFlags().

◆ SetLastSelected()

void ImplEntryList::SetLastSelected ( sal_Int32  nPos)
inline

Definition at line 150 of file listbox.hxx.

References mnLastSelected, and nPos.

Referenced by ImplListBoxWindow::SelectEntries().

◆ SetMaxMRUCount()

void ImplEntryList::SetMaxMRUCount ( sal_Int32  n)
inline

Definition at line 162 of file listbox.hxx.

References mnMaxMRUCount, and n.

Referenced by ImplListBox::SetMaxMRUCount().

◆ SetMRUCount()

void ImplEntryList::SetMRUCount ( sal_Int32  n)
inline

Definition at line 159 of file listbox.hxx.

References mnMRUCount, and n.

Referenced by ImplListBox::Clear(), ImplListBoxWindow::ImplCallSelect(), and ImplListBox::SetMRUEntries().

◆ SetSelectionAnchor()

void ImplEntryList::SetSelectionAnchor ( sal_Int32  nPos)
inline

Definition at line 153 of file listbox.hxx.

References mnSelectionAnchor, and nPos.

Referenced by ImplListBoxWindow::SelectEntries().

◆ SetSelectionChangedHdl()

void ImplEntryList::SetSelectionChangedHdl ( const Link< sal_Int32, void > &  rLnk)
inline

Definition at line 156 of file listbox.hxx.

References maSelectionChangedHdl.

Referenced by ImplListBox::SetSelectionChangedHdl().

Member Data Documentation

◆ maEntries

std::vector<std::unique_ptr<ImplEntryType> > ImplEntryList::maEntries
private

◆ maSelectionChangedHdl

Link<sal_Int32,void> ImplEntryList::maSelectionChangedHdl
private

Definition at line 98 of file listbox.hxx.

Referenced by SelectEntry(), and SetSelectionChangedHdl().

◆ mbCallSelectionChangedHdl

bool ImplEntryList::mbCallSelectionChangedHdl
private

Definition at line 99 of file listbox.hxx.

Referenced by ImplEntryList(), SelectEntry(), and SetCallSelectionChangedHdl().

◆ mnImages

sal_Int32 ImplEntryList::mnImages
private

Definition at line 93 of file listbox.hxx.

Referenced by Clear(), HasImages(), ImplEntryList(), InsertEntry(), and RemoveEntry().

◆ mnLastSelected

sal_Int32 ImplEntryList::mnLastSelected
private

Definition at line 91 of file listbox.hxx.

Referenced by GetLastSelected(), ImplEntryList(), and SetLastSelected().

◆ mnMaxMRUCount

sal_Int32 ImplEntryList::mnMaxMRUCount
private

Definition at line 96 of file listbox.hxx.

Referenced by GetMaxMRUCount(), ImplEntryList(), and SetMaxMRUCount().

◆ mnMRUCount

sal_Int32 ImplEntryList::mnMRUCount
private

Definition at line 95 of file listbox.hxx.

Referenced by GetMRUCount(), ImplEntryList(), InsertEntry(), and SetMRUCount().

◆ mnSelectionAnchor

sal_Int32 ImplEntryList::mnSelectionAnchor
private

Definition at line 92 of file listbox.hxx.

Referenced by GetSelectionAnchor(), ImplEntryList(), and SetSelectionAnchor().

◆ mpWindow

VclPtr<vcl::Window> ImplEntryList::mpWindow
private

For getting the current locale when matching strings.

Definition at line 90 of file listbox.hxx.

Referenced by dispose(), FindMatchingEntry(), and ImplEntryList().


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