LibreOffice Module UnoControls (master) 1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
unocontrols::ProgressMonitor Class Referencefinal

#include <progressmonitor.hxx>

Inheritance diagram for unocontrols::ProgressMonitor:
[legend]
Collaboration diagram for unocontrols::ProgressMonitor:
[legend]

Public Member Functions

 ProgressMonitor (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~ProgressMonitor () override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &aType) override
 give answer, if interface is supported @descr The interfaces are searched by type. More...
 
virtual void SAL_CALL acquire () noexcept override
 increment refcount @seealso XInterface @seealso release() @onerror A RuntimeException is thrown. More...
 
virtual void SAL_CALL release () noexcept override
 decrement refcount @seealso XInterface @seealso acquire() @onerror A RuntimeException is thrown. More...
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 get information about supported interfaces @seealso XTypeProvider More...
 
virtual void SAL_CALL addText (const OUString &sTopic, const OUString &sText, sal_Bool bbeforeProgress) override
 add topic to dialog @descr Add a topic with a text in right textlist (used for FixedText-member). More...
 
virtual void SAL_CALL removeText (const OUString &sTopic, sal_Bool bbeforeProgress) override
 
virtual void SAL_CALL updateText (const OUString &sTopic, const OUString &sText, sal_Bool bbeforeProgress) override
 
virtual void SAL_CALL setForegroundColor (sal_Int32 nColor) override
 
virtual void SAL_CALL setBackgroundColor (sal_Int32 nColor) override
 
virtual void SAL_CALL setValue (sal_Int32 nValue) override
 
virtual void SAL_CALL setRange (sal_Int32 nMin, sal_Int32 nMax) override
 
virtual sal_Int32 SAL_CALL getValue () override
 
virtual void SAL_CALL addActionListener (const css::uno::Reference< css::awt::XActionListener > &xListener) override
 
virtual void SAL_CALL removeActionListener (const css::uno::Reference< css::awt::XActionListener > &xListener) override
 
virtual void SAL_CALL setLabel (const OUString &sLabel) override
 
virtual void SAL_CALL setActionCommand (const OUString &sCommand) override
 
virtual css::awt::Size SAL_CALL getMinimumSize () override
 
virtual css::awt::Size SAL_CALL getPreferredSize () override
 
virtual css::awt::Size SAL_CALL calcAdjustedSize (const css::awt::Size &aNewSize) override
 
virtual void SAL_CALL createPeer (const css::uno::Reference< css::awt::XToolkit > &xToolkit, const css::uno::Reference< css::awt::XWindowPeer > &xParent) override
 
virtual sal_Bool SAL_CALL setModel (const css::uno::Reference< css::awt::XControlModel > &xModel) override
 
virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel () override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL setPosSize (sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nFlags) override
 
- Public Member Functions inherited from unocontrols::BaseContainerControl
 BaseContainerControl (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~BaseContainerControl () override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &aType) override
 give answer, if interface is supported @descr The interfaces are searched by type. More...
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 get information about supported interfaces @seealso XTypeProvider More...
 
virtual void SAL_CALL createPeer (const css::uno::Reference< css::awt::XToolkit > &xToolkit, const css::uno::Reference< css::awt::XWindowPeer > &xParent) override
 
virtual sal_Bool SAL_CALL setModel (const css::uno::Reference< css::awt::XControlModel > &xModel) override
 
virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel () override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &rEvent) override
 
virtual void SAL_CALL addControl (const OUString &sName, const css::uno::Reference< css::awt::XControl > &xControl) override
 
virtual void SAL_CALL removeControl (const css::uno::Reference< css::awt::XControl > &xControl) override
 
virtual void SAL_CALL setStatusText (const OUString &sStatusText) override
 
virtual css::uno::Reference< css::awt::XControl > SAL_CALL getControl (const OUString &sName) override
 
virtual css::uno::Sequence< css::uno::Reference< css::awt::XControl > > SAL_CALL getControls () override
 
virtual void SAL_CALL setVisible (sal_Bool bVisible) override
 
- Public Member Functions inherited from unocontrols::BaseControl
 BaseControl (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~BaseControl () override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &aType) override
 give answer, if interface is supported @descr The interfaces are searched by type. More...
 
virtual void SAL_CALL acquire () noexcept override
 increment refcount @seealso XInterface @seealso release() @onerror A RuntimeException is thrown. More...
 
virtual void SAL_CALL release () noexcept override
 decrement refcount @seealso XInterface @seealso acquire() @onerror A RuntimeException is thrown. More...
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 get information about supported interfaces @seealso XTypeProvider More...
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 get implementation id @descr This ID is necessary for UNO-caching. More...
 
