77 void MoveCursor( sal_Int32 nPos,
bool bScroll =
true );
105 void MoveSplit( sal_Int32 nPos, sal_Int32 nNewPos );
120 virtual void Resize()
override;
178 virtual css::uno::Reference<css::accessibility::XAccessible>
CreateAccessible()
override;
Accessible base class used for CSV controls.
Base class for the CSV ruler and the data grid control.
A ruler control for the CSV import dialog.
void ImplDrawArea(sal_Int32 nPosX, sal_Int32 nWidth)
Draws the background and active area to maBackgrDev (only the given X range).
sal_Int32 mnPosCursorLast
Old state for cancellation.
void MoveCursor(sal_Int32 nPos, bool bScroll=true)
Moves cursor to a new position.
void UpdateSplitSize()
Update the split size depending on the last width set by CSVCMD_SETCHARWIDTH.
void MoveMouseTracking(sal_Int32 nPos)
Moves tracking to a new position.
virtual void StyleUpdated() override
void EndMouseTracking()
Applies tracking action for the current tracking position.
ScCsvSplits maOldSplits
Vector with split positions.
void ApplyLayout(const ScCsvLayoutData &rOldData)
Apply current layout data to the ruler.
sal_Int32 GetSplitPos(sal_uInt32 nIndex) const
Returns the position of the specified split.
sal_Int32 FindEmptyPos(sal_Int32 nPos, ScMoveMode eDir) const
Finds next position without a split.
sal_Int32 mnPosMTCurr
Start position of mouse tracking.
void StartMouseTracking(sal_Int32 nPos)
Starts tracking at the specified position.
void ScrollVertRel(ScMoveMode eDir)
Scrolls data grid vertically.
sal_uInt32 GetSplitCount() const
Returns the number of splits.
bool HasSplit(sal_Int32 nPos) const
Returns true if at position nPos is a split.
virtual void GetFocus() override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
sal_Int32 GetWidth() const
Returns the width of the control.
sal_Int32 mnPosMTStart
Last valid position of cursor.
void ImplDrawRulerDev()
Draws the ruler background, all splits and the cursor to maRulerDev.
virtual tools::Rectangle GetFocusRect() override
tools::Rectangle maActiveRect
Size of the control.
ScopedVclPtrInstance< VirtualDevice > maRulerDev
Ruler background, scaling.
Color maTextColor
Color for active part of ruler.
virtual ~ScCsvRuler() override
void ImplDrawSplit(sal_Int32 nPos)
Draws a split to maRulerDev.
ScopedVclPtrInstance< VirtualDevice > maBackgrDev
Grid Parent.
Color maSplitColor
Text and scale color.
virtual bool KeyInput(const KeyEvent &rKEvt) override
void MoveCurrSplitRel(ScMoveMode eDir)
Moves split and cursor to the given direction and commits event.
void MoveCursorToSplit(ScMoveMode eDir)
Sets cursor to an existing split, according to eDir.
void ImplRedraw(vcl::RenderContext &rRenderContext)
Redraws the entire ruler.
Size maWinSize
Tracking: Anytime moved to another position?
void RemoveSplit(sal_Int32 nPos)
Removes a split.
void InitColors()
Reads colors from system settings.
ScCsvRuler(const ScCsvLayoutData &rData, ScCsvTableBox *pTableBox)
If currently mouse tracking.
bool mbTracking
Size of a split circle.
virtual bool MouseMove(const MouseEvent &rMEvt) override
void RemoveAllSplits()
Removes all splits of the ruler.
ScCsvTableBox * GetTableBox()
Color maActiveColor
Background color.
sal_Int32 mnSplitSize
The active area of the ruler.
const ScCsvSplits & GetSplits() const
Returns the split array.
Color maBackColor
Ruler with splits and cursor.
sal_Int32 GetHeight() const
Returns the height of the control.
void InsertSplit(sal_Int32 nPos)
Inserts a split.
ScCsvTableBox * mpTableBox
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
Creates a new accessible object.
virtual void LoseFocus() override
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
void ImplEraseSplit(sal_Int32 nPos)
Erases a split from maRulerDev.
void MoveCurrSplit(sal_Int32 nNewPos)
Moves split and cursor to nNewPos and commits event.
void ImplInvertCursor(sal_Int32 nPos)
Inverts the cursor bar at the specified position in maRulerDev.
sal_Int32 GetNoScrollPos(sal_Int32 nPos) const
Finds a position nearest to nPos which does not cause scrolling the visible area.
void ImplDrawBackgrDev()
Draws the entire ruler background with scaling to maBackgrDev.
void MoveCursorRel(ScMoveMode eDir)
Moves cursor to the given direction.
void MoveSplit(sal_Int32 nPos, sal_Int32 nNewPos)
Moves a split from nPos to nNewPos.
void InitSizeData()
Initializes all data dependent from the control's size.
bool mbPosMTMoved
Current position of mouse tracking.
virtual void Resize() override
ScCsvSplits maSplits
Split area color.
void ImplSetMousePointer(sal_Int32 nPos)
Sets arrow or horizontal split pointer.
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
A vector of column splits that supports inserting, removing and moving splits.
sal_uInt32 Count() const
Returns the number of splits.
bool HasSplit(sal_Int32 nPos) const
Returns true if at position nPos is a split.
The control in the CSV import dialog that contains a ruler and a data grid to visualize and modify th...
constexpr tools::Long Height() const
constexpr tools::Long Width() const
ScMoveMode
Specifies which element should be used to perform an action.
A structure containing all layout data valid for both ruler and data grid (i.e.