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 *, voidmaSelectHdl
 Pointers to enables frame borders. More...
 
long mnCtrlSize
 Selection handler. More...
 
long mnArrowSize
 Size of the control (always square). More...
 
long mnLine1
 Size of an arrow image. More...
 
long mnLine2
 Middle of left/top frame borders. More...
 
long mnLine3
 Middle of inner frame borders. More...
 
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

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

Definition at line 264 of file frmsel.cxx.

References maChildVec.

Member Function Documentation

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

Copies contents of the virtual device to the control.

Definition at line 704 of file frmsel.cxx.

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

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

Invalidates the control.

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

Definition at line 735 of file frmsel.cxx.

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

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

void svx::FrameSelectorImpl::DrawAllFrameBorders ( )
void svx::FrameSelectorImpl::DrawAllTrackingRects ( vcl::RenderContext rRenderContext)
void svx::FrameSelectorImpl::DrawArrows ( const FrameBorder rBorder)
void svx::FrameSelectorImpl::DrawBackground ( )

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

Definition at line 536 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().

void svx::FrameSelectorImpl::DrawVirtualDevice ( )

Draws all contents of the control.

Definition at line 695 of file frmsel.cxx.

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

Referenced by CopyVirDevToControl().

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

Returns the object representing the specified frame border.

Definition at line 521 of file frmsel.cxx.

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

Referenced by GetBorderAccess(), and SetBorderState().

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

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

Definition at line 530 of file frmsel.cxx.

References GetBorder().

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

Converts a mouse position to the virtual device position.

Definition at line 730 of file frmsel.cxx.

References maVirDevPos.

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

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

Definition at line 615 of file frmsel.cxx.

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

Referenced by DrawAllFrameBorders().

void svx::FrameSelectorImpl::InitArrowImageList ( )

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

Definition at line 322 of file frmsel.cxx.

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

Referenced by InitVirtualDevice().

void svx::FrameSelectorImpl::InitBorderGeometry ( )
void svx::FrameSelectorImpl::InitColors ( )
void svx::FrameSelectorImpl::InitGlobalGeometry ( )

Initializes global coordinates.

Definition at line 348 of file frmsel.cxx.

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

Referenced by sizeChanged().

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

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

Definition at line 273 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().

void svx::FrameSelectorImpl::InitVirtualDevice ( )

Draws the entire control into the internal virtual device.

Definition at line 502 of file frmsel.cxx.

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

Referenced by Initialize().

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

Selects a frame border and schedules redraw.

Definition at line 789 of file frmsel.cxx.

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

bool svx::FrameSelectorImpl::SelectedBordersEqual ( ) const

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

Definition at line 805 of file frmsel.cxx.

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

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 763 of file frmsel.cxx.

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

Referenced by SetBorderState().

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

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

Definition at line 797 of file frmsel.cxx.

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

void svx::FrameSelectorImpl::sizeChanged ( )

call this to recalculate based on parent size

Definition at line 511 of file frmsel.cxx.

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

Referenced by InitVirtualDevice().

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

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

Definition at line 770 of file frmsel.cxx.

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

Member Data Documentation

FrameBorderPtrVec svx::FrameSelectorImpl::maAllBorders

Flags for enabled frame borders.

Definition at line 124 of file frmselimpl.hxx.

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

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().

Color svx::FrameSelectorImpl::maArrowCol

Background color.

Definition at line 107 of file frmselimpl.hxx.

Referenced by InitArrowImageList(), and InitColors().

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

For all buffered drawing operations.

Definition at line 105 of file frmselimpl.hxx.

Referenced by DrawArrows(), and InitArrowImageList().

Color svx::FrameSelectorImpl::maBackCol

Arrows in current system colors.

Definition at line 106 of file frmselimpl.hxx.

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

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().

FrameBorder svx::FrameSelectorImpl::maBottom

All data of top frame border.

Definition at line 115 of file frmselimpl.hxx.

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

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().

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().

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().

Color svx::FrameSelectorImpl::maHCLineCol

Selection marker color.

Definition at line 109 of file frmselimpl.hxx.

Referenced by GetDrawLineColor(), and InitColors().

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().

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().

Color svx::FrameSelectorImpl::maMarkCol

Selection arrow color.

Definition at line 108 of file frmselimpl.hxx.

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

FrameBorder svx::FrameSelectorImpl::maRight

All data of left frame border.

Definition at line 113 of file frmselimpl.hxx.

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

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

Pointers to enables frame borders.

Definition at line 126 of file frmselimpl.hxx.

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().

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().

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().

Point svx::FrameSelectorImpl::maVirDevPos

High contrast line color.

Definition at line 110 of file frmselimpl.hxx.

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

bool svx::FrameSelectorImpl::mbAutoSelect

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

Definition at line 140 of file frmselimpl.hxx.

Referenced by SilentGrabFocus().

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().

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().

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().

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().

bool svx::FrameSelectorImpl::mbTLBR

true = Inner vertical frame border enabled.

Definition at line 137 of file frmselimpl.hxx.

Referenced by InitBorderGeometry(), and Initialize().

bool svx::FrameSelectorImpl::mbVer

true = Inner horizontal frame border enabled.

Definition at line 136 of file frmselimpl.hxx.

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

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().

long svx::FrameSelectorImpl::mnCtrlSize

Selection handler.

Definition at line 128 of file frmselimpl.hxx.

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

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().

long svx::FrameSelectorImpl::mnFocusOffs

Middle of right/bottom frame borders.

Definition at line 133 of file frmselimpl.hxx.

Referenced by DrawBackground(), and InitBorderGeometry().

long svx::FrameSelectorImpl::mnLine1

Size of an arrow image.

Definition at line 130 of file frmselimpl.hxx.

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

long svx::FrameSelectorImpl::mnLine2

Middle of left/top frame borders.

Definition at line 131 of file frmselimpl.hxx.

Referenced by DrawArrows(), and InitBorderGeometry().

long svx::FrameSelectorImpl::mnLine3

Middle of inner frame borders.

Definition at line 132 of file frmselimpl.hxx.

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

ScopedVclPtr<VirtualDevice> svx::FrameSelectorImpl::mpVirDev
FrameSelector& svx::FrameSelectorImpl::mrFrameSel

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