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

Classes

struct  impHandle
 

Public Member Functions

 GridWindow ()
 
void Init (double *pXValues, double *pYValues, int nValues, bool bCutValues, const BitmapEx &rMarkerBitmap)
 
virtual ~GridWindow () override
 
void setBoundings (double fMinX, double fMinY, double fMaxX, double fMaxY)
 
double * getNewYValues ()
 
void ChangeMode (ResetType nType)
 
virtual void Paint (vcl::RenderContext &, const tools::Rectangle &rRect) 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

using Handles = std::vector< impHandle >
 

Private Member Functions

Point transform (double x, double y)
 
void transform (const Point &rOriginal, double &x, double &y)
 
double findMinX ()
 
double findMinY ()
 
double findMaxX ()
 
double findMaxY ()
 
void drawGrid (vcl::RenderContext &rRenderContext)
 
void drawOriginal (vcl::RenderContext &rRenderContext)
 
void drawNew (vcl::RenderContext &rRenderContext)
 
void drawHandles (vcl::RenderContext &rRenderContext)
 
void computeExtremes ()
 
void computeNew ()
 
virtual bool MouseMove (const MouseEvent &) override
 
virtual bool MouseButtonDown (const MouseEvent &) override
 
virtual bool MouseButtonUp (const MouseEvent &) override
 
void onResize ()
 
virtual void Resize () override
 
virtual void SetDrawingArea (weld::DrawingArea *pDrawingArea) override
 
void drawLine (vcl::RenderContext &rRenderContext, double x1, double y1, double x2, double y2)
 

Static Private Member Functions

static void computeChunk (double fMin, double fMax, double &fChunkOut, double &fMinChunkOut)
 
static double interpolate (double x, double const *pNodeX, double const *pNodeY, int nNodes)
 

Private Attributes

tools::Rectangle m_aGridArea
 
double m_fMinX
 
double m_fMinY
 
double m_fMaxX
 
double m_fMaxY
 
double m_fChunkX
 
double m_fMinChunkX
 
double m_fChunkY
 
double m_fMinChunkY
 
double * m_pXValues
 
double * m_pOrigYValues
 
int m_nValues
 
std::unique_ptr< double[]> m_pNewYValues
 
sal_uInt16 m_BmOffX
 
sal_uInt16 m_BmOffY
 
bool m_bCutValues
 
Handles m_aHandles
 
Handles::size_type m_nDragIndex
 
BitmapEx m_aMarkerBitmap
 

Static Private Attributes

static constexpr auto npos = std::numeric_limits<Handles::size_type>::max()
 

Additional Inherited Members

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

Detailed Description

Definition at line 39 of file grid.cxx.

Member Typedef Documentation

◆ Handles

using GridWindow::Handles = std::vector<impHandle>
private

Definition at line 95 of file grid.cxx.

Constructor & Destructor Documentation

◆ GridWindow()

GridWindow::GridWindow ( )

Definition at line 141 of file grid.cxx.

◆ ~GridWindow()

GridWindow::~GridWindow ( )
overridevirtual

Definition at line 223 of file grid.cxx.

References m_pNewYValues.

Member Function Documentation

◆ ChangeMode()

void GridWindow::ChangeMode ( ResetType  nType)

◆ computeChunk()

void GridWindow::computeChunk ( double  fMin,
double  fMax,
double &  fChunkOut,
double &  fMinChunkOut 
)
staticprivate

Definition at line 326 of file grid.cxx.

Referenced by setBoundings().

◆ computeExtremes()

void GridWindow::computeExtremes ( )
private

Definition at line 275 of file grid.cxx.

References i, m_fMaxX, m_fMaxY, m_fMinX, m_fMinY, m_nValues, m_pOrigYValues, m_pXValues, and setBoundings().

Referenced by Init().

◆ computeNew()

void GridWindow::computeNew ( )
private

◆ drawGrid()

void GridWindow::drawGrid ( vcl::RenderContext rRenderContext)
private

◆ drawHandles()

void GridWindow::drawHandles ( vcl::RenderContext rRenderContext)
private

Definition at line 506 of file grid.cxx.

References m_aHandles, and m_aMarkerBitmap.

Referenced by Paint().

◆ drawLine()

void GridWindow::drawLine ( vcl::RenderContext rRenderContext,
double  x1,
double  y1,
double  x2,
double  y2 
)
private

Definition at line 321 of file grid.cxx.

References OutputDevice::DrawLine(), and transform().

Referenced by drawGrid(), drawNew(), and drawOriginal().

◆ drawNew()

void GridWindow::drawNew ( vcl::RenderContext rRenderContext)
private

◆ drawOriginal()

void GridWindow::drawOriginal ( vcl::RenderContext rRenderContext)
private

Definition at line 476 of file grid.cxx.

References COL_RED(), drawLine(), i, m_nValues, m_pOrigYValues, m_pXValues, and OutputDevice::SetLineColor().

Referenced by Paint().

◆ findMaxX()

double GridWindow::findMaxX ( )
private

Definition at line 251 of file grid.cxx.

References i, m_nValues, and m_pXValues.

Referenced by Init().

◆ findMaxY()

double GridWindow::findMaxY ( )
private

Definition at line 263 of file grid.cxx.

References i, m_nValues, and m_pNewYValues.

Referenced by Init().

◆ findMinX()

double GridWindow::findMinX ( )
private

Definition at line 228 of file grid.cxx.

References i, m_nValues, and m_pXValues.

Referenced by Init().

◆ findMinY()

double GridWindow::findMinY ( )
private

Definition at line 239 of file grid.cxx.

References i, m_nValues, and m_pNewYValues.

Referenced by Init().

◆ getNewYValues()

double * GridWindow::getNewYValues ( )
inline

