LibreOffice Module svx (master) 1
Public Member Functions | Public Attributes | List of all members
svx::FrameSelectorImpl Struct Reference

#include <frmselimpl.hxx>

Collaboration diagram for svx::FrameSelectorImpl:
[legend]

Public Member Functions

 FrameSelectorImpl (FrameSelector &rFrameSel)
 Pointers to accessibility objects for frame borders. More...
 
 ~FrameSelectorImpl ()
 
void Initialize (FrameSelFlags nFlags)
 Initializes the control, enables/disables frame borders according to flags. More...
 
void InitColors ()
 Fills all color members from current style settings. More...
 
void InitArrowImageList ()
 Creates the image list with selection arrows regarding current style settings. More...
 
void InitGlobalGeometry ()
 Initializes global coordinates. More...
 
void InitBorderGeometry ()
 Initializes coordinates of all frame borders. More...
 
void InitVirtualDevice ()
 Draws the entire control into the internal virtual device. More...
 
void sizeChanged ()
 call this to recalculate based on parent size More...
 
const FrameBorderGetBorder (FrameBorderType eBorder) const
 Returns the object representing the specified frame border. More...
 
FrameBorderGetBorderAccess (FrameBorderType eBorder)
 Returns the object representing the specified frame border (write access). More...
 
void DrawBackground ()
 Draws the background of the entire control (the gray areas between borders). More...
 
void DrawArrows (const FrameBorder &rBorder)
 Draws selection arrows for the specified frame border. More...
 
Color GetDrawLineColor (const Color &rColor) const
 Returns the color that has to be used to draw a frame border. More...
 
void DrawAllFrameBorders ()
 Draws all frame borders. More...
 
void DrawVirtualDevice ()
 Draws all contents of the control. More...
 
void CopyVirDevToControl (vcl::RenderContext &rRenderContext)
 Copies contents of the virtual device to the control. More...
 
void DrawAllTrackingRects (vcl::RenderContext &rRenderContext)
 Draws tracking rectangles for all selected frame borders. More...
 
Point GetDevPosFromMousePos (const Point &rMousePos) const
 Converts a mouse position to the virtual device position. More...
 
void DoInvalidate (bool bFullRepaint)
 Invalidates the control. More...
 
void SetBorderState (FrameBorder &rBorder, FrameBorderState eState)
 Sets the state of the specified frame border. More...
 
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. More...
 
void ToggleBorderState (FrameBorder &rBorder)
 Changes the state of a frame border after a control event (mouse/keyboard). More...
 
void SelectBorder (FrameBorder &rBorder, bool bSelect)
 Selects a frame border and schedules redraw. More...
 
void SilentGrabFocus ()
 Grabs focus without auto-selection of a frame border, if no border selected. More...
 
bool SelectedBordersEqual () const
 Returns true, if all selected frame borders are equal (or if nothing is selected). More...
 

Public Attributes

FrameSelectormrFrameSel
 
ScopedVclPtr< VirtualDevicempVirDev
 The control itself. More...
 
std::vector< ImagemaArrows
 For all buffered drawing operations. More...
 
Color maBackCol
 Arrows in current system colors. More...
 
Color maArrowCol
 Background color. More...
 
Color maMarkCol
 Selection arrow color. More...
 
Color maHCLineCol
 Selection marker color. More...
 
Point maVirDevPos
 High contrast line color. More...
 
FrameBorder maLeft
 Position of virtual device in the control. More...
 
FrameBorder maRight
 All data of left frame border. More...
 
FrameBorder maTop
 All data of right frame border. More...
 
FrameBorder maBottom
 All data of top frame border. More...
 
FrameBorder maHor
 All data of bottom frame border. More...
 
FrameBorder maVer
 All data of inner horizontal frame border. More...
 
FrameBorder maTLBR
 All data of inner vertical frame border. More...
 
FrameBorder maBLTR
 All data of top-left to bottom-right frame border. More...
 
editeng::SvxBorderLine maCurrStyle
 All data of bottom-left to top-right frame border. More...
 
frame::Array maArray
 Current style and color for new borders. More...
 
FrameSelFlags mnFlags
 Frame link array to draw an array of frame borders. More...
 
FrameBorderPtrVec maAllBorders
 Flags for enabled frame borders. More...
 
FrameBorderPtrVec maEnabBorders
 Pointers to all frame borders. More...
 
Link< LinkParamNone *, void > maSelectHdl
 Pointers to enables frame borders. More...
 
tools::Long mnCtrlSize
 Selection handler. More...
 
tools::Long mnArrowSize
 Size of the control (always square). More...
 