virtual sal_Bool SAL_CALL supportsService (const OUString &sServiceName) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override
 
virtual void SAL_CALL createPeer (const css::uno::Reference< css::awt::XToolkit > &xToolkit, const css::uno::Reference< css::awt::XWindowPeer > &xParent) override
 
virtual void SAL_CALL setContext (const css::uno::Reference< css::uno::XInterface > &xContext) override
 
virtual sal_Bool SAL_CALL setModel (const css::uno::Reference< css::awt::XControlModel > &xModel) override=0
 
virtual void SAL_CALL setDesignMode (sal_Bool bOn) override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext () override
 
virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel () override=0
 
virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer () override
 
virtual css::uno::Reference< css::awt::XView > SAL_CALL getView () override
 
virtual sal_Bool SAL_CALL isDesignMode () override
 
virtual sal_Bool SAL_CALL isTransparent () override
 
virtual void SAL_CALL setPosSize (sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nFlags) override
 
virtual void SAL_CALL setVisible (sal_Bool bVisible) override
 
virtual void SAL_CALL setEnable (sal_Bool bEnable) override
 
virtual void SAL_CALL setFocus () override
 
virtual css::awt::Rectangle SAL_CALL getPosSize () override
 
virtual void SAL_CALL addWindowListener (const css::uno::Reference< css::awt::XWindowListener > &xListener) override
 
virtual void SAL_CALL addFocusListener (const css::uno::Reference< css::awt::XFocusListener > &xListener) override
 
virtual void SAL_CALL addKeyListener (const css::uno::Reference< css::awt::XKeyListener > &xListener) override
 
virtual void SAL_CALL addMouseListener (const css::uno::Reference< css::awt::XMouseListener > &xListener) override
 
virtual void SAL_CALL addMouseMotionListener (const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
 
virtual void SAL_CALL addPaintListener (const css::uno::Reference< css::awt::XPaintListener > &xListener) override
 
virtual void SAL_CALL removeWindowListener (const css::uno::Reference< css::awt::XWindowListener > &xListener) override
 
virtual void SAL_CALL removeFocusListener (const css::uno::Reference< css::awt::XFocusListener > &xListener) override
 
virtual void SAL_CALL removeKeyListener (const css::uno::Reference< css::awt::XKeyListener > &xListener) override
 
virtual void SAL_CALL removeMouseListener (const css::uno::Reference< css::awt::XMouseListener > &xListener) override
 
virtual void SAL_CALL removeMouseMotionListener (const css::uno::Reference< css::awt::XMouseMotionListener > &xListener) override
 
virtual void SAL_CALL removePaintListener (const css::uno::Reference< css::awt::XPaintListener > &xListener) override
 
virtual void SAL_CALL draw (sal_Int32 nX, sal_Int32 nY) override
 
virtual sal_Bool SAL_CALL setGraphics (const css::uno::Reference< css::awt::XGraphics > &xDevice) override
 
virtual void SAL_CALL setZoom (float fZoomX, float fZoomY) override
 
virtual css::uno::Reference< css::awt::XGraphics > SAL_CALL getGraphics () override
 
virtual css::awt::Size SAL_CALL getSize () override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &rSource) override
 
virtual void SAL_CALL windowPaint (const css::awt::PaintEvent &rEvent) override
 
virtual void SAL_CALL windowResized (const css::awt::WindowEvent &aEvent) override
 
virtual void SAL_CALL windowMoved (const css::awt::WindowEvent &aEvent) override
 
virtual void SAL_CALL windowShown (const css::lang::EventObject &aEvent) override
 
virtual void SAL_CALL windowHidden (const css::lang::EventObject &aEvent) override
 

Private Member Functions

virtual void impl_paint (sal_Int32 nX, sal_Int32 nY, const css::uno::Reference< css::awt::XGraphics > &xGraphics) override
 
void impl_recalcLayout ()
 
void impl_rebuildFixedText ()
 
void impl_cleanMemory ()
 
IMPL_TextlistItemimpl_searchTopic (std::u16string_view sTopic, bool bbeforeProgress)
 
virtual void impl_recalcLayout (const css::awt::WindowEvent &aEvent)
 

Static Private Member Functions

static bool impl_debug_checkParameter (std::u16string_view sTopic, std::u16string_view sText)
 
static bool impl_debug_checkParameter (std::u16string_view rTopic)
 

Private Attributes

