LibreOffice Module desktop (master) 1
Public Types | 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:
Collaboration diagram for dp_gui::ExtensionBox_Impl:

Public Types

enum  { ENTRY_NOTFOUND = -1 }

Public Member Functions

 ExtensionBox_Impl (std::unique_ptr< weld::ScrolledWindow > xScroll)
virtual ~ExtensionBox_Impl () override
virtual bool MouseButtonDown (const MouseEvent &rMEvt) override
virtual bool MouseMove (const MouseEvent &rMEvt) override
virtual bool KeyInput (const KeyEvent &rKEvt) override
virtual void Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rPaintRect) override
virtual void Resize () override
virtual OUString RequestHelp (tools::Rectangle &rRect) override
virtual void SetDrawingArea (weld::DrawingArea *pDrawingArea) override
TEntry_Impl const & GetEntryData (tools::Long nPos)
tools::Long GetEntryCount () const
tools::Rectangle GetEntryRect (const tools::Long nPos) const
bool HasActive () const
tools::Long PointToPos (const Point &rPos)
virtual void RecalcAll ()
void RemoveUnlocked ()
virtual void selectEntry (const tools::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)
sal_Int32 getItemCount () const
sal_Int32 getSelIndex () const
- Public Member Functions inherited from weld::CustomWidgetController
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible ()
virtual void Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)=0
virtual void Resize ()
virtual bool MouseButtonDown (const MouseEvent &)
virtual bool MouseMove (const MouseEvent &)
virtual bool MouseButtonUp (const MouseEvent &)
virtual void GetFocus ()
virtual void LoseFocus ()
virtual void StyleUpdated ()
virtual bool Command (const CommandEvent &)
virtual bool KeyInput (const KeyEvent &)
virtual tools::Rectangle GetFocusRect ()
virtual FactoryFunction GetUITestFactory () const
virtual OUString RequestHelp (tools::Rectangle &)
virtual OUString GetHelpText () const
Size const & GetOutputSizePixel () const
void SetOutputSizePixel (const Size &rSize)
virtual void SetDrawingArea (weld::DrawingArea *pDrawingArea)
weld::DrawingAreaGetDrawingArea () const
void Invalidate ()
void Invalidate (const tools::Rectangle &rRect)
virtual void Show ()
virtual void Hide ()
void SetCursor (void *pData)
void GrabFocus ()
bool HasFocus () const
bool HasChildFocus () const
bool IsVisible () const
bool IsReallyVisible () const
bool IsEnabled () const
void Enable () const
void Disable () const
bool IsActive () const
int GetTextHeight () const
int GetTextWidth (const OUString &rText) const
OUString GetAccessibleName () const
OUString GetAccessibleDescription () const
void CaptureMouse ()
bool IsMouseCaptured () const
Point GetPointerPosPixel () const
void EnableRTL (bool bEnable)
bool IsRTLEnabled () const
void ReleaseMouse ()
void SetPointer (PointerStyle ePointerStyle)
void SetHelpId (const OUString &rHelpId)
void SetAccessibleName (const OUString &rName)
void SetInputContext (const InputContext &rInputContext)
void SetCursorRect (const tools::Rectangle &rCursorRect, int nExtTextInputWidth)
virtual int GetSurroundingText (OUString &)
virtual bool DeleteSurroundingText (const Selection &)
css::uno::Reference< css::datatransfer::dnd::XDropTarget > GetDropTarget ()
css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard () const
void SetDragDataTransferable (rtl::Reference< TransferDataContainer > &rTransferable, sal_uInt8 eDNDConstants)
virtual bool StartDrag ()
void set_size_request (int nWidth, int nHeight)
void queue_resize ()
 CustomWidgetController ()
virtual ~CustomWidgetController ()
 CustomWidgetController (CustomWidgetController const &)=default
 CustomWidgetController (CustomWidgetController &&)=default
CustomWidgetControlleroperator= (CustomWidgetController const &)=default
CustomWidgetControlleroperator= (CustomWidgetController &&)=default

Private Member Functions