tools::Long mnLine1
 Size of an arrow image. More...
 
tools::Long mnLine2
 Middle of left/top frame borders. More...
 
tools::Long mnLine3
 Middle of inner frame borders. More...
 
tools::Long mnFocusOffs
 Middle of right/bottom frame borders. More...
 
bool mbHor
 Offset from frame border middle to draw focus. More...
 
bool mbVer
 true = Inner horizontal frame border enabled. More...
 
bool mbTLBR
 true = Inner vertical frame border enabled. More...
 
bool mbBLTR
 true = Top-left to bottom-right frame border enabled. More...
 
bool mbFullRepaint
 true = Bottom-left to top-right frame border enabled. More...
 
bool mbAutoSelect
 Used for repainting (false = only copy virtual device). More...
 
bool mbHCMode
 true = Auto select a frame border, if focus reaches control. More...
 
std::vector< rtl::Reference< a11y::AccFrameSelectorChild > > maChildVec
 true = High contrast mode. More...
 

Detailed Description

Definition at line 101 of file frmselimpl.hxx.

Constructor & Destructor Documentation

◆ FrameSelectorImpl()

svx::FrameSelectorImpl::FrameSelectorImpl ( FrameSelector rFrameSel)
explicit

◆ ~FrameSelectorImpl()

svx::FrameSelectorImpl::~FrameSelectorImpl ( )

Definition at line 273 of file frmsel.cxx.

References maChildVec.

Member Function Documentation

◆ CopyVirDevToControl()

void svx::FrameSelectorImpl::CopyVirDevToControl ( vcl::RenderContext rRenderContext)

Copies contents of the virtual device to the control.

Definition at line 715 of file frmsel.cxx.

References OutputDevice::DrawBitmapEx(), DrawVirtualDevice(), maVirDevPos, mbFullRepaint, and mpVirDev.

◆ DoInvalidate()

void svx::FrameSelectorImpl::DoInvalidate ( bool  bFullRepaint)

Invalidates the control.

Parameters
bFullRepainttrue = Full repaint; false = update selection only.

Definition at line 746 of file frmsel.cxx.

References weld::CustomWidgetController::Invalidate(), mbFullRepaint, and mrFrameSel.

Referenced by SelectBorder(), SetBorderCoreStyle(), SetBorderState(), and sizeChanged().

◆ DrawAllFrameBorders()

void svx::FrameSelectorImpl::DrawAllFrameBorders ( )

◆ DrawAllTrackingRects()

void svx::FrameSelectorImpl::DrawAllTrackingRects ( vcl::RenderContext rRenderContext)

◆ DrawArrows()

void svx::FrameSelectorImpl::DrawArrows ( const FrameBorder rBorder)

◆ DrawBackground()

void svx::FrameSelectorImpl::DrawBackground ( )

Draws the background of the entire control (the gray areas between borders).

Definition at line 550 of file frmsel.cxx.

References svx::FrameBorderIterBase< Cont, Iter, Pred >::Is(), maBackCol, maEnabBorders, maMarkCol, mnFocusOffs, mnLine1, mnLine3, mpVirDev, and tools::PolyPolygon::Optimize().

Referenced by DrawVirtualDevice().

◆ DrawVirtualDevice()

void svx::FrameSelectorImpl::DrawVirtualDevice ( )

Draws all contents of the control.

Definition at line 706 of file frmsel.cxx.

References DrawAllFrameBorders(), DrawArrows(), DrawBackground(), svx::FrameBorderIterBase< Cont, Iter, Pred >::Is(), maEnabBorders, and mbFullRepaint.

Referenced by CopyVirDevToControl().

◆ GetBorder()

const FrameBorder & svx::FrameSelectorImpl::GetBorder ( FrameBorderType  eBorder) const

Returns the object representing the specified frame border.

Definition at line 535 of file frmsel.cxx.

References svx::GetIndexFromFrameBorderType(), maAllBorders, maTop, nIndex, and SAL_WARN.

Referenced by GetBorderAccess(), and SetBorderState().

◆ GetBorderAccess()

FrameBorder & svx::FrameSelectorImpl::GetBorderAccess ( FrameBorderType  eBorder)

Returns the object representing the specified frame border (write access).

Definition at line 544 of file frmsel.cxx.

References GetBorder().

◆ GetDevPosFromMousePos()

Point svx::FrameSelectorImpl::GetDevPosFromMousePos ( const Point rMousePos) const

Converts a mouse position to the virtual device position.

Definition at line 741 of file frmsel.cxx.

References maVirDevPos.

◆ GetDrawLineColor()