::std::vector< IMPL_TextlistItemmaTextlist_Top
 
css::uno::Reference< css::awt::XFixedText > m_xTopic_Top
 
css::uno::Reference< css::awt::XFixedText > m_xText_Top
 
::std::vector< IMPL_TextlistItemmaTextlist_Bottom
 
css::uno::Reference< css::awt::XFixedText > m_xTopic_Bottom
 
css::uno::Reference< css::awt::XFixedText > m_xText_Bottom
 
rtl::Reference< ProgressBarm_xProgressBar
 
css::uno::Reference< css::awt::XButton > m_xButton
 
css::awt::Rectangle m_a3DLine
 

Additional Inherited Members

- Protected Member Functions inherited from unocontrols::BaseContainerControl
virtual css::awt::WindowDescriptor impl_getWindowDescriptor (const css::uno::Reference< css::awt::XWindowPeer > &xParentPeer) override
 
virtual void impl_paint (sal_Int32 nX, sal_Int32 nY, const css::uno::Reference< css::awt::XGraphics > &xGraphics) override
 
- Protected Member Functions inherited from unocontrols::BaseControl
const css::uno::Reference< css::uno::XComponentContext > & impl_getComponentContext () const
 
const css::uno::Reference< css::awt::XWindow > & impl_getPeerWindow () const
 
const css::uno::Reference< css::awt::XGraphics > & impl_getGraphicsPeer () const
 
sal_Int32 impl_getWidth () const
 
sal_Int32 impl_getHeight () const
 
virtual css::awt::WindowDescriptor impl_getWindowDescriptor (const css::uno::Reference< css::awt::XWindowPeer > &xParentPeer)
 
virtual void impl_paint (sal_Int32 nX, sal_Int32 nY, const css::uno::Reference< css::awt::XGraphics > &xGraphics)
 
virtual void impl_recalcLayout (const css::awt::WindowEvent &aEvent)
 
- Protected Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Detailed Description

Definition at line 53 of file progressmonitor.hxx.

Constructor & Destructor Documentation

◆ ProgressMonitor()

unocontrols::ProgressMonitor::ProgressMonitor ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)

◆ ~ProgressMonitor()

unocontrols::ProgressMonitor::~ProgressMonitor ( )
overridevirtual

Definition at line 107 of file progressmonitor.cxx.

References impl_cleanMemory().

Member Function Documentation

◆ acquire()

void SAL_CALL unocontrols::ProgressMonitor::acquire ( )
overridevirtualnoexcept

increment refcount @seealso XInterface @seealso release() @onerror A RuntimeException is thrown.

Reimplemented from unocontrols::BaseControl.

Definition at line 135 of file progressmonitor.cxx.

References unocontrols::BaseControl::acquire().

◆ addActionListener()

void SAL_CALL unocontrols::ProgressMonitor::addActionListener ( const css::uno::Reference< css::awt::XActionListener > &  xListener)
overridevirtual

Definition at line 322 of file progressmonitor.cxx.

References cppu::BaseMutex::m_aMutex, and m_xButton.

◆ addText()

void SAL_CALL unocontrols::ProgressMonitor::addText ( const OUString &  sTopic,
const OUString &  sText,
sal_Bool  bbeforeProgress 
)
overridevirtual

add topic to dialog @descr Add a topic with a text in right textlist (used for FixedText-member).


( "beforeProgress" fix the right list ). The dialog metric is recalculated.

@seealso removeText(), updateText()

Parameters
sTopicName of topic
[sTopic != "" && sTopic != NULL]
sTextValue of topic
[sText != "" && sText != NULL]
bbeforeProgressPosition of topic
[True => before progressbar / False => below progressbar] @onerror DEBUG = Assertion
RELEASE = nothing

Definition at line 167 of file progressmonitor.cxx.

References DBG_ASSERT, impl_debug_checkParameter(), impl_rebuildFixedText(), impl_recalcLayout(), impl_searchTopic(), cppu::BaseMutex::m_aMutex, maTextlist_Bottom, maTextlist_Top, unocontrols::IMPL_TextlistItem::sText, and unocontrols::IMPL_TextlistItem::sTopic.

◆ calcAdjustedSize()

Size SAL_CALL unocontrols::ProgressMonitor::calcAdjustedSize ( const css::awt::Size &  aNewSize)
overridevirtual

Definition at line 420 of file progressmonitor.cxx.

References getPreferredSize().

◆ createPeer()

