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:
[legend]
Collaboration diagram for dp_gui::ExtensionBox_Impl:
[legend]

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 (long nPos)
 
long GetEntryCount ()
 
tools::Rectangle GetEntryRect (const long nPos) const
 
bool HasActive ()
 
long PointToPos (const Point &rPos)
 
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
 
virtual sal_Int32 getSelIndex () const
 
- Public Member Functions inherited from weld::CustomWidgetController
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible ()
 
virtual bool MouseButtonUp (const MouseEvent &)
 
virtual void GetFocus ()
 
virtual void LoseFocus ()
 
virtual void StyleUpdated ()
 
virtual bool ContextMenu (const CommandEvent &)
 
virtual tools::Rectangle GetFocusRect ()
 
virtual FactoryFunction GetUITestFactory () const
 
virtual OUString GetHelpText () const
 
Size const & GetOutputSizePixel () const
 
void SetOutputSizePixel (const Size &rSize)
 
weld::DrawingAreaGetDrawingArea () const
 
void Invalidate ()
 
void Invalidate (const tools::Rectangle &rRect)
 
virtual void Show ()
 
virtual void Hide ()
 
void GrabFocus ()
 
bool HasFocus () const
 
bool IsVisible () const
 
bool IsReallyVisible () const
 
bool IsEnabled () const
 
int GetTextHeight () const
 
OUString GetAccessibleName () const
 
OUString GetAccessibleDescription () const
 
void CaptureMouse ()
 
bool IsMouseCaptured () const
 
void EnableRTL (bool bEnable)
 
bool IsRTLEnabled () const
 
void ReleaseMouse ()
 
void SetPointer (PointerStyle ePointerStyle)
 
void SetHelpId (const OString &rHelpId)
 
void SetAccessibleName (const OUString &rName)
 
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 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, 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
 
long m_nActive
 
long m_nTopIndex
 
long m_nStdHeight
 
long m_nActiveHeight
 
Image m_aSharedImage
 
Image m_aLockedImage
 
Image m_aWarningImage
 
Image m_aDefaultImage
 
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
 
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 105 of file dp_gui_extlistbox.hxx.

Member Enumeration Documentation

anonymous enum
Enumerator
ENTRY_NOTFOUND 

Definition at line 197 of file dp_gui_extlistbox.hxx.

Constructor & Destructor Documentation

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

Definition at line 181 of file dp_gui_extlistbox.cxx.

References Yes.

dp_gui::ExtensionBox_Impl::~ExtensionBox_Impl ( )
overridevirtual

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 882 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 872 of file dp_gui_extlistbox.cxx.

References m_vListenerAdded.

Referenced by addEventListenerOnce().

dp_gui::ExtensionBox_Impl::DECL_LINK ( ScrollHdl  ,
weld::ScrolledWindow ,
void   
)
private
void dp_gui::ExtensionBox_Impl::DeleteRemoved ( )
private

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

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

Definition at line 386 of file dp_gui_extlistbox.cxx.

References dp_gui::AMBIGUOUS, tools::Rectangle::Bottom(), tools::Rectangle::BottomLeft(), tools::Rectangle::BottomRight(), COL_LIGHTGRAY(), OutputDevice::DrawImage(), OutputDevice::DrawLine(), OutputDevice::DrawRect(), OutputDevice::DrawText(), OutputDevice::Erase(), Application::GetDefaultDevice(), 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(), OutputDevice::SetTextColor(), OutputDevice::SetTextFillColor(), vcl::Font::SetUnderline(), SMALL_ICON_SIZE, SPACE_BETWEEN, TOP_OFFSET, tools::Rectangle::TopLeft(), tools::Rectangle::TopRight(), WEIGHT_BOLD, and Size::Width().

Referenced by Paint().

bool dp_gui::ExtensionBox_Impl::FindEntryPos ( const TEntry_Impl rEntry,
long  nStart,
long  nEnd,
long &  nFound 
)
private

Definition at line 821 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 176 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
virtual
Returns
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().

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

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

Definition at line 661 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

Definition at line 178 of file dp_gui_extlistbox.hxx.

References m_bHasActive.

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

void dp_gui::ExtensionBox_Impl::Init ( void  )
private
bool dp_gui::ExtensionBox_Impl::KeyInput ( const KeyEvent rKEvt)
overridevirtual
bool dp_gui::ExtensionBox_Impl::MouseButtonDown ( const MouseEvent rMEvt)
overridevirtual
bool dp_gui::ExtensionBox_Impl::MouseMove ( 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 1059 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 1034 of file dp_gui_extlistbox.cxx.

References m_entriesMutex, m_vEntries, and removeEntry().

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

Reimplemented from weld::CustomWidgetController.

Definition at line 752 of file dp_gui_extlistbox.cxx.

References m_vEntries, nPos, PointToPos(), and tools::Rectangle::TopLeft().

void dp_gui::ExtensionBox_Impl::Resize ( )
overridevirtual

Reimplemented from weld::CustomWidgetController.

Definition at line 702 of file dp_gui_extlistbox.cxx.

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

void dp_gui::ExtensionBox_Impl::selectEntry ( const long  nPos)
virtual
void dp_gui::ExtensionBox_Impl::SetDrawingArea ( weld::DrawingArea pDrawingArea)
overridevirtual
void dp_gui::ExtensionBox_Impl::setExtensionManager ( TheExtensionManager pManager)
inline

Definition at line 193 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 122 of file dp_gui_extlistbox.hxx.

Referenced by DrawRow().

Image dp_gui::ExtensionBox_Impl::m_aLockedImage
private

Definition at line 120 of file dp_gui_extlistbox.hxx.

Referenced by DrawRow().

Image dp_gui::ExtensionBox_Impl::m_aSharedImage
private

Definition at line 119 of file dp_gui_extlistbox.hxx.

Referenced by DrawRow().

Image dp_gui::ExtensionBox_Impl::m_aWarningImage
private

Definition at line 121 of file dp_gui_extlistbox.hxx.

Referenced by DrawRow().

bool dp_gui::ExtensionBox_Impl::m_bAdjustActive
private

Definition at line 111 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

Definition at line 107 of file dp_gui_extlistbox.hxx.

Referenced by RecalcAll(), and SetupScrollBar().

bool dp_gui::ExtensionBox_Impl::m_bInCheckMode
private
bool dp_gui::ExtensionBox_Impl::m_bInDelete
private
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

Definition at line 116 of file dp_gui_extlistbox.hxx.

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

std::unique_ptr<CollatorWrapper> dp_gui::ExtensionBox_Impl::m_pCollator
private

Definition at line 139 of file dp_gui_extlistbox.hxx.

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

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

Definition at line 138 of file dp_gui_extlistbox.hxx.

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

TheExtensionManager* dp_gui::ExtensionBox_Impl::m_pManager
private

Definition at line 126 of file dp_gui_extlistbox.hxx.

Referenced by addEntry(), and updateEntry().

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 143 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 136 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 124 of file dp_gui_extlistbox.hxx.

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

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

Definition at line 145 of file dp_gui_extlistbox.hxx.

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


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