LibreOffice Module extensions (master) 1
Public Member Functions | Private Types | Private Attributes | List of all members
ScanPreview Class Reference
Inheritance diagram for ScanPreview:
[legend]
Collaboration diagram for ScanPreview:
[legend]

Public Member Functions

 ScanPreview ()
 
void Init (SaneDlg *pParent)
 
void ResetForNewScanner ()
 
void EnableDrag ()
 
void DisableDrag ()
 
bool IsDragEnabled () const
 
virtual void Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
 
virtual bool MouseButtonDown (const MouseEvent &rMEvt) override
 
virtual bool MouseMove (const MouseEvent &rMEvt) override
 
virtual bool MouseButtonUp (const MouseEvent &rMEvt) override
 
Point GetPixelPos (const Point &rIn) const
 
Point GetLogicPos (const Point &rIn) const
 
void GetPreviewLogicRect (Point &rTopLeft, Point &rBottomRight) const
 
void GetMaxLogicRect (Point &rTopLeft, Point &rBottomRight) const
 
void ChangePreviewLogicTopLeftY (tools::Long Y)
 
void ChangePreviewLogicTopLeftX (tools::Long X)
 
void ChangePreviewLogicBottomRightY (tools::Long Y)
 
void ChangePreviewLogicBottomRightX (tools::Long X)
 
void SetPreviewLogicRect (const Point &rTopLeft, const Point &rBottomRight)
 
void SetPreviewMaxRect (const Point &rTopLeft, const Point &rBottomRight)
 
void DrawDrag (vcl::RenderContext &rRenderContext)
 
void UpdatePreviewBounds ()
 
void SetBitmap (SvStream &rStream)
 
virtual void SetDrawingArea (weld::DrawingArea *pDrawingArea) override
 
- 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 Types

enum  DragDirection {
  TopLeft ,
  Top ,
  TopRight ,
  Right ,
  BottomRight ,
  Bottom ,
  BottomLeft ,
  Left
}
 

Private Attributes

BitmapEx maPreviewBitmapEx
 
tools::Rectangle maPreviewRect
 
Point maTopLeft
 
Point maBottomRight
 
Point maMinTopLeft
 
Point maMaxBottomRight
 
SaneDlgmpParentDialog
 
DragDirection meDragDirection
 
bool mbDragEnable
 
bool mbIsDragging
 

Additional Inherited Members

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

Detailed Description

Definition at line 97 of file sanedlg.cxx.

Member Enumeration Documentation

◆ DragDirection

Enumerator
TopLeft 
Top 
TopRight 
Right 
BottomRight 
Bottom 
BottomLeft 
Left 

Definition at line 100 of file sanedlg.cxx.

Constructor & Destructor Documentation

◆ ScanPreview()

ScanPreview::ScanPreview ( )
inline

Definition at line 113 of file sanedlg.cxx.

Member Function Documentation

◆ ChangePreviewLogicBottomRightX()

void ScanPreview::ChangePreviewLogicBottomRightX ( tools::Long  X)
inline

Definition at line 186 of file sanedlg.cxx.

References GetPixelPos(), maBottomRight, Point::setX(), X, and Point::X().

◆ ChangePreviewLogicBottomRightY()

void ScanPreview::ChangePreviewLogicBottomRightY ( tools::Long  Y)
inline

Definition at line 180 of file sanedlg.cxx.

References GetPixelPos(), maBottomRight, Point::setY(), Y, and Point::Y().

◆ ChangePreviewLogicTopLeftX()

void ScanPreview::ChangePreviewLogicTopLeftX ( tools::Long  X)
inline

Definition at line 174 of file sanedlg.cxx.

References GetPixelPos(), maTopLeft, Point::setX(), X, and Point::X().

◆ ChangePreviewLogicTopLeftY()

void ScanPreview::ChangePreviewLogicTopLeftY ( tools::Long  Y)
inline

Definition at line 168 of file sanedlg.cxx.

References GetPixelPos(), maTopLeft, Point::setY(), Y, and Point::Y().

◆ DisableDrag()

void ScanPreview::DisableDrag ( )
inline

Definition at line 140 of file sanedlg.cxx.

References mbDragEnable.

◆ DrawDrag()

void ScanPreview::DrawDrag ( vcl::RenderContext rRenderContext)

Definition at line 1204 of file sanedlg.cxx.

References maBottomRight, maTopLeft, mbDragEnable, and OutputDevice::SetMapMode().

Referenced by Paint().

◆ EnableDrag()

void ScanPreview::EnableDrag ( )
inline