Definition at line 134 of file grid.cxx.

References m_pNewYValues.

◆ Init()

void GridWindow::Init ( double *  pXValues,
double *  pYValues,
int  nValues,
bool  bCutValues,
const BitmapEx rMarkerBitmap 
)

◆ interpolate()

double GridWindow::interpolate ( double  x,
double const *  pNodeX,
double const *  pNodeY,
int  nNodes 
)
staticprivate

Definition at line 398 of file grid.cxx.

References i, n, and x.

Referenced by computeNew().

◆ MouseButtonDown()

bool GridWindow::MouseButtonDown ( const MouseEvent rEvt)
overrideprivatevirtual

◆ MouseButtonUp()

bool GridWindow::MouseButtonUp ( const MouseEvent rEvt)
overrideprivatevirtual

◆ MouseMove()

bool GridWindow::MouseMove ( const MouseEvent rEvt)
overrideprivatevirtual

◆ onResize()

void GridWindow::onResize ( )
private

◆ Paint()

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

◆ Resize()

void GridWindow::Resize ( )
overrideprivatevirtual

Reimplemented from weld::CustomWidgetController.

Definition at line 187 of file grid.cxx.

References onResize().

◆ setBoundings()

void GridWindow::setBoundings ( double  fMinX,
double  fMinY,
double  fMaxX,
double  fMaxY 
)

Definition at line 427 of file grid.cxx.

References computeChunk(), m_fChunkX, m_fChunkY, m_fMaxX, m_fMaxY, m_fMinChunkX, m_fMinChunkY, m_fMinX, and m_fMinY.

Referenced by computeExtremes(), and Init().

◆ SetDrawingArea()

void GridWindow::SetDrawingArea ( weld::DrawingArea pDrawingArea)
overrideprivatevirtual

◆ transform() [1/2]

void GridWindow::transform ( const Point rOriginal,
double &  x,
double &  y 
)
private

◆ transform() [2/2]

Point GridWindow::transform ( double  x,
double  y 
)
private

Member Data Documentation

◆ m_aGridArea

tools::Rectangle GridWindow::m_aGridArea
private

Definition at line 72 of file grid.cxx.

Referenced by drawNew(), MouseButtonDown(), MouseButtonUp(), MouseMove(), onResize(), and transform().

◆ m_aHandles

Handles GridWindow::m_aHandles
private

Definition at line 97 of file grid.cxx.

Referenced by ChangeMode(), computeNew(), drawHandles(), Init(), MouseButtonDown(), and MouseMove().

◆ m_aMarkerBitmap

BitmapEx GridWindow::m_aMarkerBitmap
private

Definition at line 100 of file grid.cxx.

Referenced by drawHandles(), Init(), and MouseButtonDown().

◆ m_bCutValues

bool GridWindow::m_bCutValues
private

Definition at line 92 of file grid.cxx.

Referenced by computeNew(), and Init().

◆ m_BmOffX

sal_uInt16 GridWindow::m_BmOffX
private

Definition at line 89 of file grid.cxx.

Referenced by Init(), and MouseButtonDown().

◆ m_BmOffY

sal_uInt16 GridWindow::m_BmOffY
private

Definition at line 90 of file grid.cxx.

Referenced by Init(), and MouseButtonDown().

◆ m_fChunkX

double GridWindow::m_fChunkX
private

Definition at line 79 of file grid.cxx.

Referenced by drawGrid(), and setBoundings().

◆ m_fChunkY

double GridWindow::m_fChunkY
private

Definition at line 81 of file grid.cxx.

Referenced by drawGrid(), and setBoundings().

◆ m_fMaxX

double GridWindow::m_fMaxX
private

Definition at line 76 of file grid.cxx.

Referenced by ChangeMode(), computeExtremes(), drawGrid(), setBoundings(), and transform().

◆ m_fMaxY

double GridWindow::m_fMaxY
private

Definition at line 77 of file grid.cxx.

Referenced by ChangeMode(), computeExtremes(), computeNew(), drawGrid(), setBoundings(), and transform().

◆ m_fMinChunkX

double GridWindow::m_fMinChunkX
private

Definition at line 80 of file grid.cxx.

Referenced by drawGrid(), and setBoundings().

◆ m_fMinChunkY

double GridWindow::m_fMinChunkY
private

Definition at line 82 of file grid.cxx.

Referenced by drawGrid(), and setBoundings().

◆ m_fMinX

double GridWindow::m_fMinX
private

Definition at line 74 of file grid.cxx.

Referenced by ChangeMode(), computeExtremes(), drawGrid(), setBoundings(), and transform().

◆ m_fMinY

double GridWindow::m_fMinY
private

Definition at line 75 of file grid.cxx.

Referenced by ChangeMode(), computeExtremes(), computeNew(), drawGrid(), setBoundings(), and transform().

◆ m_nDragIndex

Handles::size_type GridWindow::m_nDragIndex
private

Definition at line 98 of file grid.cxx.

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

◆ m_nValues

int GridWindow::m_nValues
private

◆ m_pNewYValues

std::unique_ptr<double[]> GridWindow::m_pNewYValues
private

Definition at line 87 of file grid.cxx.

Referenced by ChangeMode(), computeNew(), drawNew(), findMaxY(), findMinY(), getNewYValues(), Init(), and ~GridWindow().

◆ m_pOrigYValues

double* GridWindow::m_pOrigYValues
private

Definition at line 85 of file grid.cxx.

Referenced by ChangeMode(), computeExtremes(), drawOriginal(), and Init().

◆ m_pXValues

double* GridWindow::m_pXValues
private

◆ npos

constexpr auto GridWindow::npos = std::numeric_limits<Handles::size_type>::max()
staticconstexprprivate

Definition at line 96 of file grid.cxx.

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


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