LibreOffice Module sdext (master)  1
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
sdext::presenter::PresenterVerticalScrollBar Class Reference

A vertical scroll bar. More...

#include <PresenterScrollBar.hxx>

Inheritance diagram for sdext::presenter::PresenterVerticalScrollBar:
Collaboration diagram for sdext::presenter::PresenterVerticalScrollBar:

Public Member Functions

 PresenterVerticalScrollBar (const css::uno::Reference< css::uno::XComponentContext > &rxComponentContext, const css::uno::Reference< css::awt::XWindow > &rxParentWindow, const std::shared_ptr< PresenterPaintManager > &rpPaintManager, const ::std::function< void(double)> &rThumbMotionListener)
virtual ~PresenterVerticalScrollBar () override
virtual sal_Int32 GetSize () const override
- Public Member Functions inherited from sdext::presenter::PresenterScrollBar
virtual ~PresenterScrollBar () override
 PresenterScrollBar (const PresenterScrollBar &)=delete
PresenterScrollBaroperator= (const PresenterScrollBar &)=delete
virtual void SAL_CALL disposing () override
css::uno::Reference< css::uno::XComponentContext > const & GetComponentContext () const
void SetVisible (const bool bIsVisible)
void SetPosSize (const css::geometry::RealRectangle2D &rBox)
 Set the bounding box of the scroll bar. More...
void SetThumbPosition (double nPosition, const bool bAsynchronousRepaint)
 Set the position of the movable thumb. More...
double GetThumbPosition () const
void SetTotalSize (const double nTotalSize)
 Set the upper border of the slider range. More...
void SetThumbSize (const double nThumbSize)
 Set the size of the movable thumb. More...
double GetThumbSize () const
void SetLineHeight (const double nLineHeight)
double GetLineHeight () const
void SetCanvas (const css::uno::Reference< css::rendering::XCanvas > &rxCanvas)
 Set the canvas that is used for painting the scroll bar. More...
void SetBackground (const SharedBitmapDescriptor &rpBackgroundBitmap)
void CheckValues ()
 Call this after changing total size or thumb position or size to move the thumb to a valid position. More...
void Paint (const css::awt::Rectangle &rUpdateBox)
 On some occasions it is necessary to trigger the painting of a scrollbar from the outside. More...
virtual void SAL_CALL windowResized (const css::awt::WindowEvent &rEvent) override
virtual void SAL_CALL windowMoved (const css::awt::WindowEvent &rEvent) override
virtual void SAL_CALL windowShown (const css::lang::EventObject &rEvent) override
virtual void SAL_CALL windowHidden (const css::lang::EventObject &rEvent) override
virtual void SAL_CALL windowPaint (const css::awt::PaintEvent &rEvent) override
virtual void SAL_CALL mousePressed (const css::awt::MouseEvent &rEvent) override
virtual void SAL_CALL mouseReleased (const css::awt::MouseEvent &rEvent) override
virtual void SAL_CALL mouseEntered (const css::awt::MouseEvent &rEvent) override
virtual void SAL_CALL mouseExited (const css::awt::MouseEvent &rEvent) override
virtual void SAL_CALL mouseMoved (const css::awt::MouseEvent &rEvent) override
virtual void SAL_CALL mouseDragged (const css::awt::MouseEvent &rEvent) override
virtual void SAL_CALL disposing (const css::lang::EventObject &rEvent) override

Protected Member Functions

virtual double GetDragDistance (const sal_Int32 nX, const sal_Int32 nY) const override
virtual void UpdateDragAnchor (const double nDragDistance) override
virtual double GetMinor (const double nX, const double nY) const override
virtual void UpdateBorders () override
virtual void UpdateBitmaps () override
virtual void PaintComposite (const css::awt::Rectangle &rRepaintBox, const Area eArea, const SharedBitmapDescriptor &rpStartBitmaps, const SharedBitmapDescriptor &rpCenterBitmaps, const SharedBitmapDescriptor &rpEndBitmaps) override
- Protected Member Functions inherited from sdext::presenter::PresenterScrollBar
css::geometry::RealRectangle2D const & GetRectangle (const Area eArea) const
 PresenterScrollBar (const css::uno::Reference< css::uno::XComponentContext > &rxComponentContext, const css::uno::Reference< css::awt::XWindow > &rxParentWindow, const std::shared_ptr< PresenterPaintManager > &rpPaintManager, const ::std::function< void(double)> &rThumbMotionListener)