Color svx::FrameSelectorImpl::GetDrawLineColor ( const Color rColor) const

Returns the color that has to be used to draw a frame border.

Definition at line 629 of file frmsel.cxx.

References Color::Invert(), maBackCol, maHCLineCol, and mbHCMode.

Referenced by DrawAllFrameBorders().

◆ InitArrowImageList()

void svx::FrameSelectorImpl::InitArrowImageList ( )

Creates the image list with selection arrows regarding current style settings.

Definition at line 333 of file frmsel.cxx.

References svx::aImageIds, i, maArrowCol, maArrows, maBackCol, maMarkCol, mnArrowSize, BitmapEx::Replace(), and SAL_N_ELEMENTS.

Referenced by InitVirtualDevice().

◆ InitBorderGeometry()

void svx::FrameSelectorImpl::InitBorderGeometry ( )

◆ InitColors()

void svx::FrameSelectorImpl::InitColors ( )

◆ InitGlobalGeometry()

void svx::FrameSelectorImpl::InitGlobalGeometry ( )

Initializes global coordinates.

Definition at line 359 of file frmsel.cxx.

References weld::CustomWidgetController::GetOutputSizePixel(), Size::Height(), maVirDevPos, mnArrowSize, mnCtrlSize, mpVirDev, mrFrameSel, and Size::Width().

Referenced by sizeChanged().

◆ Initialize()

void svx::FrameSelectorImpl::Initialize ( FrameSelFlags  nFlags)

Initializes the control, enables/disables frame borders according to flags.

Definition at line 283 of file frmsel.cxx.

References InitVirtualDevice(), svx::FrameBorderIterBase< Cont, Iter, Pred >::Is(), svx::FrameBorder::IsEnabled(), maAllBorders, maBLTR, maEnabBorders, maHor, maTLBR, maVer, mbBLTR, mbHor, mbTLBR, mbVer, and mnFlags.

Referenced by FrameSelectorImpl().

◆ InitVirtualDevice()

void svx::FrameSelectorImpl::InitVirtualDevice ( )

Draws the entire control into the internal virtual device.

Definition at line 516 of file frmsel.cxx.

References InitArrowImageList(), InitColors(), and sizeChanged().

Referenced by Initialize().

◆ SelectBorder()

void svx::FrameSelectorImpl::SelectBorder ( FrameBorder rBorder,
bool  bSelect 
)

Selects a frame border and schedules redraw.

Definition at line 807 of file frmsel.cxx.

References DBG_ASSERT, DoInvalidate(), DrawArrows(), svx::FrameBorder::IsEnabled(), and svx::FrameBorder::Select().

◆ SelectedBordersEqual()

bool svx::FrameSelectorImpl::SelectedBordersEqual ( ) const

Returns true, if all selected frame borders are equal (or if nothing is selected).

Definition at line 823 of file frmsel.cxx.

References svx::FrameBorderIterBase< Cont, Iter, Pred >::Is(), and maEnabBorders.

◆ SetBorderCoreStyle()

void svx::FrameSelectorImpl::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.

Definition at line 781 of file frmsel.cxx.

References DBG_ASSERT, DoInvalidate(), svx::FrameBorder::IsEnabled(), and svx::FrameBorder::SetCoreStyle().

Referenced by SetBorderState().

◆ SetBorderState()

void svx::FrameSelectorImpl::SetBorderState ( FrameBorder rBorder,
FrameBorderState  eState 
)

◆ SilentGrabFocus()

void svx::FrameSelectorImpl::SilentGrabFocus ( )

Grabs focus without auto-selection of a frame border, if no border selected.

Definition at line 815 of file frmsel.cxx.

References weld::CustomWidgetController::GrabFocus(), mbAutoSelect, and mrFrameSel.

◆ sizeChanged()

void svx::FrameSelectorImpl::sizeChanged ( )

call this to recalculate based on parent size

Definition at line 525 of file frmsel.cxx.

References DoInvalidate(), InitBorderGeometry(), and InitGlobalGeometry().

Referenced by InitVirtualDevice().

◆ ToggleBorderState()

void svx::FrameSelectorImpl::ToggleBorderState ( FrameBorder rBorder)

Changes the state of a frame border after a control event (mouse/keyboard).

Definition at line 788 of file frmsel.cxx.

References svx::DontCare, svx::FrameBorder::GetState(), svx::Hide, mrFrameSel, SetBorderState(), svx::Show, and svx::FrameSelector::SupportsDontCareState().

Member Data Documentation

◆ maAllBorders

FrameBorderPtrVec svx::FrameSelectorImpl::maAllBorders

