LibreOffice Module desktop (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
dp_gui::ExtensionBox_Impl Class Reference

#include <dp_gui_extlistbox.hxx>

Inheritance diagram for dp_gui::ExtensionBox_Impl:
[legend]
Collaboration diagram for dp_gui::ExtensionBox_Impl:
[legend]

Public Member Functions

 ExtensionBox_Impl (vcl::Window *pParent)
 
virtual ~ExtensionBox_Impl () override
 
virtual void dispose () override
 
virtual void MouseButtonDown (const MouseEvent &rMEvt) override
 
virtual void Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rPaintRect) override
 
virtual void Resize () override
 
virtual bool EventNotify (NotifyEvent &rNEvt) override
 
virtual Size GetOptimalSize () const override
 
TEntry_Impl const & GetEntryData (long nPos)
 
long GetEntryCount ()
 
tools::Rectangle GetEntryRect (const long nPos) const
 
bool HasActive ()
 
long PointToPos (const Point &rPos)
 
void DoScroll (long nDelta)
 
virtual void RecalcAll ()
 
void RemoveUnlocked ()
 
virtual void selectEntry (const long nPos)
 
void addEntry (const css::uno::Reference< css::deployment::XPackage > &xPackage, bool bLicenseMissing=false)
 
void updateEntry (const css::uno::Reference< css::deployment::XPackage > &xPackage)
 
void removeEntry (const css::uno::Reference< css::deployment::XPackage > &xPackage)
 
void prepareChecking ()
 
void checkEntries ()
 
void setExtensionManager (TheExtensionManager *pManager)
 
virtual sal_Int32 getItemCount () const override
 
virtual sal_Int32 getSelIndex () const override
 
- Public Member Functions inherited from svt::IExtensionListBox
 IExtensionListBox (vcl::Window *pParent)
 

Private Member Functions

void cleanVecListenerAdded ()
 
void addEventListenerOnce (css::uno::Reference< css::deployment::XPackage > const &extension)
 
void CalcActiveHeight (const long nPos)
 
long GetTotalHeight () const
 
void SetupScrollBar ()
 
void DrawRow (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect, const TEntry_Impl &rEntry)
 
bool HandleCursorKey (sal_uInt16 nKeyCode)
 
bool FindEntryPos (const TEntry_Impl &rEntry, long nStart, long nEnd, long &nFound)
 
void DeleteRemoved ()
 
 DECL_LINK (ScrollHdl, ScrollBar *, void)
 
void Init ()
 

Private Attributes

bool m_bHasScrollBar: 1
 
bool m_bHasActive: 1
 
bool m_bNeedsRecalc: 1
 
bool m_bInCheckMode: 1
 
bool m_bAdjustActive: 1
 
bool m_bInDelete: 1
 
long m_nActive
 
long m_nTopIndex
 
long m_nStdHeight
 
long m_nActiveHeight
 
Image m_aSharedImage
 
Image m_aLockedImage
 
Image m_aWarningImage
 
Image m_aDefaultImage
 
VclPtr< ScrollBarm_pScrollBar
 
rtl::Reference< ExtensionRemovedListenerm_xRemoveListener
 
TheExtensionManagerm_pManager
 
mutable::osl::Mutex m_entriesMutex
 
std::vector< TEntry_Implm_vEntries
 
std::vector< TEntry_Implm_vRemovedEntries
 
std::unique_ptr< css::lang::Locale > m_pLocale
 
std::unique_ptr< CollatorWrapperm_pCollator
 
std::vector< css::uno::WeakReference< css::deployment::XPackage > > m_vListenerAdded
 

Additional Inherited Members

- Public Attributes inherited from svt::IExtensionListBox
 ENTRY_NOTFOUND
 

Detailed Description

Definition at line 108 of file dp_gui_extlistbox.hxx.

Constructor & Destructor Documentation

dp_gui::ExtensionBox_Impl::ExtensionBox_Impl ( vcl::Window pParent)
explicit

Definition at line 178 of file dp_gui_extlistbox.cxx.

References Init(), and Yes.

dp_gui::ExtensionBox_Impl::~ExtensionBox_Impl ( )
overridevirtual

Definition at line 237 of file dp_gui_extlistbox.cxx.

Member Function Documentation

void dp_gui::ExtensionBox_Impl::addEntry ( const css::uno::Reference< css::deployment::XPackage > &  xPackage,
bool  bLicenseMissing = false 
)
void dp_gui::ExtensionBox_Impl::addEventListenerOnce ( css::uno::Reference< css::deployment::XPackage > const &  extension)
private

Definition at line 899 of file dp_gui_extlistbox.cxx.

