LibreOffice Module vcl (master)
1
|
#include <listbox.hxx>
Public Member Functions | |
ImplEntryList (vcl::Window *pWindow) | |
~ImplEntryList () | |
sal_Int32 | InsertEntry (sal_Int32 nPos, ImplEntryType *pNewEntry, bool bSort) |
void | RemoveEntry (sal_Int32 nPos) |
const ImplEntryType * | GetEntryPtr (sal_Int32 nPos) const |
ImplEntryType * | GetMutableEntryPtr (sal_Int32 nPos) const |
void | Clear () |
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) |
Private Member Functions | |
ImplEntryType * | GetEntry (sal_Int32 nPos) const |
Private Attributes | |
VclPtr< vcl::Window > | mpWindow |
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 |
Definition at line 85 of file listbox.hxx.
ImplEntryList::ImplEntryList | ( | vcl::Window * | pWindow | ) |
Definition at line 61 of file imp_listbox.cxx.
References LISTBOX_ENTRY_NOTFOUND, mbCallSelectionChangedHdl, mnImages, mnLastSelected, mnMaxMRUCount, mnMRUCount, mnSelectionAnchor, and mpWindow.
ImplEntryList::~ImplEntryList | ( | ) |
Definition at line 73 of file imp_listbox.cxx.
References Clear().
void ImplEntryList::Clear | ( | ) |
Definition at line 78 of file imp_listbox.cxx.
References maEntries, and mnImages.
Referenced by ~ImplEntryList().
sal_Int32 ImplEntryList::FindEntry | ( | std::u16string_view | rStr, |
bool | bSearchMRUArea = false |
||
) | const |
Definition at line 237 of file imp_listbox.cxx.
References vcl::I18nHelper::filterFormattingChars(), GetMRUCount(), LISTBOX_ENTRY_NOTFOUND, maEntries, and n.
Referenced by ListBox::GetEntryPos(), ListBox::GetSelectedEntryPos(), IMPL_LINK(), ImplListBoxWindow::ImplCallSelect(), ImplListBoxWindow::ImplPaint(), and lcl_GetSelectedEntries().
sal_Int32 ImplEntryList::FindFirstSelectable | ( | sal_Int32 | nPos, |
bool | bForward = true |
||
) |
Definition at line 418 of file imp_listbox.cxx.
References GetEntryCount(), IsEntrySelectable(), and LISTBOX_ENTRY_NOTFOUND.
sal_Int32 ImplEntryList::FindMatchingEntry | ( | const OUString & | rStr, |
sal_Int32 | nStart, | ||
bool | bLazy | ||
) | const |
Definition at line 249 of file imp_listbox.cxx.
References GetEntry(), GetEntryCount(), AllSettings::GetLocaleI18nHelper(), OutputDevice::GetSettings(), LISTBOX_ENTRY_NOTFOUND, ImplEntryType::maStr, vcl::I18nHelper::MatchString(), mpWindow, n, and nPos.
tools::Long ImplEntryList::GetAddedHeight | ( | sal_Int32 | nEndIndex, |
sal_Int32 | nBeginIndex | ||
) | const |
helper: add up heights up to index nEndIndex.
GetAddedHeight( 0 )
Definition at line 279 of file imp_listbox.cxx.
References GetEntryCount(), GetEntryPtr(), ImplEntryType::getHeightWithMargin(), LISTBOX_ENTRY_NOTFOUND, nIndex, and SAL_WARN.
|
inlineprivate |
Definition at line 100 of file listbox.hxx.
References o3tl::make_unsigned().
Referenced by FindMatchingEntry(), GetEntryData(), GetEntryHeight(), GetEntryImage(), GetEntryPtr(), GetEntryText(), GetMutableEntryPtr(), GetSelectedEntryCount(), GetSelectedEntryPos(), HasEntryImage(), InsertEntry(), IsEntryPosSelected(), IsEntrySelectable(), SetEntryData(), and SetEntryFlags().
|
inline |
Definition at line 127 of file listbox.hxx.
Referenced by ImplListBoxFloatingWindow::CalcFloatSize(), ListBox::CalcSubEditSize(), FindFirstSelectable(), FindMatchingEntry(), GetAddedHeight(), ListBox::GetEntryCount(), GetSelectedEntryCount(), GetSelectedEntryPos(), ImplListBox::ImplCheckScrollBars(), ImplListBox::ImplInitScrollBars(), and ListBox::SelectEntriesPos().
void * ImplEntryList::GetEntryData | ( | sal_Int32 | nPos | ) | const |
Definition at line 353 of file imp_listbox.cxx.
References GetEntry(), and ImplEntryType::mpUserData.
Referenced by ListBox::GetEntryData().
tools::Long ImplEntryList::GetEntryHeight | ( | sal_Int32 | nPos | ) | const |
Definition at line 313 of file imp_listbox.cxx.
References GetEntry(), and ImplEntryType::getHeightWithMargin().
Image ImplEntryList::GetEntryImage | ( | sal_Int32 | nPos | ) | const |
Definition at line 337 of file imp_listbox.cxx.
References GetEntry(), and ImplEntryType::maImage.
Referenced by ListBox::GetEntryImage().
|
inline |
OUString ImplEntryList::GetEntryText | ( | sal_Int32 | nPos | ) | const |
Definition at line 319 of file imp_listbox.cxx.
References GetEntry(), and ImplEntryType::maStr.
Referenced by ListBox::Draw(), ListBox::GetEntry(), GetSelectedEntry(), ListBox::GetSelectedEntryPos(), IMPL_LINK(), and ImplListBoxWindow::ImplCallSelect().
|
inline |
Definition at line 148 of file listbox.hxx.
References mnLastSelected.
|
inline |
Definition at line 160 of file listbox.hxx.
References mnMaxMRUCount.
Referenced by ImplListBox::GetMaxMRUCount().
|
inline |
Definition at line 157 of file listbox.hxx.
References mnMRUCount.
Referenced by FindEntry(), ImplListBoxWindow::GetBoundingRectangle(), ListBox::GetEntry(), ListBox::GetEntryCount(), ListBox::GetEntryData(), ListBox::GetEntryPos(), ImplListBox::GetMRUEntries(), ListBox::GetSelectedEntryPos(), ImplListBoxWindow::ImplCallSelect(), ImplListBoxWindow::ImplPaint(), ListBox::InsertEntry(), ListBox::IsEntryPosSelected(), ListBox::RemoveEntry(), ListBox::SelectEntriesPos(), ListBox::SelectEntryPos(), ListBox::SetEntryData(), ListBox::SetEntryFlags(), ImplListBox::SetMRUEntries(), and ListBox::SetTopEntry().
|
inline |
Definition at line 114 of file listbox.hxx.
References GetEntry().
OUString ImplEntryList::GetSelectedEntry | ( | sal_Int32 | nIndex | ) | const |
Definition at line 378 of file imp_listbox.cxx.
References GetEntryText(), and GetSelectedEntryPos().
sal_Int32 ImplEntryList::GetSelectedEntryCount | ( | ) | const |
Definition at line 366 of file imp_listbox.cxx.
References GetEntry(), GetEntryCount(), ImplEntryType::mbIsSelected, and n.
Referenced by ListBox::GetSelectedEntryCount(), ImplListBox::ImplCheckScrollBars(), ImplListBoxWindow::MouseButtonDown(), and ImplListBoxWindow::MouseMove().
sal_Int32 ImplEntryList::GetSelectedEntryPos | ( | sal_Int32 | nIndex | ) | const |
Definition at line 383 of file imp_listbox.cxx.
References GetEntry(), GetEntryCount(), LISTBOX_ENTRY_NOTFOUND, ImplEntryType::mbIsSelected, and n.
Referenced by ImplListBoxWindow::DeselectAll(), GetSelectedEntry(), ListBox::GetSelectedEntryPos(), ImplListBoxWindow::ImplCallSelect(), ImplListBox::ImplCheckScrollBars(), ImplListBoxWindow::MouseButtonDown(), ImplListBoxWindow::MouseMove(), ImplListBoxWindow::SelectEntry(), and ImplListBoxFloatingWindow::StartFloat().
|
inline |
Definition at line 151 of file listbox.hxx.
References mnSelectionAnchor.
bool ImplEntryList::HasEntryImage | ( | sal_Int32 | nPos | ) | const |
Definition at line 328 of file imp_listbox.cxx.
References GetEntry(), and ImplEntryType::maImage.
Referenced by ListBox::GetEntryImage().
|
inline |
Definition at line 128 of file listbox.hxx.
sal_Int32 ImplEntryList::InsertEntry | ( | sal_Int32 | nPos, |
ImplEntryType * | pNewEntry, | ||
bool | bSort | ||
) |
Definition at line 123 of file imp_listbox.cxx.
References assert(), comphelper::string::NaturalStringSorter::compare(), GetEntry(), LISTBOX_MAX_ENTRIES, maEntries, ImplEntryType::maImage, ImplEntryType::maStr, mnImages, and mnMRUCount.
Referenced by ImplListBoxWindow::ImplCallSelect().
bool ImplEntryList::IsEntryPosSelected | ( | sal_Int32 | nIndex | ) | const |
Definition at line 406 of file imp_listbox.cxx.
References GetEntry(), and ImplEntryType::mbIsSelected.
Referenced by ListBox::Draw(), IMPL_LINK(), and ListBox::IsEntryPosSelected().
bool ImplEntryList::IsEntrySelectable | ( | sal_Int32 | nPos | ) | const |
An Entry is selectable if its mnFlags does not have the ListBoxEntryFlags::DisableSelection flag set.
Definition at line 412 of file imp_listbox.cxx.
References DisableSelection, GetEntry(), ImplEntryType::mnFlags, and NONE.
Referenced by FindFirstSelectable().
void ImplEntryList::RemoveEntry | ( | sal_Int32 | nPos | ) |
Definition at line 224 of file imp_listbox.cxx.
References maEntries, o3tl::make_unsigned(), and mnImages.
void ImplEntryList::SelectEntry | ( | sal_Int32 | nPos, |
bool | bSelect | ||
) |
Definition at line 84 of file imp_listbox.cxx.
References DisableSelection, maEntries, o3tl::make_unsigned(), maSelectionChangedHdl, mbCallSelectionChangedHdl, and NONE.
Referenced by ImplListBoxWindow::SelectEntry().
|
inline |
Definition at line 154 of file listbox.hxx.
Referenced by ImplListBox::SetCallSelectionChangedHdl().
Definition at line 346 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 359 of file imp_listbox.cxx.
References GetEntry(), and ImplEntryType::mnFlags.
|
inline |
Definition at line 147 of file listbox.hxx.
|
inline |
Definition at line 159 of file listbox.hxx.
Referenced by ImplListBox::SetMaxMRUCount().
|
inline |
Definition at line 156 of file listbox.hxx.
Referenced by ImplListBox::Clear(), ImplListBoxWindow::ImplCallSelect(), and ImplListBox::SetMRUEntries().
|
inline |
Definition at line 150 of file listbox.hxx.
Definition at line 153 of file listbox.hxx.
Referenced by ImplListBox::SetSelectionChangedHdl().
|
private |
Definition at line 98 of file listbox.hxx.
Referenced by Clear(), FindEntry(), InsertEntry(), RemoveEntry(), and SelectEntry().
Definition at line 96 of file listbox.hxx.
Referenced by SelectEntry().
|
private |
Definition at line 97 of file listbox.hxx.
Referenced by ImplEntryList(), and SelectEntry().
|
private |
Definition at line 91 of file listbox.hxx.
Referenced by Clear(), ImplEntryList(), InsertEntry(), and RemoveEntry().
|
private |
Definition at line 89 of file listbox.hxx.
Referenced by GetLastSelected(), and ImplEntryList().
|
private |
Definition at line 94 of file listbox.hxx.
Referenced by GetMaxMRUCount(), and ImplEntryList().
|
private |
Definition at line 93 of file listbox.hxx.
Referenced by GetMRUCount(), ImplEntryList(), and InsertEntry().
|
private |
Definition at line 90 of file listbox.hxx.
Referenced by GetSelectionAnchor(), and ImplEntryList().
|
private |
For getting the current locale when matching strings.
Definition at line 88 of file listbox.hxx.
Referenced by FindMatchingEntry(), and ImplEntryList().