Definition at line 135 of file sanedlg.cxx.

References mbDragEnable.

◆ GetLogicPos()

Point ScanPreview::GetLogicPos ( const Point rIn) const

◆ GetMaxLogicRect()

void ScanPreview::GetMaxLogicRect ( Point rTopLeft,
Point rBottomRight 
) const
inline

Definition at line 162 of file sanedlg.cxx.

References maMaxBottomRight, and maMinTopLeft.

◆ GetPixelPos()

Point ScanPreview::GetPixelPos ( const Point rIn) const

◆ GetPreviewLogicRect()

void ScanPreview::GetPreviewLogicRect ( Point rTopLeft,
Point rBottomRight 
) const
inline

Definition at line 157 of file sanedlg.cxx.

References GetLogicPos(), maBottomRight, and maTopLeft.

◆ Init()

void ScanPreview::Init ( SaneDlg pParent)
inline

Definition at line 122 of file sanedlg.cxx.

References mpParentDialog.

◆ IsDragEnabled()

bool ScanPreview::IsDragEnabled ( ) const
inline

Definition at line 145 of file sanedlg.cxx.

References mbDragEnable.

◆ MouseButtonDown()

bool ScanPreview::MouseButtonDown ( const MouseEvent rMEvt)
overridevirtual

◆ MouseButtonUp()

bool ScanPreview::MouseButtonUp ( const MouseEvent rMEvt)
overridevirtual

Reimplemented from weld::CustomWidgetController.

Definition at line 1195 of file sanedlg.cxx.

References mbIsDragging, mpParentDialog, and SaneDlg::UpdateScanArea().

◆ MouseMove()

bool ScanPreview::MouseMove ( const MouseEvent rMEvt)
overridevirtual

◆ Paint()

void ScanPreview::Paint ( vcl::RenderContext rRenderContext,
const tools::Rectangle rRect 
)
overridevirtual

◆ ResetForNewScanner()

void ScanPreview::ResetForNewScanner ( )
inline

◆ SetBitmap()

void ScanPreview::SetBitmap ( SvStream rStream)
inline

Definition at line 207 of file sanedlg.cxx.

References maPreviewBitmapEx, and ReadDIBBitmapEx().

◆ SetDrawingArea()

virtual void ScanPreview::SetDrawingArea ( weld::DrawingArea pDrawingArea)
inlineoverridevirtual

◆ SetPreviewLogicRect()

void ScanPreview::SetPreviewLogicRect ( const Point rTopLeft,
const Point rBottomRight 
)
inline

Definition at line 192 of file sanedlg.cxx.

References GetPixelPos(), maBottomRight, maPreviewRect, maTopLeft, Point::X(), and Point::Y().

◆ SetPreviewMaxRect()

void ScanPreview::SetPreviewMaxRect ( const Point rTopLeft,
const Point rBottomRight 
)
inline

Definition at line 200 of file sanedlg.cxx.

References maMaxBottomRight, and maMinTopLeft.

◆ UpdatePreviewBounds()

void ScanPreview::UpdatePreviewBounds ( )

Member Data Documentation

◆ maBottomRight

Point ScanPreview::maBottomRight
private

◆ maMaxBottomRight

Point ScanPreview::maMaxBottomRight
private

◆ maMinTopLeft

Point ScanPreview::maMinTopLeft
private

◆ maPreviewBitmapEx

BitmapEx ScanPreview::maPreviewBitmapEx
private

Definition at line 103 of file sanedlg.cxx.

Referenced by Paint(), SetBitmap(), and UpdatePreviewBounds().

◆ maPreviewRect

tools::Rectangle ScanPreview::maPreviewRect
private

Definition at line 104 of file sanedlg.cxx.

Referenced by Paint(), SetPreviewLogicRect(), and UpdatePreviewBounds().

◆ maTopLeft

Point ScanPreview::maTopLeft
private

◆ mbDragEnable

bool ScanPreview::mbDragEnable
private

◆ mbIsDragging

bool ScanPreview::mbIsDragging
private

Definition at line 110 of file sanedlg.cxx.

Referenced by MouseButtonDown(), MouseButtonUp(), and MouseMove().

◆ meDragDirection

DragDirection ScanPreview::meDragDirection
private

Definition at line 108 of file sanedlg.cxx.

Referenced by MouseButtonDown(), and MouseMove().

◆ mpParentDialog

SaneDlg* ScanPreview::mpParentDialog
private

Definition at line 107 of file sanedlg.cxx.

Referenced by Init(), MouseButtonUp(), and MouseMove().


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