Flags for enabled frame borders.

Definition at line 124 of file frmselimpl.hxx.

Referenced by FrameSelectorImpl(), GetBorder(), InitBorderGeometry(), and Initialize().

◆ maArray

frame::Array svx::FrameSelectorImpl::maArray

Current style and color for new borders.

Definition at line 121 of file frmselimpl.hxx.

Referenced by DrawAllFrameBorders(), and InitBorderGeometry().

◆ maArrowCol

Color svx::FrameSelectorImpl::maArrowCol

Background color.

Definition at line 107 of file frmselimpl.hxx.

Referenced by InitArrowImageList(), and InitColors().

◆ maArrows

std::vector<Image> svx::FrameSelectorImpl::maArrows

For all buffered drawing operations.

Definition at line 105 of file frmselimpl.hxx.

Referenced by DrawArrows(), and InitArrowImageList().

◆ maBackCol

Color svx::FrameSelectorImpl::maBackCol

Arrows in current system colors.

Definition at line 106 of file frmselimpl.hxx.

Referenced by DrawBackground(), GetDrawLineColor(), InitArrowImageList(), and InitColors().

◆ maBLTR

FrameBorder svx::FrameSelectorImpl::maBLTR

All data of top-left to bottom-right frame border.

Definition at line 119 of file frmselimpl.hxx.

Referenced by DrawAllFrameBorders(), FrameSelectorImpl(), InitBorderGeometry(), and Initialize().

◆ maBottom

FrameBorder svx::FrameSelectorImpl::maBottom

All data of top frame border.

Definition at line 115 of file frmselimpl.hxx.

Referenced by DrawAllFrameBorders(), FrameSelectorImpl(), and InitBorderGeometry().

◆ maChildVec

std::vector<rtl::Reference<a11y::AccFrameSelectorChild> > svx::FrameSelectorImpl::maChildVec

true = High contrast mode.

Definition at line 144 of file frmselimpl.hxx.

Referenced by SetBorderState(), and ~FrameSelectorImpl().

◆ maCurrStyle

editeng::SvxBorderLine svx::FrameSelectorImpl::maCurrStyle

All data of bottom-left to top-right frame border.

Definition at line 120 of file frmselimpl.hxx.

Referenced by SetBorderState().

◆ maEnabBorders

FrameBorderPtrVec svx::FrameSelectorImpl::maEnabBorders

Pointers to all frame borders.

Definition at line 125 of file frmselimpl.hxx.

Referenced by DrawAllFrameBorders(), DrawAllTrackingRects(), DrawBackground(), DrawVirtualDevice(), Initialize(), and SelectedBordersEqual().

◆ maHCLineCol

Color svx::FrameSelectorImpl::maHCLineCol

Selection marker color.

Definition at line 109 of file frmselimpl.hxx.

Referenced by GetDrawLineColor(), and InitColors().

◆ maHor

FrameBorder svx::FrameSelectorImpl::maHor

All data of bottom frame border.

Definition at line 116 of file frmselimpl.hxx.

Referenced by DrawAllFrameBorders(), FrameSelectorImpl(), InitBorderGeometry(), and Initialize().

◆ maLeft

FrameBorder svx::FrameSelectorImpl::maLeft

Position of virtual device in the control.

Definition at line 112 of file frmselimpl.hxx.

Referenced by DrawAllFrameBorders(), FrameSelectorImpl(), and InitBorderGeometry().

◆ maMarkCol

Color svx::FrameSelectorImpl::maMarkCol

Selection arrow color.

Definition at line 108 of file frmselimpl.hxx.

Referenced by DrawAllFrameBorders(), DrawBackground(), InitArrowImageList(), and InitColors().

◆ maRight

FrameBorder svx::FrameSelectorImpl::maRight

All data of left frame border.

Definition at line 113 of file frmselimpl.hxx.

Referenced by DrawAllFrameBorders(), FrameSelectorImpl(), and InitBorderGeometry().

◆ maSelectHdl

Link<LinkParamNone*,void> svx::FrameSelectorImpl::maSelectHdl

Pointers to enables frame borders.

Definition at line 126 of file frmselimpl.hxx.

◆ maTLBR

FrameBorder svx::FrameSelectorImpl::maTLBR

All data of inner vertical frame border.

Definition at line 118 of file frmselimpl.hxx.

Referenced by DrawAllFrameBorders(), FrameSelectorImpl(), InitBorderGeometry(), and Initialize().

◆ maTop

FrameBorder svx::FrameSelectorImpl::maTop

All data of right frame border.