void SAL_CALL unocontrols::ProgressMonitor::createPeer ( const css::uno::Reference< css::awt::XToolkit > &  xToolkit,
const css::uno::Reference< css::awt::XWindowPeer > &  xParent 
)
overridevirtual

◆ dispose()

void SAL_CALL unocontrols::ProgressMonitor::dispose ( void  )
overridevirtual

◆ getMinimumSize()

Size SAL_CALL unocontrols::ProgressMonitor::getMinimumSize ( )
overridevirtual

Definition at line 370 of file progressmonitor.cxx.

References PROGRESSMONITOR_DEFAULT_HEIGHT, and PROGRESSMONITOR_DEFAULT_WIDTH.

Referenced by createPeer().

◆ getModel()

css::uno::Reference< XControlModel > SAL_CALL unocontrols::ProgressMonitor::getModel ( )
overridevirtual

Reimplemented from unocontrols::BaseContainerControl.

Definition at line 448 of file progressmonitor.cxx.

◆ getPreferredSize()

Size SAL_CALL unocontrols::ProgressMonitor::getPreferredSize ( )
overridevirtual

◆ getTypes()

Sequence< Type > SAL_CALL unocontrols::ProgressMonitor::getTypes ( )
overridevirtual

get information about supported interfaces @seealso XTypeProvider

Returns
Sequence of types of all supported interfaces

@onerror A RuntimeException is thrown.

Reimplemented from unocontrols::BaseContainerControl.

Definition at line 155 of file progressmonitor.cxx.

References unocontrols::BaseContainerControl::getTypes().

◆ getValue()

sal_Int32 SAL_CALL unocontrols::ProgressMonitor::getValue ( )
overridevirtual

Definition at line 313 of file progressmonitor.cxx.

References cppu::BaseMutex::m_aMutex, and m_xProgressBar.

◆ impl_cleanMemory()

void unocontrols::ProgressMonitor::impl_cleanMemory ( )
private

Definition at line 756 of file progressmonitor.cxx.

References cppu::BaseMutex::m_aMutex, maTextlist_Bottom, and maTextlist_Top.

Referenced by ~ProgressMonitor().

◆ impl_debug_checkParameter() [1/2]

bool unocontrols::ProgressMonitor::impl_debug_checkParameter ( std::u16string_view  rTopic)
staticprivate

Definition at line 816 of file progressmonitor.cxx.

◆ impl_debug_checkParameter() [2/2]

bool unocontrols::ProgressMonitor::impl_debug_checkParameter ( std::u16string_view  sTopic,
std::u16string_view  sText 
)
staticprivate

Definition at line 803 of file progressmonitor.cxx.

Referenced by addText(), removeText(), and updateText().

◆ impl_paint()

void unocontrols::ProgressMonitor::impl_paint ( sal_Int32  nX,
sal_Int32  nY,
const css::uno::Reference< css::awt::XGraphics > &  xGraphics 
)
overrideprivatevirtual

◆ impl_rebuildFixedText()

void unocontrols::ProgressMonitor::impl_rebuildFixedText ( )
private

◆ impl_recalcLayout() [1/2]

void unocontrols::ProgressMonitor::impl_recalcLayout ( )
private

◆ impl_recalcLayout() [2/2]

void unocontrols::BaseControl::impl_recalcLayout ( const css::awt::WindowEvent &  aEvent)
privatevirtual

Reimplemented from unocontrols::BaseControl.

Definition at line 288 of file basecontrol.cxx.

◆ impl_searchTopic()

IMPL_TextlistItem * unocontrols::ProgressMonitor::impl_searchTopic ( std::u16string_view  sTopic,
bool  bbeforeProgress 
)
private

Definition at line 767 of file progressmonitor.cxx.

References maTextlist_Bottom, maTextlist_Top, and nCount.

Referenced by addText(), removeText(), and updateText().

◆ queryInterface()

Any SAL_CALL unocontrols::ProgressMonitor::queryInterface ( const css::uno::Type &  aType)
overridevirtual

give answer, if interface is supported @descr The interfaces are searched by type.

@seealso XInterface

Parameters
rTypeis the type of searched interface.
Returns
Any information about found interface

@onerror A RuntimeException is thrown.

Reimplemented from unocontrols::BaseContainerControl.

Definition at line 113 of file progressmonitor.cxx.

References Any, and unocontrols::BaseControl::queryInterface().

◆ release()

void SAL_CALL unocontrols::ProgressMonitor::release ( )
overridevirtualnoexcept

decrement refcount @seealso XInterface @seealso acquire() @onerror A RuntimeException is thrown.

Reimplemented from unocontrols::BaseControl.