void cleanVecListenerAdded ()
void addEventListenerOnce (css::uno::Reference< css::deployment::XPackage > const &extension)
void CalcActiveHeight (const tools::Long nPos)
tools::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, tools::Long nStart, tools::Long nEnd, tools::Long &nFound)
void DeleteRemoved ()
 DECL_LINK (ScrollHdl, weld::ScrolledWindow &, 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
tools::Long m_nActive
tools::Long m_nTopIndex
tools::Long m_nStdHeight
tools::Long m_nActiveHeight
Image m_aSharedImage
Image m_aLockedImage
Image m_aWarningImage
Image m_aDefaultImage
rtl::Reference< ExtensionRemovedListenerm_xRemoveListener
mutable::osl::Mutex m_entriesMutex
std::vector< TEntry_Implm_vEntries
std::vector< TEntry_Implm_vRemovedEntries
std::unique_ptr< css::lang::Locale > m_pLocale
std::optional< CollatorWrapperm_oCollator
std::vector< css::uno::WeakReference< css::deployment::XPackage > > m_vListenerAdded
std::unique_ptr< weld::ScrolledWindowm_xScrollBar

Additional Inherited Members

- Static Public Member Functions inherited from weld::CustomWidgetController
static bool IsUpdateMode ()

Detailed Description

Definition at line 107 of file dp_gui_extlistbox.hxx.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 199 of file dp_gui_extlistbox.hxx.

Constructor & Destructor Documentation

◆ ExtensionBox_Impl()

dp_gui::ExtensionBox_Impl::ExtensionBox_Impl ( std::unique_ptr< weld::ScrolledWindow xScroll)

Definition at line 182 of file dp_gui_extlistbox.cxx.

References m_pManager, and Yes.

◆ ~ExtensionBox_Impl()

dp_gui::ExtensionBox_Impl::~ExtensionBox_Impl ( )

Member Function Documentation

◆ addEntry()

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

◆ addEventListenerOnce()

void dp_gui::ExtensionBox_Impl::addEventListenerOnce ( css::uno::Reference< css::deployment::XPackage > const &  extension)

Definition at line 879 of file dp_gui_extlistbox.cxx.

References cleanVecListenerAdded(), m_vListenerAdded, and m_xRemoveListener.

Referenced by addEntry().

◆ CalcActiveHeight()

void dp_gui::ExtensionBox_Impl::CalcActiveHeight ( const tools::Long  nPos)

◆ checkEntries()

void dp_gui::ExtensionBox_Impl::checkEntries ( )

◆ cleanVecListenerAdded()

void dp_gui::ExtensionBox_Impl::cleanVecListenerAdded ( )

Definition at line 869 of file dp_gui_extlistbox.cxx.

References m_vListenerAdded.

Referenced by addEventListenerOnce().


dp_gui::ExtensionBox_Impl::DECL_LINK ( ScrollHdl  ,
weld::ScrolledWindow ,

◆ DeleteRemoved()

void dp_gui::ExtensionBox_Impl::DeleteRemoved ( )

Definition at line 322 of file dp_gui_extlistbox.cxx.

References m_bInDelete, m_entriesMutex, and m_vRemovedEntries.

Referenced by KeyInput(), Paint(), and ~ExtensionBox_Impl().

◆ DrawRow()

void dp_gui::ExtensionBox_Impl::DrawRow ( vcl::RenderContext rRenderContext,
const tools::Rectangle rRect,
const TEntry_Impl rEntry 

Definition at line 386 of file dp_gui_extlistbox.cxx.

References Point::AdjustY(), dp_gui::AMBIGUOUS, tools::Rectangle::Bottom(), tools::Rectangle::BottomLeft(), tools::Rectangle::BottomRight(), COL_LIGHTGRAY(), OutputDevice::DrawImage(), OutputDevice::DrawLine(), OutputDevice::DrawRect(), OutputDevice::DrawText(), OutputDevice::Erase(), vcl::FONT, StyleSettings::GetDisableColor(), weld::CustomWidgetController::GetDrawingArea(), OutputDevice::GetEllipsisString(), StyleSettings::GetFieldColor(), StyleSettings::GetFieldTextColor(), OutputDevice::GetFont(), StyleSettings::GetHighlightColor(), StyleSettings::GetHighlightTextColor(), StyleSettings::GetLinkColor(), OutputDevice::GetSettings(), Image::GetSizePixel(), AllSettings::GetStyleSettings(), weld::CustomWidgetController::GetTextHeight(), OutputDevice::GetTextHeight(), OutputDevice::GetTextWidth(), tools::Rectangle::GetWidth(), Size::Height(), ICON_HEIGHT, ICON_OFFSET, ICON_WIDTH, LINESTYLE_SINGLE, m_aDefaultImage, m_aLockedImage, m_aSharedImage, m_aWarningImage, dp_gui::NOT_AVAILABLE, OutputDevice::Pop(), OutputDevice::Push(), dp_gui::REGISTERED, tools::Rectangle::Right(), RIGHT_ICON_OFFSET, OutputDevice::SetBackground(), OutputDevice::SetFillColor(), OutputDevice::SetFont(), OutputDevice::SetLineColor(), weld::SetPointFont(), OutputDevice::SetTextColor(), OutputDevice::SetTextFillColor(), vcl::Font::SetUnderline(), vcl::Font::SetWeight(), SMALL_ICON_SIZE, SPACE_BETWEEN, vcl::TEXTCOLOR, vcl::TEXTFILLCOLOR, TOP_OFFSET, tools::Rectangle::TopLeft(), tools::Rectangle::TopRight(), WEIGHT_BOLD, Size::Width(), Point::X(), and Point::Y().

Referenced by Paint().

◆ FindEntryPos()

bool dp_gui::ExtensionBox_Impl::FindEntryPos ( const TEntry_Impl rEntry,
tools::Long  nStart,
tools::Long  nEnd,
tools::Long nFound 

Definition at line 818 of file dp_gui_extlistbox.cxx.

References FindEntryPos(), m_bInCheckMode, m_oCollator, m_vEntries, and nPos.

Referenced by addEntry(), and FindEntryPos().

◆ GetEntryCount()

tools::Long dp_gui::ExtensionBox_Impl::GetEntryCount ( ) const

Definition at line 178 of file dp_gui_extlistbox.hxx.

References m_vEntries.

◆ GetEntryData()

TEntry_Impl const & dp_gui::ExtensionBox_Impl::GetEntryData ( tools::Long  nPos)

◆ GetEntryRect()

tools::Rectangle dp_gui::ExtensionBox_Impl::GetEntryRect ( const tools::Long  nPos) const

◆ getItemCount()

sal_Int32 dp_gui::ExtensionBox_Impl::getItemCount ( ) const
The count of the entries in the list box.

Definition at line 247 of file dp_gui_extlistbox.cxx.

References m_vEntries.

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

◆ getSelIndex()

sal_Int32 dp_gui::ExtensionBox_Impl::getSelIndex ( ) const
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
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

Definition at line 253 of file dp_gui_extlistbox.cxx.

References 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().

◆ GetTotalHeight()

tools::Long dp_gui::ExtensionBox_Impl::GetTotalHeight ( ) const

Definition at line 660 of file dp_gui_extlistbox.cxx.

References m_bHasActive, m_nActiveHeight, m_nStdHeight, and m_vEntries.

Referenced by RecalcAll(), and SetupScrollBar().

◆ HandleCursorKey()

bool dp_gui::ExtensionBox_Impl::HandleCursorKey ( sal_uInt16  nKeyCode)

◆ HasActive()

bool dp_gui::ExtensionBox_Impl::HasActive ( ) const

Definition at line 180 of file dp_gui_extlistbox.hxx.

References m_bHasActive.

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

◆ Init()

void dp_gui::ExtensionBox_Impl::Init ( void  )

◆ KeyInput()

bool dp_gui::ExtensionBox_Impl::KeyInput ( const KeyEvent rKEvt)

◆ MouseButtonDown()

bool dp_gui::ExtensionBox_Impl::MouseButtonDown ( const MouseEvent rMEvt)

◆ MouseMove()

bool dp_gui::ExtensionBox_Impl::MouseMove ( const MouseEvent rMEvt)

◆ Paint()

void dp_gui::ExtensionBox_Impl::Paint ( vcl::RenderContext rRenderContext,
const tools::Rectangle rPaintRect 

◆ PointToPos()

tools::Long dp_gui::ExtensionBox_Impl::PointToPos ( const Point rPos)

◆ prepareChecking()

void dp_gui::ExtensionBox_Impl::prepareChecking ( )

Definition at line 1056 of file dp_gui_extlistbox.cxx.

References m_bInCheckMode, and m_vEntries.

◆ RecalcAll()

void dp_gui::ExtensionBox_Impl::RecalcAll ( )

◆ removeEntry()

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

◆ RemoveUnlocked()

void dp_gui::ExtensionBox_Impl::RemoveUnlocked ( )

Definition at line 1031 of file dp_gui_extlistbox.cxx.

References m_entriesMutex, m_vEntries, and removeEntry().

◆ RequestHelp()

OUString dp_gui::ExtensionBox_Impl::RequestHelp ( tools::Rectangle rRect)

◆ Resize()

void dp_gui::ExtensionBox_Impl::Resize ( )

Reimplemented from weld::CustomWidgetController.

Definition at line 701 of file dp_gui_extlistbox.cxx.

References weld::CustomWidgetController::Invalidate(), and RecalcAll().

◆ selectEntry()

void dp_gui::ExtensionBox_Impl::selectEntry ( const tools::Long  nPos)

◆ SetDrawingArea()

void dp_gui::ExtensionBox_Impl::SetDrawingArea ( weld::DrawingArea pDrawingArea)

◆ setExtensionManager()

void dp_gui::ExtensionBox_Impl::setExtensionManager ( TheExtensionManager pManager)

Definition at line 195 of file dp_gui_extlistbox.hxx.

References m_pManager.

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

◆ SetupScrollBar()

void dp_gui::ExtensionBox_Impl::SetupScrollBar ( )

◆ updateEntry()

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

Member Data Documentation

◆ m_aDefaultImage

Image dp_gui::ExtensionBox_Impl::m_aDefaultImage

Definition at line 124 of file dp_gui_extlistbox.hxx.

Referenced by DrawRow().

◆ m_aLockedImage

Image dp_gui::ExtensionBox_Impl::m_aLockedImage

Definition at line 122 of file dp_gui_extlistbox.hxx.

Referenced by DrawRow().

◆ m_aSharedImage

Image dp_gui::ExtensionBox_Impl::m_aSharedImage

Definition at line 121 of file dp_gui_extlistbox.hxx.

Referenced by DrawRow().

◆ m_aWarningImage

Image dp_gui::ExtensionBox_Impl::m_aWarningImage

Definition at line 123 of file dp_gui_extlistbox.hxx.

Referenced by DrawRow().

◆ m_bAdjustActive

bool dp_gui::ExtensionBox_Impl::m_bAdjustActive

Definition at line 113 of file dp_gui_extlistbox.hxx.

Referenced by RecalcAll(), and selectEntry().

◆ m_bHasActive

bool dp_gui::ExtensionBox_Impl::m_bHasActive

◆ m_bHasScrollBar

bool dp_gui::ExtensionBox_Impl::m_bHasScrollBar

Definition at line 109 of file dp_gui_extlistbox.hxx.

Referenced by RecalcAll(), and SetupScrollBar().

◆ m_bInCheckMode

bool dp_gui::ExtensionBox_Impl::m_bInCheckMode

◆ m_bInDelete

bool dp_gui::ExtensionBox_Impl::m_bInDelete

◆ m_bNeedsRecalc

bool dp_gui::ExtensionBox_Impl::m_bNeedsRecalc

◆ m_entriesMutex

mutable::osl::Mutex dp_gui::ExtensionBox_Impl::m_entriesMutex

◆ m_nActive

tools::Long dp_gui::ExtensionBox_Impl::m_nActive

◆ m_nActiveHeight

tools::Long dp_gui::ExtensionBox_Impl::m_nActiveHeight

◆ m_nStdHeight

tools::Long dp_gui::ExtensionBox_Impl::m_nStdHeight

◆ m_nTopIndex

tools::Long dp_gui::ExtensionBox_Impl::m_nTopIndex

Definition at line 118 of file dp_gui_extlistbox.hxx.

Referenced by GetEntryRect(), Paint(), PointToPos(), RecalcAll(), and SetupScrollBar().

◆ m_oCollator

std::optional<CollatorWrapper> dp_gui::ExtensionBox_Impl::m_oCollator

Definition at line 141 of file dp_gui_extlistbox.hxx.

Referenced by FindEntryPos(), Init(), and ~ExtensionBox_Impl().

◆ m_pLocale

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

Definition at line 140 of file dp_gui_extlistbox.hxx.

Referenced by Init(), and ~ExtensionBox_Impl().

◆ m_pManager

TheExtensionManager* dp_gui::ExtensionBox_Impl::m_pManager

Definition at line 128 of file dp_gui_extlistbox.hxx.

Referenced by addEntry(), setExtensionManager(), and updateEntry().

◆ m_vEntries

std::vector< TEntry_Impl > dp_gui::ExtensionBox_Impl::m_vEntries

◆ m_vListenerAdded

std::vector< css::uno::WeakReference< css::deployment::XPackage> > dp_gui::ExtensionBox_Impl::m_vListenerAdded

Definition at line 145 of file dp_gui_extlistbox.hxx.

Referenced by addEventListenerOnce(), and cleanVecListenerAdded().

◆ m_vRemovedEntries

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

Definition at line 138 of file dp_gui_extlistbox.hxx.

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

◆ m_xRemoveListener

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

◆ m_xScrollBar

std::unique_ptr<weld::ScrolledWindow> dp_gui::ExtensionBox_Impl::m_xScrollBar

Definition at line 147 of file dp_gui_extlistbox.hxx.

Referenced by Init(), RecalcAll(), and SetupScrollBar().

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