Definition at line 114 of file frmselimpl.hxx.

Referenced by DrawAllFrameBorders(), FrameSelectorImpl(), GetBorder(), and InitBorderGeometry().

◆ maVer

FrameBorder svx::FrameSelectorImpl::maVer

All data of inner horizontal frame border.

Definition at line 117 of file frmselimpl.hxx.

Referenced by DrawAllFrameBorders(), FrameSelectorImpl(), InitBorderGeometry(), and Initialize().

◆ maVirDevPos

Point svx::FrameSelectorImpl::maVirDevPos

High contrast line color.

Definition at line 110 of file frmselimpl.hxx.

Referenced by CopyVirDevToControl(), DrawAllTrackingRects(), GetDevPosFromMousePos(), and InitGlobalGeometry().

◆ mbAutoSelect

bool svx::FrameSelectorImpl::mbAutoSelect

Used for repainting (false = only copy virtual device).

Definition at line 140 of file frmselimpl.hxx.

Referenced by SilentGrabFocus().

◆ mbBLTR

bool svx::FrameSelectorImpl::mbBLTR

true = Top-left to bottom-right frame border enabled.

Definition at line 138 of file frmselimpl.hxx.

Referenced by InitBorderGeometry(), and Initialize().

◆ mbFullRepaint

bool svx::FrameSelectorImpl::mbFullRepaint

true = Bottom-left to top-right frame border enabled.

Definition at line 139 of file frmselimpl.hxx.

Referenced by CopyVirDevToControl(), DoInvalidate(), and DrawVirtualDevice().

◆ mbHCMode

bool svx::FrameSelectorImpl::mbHCMode

true = Auto select a frame border, if focus reaches control.

Definition at line 141 of file frmselimpl.hxx.

Referenced by GetDrawLineColor(), and InitColors().

◆ mbHor

bool svx::FrameSelectorImpl::mbHor

Offset from frame border middle to draw focus.

Definition at line 135 of file frmselimpl.hxx.

Referenced by DrawAllFrameBorders(), InitBorderGeometry(), and Initialize().

◆ mbTLBR

bool svx::FrameSelectorImpl::mbTLBR

true = Inner vertical frame border enabled.

Definition at line 137 of file frmselimpl.hxx.

Referenced by InitBorderGeometry(), and Initialize().

◆ mbVer

bool svx::FrameSelectorImpl::mbVer

true = Inner horizontal frame border enabled.

Definition at line 136 of file frmselimpl.hxx.

Referenced by DrawAllFrameBorders(), InitBorderGeometry(), and Initialize().

◆ mnArrowSize

tools::Long svx::FrameSelectorImpl::mnArrowSize

Size of the control (always square).

Definition at line 129 of file frmselimpl.hxx.

Referenced by DrawArrows(), InitArrowImageList(), InitBorderGeometry(), and InitGlobalGeometry().

◆ mnCtrlSize

tools::Long svx::FrameSelectorImpl::mnCtrlSize

Selection handler.

Definition at line 128 of file frmselimpl.hxx.

Referenced by DrawArrows(), InitBorderGeometry(), and InitGlobalGeometry().

◆ mnFlags

FrameSelFlags svx::FrameSelectorImpl::mnFlags

Frame link array to draw an array of frame borders.

Definition at line 123 of file frmselimpl.hxx.

Referenced by FrameSelectorImpl(), and Initialize().

◆ mnFocusOffs

tools::Long svx::FrameSelectorImpl::mnFocusOffs

Middle of right/bottom frame borders.

Definition at line 133 of file frmselimpl.hxx.

Referenced by DrawBackground(), and InitBorderGeometry().

◆ mnLine1

tools::Long svx::FrameSelectorImpl::mnLine1

Size of an arrow image.

Definition at line 130 of file frmselimpl.hxx.

Referenced by DrawArrows(), DrawBackground(), and InitBorderGeometry().

◆ mnLine2

tools::Long svx::FrameSelectorImpl::mnLine2

Middle of left/top frame borders.

Definition at line 131 of file frmselimpl.hxx.

Referenced by DrawArrows(), and InitBorderGeometry().

◆ mnLine3

tools::Long svx::FrameSelectorImpl::mnLine3

Middle of inner frame borders.

Definition at line 132 of file frmselimpl.hxx.

Referenced by DrawArrows(), DrawBackground(), and InitBorderGeometry().

◆ mpVirDev

ScopedVclPtr<VirtualDevice> svx::FrameSelectorImpl::mpVirDev

◆ mrFrameSel

FrameSelector& svx::FrameSelectorImpl::mrFrameSel

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