Definition at line 145 of file progressmonitor.cxx.

References unocontrols::BaseControl::release().

◆ removeActionListener()

void SAL_CALL unocontrols::ProgressMonitor::removeActionListener ( const css::uno::Reference< css::awt::XActionListener > &  xListener)
overridevirtual

Definition at line 334 of file progressmonitor.cxx.

References cppu::BaseMutex::m_aMutex, and m_xButton.

◆ removeText()

void SAL_CALL unocontrols::ProgressMonitor::removeText ( const OUString &  sTopic,
sal_Bool  bbeforeProgress 
)
overridevirtual

◆ setActionCommand()

void SAL_CALL unocontrols::ProgressMonitor::setActionCommand ( const OUString &  sCommand)
overridevirtual

Definition at line 358 of file progressmonitor.cxx.

References cppu::BaseMutex::m_aMutex, and m_xButton.

◆ setBackgroundColor()

void SAL_CALL unocontrols::ProgressMonitor::setBackgroundColor ( sal_Int32  nColor)
overridevirtual

Definition at line 286 of file progressmonitor.cxx.

References cppu::BaseMutex::m_aMutex, and m_xProgressBar.

◆ setForegroundColor()

void SAL_CALL unocontrols::ProgressMonitor::setForegroundColor ( sal_Int32  nColor)
overridevirtual

Definition at line 277 of file progressmonitor.cxx.

References cppu::BaseMutex::m_aMutex, and m_xProgressBar.

◆ setLabel()

void SAL_CALL unocontrols::ProgressMonitor::setLabel ( const OUString &  sLabel)
overridevirtual

Definition at line 346 of file progressmonitor.cxx.

References cppu::BaseMutex::m_aMutex, and m_xButton.

◆ setModel()

sal_Bool SAL_CALL unocontrols::ProgressMonitor::setModel ( const css::uno::Reference< css::awt::XControlModel > &  xModel)
overridevirtual

Reimplemented from unocontrols::BaseContainerControl.

Definition at line 441 of file progressmonitor.cxx.

◆ setPosSize()

void SAL_CALL unocontrols::ProgressMonitor::setPosSize ( sal_Int32  nX,
sal_Int32  nY,
sal_Int32  nWidth,
sal_Int32  nHeight,
sal_Int16  nFlags 
)
overridevirtual

◆ setRange()

void SAL_CALL unocontrols::ProgressMonitor::setRange ( sal_Int32  nMin,
sal_Int32  nMax 
)
overridevirtual

Definition at line 304 of file progressmonitor.cxx.

References cppu::BaseMutex::m_aMutex, and m_xProgressBar.

◆ setValue()

void SAL_CALL unocontrols::ProgressMonitor::setValue ( sal_Int32  nValue)
overridevirtual

Definition at line 295 of file progressmonitor.cxx.

References cppu::BaseMutex::m_aMutex, m_xProgressBar, and nValue.

◆ updateText()

void SAL_CALL unocontrols::ProgressMonitor::updateText ( const OUString &  sTopic,
const OUString &  sText,
sal_Bool  bbeforeProgress 
)
overridevirtual

Member Data Documentation

◆ m_a3DLine

css::awt::Rectangle unocontrols::ProgressMonitor::m_a3DLine
private

Definition at line 237 of file progressmonitor.hxx.

Referenced by impl_paint(), and impl_recalcLayout().

◆ m_xButton

css::uno::Reference< css::awt::XButton > unocontrols::ProgressMonitor::m_xButton
private

◆ m_xProgressBar

rtl::Reference<ProgressBar> unocontrols::ProgressMonitor::m_xProgressBar
private

◆ m_xText_Bottom

css::uno::Reference< css::awt::XFixedText > unocontrols::ProgressMonitor::m_xText_Bottom
private

◆ m_xText_Top

css::uno::Reference< css::awt::XFixedText > unocontrols::ProgressMonitor::m_xText_Top
private

◆ m_xTopic_Bottom

css::uno::Reference< css::awt::XFixedText > unocontrols::ProgressMonitor::m_xTopic_Bottom
private

◆ m_xTopic_Top

css::uno::Reference< css::awt::XFixedText > unocontrols::ProgressMonitor::m_xTopic_Top
private

◆ maTextlist_Bottom

::std::vector< IMPL_TextlistItem > unocontrols::ProgressMonitor::maTextlist_Bottom
private

◆ maTextlist_Top

::std::vector< IMPL_TextlistItem > unocontrols::ProgressMonitor::maTextlist_Top
private

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