References cleanVecListenerAdded(), m_vListenerAdded, and m_xRemoveListener.

Referenced by addEntry().

void dp_gui::ExtensionBox_Impl::CalcActiveHeight ( const long  nPos)
private
void dp_gui::ExtensionBox_Impl::checkEntries ( )
void dp_gui::ExtensionBox_Impl::cleanVecListenerAdded ( )
private

Definition at line 886 of file dp_gui_extlistbox.cxx.

References i, and m_vListenerAdded.

Referenced by addEventListenerOnce().

dp_gui::ExtensionBox_Impl::DECL_LINK ( ScrollHdl  ,
ScrollBar ,
void   
)
private
void dp_gui::ExtensionBox_Impl::DeleteRemoved ( )
private

Definition at line 347 of file dp_gui_extlistbox.cxx.

References m_bInDelete, m_entriesMutex, and m_vRemovedEntries.

Referenced by dispose(), EventNotify(), and Paint().

void dp_gui::ExtensionBox_Impl::dispose ( void  )
overridevirtual
void dp_gui::ExtensionBox_Impl::DoScroll ( long  nDelta)
void dp_gui::ExtensionBox_Impl::DrawRow ( vcl::RenderContext rRenderContext,
const tools::Rectangle rRect,
const TEntry_Impl rEntry 
)
private
bool dp_gui::ExtensionBox_Impl::EventNotify ( NotifyEvent rNEvt)
overridevirtual
bool dp_gui::ExtensionBox_Impl::FindEntryPos ( const TEntry_Impl rEntry,
long  nStart,
long  nEnd,
long &  nFound 
)
private

Definition at line 835 of file dp_gui_extlistbox.cxx.

References m_bInCheckMode, m_pCollator, and m_vEntries.

Referenced by addEntry().

long dp_gui::ExtensionBox_Impl::GetEntryCount ( )
inline

Definition at line 177 of file dp_gui_extlistbox.hxx.

TEntry_Impl const& dp_gui::ExtensionBox_Impl::GetEntryData ( long  nPos)
inline
tools::Rectangle dp_gui::ExtensionBox_Impl::GetEntryRect ( const long  nPos) const
sal_Int32 dp_gui::ExtensionBox_Impl::getItemCount ( ) const
overridevirtual
Returns
The count of the entries in the list box.

Implements svt::IExtensionListBox.

Definition at line 267 of file dp_gui_extlistbox.cxx.

References m_vEntries.

Referenced by dp_gui::ExtBoxWithBtns_Impl::ShowPopupMenu().

Size dp_gui::ExtensionBox_Impl::GetOptimalSize ( ) const
overridevirtual

Definition at line 751 of file dp_gui_extlistbox.cxx.

sal_Int32 dp_gui::ExtensionBox_Impl::getSelIndex ( ) const
overridevirtual
Returns
The index of the first selected entry in the list box. When nothing is selected, which is the case when getItemCount returns '0', then this function returns ENTRY_NOTFOUND

Implements svt::IExtensionListBox.

Definition at line 273 of file dp_gui_extlistbox.cxx.

References svt::IExtensionListBox::ENTRY_NOTFOUND, m_bHasActive, and m_nActive.

Referenced by dp_gui::ExtBoxWithBtns_Impl::enableButtons(), dp_gui::ExtBoxWithBtns_Impl::RecalcAll(), and dp_gui::ExtBoxWithBtns_Impl::selectEntry().

long dp_gui::ExtensionBox_Impl::GetTotalHeight ( ) const
private

Definition at line 700 of file dp_gui_extlistbox.cxx.

References m_bHasActive, m_nActiveHeight, m_nStdHeight, and m_vEntries.

Referenced by RecalcAll(), and SetupScrollBar().

bool dp_gui::ExtensionBox_Impl::HandleCursorKey ( sal_uInt16  nKeyCode)
private
bool dp_gui::ExtensionBox_Impl::HasActive ( )
inline
void dp_gui::ExtensionBox_Impl::Init ( void  )
private
void dp_gui::ExtensionBox_Impl::MouseButtonDown ( const MouseEvent rMEvt)
overridevirtual
void dp_gui::ExtensionBox_Impl::Paint ( vcl::RenderContext rRenderContext,
const tools::Rectangle rPaintRect 
)
overridevirtual
long dp_gui::ExtensionBox_Impl::PointToPos ( const Point rPos)
void dp_gui::ExtensionBox_Impl::prepareChecking ( )

Definition at line 1077 of file dp_gui_extlistbox.cxx.

References m_bInCheckMode, and m_vEntries.

