LibreOffice Module basctl (master) 1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
basctl::SbTreeListBox Class Reference

#include <bastype2.hxx>

Inheritance diagram for basctl::SbTreeListBox:
[legend]
Collaboration diagram for basctl::SbTreeListBox:
[legend]

Public Member Functions

 SbTreeListBox (std::unique_ptr< weld::TreeView > xControl, weld::Window *pTopLevel)
 
virtual ~SbTreeListBox () override
 
void ScanEntry (const ScriptDocument &rDocument, LibraryLocation eLocation)
 
void ScanAllEntries ()
 
void UpdateEntries ()
 
bool IsEntryProtected (const weld::TreeIter *pEntry)
 
void SetMode (BrowseMode nM)
 
BrowseMode GetMode () const
 
SbModuleFindModule (const weld::TreeIter *pEntry)
 
SbxVariableFindVariable (const weld::TreeIter *pEntry)
 
bool FindRootEntry (const ScriptDocument &rDocument, LibraryLocation eLocation, weld::TreeIter &rIter)
 
bool FindEntry (std::u16string_view rText, EntryType eType, weld::TreeIter &rIter)
 
EntryDescriptor GetEntryDescriptor (const weld::TreeIter *pEntry)
 
bool IsValidEntry (const weld::TreeIter &rEntry)
 
void AddEntry (const OUString &rText, const OUString &rImage, const weld::TreeIter *pParent, bool bChildrenOnDemand, std::unique_ptr< Entry > &&rUserData, weld::TreeIter *pRet=nullptr)
 
void connect_changed (const Link< weld::TreeView &, void > &rLink)
 
std::unique_ptr< weld::TreeItermake_iterator (const weld::TreeIter *pIter=nullptr) const
 
void copy_iterator (const weld::TreeIter &rSource, weld::TreeIter &rDest) const
 
bool get_selected (weld::TreeIter *pIter) const
 
void select (const weld::TreeIter &rIter)
 
void unselect (const weld::TreeIter &rIter)
 
void remove (const weld::TreeIter &rIter)
 
bool get_cursor (weld::TreeIter *pIter) const
 
void set_cursor (const weld::TreeIter &rIter)
 
OUString get_text (const weld::TreeIter &rIter) const
 
void set_text (const weld::TreeIter &rIter, const OUString &rText)
 
OUString get_id (const weld::TreeIter &rIter) const
 
bool get_iter_first (weld::TreeIter &rIter) const
 
bool iter_next_sibling (weld::TreeIter &rIter) const
 
bool iter_children (weld::TreeIter &rIter) const
 
bool iter_parent (weld::TreeIter &rIter) const
 
int get_iter_depth (const weld::TreeIter &rIter) const
 
bool get_row_expanded (const weld::TreeIter &rIter) const
 
void expand_row (const weld::TreeIter &rIter)
 
void set_size_request (int nWidth, int nHeight)
 
float get_approximate_digit_width () const
 
int get_height_rows (int nRows) const
 
int get_iter_index_in_parent (const weld::TreeIter &rIter) const
 
void connect_editing (const Link< const weld::TreeIter &, bool > &rStartLink, const Link< const std::pair< const weld::TreeIter &, OUString > &, bool > &rEndLink)
 
void make_sorted ()
 
void RemoveEntry (const weld::TreeIter &rIter)
 
void RemoveEntry (const ScriptDocument &)
 
OUString GetRootEntryName (const ScriptDocument &rDocument, LibraryLocation eLocation) const
 
void SetCurrentEntry (EntryDescriptor const &)
 
weld::TreeViewget_widget ()
 
- Public Member Functions inherited from basctl::DocumentEventListener
 DocumentEventListener (const DocumentEventListener &)=delete
 
const DocumentEventListeneroperator= (const DocumentEventListener &)=delete
 
 DocumentEventListener ()=default
 
