22#include <rtl/ustring.hxx>
31#include <com/sun/star/lang/Locale.hpp>
32#include <com/sun/star/lang/XEventListener.hpp>
33#include <com/sun/star/deployment/XPackage.hpp>
42#define SMALL_ICON_SIZE 16
47#define RIGHT_ICON_OFFSET 5
48#define SPACE_BETWEEN 3
50class TheExtensionManager;
80 css::uno::Reference<css::deployment::XPackage>
m_xPackage;
82 Entry_Impl(
const css::uno::Reference<css::deployment::XPackage> &xPackage,
104 virtual void SAL_CALL
disposing(css::lang::EventObject
const& evt)
override;
144 std::vector< css::uno::WeakReference<
172 virtual void Resize()
override;
187 void addEntry(
const css::uno::Reference<css::deployment::XPackage> &xPackage,
188 bool bLicenseMissing =
false );
189 void updateEntry(
const css::uno::Reference<css::deployment::XPackage> &xPackage );
190 void removeEntry(
const css::uno::Reference<css::deployment::XPackage> &xPackage );
virtual void selectEntry(const tools::Long nPos)
std::vector< TEntry_Impl > m_vEntries
tools::Long PointToPos(const Point &rPos)
virtual ~ExtensionBox_Impl() override
bool FindEntryPos(const TEntry_Impl &rEntry, tools::Long nStart, tools::Long nEnd, tools::Long &nFound)
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
void setExtensionManager(TheExtensionManager *pManager)
void updateEntry(const css::uno::Reference< css::deployment::XPackage > &xPackage)
tools::Long GetTotalHeight() const
tools::Rectangle GetEntryRect(const tools::Long nPos) const
void DrawRow(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect, const TEntry_Impl &rEntry)
std::vector< TEntry_Impl > m_vRemovedEntries
tools::Long GetEntryCount() const
void addEventListenerOnce(css::uno::Reference< css::deployment::XPackage > const &extension)
std::optional< CollatorWrapper > m_oCollator
virtual void Resize() override
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rPaintRect) override
mutable::osl::Mutex m_entriesMutex
sal_Int32 getSelIndex() const
std::unique_ptr< css::lang::Locale > m_pLocale
void cleanVecListenerAdded()
rtl::Reference< ExtensionRemovedListener > m_xRemoveListener
std::vector< css::uno::WeakReference< css::deployment::XPackage > > m_vListenerAdded
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
DECL_LINK(ScrollHdl, weld::ScrolledWindow &, void)
void removeEntry(const css::uno::Reference< css::deployment::XPackage > &xPackage)
ExtensionBox_Impl(std::unique_ptr< weld::ScrolledWindow > xScroll)
std::unique_ptr< weld::ScrolledWindow > m_xScrollBar
virtual OUString RequestHelp(tools::Rectangle &rRect) override
sal_Int32 getItemCount() const
TheExtensionManager * m_pManager
tools::Long m_nActiveHeight
bool HandleCursorKey(sal_uInt16 nKeyCode)
virtual bool KeyInput(const KeyEvent &rKEvt) override
TEntry_Impl const & GetEntryData(tools::Long nPos)
void CalcActiveHeight(const tools::Long nPos)
void addEntry(const css::uno::Reference< css::deployment::XPackage > &xPackage, bool bLicenseMissing=false)
virtual bool MouseMove(const MouseEvent &rMEvt) override
virtual void SAL_CALL disposing(css::lang::EventObject const &evt) override
virtual ~ExtensionRemovedListener() override
ExtensionRemovedListener(ExtensionBox_Impl *pParent)
ExtensionBox_Impl * m_pParent
std::shared_ptr< Entry_Impl > TEntry_Impl
sal_Int32 CompareTo(const CollatorWrapper *pCollator, const TEntry_Impl &rEntry) const
Entry_Impl(const css::uno::Reference< css::deployment::XPackage > &xPackage, const PackageState eState, const bool bReadOnly)
tools::Rectangle m_aLinkRect
css::uno::Reference< css::deployment::XPackage > m_xPackage