void dp_gui::ExtensionBox_Impl::RecalcAll ( )
virtual
void dp_gui::ExtensionBox_Impl::removeEntry ( const css::uno::Reference< css::deployment::XPackage > &  xPackage)
void dp_gui::ExtensionBox_Impl::RemoveUnlocked ( )

Definition at line 1052 of file dp_gui_extlistbox.cxx.

References m_entriesMutex, m_vEntries, and removeEntry().

void dp_gui::ExtensionBox_Impl::Resize ( )
overridevirtual

Definition at line 746 of file dp_gui_extlistbox.cxx.

References RecalcAll().

void dp_gui::ExtensionBox_Impl::selectEntry ( const long  nPos)
virtual
void dp_gui::ExtensionBox_Impl::setExtensionManager ( TheExtensionManager pManager)
inline

Definition at line 195 of file dp_gui_extlistbox.hxx.

Referenced by dp_gui::ExtBoxWithBtns_Impl::InitFromDialog().

void dp_gui::ExtensionBox_Impl::SetupScrollBar ( )
private
void dp_gui::ExtensionBox_Impl::updateEntry ( const css::uno::Reference< css::deployment::XPackage > &  xPackage)

Member Data Documentation

Image dp_gui::ExtensionBox_Impl::m_aDefaultImage
private

Definition at line 125 of file dp_gui_extlistbox.hxx.

Referenced by DrawRow().

Image dp_gui::ExtensionBox_Impl::m_aLockedImage
private

Definition at line 123 of file dp_gui_extlistbox.hxx.

Referenced by DrawRow().

Image dp_gui::ExtensionBox_Impl::m_aSharedImage
private

Definition at line 122 of file dp_gui_extlistbox.hxx.

Referenced by DrawRow().

Image dp_gui::ExtensionBox_Impl::m_aWarningImage
private

Definition at line 124 of file dp_gui_extlistbox.hxx.

Referenced by DrawRow().

bool dp_gui::ExtensionBox_Impl::m_bAdjustActive
private

Definition at line 114 of file dp_gui_extlistbox.hxx.

Referenced by RecalcAll(), and selectEntry().

bool dp_gui::ExtensionBox_Impl::m_bHasActive
private
bool dp_gui::ExtensionBox_Impl::m_bHasScrollBar
private
bool dp_gui::ExtensionBox_Impl::m_bInCheckMode
private
bool dp_gui::ExtensionBox_Impl::m_bInDelete
private

Definition at line 115 of file dp_gui_extlistbox.hxx.

Referenced by DeleteRemoved(), dispose(), EventNotify(), Paint(), and removeEntry().

bool dp_gui::ExtensionBox_Impl::m_bNeedsRecalc
private
mutable ::osl::Mutex dp_gui::ExtensionBox_Impl::m_entriesMutex
private
long dp_gui::ExtensionBox_Impl::m_nActive
private
long dp_gui::ExtensionBox_Impl::m_nActiveHeight
private
long dp_gui::ExtensionBox_Impl::m_nStdHeight
private
long dp_gui::ExtensionBox_Impl::m_nTopIndex
private
std::unique_ptr<CollatorWrapper> dp_gui::ExtensionBox_Impl::m_pCollator
private

Definition at line 144 of file dp_gui_extlistbox.hxx.

Referenced by dispose(), FindEntryPos(), and Init().

std::unique_ptr<css::lang::Locale> dp_gui::ExtensionBox_Impl::m_pLocale
private

Definition at line 143 of file dp_gui_extlistbox.hxx.

Referenced by dispose(), and Init().

TheExtensionManager* dp_gui::ExtensionBox_Impl::m_pManager
private

Definition at line 131 of file dp_gui_extlistbox.hxx.

Referenced by addEntry(), and updateEntry().

VclPtr<ScrollBar> dp_gui::ExtensionBox_Impl::m_pScrollBar
private
std::vector< TEntry_Impl > dp_gui::ExtensionBox_Impl::m_vEntries
private
std::vector< css::uno::WeakReference< css::deployment::XPackage> > dp_gui::ExtensionBox_Impl::m_vListenerAdded
private

Definition at line 148 of file dp_gui_extlistbox.hxx.

Referenced by addEventListenerOnce(), and cleanVecListenerAdded().

std::vector< TEntry_Impl > dp_gui::ExtensionBox_Impl::m_vRemovedEntries
private

Definition at line 141 of file dp_gui_extlistbox.hxx.

Referenced by checkEntries(), DeleteRemoved(), and removeEntry().

rtl::Reference<ExtensionRemovedListener> dp_gui::ExtensionBox_Impl::m_xRemoveListener
private

Definition at line 129 of file dp_gui_extlistbox.hxx.

Referenced by addEventListenerOnce(), dispose(), Init(), and removeEntry().


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