virtual void onDocumentCreated (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentOpened (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentSave (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentSaveDone (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentSaveAs (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentSaveAsDone (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentClosed (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentTitleChanged (const ScriptDocument &_rDocument)=0
 
virtual void onDocumentModeChanged (const ScriptDocument &_rDocument)=0
 
virtual ~DocumentEventListener ()
 

Static Public Member Functions

static ItemType ConvertType (EntryType eType)
 
static OUString GetRootEntryBitmaps (const ScriptDocument &rDocument)
 

Protected Member Functions

 DECL_LINK (RequestingChildrenHdl, const weld::TreeIter &, bool)
 
 DECL_LINK (OpenCurrentHdl, weld::TreeView &, bool)
 
void ImpCreateLibEntries (const weld::TreeIter &rShellRootEntry, const ScriptDocument &rDocument, LibraryLocation eLocation)
 
void ImpCreateLibSubEntries (const weld::TreeIter &rLibRootEntry, const ScriptDocument &rDocument, const OUString &rLibName)
 
void ImpCreateLibSubEntriesInVBAMode (const weld::TreeIter &rLibRootEntry, const ScriptDocument &rDocument, const OUString &rLibName)
 
void ImpCreateLibSubSubEntriesInVBAMode (const weld::TreeIter &rLibRootEntry, const ScriptDocument &rDocument, const OUString &rLibName)
 
bool ImpFindEntry (weld::TreeIter &rIter, std::u16string_view rText)
 
virtual void onDocumentCreated (const ScriptDocument &_rDocument) override
 
virtual void onDocumentOpened (const ScriptDocument &_rDocument) override
 
virtual void onDocumentSave (const ScriptDocument &_rDocument) override
 
virtual void onDocumentSaveDone (const ScriptDocument &_rDocument) override
 
virtual void onDocumentSaveAs (const ScriptDocument &_rDocument) override
 
virtual void onDocumentSaveAsDone (const ScriptDocument &_rDocument) override
 
virtual void onDocumentClosed (const ScriptDocument &_rDocument) override
 
virtual void onDocumentTitleChanged (const ScriptDocument &_rDocument) override
 
virtual void onDocumentModeChanged (const ScriptDocument &_rDocument) override
 

Private Member Functions

void SetEntryBitmaps (const weld::TreeIter &rIter, const OUString &rImage)
 
LibraryType GetLibraryType () const
 

Private Attributes

std::unique_ptr< weld::TreeViewm_xControl
 
std::unique_ptr< weld::TreeIterm_xScratchIter
 
weld::Windowm_pTopLevel
 
bool m_bFreezeOnFirstAddRemove
 
BrowseMode nMode
 
DocumentEventNotifier m_aNotifier
 

Detailed Description

Definition at line 174 of file bastype2.hxx.

Constructor & Destructor Documentation

◆ SbTreeListBox()

basctl::SbTreeListBox::SbTreeListBox ( std::unique_ptr< weld::TreeView xControl,
weld::Window pTopLevel 
)

Definition at line 161 of file bastype2.cxx.

References All, LINK, m_xControl, m_xControl, and nMode.

◆ ~SbTreeListBox()

basctl::SbTreeListBox::~SbTreeListBox ( )
overridevirtual

Member Function Documentation

◆ AddEntry()

void basctl::SbTreeListBox::AddEntry ( const OUString &  rText,
const OUString &  rImage,
const weld::TreeIter pParent,
bool  bChildrenOnDemand,
std::unique_ptr< Entry > &&  rUserData,
weld::TreeIter pRet = nullptr 
)

◆ connect_changed()

void basctl::SbTreeListBox::connect_changed ( const Link< weld::TreeView &, void > &  rLink)
inline

Definition at line 231 of file bastype2.hxx.

References m_xControl.

◆ connect_editing()

void basctl::SbTreeListBox::connect_editing ( const Link< const weld::TreeIter &, bool > &  rStartLink,
const Link< const std::pair< const weld::TreeIter &, OUString > &, bool > &  rEndLink 
)
inline

Definition at line 254 of file bastype2.hxx.

References m_xControl.

◆ ConvertType()

ItemType basctl::SbTreeListBox::ConvertType ( EntryType  eType)
static

◆ copy_iterator()

void basctl::SbTreeListBox::copy_iterator ( const weld::TreeIter rSource,
weld::TreeIter rDest 
) const
inline

Definition at line 233 of file bastype2.hxx.

References m_xControl.

Referenced by basctl::createLibImpl(), and basctl::createModImpl().

◆ DECL_LINK() [1/2]

basctl::SbTreeListBox::DECL_LINK ( OpenCurrentHdl  ,
weld::TreeView ,
bool   
)
protected

◆ DECL_LINK() [2/2]

basctl::SbTreeListBox::DECL_LINK ( RequestingChildrenHdl  ,
const weld::TreeIter ,
bool   
)
protected

◆ expand_row()

void basctl::SbTreeListBox::expand_row ( const weld::TreeIter rIter)
inline

◆ FindEntry()

bool basctl::SbTreeListBox::FindEntry ( std::u16string_view  rText,
EntryType  eType,
weld::TreeIter rIter 
)

◆ FindModule()

SbModule * basctl::SbTreeListBox::FindModule ( const weld::TreeIter pEntry)

Definition at line 413 of file bastype3.cxx.

References FindVariable().

Referenced by FindVariable().

◆ FindRootEntry()

bool basctl::SbTreeListBox::FindRootEntry ( const ScriptDocument rDocument,
LibraryLocation  eLocation,
weld::TreeIter rIter 
)

◆ FindVariable()

SbxVariable * basctl::SbTreeListBox::FindVariable ( const weld::TreeIter pEntry)

◆ get_approximate_digit_width()

float basctl::SbTreeListBox::get_approximate_digit_width ( ) const
inline

Definition at line 251 of file bastype2.hxx.

References m_xControl.

◆ get_cursor()

bool basctl::SbTreeListBox::get_cursor ( weld::TreeIter pIter) const
inline

Definition at line 238 of file bastype2.hxx.

References m_xControl.

Referenced by basctl::createLibImpl().

◆ get_height_rows()

int basctl::SbTreeListBox::get_height_rows ( int  nRows) const
inline

Definition at line 252 of file bastype2.hxx.

References m_xControl.

◆ get_id()

OUString basctl::SbTreeListBox::get_id ( const weld::TreeIter rIter) const
inline

Definition at line 242 of file bastype2.hxx.

References m_xControl.

Referenced by basctl::SbTreeListBoxDropTarget::NotifyCopyingMoving().

◆ get_iter_depth()

int basctl::SbTreeListBox::get_iter_depth ( const weld::TreeIter rIter) const
inline

◆ get_iter_first()

bool basctl::SbTreeListBox::get_iter_first ( weld::TreeIter rIter) const
inline

Definition at line 243 of file bastype2.hxx.

References m_xControl.

◆ get_iter_index_in_parent()

int basctl::SbTreeListBox::get_iter_index_in_parent ( const weld::TreeIter rIter) const
inline

Definition at line 253 of file bastype2.hxx.

References m_xControl.

Referenced by basctl::SbTreeListBoxDropTarget::NotifyCopyingMoving().

◆ get_row_expanded()

bool basctl::SbTreeListBox::get_row_expanded ( const weld::TreeIter rIter) const
inline

◆ get_selected()

bool basctl::SbTreeListBox::get_selected ( weld::TreeIter pIter) const
inline

Definition at line 234 of file bastype2.hxx.

References m_xControl.

Referenced by basctl::SbTreeListBoxDropTarget::NotifyCopyingMoving().

◆ get_text()

OUString basctl::SbTreeListBox::get_text ( const weld::TreeIter rIter) const
inline

Definition at line 240 of file bastype2.hxx.

References m_xControl.

Referenced by basctl::SbTreeListBoxDropTarget::NotifyCopyingMoving().

◆ get_widget()

weld::TreeView & basctl::SbTreeListBox::get_widget ( )
inline

◆ GetEntryDescriptor()

EntryDescriptor basctl::SbTreeListBox::GetEntryDescriptor ( const weld::TreeIter pEntry)

◆ GetLibraryType()

LibraryType basctl::SbTreeListBox::GetLibraryType ( ) const
private

Definition at line 668 of file bastype2.cxx.

References basctl::All, basctl::Dialog, Dialogs, eType, basctl::Module, Modules, and nMode.

Referenced by GetRootEntryName().

◆ GetMode()

BrowseMode basctl::SbTreeListBox::GetMode ( ) const
inline

Definition at line 216 of file bastype2.hxx.

References nMode.

Referenced by basctl::createLibImpl().

◆ GetRootEntryBitmaps()

OUString basctl::SbTreeListBox::GetRootEntryBitmaps ( const ScriptDocument rDocument)
static

◆ GetRootEntryName()

OUString basctl::SbTreeListBox::GetRootEntryName ( const ScriptDocument rDocument,
LibraryLocation  eLocation 
) const

Definition at line 678 of file bastype2.cxx.

References GetLibraryType(), and basctl::ScriptDocument::getTitle().

Referenced by IsValidEntry(), and ScanEntry().

◆ ImpCreateLibEntries()

void basctl::SbTreeListBox::ImpCreateLibEntries ( const weld::TreeIter rShellRootEntry,
const ScriptDocument rDocument,
LibraryLocation  eLocation 
)
protected

◆ ImpCreateLibSubEntries()

void basctl::SbTreeListBox::ImpCreateLibSubEntries ( const weld::TreeIter rLibRootEntry,
const ScriptDocument rDocument,
const OUString &  rLibName 
)
protected

◆ ImpCreateLibSubEntriesInVBAMode()

void basctl::SbTreeListBox::ImpCreateLibSubEntriesInVBAMode ( const weld::TreeIter rLibRootEntry,
const ScriptDocument rDocument,
const OUString &  rLibName 
)
protected

◆ ImpCreateLibSubSubEntriesInVBAMode()

void basctl::SbTreeListBox::ImpCreateLibSubSubEntriesInVBAMode ( const weld::TreeIter rLibRootEntry,
const ScriptDocument rDocument,
const OUString &  rLibName 
)
protected

◆ ImpFindEntry()

bool basctl::SbTreeListBox::ImpFindEntry ( weld::TreeIter rIter,
std::u16string_view  rText 
)
protected

Definition at line 479 of file bastype2.cxx.

References m_xControl.

Referenced by SetCurrentEntry().

◆ IsEntryProtected()

bool basctl::SbTreeListBox::IsEntryProtected ( const weld::TreeIter pEntry)

◆ IsValidEntry()

bool basctl::SbTreeListBox::IsValidEntry ( const weld::TreeIter rEntry)

◆ iter_children()

bool basctl::SbTreeListBox::iter_children ( weld::TreeIter rIter) const
inline

Definition at line 245 of file bastype2.hxx.

References m_xControl.

◆ iter_next_sibling()

bool basctl::SbTreeListBox::iter_next_sibling ( weld::TreeIter rIter) const
inline

Definition at line 244 of file bastype2.hxx.

References m_xControl.

◆ iter_parent()

bool basctl::SbTreeListBox::iter_parent ( weld::TreeIter rIter) const
inline

◆ make_iterator()

std::unique_ptr< weld::TreeIter > basctl::SbTreeListBox::make_iterator ( const weld::TreeIter pIter = nullptr) const
inline

◆ make_sorted()

void basctl::SbTreeListBox::make_sorted ( )
inline

Definition at line 260 of file bastype2.hxx.

References m_xControl.

◆ onDocumentClosed()

void basctl::SbTreeListBox::onDocumentClosed ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 521 of file bastype2.cxx.

References RemoveEntry(), and UpdateEntries().

◆ onDocumentCreated()

void basctl::SbTreeListBox::onDocumentCreated ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 491 of file bastype2.cxx.

References UpdateEntries().

◆ onDocumentModeChanged()

void basctl::SbTreeListBox::onDocumentModeChanged ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 534 of file bastype2.cxx.

◆ onDocumentOpened()

void basctl::SbTreeListBox::onDocumentOpened ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 496 of file bastype2.cxx.

References UpdateEntries().

◆ onDocumentSave()

void basctl::SbTreeListBox::onDocumentSave ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 501 of file bastype2.cxx.

◆ onDocumentSaveAs()

void basctl::SbTreeListBox::onDocumentSaveAs ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 511 of file bastype2.cxx.

◆ onDocumentSaveAsDone()

void basctl::SbTreeListBox::onDocumentSaveAsDone ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 516 of file bastype2.cxx.

References UpdateEntries().

◆ onDocumentSaveDone()

void basctl::SbTreeListBox::onDocumentSaveDone ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 506 of file bastype2.cxx.

◆ onDocumentTitleChanged()

void basctl::SbTreeListBox::onDocumentTitleChanged ( const ScriptDocument _rDocument)
overrideprotectedvirtual

Implements basctl::DocumentEventListener.

Definition at line 529 of file bastype2.cxx.

◆ remove()

void basctl::SbTreeListBox::remove ( const weld::TreeIter rIter)
inline

Definition at line 237 of file bastype2.hxx.

References m_xControl.

Referenced by basctl::SbTreeListBoxDropTarget::NotifyCopyingMoving().

◆ RemoveEntry() [1/2]

void basctl::SbTreeListBox::RemoveEntry ( const ScriptDocument rDocument)

◆ RemoveEntry() [2/2]

void basctl::SbTreeListBox::RemoveEntry ( const weld::TreeIter rIter)

Definition at line 572 of file bastype2.cxx.

References m_bFreezeOnFirstAddRemove, and m_xControl.

Referenced by onDocumentClosed(), RemoveEntry(), and UpdateEntries().

◆ ScanAllEntries()

void basctl::SbTreeListBox::ScanAllEntries ( )

◆ ScanEntry()

void basctl::SbTreeListBox::ScanEntry ( const ScriptDocument rDocument,
LibraryLocation  eLocation 
)

◆ select()

void basctl::SbTreeListBox::select ( const weld::TreeIter rIter)
inline

◆ set_cursor()

void basctl::SbTreeListBox::set_cursor ( const weld::TreeIter rIter)
inline

Definition at line 239 of file bastype2.hxx.

References m_xControl.

Referenced by basctl::createLibImpl(), and basctl::createModImpl().

◆ set_size_request()

void basctl::SbTreeListBox::set_size_request ( int  nWidth,
int  nHeight 
)
inline

Definition at line 250 of file bastype2.hxx.

References m_xControl.

◆ set_text()

void basctl::SbTreeListBox::set_text ( const weld::TreeIter rIter,
const OUString &  rText 
)
inline

Definition at line 241 of file bastype2.hxx.

References m_xControl.

◆ SetCurrentEntry()

void basctl::SbTreeListBox::SetCurrentEntry ( EntryDescriptor const &  rDesc)

◆ SetEntryBitmaps()

void basctl::SbTreeListBox::SetEntryBitmaps ( const weld::TreeIter rIter,
const OUString &  rImage 
)
private

Definition at line 663 of file bastype2.cxx.

References m_xControl.

Referenced by ImpCreateLibEntries(), and ImpCreateLibSubEntriesInVBAMode().

◆ SetMode()

void basctl::SbTreeListBox::SetMode ( BrowseMode  nM)
inline

Definition at line 215 of file bastype2.hxx.

References nMode.

◆ unselect()

void basctl::SbTreeListBox::unselect ( const weld::TreeIter rIter)
inline

Definition at line 236 of file bastype2.hxx.

References m_xControl.

◆ UpdateEntries()

void basctl::SbTreeListBox::UpdateEntries ( )

Member Data Documentation

◆ m_aNotifier

DocumentEventNotifier basctl::SbTreeListBox::m_aNotifier
private

Definition at line 182 of file bastype2.hxx.

Referenced by ~SbTreeListBox().

◆ m_bFreezeOnFirstAddRemove

bool basctl::SbTreeListBox::m_bFreezeOnFirstAddRemove
private

Definition at line 180 of file bastype2.hxx.

Referenced by AddEntry(), RemoveEntry(), and ScanAllEntries().

◆ m_pTopLevel

weld::Window* basctl::SbTreeListBox::m_pTopLevel
private

Definition at line 179 of file bastype2.hxx.

◆ m_xControl

std::unique_ptr<weld::TreeView> basctl::SbTreeListBox::m_xControl
private

◆ m_xScratchIter

std::unique_ptr<weld::TreeIter> basctl::SbTreeListBox::m_xScratchIter
private

Definition at line 178 of file bastype2.hxx.

Referenced by RemoveEntry(), ScanEntry(), SetCurrentEntry(), UpdateEntries(), and ~SbTreeListBox().

◆ nMode

BrowseMode basctl::SbTreeListBox::nMode
private

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