20 #ifndef INCLUDED_SVX_SOURCE_INC_FRMSELIMPL_HXX
21 #define INCLUDED_SVX_SOURCE_INC_FRMSELIMPL_HXX
33 class AccFrameSelector;
34 class AccFrameSelectorChild;
143 std::vector<rtl::Reference<a11y::AccFrameSelectorChild>>
237 template<
typename Cont,
typename Iter,
typename Pred >
void MergeFocusToPolyPolygon(tools::PolyPolygon &rPPoly) const
static double GetDefaultPatternScale()
Cont::value_type value_type
FrameBorderIterBase< FrameBorderPtrVec, FrameBorderPtrVec::iterator, FrameBorderSelected_Pred > SelFrameBorderIter
Iterator for mutable svx::FrameBorder containers, iterates over selected borders. ...
FrameBorderPtrVec maAllBorders
Flags for enabled frame borders.
bool mbAutoSelect
Used for repainting (false = only copy virtual device).
std::vector< FrameBorder * > FrameBorderPtrVec
bool operator()(const FrameBorder *pBorder) const
const frame::Style & GetUIStyle() const
FrameBorderPtrVec maEnabBorders
Pointers to all frame borders.
void InitGlobalGeometry()
Initializes global coordinates.
Color maHCLineCol
Selection marker color.
void DrawBackground()
Draws the background of the entire control (the gray areas between borders).
Color maBackCol
Arrows in current system colors.
void SetBorderCoreStyle(FrameBorder &rBorder, const editeng::SvxBorderLine *pStyle)
Sets the core style of the specified frame border, or hides the frame border, if pStyle is 0...
Predicate for frame border iterators to use only selected borders in a container. ...
Dummy predicate for frame border iterators to use all borders in a container.
ScopedVclPtr< VirtualDevice > mpVirDev
The control itself.
void InitBorderGeometry()
Initializes coordinates of all frame borders.
editeng::SvxBorderLine maCurrStyle
All data of bottom-left to top-right frame border.
void Initialize(FrameSelFlags nFlags)
Initializes the control, enables/disables frame borders according to flags.
const editeng::SvxBorderLine & GetCoreStyle() const
Color maMarkCol
Selection arrow color.
FrameBorderIterBase< const FrameBorderPtrVec, FrameBorderPtrVec::const_iterator, FrameBorderDummy_Pred > FrameBorderCIter
Iterator for constant svx::FrameBorder containers, iterates over all borders.
FrameBorderType meKeyLeft
Internal style to draw lines.
bool mbFullRepaint
true = Bottom-left to top-right frame border enabled.
void CopyVirDevToControl(vcl::RenderContext &rRenderContext)
Copies contents of the virtual device to the control.
bool mbEnabled
Mouse click areas.
FrameBorderIterBase< FrameBorderPtrVec, FrameBorderPtrVec::iterator, FrameBorderVisible_Pred > VisFrameBorderIter
Iterator for mutable svx::FrameBorder containers, iterates over visible borders.
Point maVirDevPos
High contrast line color.
void sizeChanged()
call this to recalculate based on parent size
value_type operator*() const
void SetKeyboardNeighbors(FrameBorderType eLeft, FrameBorderType eRight, FrameBorderType eTop, FrameBorderType eBottom)
FrameBorderIterBase< Cont, Iter, Pred > this_type
tools::Long mnArrowSize
Size of the control (always square).
FrameBorderState meState
Frame border type (position in control).
FrameBorderType meKeyBottom
Upper neighbor for keyboard control.
void ToggleBorderState(FrameBorder &rBorder)
Changes the state of a frame border after a control event (mouse/keyboard).
bool mbBLTR
true = Top-left to bottom-right frame border enabled.
tools::Long mnLine3
Middle of inner frame borders.
void SetUIColorPrim(const Color &rColor)
FrameBorderState
All possible states of a frame border.
const FrameBorderType meType
tools::Long mnLine1
Size of an arrow image.
tools::Rectangle GetClickBoundRect() const
frame::Style maUIStyle
Core style from application.
void SetCoreStyle(const editeng::SvxBorderLine *pStyle)
tools::Long mnLine2
Middle of left/top frame borders.
void DrawAllFrameBorders()
Draws all frame borders.
FrameBorderState GetState() const
const FrameBorder & GetBorder(FrameBorderType eBorder) const
Returns the object representing the specified frame border.
void Enable(FrameSelFlags nFlags)
Predicate for frame border iterators to use only visible borders in a container.
FrameBorderIterBase< FrameBorderPtrVec, FrameBorderPtrVec::iterator, FrameBorderDummy_Pred > FrameBorderIter
Iterator for mutable svx::FrameBorder containers, iterates over all borders.
FrameBorder maTLBR
All data of inner vertical frame border.
Color GetDrawLineColor(const Color &rColor) const
Returns the color that has to be used to draw a frame border.
FrameBorder maBLTR
All data of top-left to bottom-right frame border.
void InitColors()
Fills all color members from current style settings.
void AddClickRect(const tools::Rectangle &rRect)
bool operator()(const FrameBorder *pBorder) const
void InitArrowImageList()
Creates the image list with selection arrows regarding current style settings.
void AddFocusPolygon(const tools::Polygon &rFocus)
tools::PolyPolygon maFocusArea
Lower neighbor for keyboard control.
Template class for all types of frame border iterators.
std::vector< rtl::Reference< a11y::AccFrameSelectorChild > > maChildVec
true = High contrast mode.
editeng::SvxBorderLine maCoreStyle
Frame border state (on/off/don't care).
tools::PolyPolygon maClickArea
Focus drawing areas.
FrameBorderIterBase< const FrameBorderPtrVec, FrameBorderPtrVec::const_iterator, FrameBorderVisible_Pred > VisFrameBorderCIter
Iterator for constant svx::FrameBorder containers, iterates over visible borders. ...
void SetColorSecn(const Color &rColor)
std::vector< Image > maArrows
For all buffered drawing operations.
Link< LinkParamNone *, void > maSelectHdl
Pointers to enables frame borders.
FrameBorderType
Enumerates all borders a frame selection control can contain.
FrameBorderType GetType() const
bool ContainsClickPoint(const Point &rPos) const
bool mbTLBR
true = Inner vertical frame border enabled.
bool mbSelected
true = Border enabled in control.
FrameBorderType meKeyRight
Left neighbor for keyboard control.
void SilentGrabFocus()
Grabs focus without auto-selection of a frame border, if no border selected.
void DoInvalidate(bool bFullRepaint)
Invalidates the control.
bool operator()(const FrameBorder *) const
FrameBorderIterBase< const FrameBorderPtrVec, FrameBorderPtrVec::const_iterator, FrameBorderSelected_Pred > SelFrameBorderCIter
Iterator for constant svx::FrameBorder containers, iterates over selected borders.
FrameBorderType GetKeyboardNeighbor(sal_uInt16 nKeyCode) const
void DrawVirtualDevice()
Draws all contents of the control.
FrameSelectorImpl(FrameSelector &rFrameSel)
Pointers to accessibility objects for frame borders.
frame::Array maArray
Current style and color for new borders.
tools::Long mnCtrlSize
Selection handler.
FrameSelector & mrFrameSel
void Select(bool bSelect)
bool SelectedBordersEqual() const
Returns true, if all selected frame borders are equal (or if nothing is selected).
void SelectBorder(FrameBorder &rBorder, bool bSelect)
Selects a frame border and schedules redraw.
FrameBorderIterBase(container_type &rCont)
FrameBorder maRight
All data of left frame border.
void SetState(FrameBorderState eState)
FrameBorder maVer
All data of inner horizontal frame border.
bool mbVer
true = Inner horizontal frame border enabled.
FrameBorderType meKeyTop
Right neighbor for keyboard control.
void DrawArrows(const FrameBorder &rBorder)
Draws selection arrows for the specified frame border.
Contains the widths of primary and secondary line of a frame style.
void InitVirtualDevice()
Draws the entire control into the internal virtual device.
tools::Long mnFocusOffs
Middle of right/bottom frame borders.
Point GetDevPosFromMousePos(const Point &rMousePos) const
Converts a mouse position to the virtual device position.
void SetBorderState(FrameBorder &rBorder, FrameBorderState eState)
Sets the state of the specified frame border.
void SetColorPrim(const Color &rColor)
Sets a new color, does not modify other settings.
FrameSelFlags mnFlags
Frame link array to draw an array of frame borders.
FrameBorder maTop
All data of right frame border.
Stores frame styles of an array of cells, supports merged ranges.
bool mbHor
Offset from frame border middle to draw focus.
Color maArrowCol
Background color.
void DrawAllTrackingRects(vcl::RenderContext &rRenderContext)
Draws tracking rectangles for all selected frame borders.
FrameBorder & GetBorderAccess(FrameBorderType eBorder)
Returns the object representing the specified frame border (write access).
bool mbHCMode
true = Auto select a frame border, if focus reaches control.
void SetUIColorSecn(const Color &rColor)
FrameBorder maHor
All data of bottom frame border.
FrameBorder maLeft
Position of virtual device in the control.
FrameBorder(FrameBorderType eType)
FrameBorder maBottom
All data of top frame border.