void Repaint (const css::geometry::RealRectangle2D &rBox, const bool bAsynchronous)
void PaintBackground (const css::awt::Rectangle &rRepaintBox)
void PaintBitmap (const css::awt::Rectangle &rRepaintBox, const Area eArea, const SharedBitmapDescriptor &rpBitmaps)
void UpdateWidthOrHeight (sal_Int32 &rSize, const SharedBitmapDescriptor &rpDescriptor)
css::uno::Reference< css::rendering::XBitmap > GetBitmap (const Area eArea, const SharedBitmapDescriptor &rpBitmaps) const
PresenterBitmapContainer::BitmapDescriptor::Mode GetBitmapMode (const Area eArea) const
bool IsDisabled (const Area eArea) const
double ValidateThumbPosition (double nPosition)

Private Attributes

sal_Int32 mnScrollBarWidth

Additional Inherited Members

- Public Types inherited from sdext::presenter::PresenterScrollBar
enum  Area {
  AreaCount = None
- Protected Attributes inherited from sdext::presenter::PresenterScrollBar
css::uno::Reference< css::uno::XComponentContext > mxComponentContext
css::uno::Reference< css::awt::XWindow > mxWindow
css::uno::Reference< css::rendering::XCanvas > mxCanvas
css::uno::Reference< css::drawing::XPresenterHelper > mxPresenterHelper
std::shared_ptr< PresenterPaintManagermpPaintManager
double mnThumbPosition
double mnTotalSize
double mnThumbSize
double mnLineHeight
css::geometry::RealPoint2D maDragAnchor
::std::function< void(double)> maThumbMotionListener
Area meButtonDownArea
Area meMouseMoveArea
css::geometry::RealRectangle2D maBox [AreaCount]
bool mbIsNotificationActive
std::shared_ptr< PresenterBitmapContainermpBitmaps
SharedBitmapDescriptor mpPrevButtonDescriptor
SharedBitmapDescriptor mpNextButtonDescriptor
SharedBitmapDescriptor mpPagerStartDescriptor
SharedBitmapDescriptor mpPagerCenterDescriptor
SharedBitmapDescriptor mpPagerEndDescriptor
SharedBitmapDescriptor mpThumbStartDescriptor
SharedBitmapDescriptor mpThumbCenterDescriptor
SharedBitmapDescriptor mpThumbEndDescriptor
bool maEnabledState [AreaCount]
- Static Protected Attributes inherited from sdext::presenter::PresenterScrollBar
static std::weak_ptr< PresenterBitmapContainermpSharedBitmaps

Detailed Description

A vertical scroll bar.

Definition at line 225 of file PresenterScrollBar.hxx.

Constructor & Destructor Documentation

sdext::presenter::PresenterVerticalScrollBar::PresenterVerticalScrollBar ( const css::uno::Reference< css::uno::XComponentContext > &  rxComponentContext,
const css::uno::Reference< css::awt::XWindow > &  rxParentWindow,
const std::shared_ptr< PresenterPaintManager > &  rpPaintManager,
const ::std::function< void(double)> &  rThumbMotionListener 

Definition at line 566 of file PresenterScrollBar.cxx.

sdext::presenter::PresenterVerticalScrollBar::~PresenterVerticalScrollBar ( )

Definition at line 576 of file PresenterScrollBar.cxx.

Member Function Documentation

double sdext::presenter::PresenterVerticalScrollBar::GetDragDistance ( const sal_Int32  nX,
const sal_Int32  nY 
) const
double sdext::presenter::PresenterVerticalScrollBar::GetMinor ( const double  nX,
const double  nY 
) const

Implements sdext::presenter::PresenterScrollBar.

Definition at line 613 of file PresenterScrollBar.cxx.

sal_Int32 sdext::presenter::PresenterVerticalScrollBar::GetSize ( ) const

Implements sdext::presenter::PresenterScrollBar.

Definition at line 608 of file PresenterScrollBar.cxx.

References mnScrollBarWidth.

void sdext::presenter::PresenterVerticalScrollBar::PaintComposite ( const css::awt::Rectangle &  rRepaintBox,
const Area  eArea,
const SharedBitmapDescriptor rpStartBitmaps,
const SharedBitmapDescriptor rpCenterBitmaps,
const SharedBitmapDescriptor rpEndBitmaps 
void sdext::presenter::PresenterVerticalScrollBar::UpdateBitmaps ( )
void sdext::presenter::PresenterVerticalScrollBar::UpdateBorders ( )
void sdext::presenter::PresenterVerticalScrollBar::UpdateDragAnchor ( const double  nDragDistance)

Member Data Documentation

sal_Int32 sdext::presenter::PresenterVerticalScrollBar::mnScrollBarWidth

Definition at line 250 of file PresenterScrollBar.hxx.

Referenced by GetSize(), and UpdateBitmaps().

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