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)
 
voidGetEntryData (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)
 

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, voidmaSelectionChangedHdl
 
bool mbCallSelectionChangedHdl
 
std::vector< std::unique_ptr< ImplEntryType > > maEntries
 

Detailed Description

Definition at line 85 of file listbox.hxx.

Constructor & Destructor Documentation

ImplEntryList::ImplEntryList ( vcl::Window pWindow)
ImplEntryList::~ImplEntryList ( )

Definition at line 71 of file imp_listbox.cxx.

References Clear().

Member Function Documentation

void ImplEntryList::Clear ( )

Definition at line 76 of file imp_listbox.cxx.

References maEntries, and mnImages.

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

void ImplEntryList::dispose ( void  )

Definition at line 82 of file imp_listbox.cxx.

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

Referenced by ImplListBoxWindow::dispose().

sal_Int32 ImplEntryList::FindEntry ( std::u16string_view  rStr,
bool  bSearchMRUArea = false 
) const
sal_Int32 ImplEntryList::FindFirstSelectable ( sal_Int32  nPos,
bool  bForward = true 
)
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 419 of file imp_listbox.cxx.

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

Referenced by ImplListBoxWindow::ProcessKeyInput().

sal_Int32 ImplEntryList::FindMatchingEntry ( const OUString &  rStr,
sal_Int32  nStart,
bool  bLazy 
) const
tools::Long ImplEntryList::GetAddedHeight ( sal_Int32  nEndIndex,
sal_Int32  nBeginIndex 
) const
ImplEntryType* ImplEntryList::GetEntry ( sal_Int32  nPos) const
inlineprivate
sal_Int32 ImplEntryList::GetEntryCount ( ) const
inline
void * ImplEntryList::GetEntryData ( sal_Int32  nPos) const

Definition at line 354 of file imp_listbox.cxx.

References GetEntry(), and ImplEntryType::mpUserData.

Referenced by ListBox::GetEntryData().

tools::Long ImplEntryList::GetEntryHeight ( sal_Int32  nPos) const
Image ImplEntryList::GetEntryImage ( sal_Int32  nPos) const
const ImplEntryType* ImplEntryList::GetEntryPtr ( sal_Int32  nPos) const
inline
OUString ImplEntryList::GetEntryText ( sal_Int32  nPos) const
sal_Int32 ImplEntryList::GetLastSelected ( ) const
inline

Definition at line 149 of file listbox.hxx.

References mnLastSelected.

Referenced by ImplListBoxWindow::SelectEntries().

sal_Int32 ImplEntryList::GetMaxMRUCount ( ) const
inline

Definition at line 161 of file listbox.hxx.

References mnMaxMRUCount.

Referenced by ImplListBox::GetMaxMRUCount().

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

Definition at line 114 of file listbox.hxx.

References GetEntry().

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

OUString ImplEntryList::GetSelectedEntry ( sal_Int32  nIndex) const

Definition at line 379 of file imp_listbox.cxx.

References GetEntryText(), and GetSelectedEntryPos().

sal_Int32 ImplEntryList::GetSelectedEntryCount ( ) const
sal_Int32 ImplEntryList::GetSelectedEntryPos ( sal_Int32  nIndex) const
sal_Int32 ImplEntryList::GetSelectionAnchor ( ) const
inline

Definition at line 152 of file listbox.hxx.

References mnSelectionAnchor.

Referenced by ImplListBoxWindow::SelectEntries().

bool ImplEntryList::HasEntryImage ( sal_Int32  nPos) const

Definition at line 329 of file imp_listbox.cxx.

References GetEntry(), and ImplEntryType::maImage.

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

bool ImplEntryList::HasImages ( ) const
inline
sal_Int32 ImplEntryList::InsertEntry ( sal_Int32  nPos,
ImplEntryType pNewEntry,
bool  bSort 
)
bool ImplEntryList::IsEntryPosSelected ( sal_Int32  nIndex) const
bool ImplEntryList::IsEntrySelectable ( sal_Int32  nPos) const
void ImplEntryList::RemoveEntry ( sal_Int32  nPos)

Definition at line 225 of file imp_listbox.cxx.

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

Referenced by ImplListBoxWindow::RemoveEntry().

void ImplEntryList::SelectEntry ( sal_Int32  nPos,
bool  bSelect 
)
void ImplEntryList::SetCallSelectionChangedHdl ( bool  bCall)
inline

Definition at line 155 of file listbox.hxx.

Referenced by ImplListBox::SetCallSelectionChangedHdl().

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

Definition at line 347 of file imp_listbox.cxx.

References GetEntry(), and ImplEntryType::mpUserData.

Referenced by ImplListBox::SetEntryData().

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

Definition at line 360 of file imp_listbox.cxx.

References GetEntry(), and ImplEntryType::mnFlags.

Referenced by ImplListBoxWindow::SetEntryFlags().

void ImplEntryList::SetLastSelected ( sal_Int32  nPos)
inline

Definition at line 148 of file listbox.hxx.

Referenced by ImplListBoxWindow::SelectEntries().

void ImplEntryList::SetMaxMRUCount ( sal_Int32  n)
inline

Definition at line 160 of file listbox.hxx.

Referenced by ImplListBox::SetMaxMRUCount().

void ImplEntryList::SetMRUCount ( sal_Int32  n)
inline
void ImplEntryList::SetSelectionAnchor ( sal_Int32  nPos)
inline

Definition at line 151 of file listbox.hxx.

Referenced by ImplListBoxWindow::SelectEntries().

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

Definition at line 154 of file listbox.hxx.

Referenced by ImplListBox::SetSelectionChangedHdl().

Member Data Documentation

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

Definition at line 98 of file listbox.hxx.

Referenced by Clear(), FindEntry(), InsertEntry(), RemoveEntry(), and SelectEntry().

Link<sal_Int32,void> ImplEntryList::maSelectionChangedHdl
private

Definition at line 96 of file listbox.hxx.

Referenced by SelectEntry().

bool ImplEntryList::mbCallSelectionChangedHdl
private

Definition at line 97 of file listbox.hxx.

Referenced by ImplEntryList(), and SelectEntry().

sal_Int32 ImplEntryList::mnImages
private

Definition at line 91 of file listbox.hxx.

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

sal_Int32 ImplEntryList::mnLastSelected
private

Definition at line 89 of file listbox.hxx.

Referenced by GetLastSelected(), and ImplEntryList().

sal_Int32 ImplEntryList::mnMaxMRUCount
private

Definition at line 94 of file listbox.hxx.

Referenced by GetMaxMRUCount(), and ImplEntryList().

sal_Int32 ImplEntryList::mnMRUCount
private

Definition at line 93 of file listbox.hxx.

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

sal_Int32 ImplEntryList::mnSelectionAnchor
private

Definition at line 90 of file listbox.hxx.

Referenced by GetSelectionAnchor(), and ImplEntryList().

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

For getting the current locale when matching strings.

Definition at line 88 of file listbox.hxx.

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


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