LibreOffice Module sw (master) 1
|
SwSelPaintRects is a base class of SwShellCursor, which stores the overlay for the cursor/selection: a list of rectangles to be painted as an overlay. More...
#include <viscrs.hxx>
Public Member Functions | |
SwSelPaintRects (const SwCursorShell &rCSh) | |
virtual | ~SwSelPaintRects () |
virtual void | FillRects ()=0 |
virtual void | FillStartEnd (SwRect &rStart, SwRect &rEnd) const =0 |
Fill rStart and rEnd with a rectangle that represents the start and end for selection handles. More... | |
void | swapContent (SwSelPaintRects &rSwap) |
void | Show (std::vector< OString > *pSelectionRectangles=nullptr) |
void | Hide () |
void | Invalidate (const SwRect &rRect) |
void | SetShowTextInputFieldOverlay (const bool bShow) |
void | SetShowContentControlOverlay (const bool bShow) |
const VclPtr< SwContentControlButton > & | GetContentControlButton () const |
const SwCursorShell * | GetShell () const |
std::optional< OString > | getLOKPayload (int nType, int nViewId) const |
Static Public Member Functions | |
static void | Get1PixelInLogic (const SwViewShell &rSh, tools::Long *pX=nullptr, tools::Long *pY=nullptr) |
Private Member Functions | |
void | HighlightInputField () |
void | HighlightContentControl () |
Private Attributes | |
const SwCursorShell * | m_pCursorShell |
bool | m_bShowTextInputFieldOverlay |
std::unique_ptr< sw::overlay::OverlayRangesOutline > | m_pTextInputFieldOverlay |
bool | m_bShowContentControlOverlay |
std::unique_ptr< sw::overlay::OverlayRangesOutline > | m_pContentControlOverlay |
VclPtr< SwContentControlButton > | m_pContentControlButton |
Static Private Attributes | |
static tools::Long | s_nPixPtX = 0 |
static tools::Long | s_nPixPtY = 0 |
static MapMode * | s_pMapMode = nullptr |
Friends | |
void | InitCore () |
void | FinitCore () |
SwSelPaintRects is a base class of SwShellCursor, which stores the overlay for the cursor/selection: a list of rectangles to be painted as an overlay.
It is also capable of painting other overlays as needed (text input, content control).
Definition at line 79 of file viscrs.hxx.
SwSelPaintRects::SwSelPaintRects | ( | const SwCursorShell & | rCSh | ) |
Definition at line 355 of file viscrs.cxx.
References if().
|
virtual |
Definition at line 364 of file viscrs.cxx.
References VclPtr< class reference_type >::disposeAndClear(), Hide(), and m_pContentControlButton.
|
pure virtual |
Implemented in SwShellCursor, and SwShellTableCursor.
Referenced by Show().
Fill rStart and rEnd with a rectangle that represents the start and end for selection handles.
Implemented in SwShellCursor, and SwShellTableCursor.
Referenced by getLOKPayload(), and Show().
|
static |
Definition at line 879 of file viscrs.cxx.
References MapMode::GetMapUnit(), SwViewShell::GetOut(), vcl::Window::GetOutDev(), MapMode::GetScaleX(), MapMode::GetScaleY(), SwViewShell::GetWin(), Size::Height(), pOut, s_nPixPtX, s_nPixPtY, s_pMapMode, and Size::Width().
Referenced by SwWrtShell::CalcAndSetScale(), and Invalidate().
const VclPtr< SwContentControlButton > & SwSelPaintRects::GetContentControlButton | ( | ) | const |
Definition at line 841 of file viscrs.cxx.
References m_pContentControlButton.
Referenced by SwEditWin::KeyInput().
Definition at line 520 of file viscrs.cxx.
References FillStartEnd(), GetShell(), SwRect::HasArea(), i, comphelper::string::join(), SfxLokHelper::makePayloadJSON(), nType, size, SwRect::SVRect(), and tools::Rectangle::toString().
Referenced by SwWrtShell::getLOKPayload().
|
inline |
Definition at line 127 of file viscrs.hxx.
References m_pCursorShell.
Referenced by SwShellTableCursor::Contains(), SwShellCursor::Create(), SwShellCursor::FillRects(), SwShellTableCursor::FillRects(), SwShellCursor::FillStartEnd(), getLOKPayload(), HighlightContentControl(), HighlightInputField(), Invalidate(), SwShellCursor::IsAtValidPos(), SwShellCursor::IsReadOnlyAvailable(), SwShellCursor::MaxReplaceArived(), SwShellCursor::SaveTableBoxContent(), SwShellCursor::Show(), Show(), and SwShellCursor::UpDown().
void SwSelPaintRects::Hide | ( | ) |
Definition at line 384 of file viscrs.cxx.
References m_pContentControlOverlay, and m_pTextInputFieldOverlay.
Referenced by ~SwSelPaintRects().
|
private |
Definition at line 634 of file viscrs.cxx.
References tools::Rectangle::Bottom(), ContentControl, VclPtr< class reference_type >::Create(), Color::DecreaseLuminance(), VclPtr< class reference_type >::disposeAndClear(), SwTextAttr::End(), tools::JsonWriter::finishAndGetAsOString(), SwIterator< TElementType, TSource, eMode >::First(), SwFormatContentControl::GetContentControl(), SwTextAttr::GetContentControl(), SwPosition::GetContentIndex(), SwCursorShell::GetCursor(), SwViewShell::GetDrawView(), SvtOptionsDrawinglayer::getHilightColor(), SwPosition::GetNode(), SdrPaintWindow::GetOverlayManager(), SdrPaintView::GetPaintWindow(), SwViewShell::GetSfxViewShell(), GetShell(), SwTextAttr::GetStart(), SwTextNode::GetTextAttrAt(), SwNode::GetTextNode(), SwFrameControlsManager::HideControls(), comphelper::LibreOfficeKit::isActive(), SwFrame::IsRightToLeft(), comphelper::string::join(), tools::Rectangle::Left(), SfxViewShell::libreOfficeKitViewCallback(), m_bShowContentControlOverlay, m_pContentControlButton, m_pContentControlOverlay, sw::Parent, tools::JsonWriter::put(), tools::JsonWriter::putSimpleValue(), RES_TXTATR_CONTENTCONTROL(), tools::Rectangle::Right(), SwFrameControlsManager::SetContentControlAliasButton(), SwPaM::Start(), tools::JsonWriter::startArray(), tools::Rectangle::Top(), SwRect::TopLeft(), and tools::Rectangle::toString().
Referenced by Show().
|
private |
Definition at line 575 of file viscrs.cxx.
References tools::Rectangle::Bottom(), Color::DecreaseLuminance(), SwTextAttr::End(), sw::Expand, SwViewShell::GetDrawView(), SvtOptionsDrawinglayer::getHilightColor(), SdrPaintWindow::GetOverlayManager(), SdrPaintView::GetPaintWindow(), SwTextField::GetpTextNode(), GetShell(), SwTextAttr::GetStart(), SwCursorShell::GetTextFieldAtPos(), tools::Rectangle::Left(), m_bShowTextInputFieldOverlay, m_pTextInputFieldOverlay, tools::Rectangle::Right(), Start, and tools::Rectangle::Top().
Referenced by Show().
void SwSelPaintRects::Invalidate | ( | const SwRect & | rRect | ) |
Definition at line 846 of file viscrs.cxx.
References SwRect::AddBottom(), SwRect::AddRight(), begin, SwRect::Bottom(), end, Get1PixelInLogic(), GetShell(), SwRect::Right(), s_nPixPtX, s_nPixPtY, and size.
|
inline |
Definition at line 123 of file viscrs.hxx.
References m_bShowContentControlOverlay.
Referenced by SwCursorShell::HideCursor(), and SwCursorShell::ShowCursor().
|
inline |
Definition at line 118 of file viscrs.hxx.
References m_bShowTextInputFieldOverlay.
Referenced by SwCursorShell::HideCursor(), and SwCursorShell::ShowCursor().
void SwSelPaintRects::Show | ( | std::vector< OString > * | pSelectionRectangles = nullptr | ) |
Definition at line 422 of file viscrs.cxx.
References a, tools::Rectangle::Bottom(), FillRects(), FillStartEnd(), SwViewShell::GetDrawView(), SvtOptionsDrawinglayer::getHilightColor(), SdrPaintWindow::GetOverlayManager(), SdrPaintView::GetPaintWindow(), GetShell(), SdrObjEditView::GetTextEditObject(), SwRect::HasArea(), HighlightContentControl(), HighlightInputField(), i, comphelper::LibreOfficeKit::isActive(), comphelper::string::join(), tools::Rectangle::Left(), m_pCursorShell, SfxLokHelper::notifyOtherViewsUpdatePerViewId(), SfxLokHelper::notifyUpdate(), SdrPaintView::PaintWindowCount(), tools::Rectangle::Right(), size, SwRect::SVRect(), tools::Rectangle::Top(), tools::Rectangle::toString(), and sdr::overlay::Transparent.
void SwSelPaintRects::swapContent | ( | SwSelPaintRects & | rSwap | ) |
Definition at line 370 of file viscrs.cxx.
References m_bShowContentControlOverlay, m_bShowTextInputFieldOverlay, m_pContentControlOverlay, and m_pTextInputFieldOverlay.
Referenced by SwCursorShell::CreateCursor().
|
private |
Definition at line 95 of file viscrs.hxx.
Referenced by HighlightContentControl(), SetShowContentControlOverlay(), and swapContent().
|
private |
Definition at line 93 of file viscrs.hxx.
Referenced by HighlightInputField(), SetShowTextInputFieldOverlay(), and swapContent().
|
private |
Definition at line 97 of file viscrs.hxx.
Referenced by GetContentControlButton(), HighlightContentControl(), and ~SwSelPaintRects().
|
private |
Definition at line 96 of file viscrs.hxx.
Referenced by Hide(), HighlightContentControl(), and swapContent().
|
private |
Definition at line 87 of file viscrs.hxx.
Referenced by GetShell(), and Show().
|
private |
Definition at line 94 of file viscrs.hxx.
Referenced by Hide(), HighlightInputField(), and swapContent().
|
staticprivate |
Definition at line 84 of file viscrs.hxx.
Referenced by Get1PixelInLogic(), and Invalidate().
|
staticprivate |
Definition at line 84 of file viscrs.hxx.
Referenced by Get1PixelInLogic(), and Invalidate().
|
staticprivate |
Definition at line 85 of file viscrs.hxx.
Referenced by Get1PixelInLogic().