LibreOffice Module sw (master) 1
|
#include <drawbase.hxx>
Public Member Functions | |
SwDrawBase (SwWrtShell *pSh, SwEditWin *pWin, SwView *pView) | |
virtual | ~SwDrawBase () |
void | SetDrawPointer () |
void | EnterSelectMode (const MouseEvent &rMEvt) |
bool | IsInsertForm () const |
bool | IsCreateObj () const |
bool | MouseMove (const MouseEvent &rMEvt) |
virtual bool | MouseButtonUp (const MouseEvent &rMEvt) |
virtual bool | MouseButtonDown (const MouseEvent &rMEvt) |
void | BreakCreate () |
void | SetSlotId (sal_uInt16 nSlot) |
sal_uInt16 | GetSlotId () const |
virtual void | Activate (const sal_uInt16 nSlotId) |
virtual void | Deactivate () |
virtual void | CreateDefaultObject () |
virtual void | CreateDefaultObjectAtPosWithSize (Point aPos, Size aSize) |
virtual bool | doConstructOrthogonal () const |
Protected Member Functions | |
Point | GetDefaultCenterPos () const |
Protected Attributes | |
SwView * | m_pView |
SwWrtShell * | m_pSh |
VclPtr< SwEditWin > | m_pWin |
Point | m_aStartPos |
sal_uInt16 | m_nSlotId |
bool | m_bCreateObj:1 |
bool | m_bInsForm:1 |
Definition at line 32 of file drawbase.hxx.
SwDrawBase::SwDrawBase | ( | SwWrtShell * | pSh, |
SwEditWin * | pWin, | ||
SwView * | pView | ||
) |
Definition at line 44 of file drawbase.cxx.
References SwViewShell::HasDrawView(), m_pSh, and SwViewShell::MakeDrawView().
|
virtual |
Definition at line 56 of file drawbase.cxx.
References SwViewShell::GetDrawView(), SwView::GetWrtShellPtr(), m_pSh, m_pView, and SdrCreateView::SetEditMode().
|
virtual |
Reimplemented in ConstArc, ConstCustomShape, ConstFormControl, ConstPolygon, ConstRectangle, and DrawSelection.
Definition at line 432 of file drawbase.cxx.
References SwViewShell::GetDrawView(), m_pSh, m_pWin, SwWrtShell::NoEdit(), SdrCreateView::SetCurrentObj(), SetDrawPointer(), SdrCreateView::SetEditMode(), and SetSlotId().
Referenced by ConstArc::Activate(), ConstCustomShape::Activate(), ConstFormControl::Activate(), ConstPolygon::Activate(), ConstRectangle::Activate(), DrawSelection::Activate(), and SwEditWin::StdDrawMode().
void SwDrawBase::BreakCreate | ( | ) |
Definition at line 469 of file drawbase.cxx.
References SwFEShell::BreakCreate(), Deactivate(), m_pSh, and m_pWin.
Referenced by SwView::Execute(), SwBezierShell::Execute(), SwSpellDialogChildWindow::MakeTextSelection_Impl(), and SwEditWin::MouseButtonUp().
|
virtual |
Reimplemented in ConstCustomShape, and ConstFormControl.
Definition at line 517 of file drawbase.cxx.
References Point::AdjustX(), Point::AdjustY(), o3tl::cm, SwFEShell::CreateDefaultShape(), GetDefaultCenterPos(), m_nSlotId, m_pSh, m_pWin, and o3tl::toTwips().
Referenced by ConstCustomShape::CreateDefaultObject().
Reimplemented in ConstCustomShape.
Definition at line 531 of file drawbase.cxx.
References Point::AdjustX(), Point::AdjustY(), SwFEShell::CreateDefaultShape(), SwView::GetDrawView(), Size::getHeight(), SdrPaintView::GetSdrPageView(), SdrSnapView::GetSnapPos(), Size::getWidth(), SdrSnapView::IsSnapEnabled(), m_nSlotId, m_pSh, m_pView, and m_pWin.
Referenced by ConstCustomShape::CreateDefaultObjectAtPosWithSize(), and MouseButtonUp().
|
virtual |
Reimplemented in ConstArc.
Definition at line 444 of file drawbase.cxx.
References SwFEShell::BreakCreate(), g_bNoInterrupt, SfxViewFrame::GetBindings(), SwViewShell::GetDrawView(), SwWrtShell::GetView(), SfxViewShell::GetViewFrame(), SfxBindings::Invalidate(), SwFEShell::IsDrawCreate(), m_pSh, m_pWin, SdrSnapView::SetAngleSnapEnabled(), and SdrSnapView::SetOrtho().
Referenced by BreakCreate(), ConstArc::Deactivate(), SwWrtShell::DelRight(), SwEditWin::EnterDrawTextMode(), SwView::ExecDraw(), SwDrawBaseShell::Execute(), SwView::ExitDraw(), SwEditWin::KeyInput(), SwEditWin::MouseButtonDown(), SwEditWin::MouseButtonUp(), SwView::Notify(), SwEditWin::SelectMenuPosition(), and SwEditWin::StopInsFrame().
|
virtual |
Reimplemented in ConstCustomShape.
Definition at line 571 of file drawbase.cxx.
References m_nSlotId.
Referenced by MouseButtonDown(), and MouseMove().
void SwDrawBase::EnterSelectMode | ( | const MouseEvent & | rMEvt | ) |
Definition at line 489 of file drawbase.cxx.
References SfxViewFrame::GetBindings(), MouseEvent::GetModifier(), MouseEvent::GetPosPixel(), SwWrtShell::GetView(), SfxViewShell::GetViewFrame(), SfxBindings::Invalidate(), SwFEShell::IsObjSelectable(), SwFEShell::IsObjSelected(), SwWrtShell::IsSelFrameMode(), KEY_SHIFT, SwView::LeaveDrawCreate(), SwWrtShell::LeaveSelFrameMode(), m_pSh, m_pView, m_pWin, SwView::NoRotate(), and SwFEShell::SelectObj().
Referenced by MouseButtonUp(), and ConstPolygon::MouseButtonUp().
|
protected |
Definition at line 546 of file drawbase.cxx.
References SwRect::Center(), SwViewShell::GetDocSize(), SwViewShell::getLOKVisibleArea(), SwViewOption::GetViewLayoutColumns(), SwViewShell::GetViewOptions(), Size::Height(), SwRect::Height(), SwRect::Intersection(), comphelper::LibreOfficeKit::isActive(), SwRect::Left(), m_pSh, Point::setX(), Point::setY(), SwRect::Top(), SwViewShell::VisArea(), Size::Width(), and SwRect::Width().
Referenced by CreateDefaultObject(), and ConstFormControl::CreateDefaultObject().
|
inline |
|
inline |
Definition at line 51 of file drawbase.hxx.
References m_bCreateObj.
Referenced by MouseButtonDown(), MouseButtonUp(), and MouseMove().
|
inline |
Definition at line 50 of file drawbase.hxx.
References m_bInsForm.
Referenced by SwView::IsFormMode(), and SwEditWin::UpdatePointer().
|
virtual |
Reimplemented in ConstArc, ConstCustomShape, ConstFormControl, and ConstRectangle.
Definition at line 62 of file drawbase.cxx.
References SdrDragView::BegDragObj(), SwFEShell::BeginCreate(), SwFEShell::BeginMark(), SdrDragView::BegInsObjPoint(), SdrMarkView::BegMarkPoints(), doConstructOrthogonal(), SwWrtShell::EnterSelFrameMode(), g_bNoInterrupt, SwViewShell::GetDrawView(), SdrHdl::GetKind(), MouseEvent::GetPosPixel(), SdrMarkView::HasMarkablePoints(), SdrCreateView::IsAction(), IsCreateObj(), SwFEShell::IsDrawCreate(), MouseEvent::IsLeft(), MouseEvent::IsMod1(), MouseEvent::IsMod2(), SwFEShell::IsObjSelectable(), SwFEShell::IsObjSelected(), SdrMarkView::IsPointMarked(), SwWrtShell::IsSelFrameMode(), MouseEvent::IsShift(), SwViewShell::IsViewLocked(), SwViewShell::LockView(), LONG_MAX, m_aStartPos, m_pSh, m_pWin, SdrMarkView::MarkPoint(), SdrViewEvent::mpHdl, SdrView::PickAnything(), SdrMarkView::PickHandle(), SwFEShell::SelectObj(), SdrSnapView::SetAngleSnapEnabled(), SdrCreateView::SetCreate1stPointAsCenter(), SetDrawPointer(), SdrSnapView::SetOrtho(), SdrDragView::SetResizeAtCenter(), SdrMarkView::UnmarkAllPoints(), and SdrMarkView::UnmarkPoint().
Referenced by SwEditWin::EnterDrawMode(), ConstArc::MouseButtonDown(), ConstCustomShape::MouseButtonDown(), ConstFormControl::MouseButtonDown(), and ConstRectangle::MouseButtonDown().
|
virtual |
!!!!!!!!! Attention suicide !!!!!!!!!!! Everything should be renewed once
Reimplemented in ConstArc, ConstPolygon, and ConstRectangle.
Definition at line 239 of file drawbase.cxx.
References SwRewriter::AddRule(), SfxRequest::AppendItem(), SwView::AutoCaption(), SwWrtShell::AutoUpdateFrame(), SwFEShell::BreakCreate(), CreateDefaultObjectAtPosWithSize(), SfxRequest::Done(), SdrCreateView::EndAction(), SwFEShell::EndCreate(), SdrDragView::EndInsObjPoint(), SwFEShell::EndMark(), SdrMarkView::EndMarkPoints(), SwEditShell::EndUndo(), EnterSelectMode(), FN_INSERT_FRAME, FRAME_CAP, SfxItemSet::Get(), SwFEShell::GetAnchorObjDiff(), SfxViewFrame::GetBindings(), SwViewShell::GetDrawView(), SwFormatCol::GetGutterWidth(), SwFEShell::GetObjSize(), SfxShell::GetPool(), MouseEvent::GetPosPixel(), SfxBindings::GetRecorder(), SwFEShell::GetSelectedFrameFormat(), SwWrtShell::GetView(), SfxViewShell::GetViewFrame(), SwFormatCol::GetWishWidth(), SdrMarkView::HasMarkablePoints(), SwFormatCol::Init(), INSERT, SfxBindings::Invalidate(), SdrCreateView::IsAction(), SwFormat::IsAutoUpdateOnDirectFormat(), IsCreateObj(), SwFEShell::IsDrawCreate(), SdrDragView::IsInsObjPoint(), MouseEvent::IsLeft(), SdrMarkView::IsMarkObj(), SdrMarkView::IsMarkPoints(), SwFEShell::IsObjSelectable(), SwFEShell::IsObjSelected(), MouseEvent::IsRight(), SwWrtShell::IsSelFrameMode(), MouseEvent::IsShift(), SwView::LeaveDrawCreate(), SwWrtShell::LeaveSelFrameMode(), LONG_MAX, m_aStartPos, m_pSh, m_pView, m_pWin, SwView::NoRotate(), SfxItemSet::Put(), RES_COL(), SwFEShell::SelectObj(), SetDrawPointer(), SwFEShell::SetFlyFrameAttr(), SwEditShell::StartUndo(), SW_ADD_SELECT, SwResId(), UndoArg1, and SdrMarkView::UnmarkAllPoints().
Referenced by ConstArc::MouseButtonUp(), ConstPolygon::MouseButtonUp(), ConstRectangle::MouseButtonUp(), and SwEditWin::MouseButtonUp().
bool SwDrawBase::MouseMove | ( | const MouseEvent & | rMEvt | ) |
Definition at line 215 of file drawbase.cxx.
References doConstructOrthogonal(), SwViewShell::GetDrawView(), MouseEvent::GetPosPixel(), SdrCreateView::IsAction(), SdrCreateView::IsCreateObj(), IsCreateObj(), SdrDragView::IsInsObjPoint(), SdrMarkView::IsMarkPoints(), MouseEvent::IsShift(), m_pSh, m_pWin, SwFEShell::MoveCreate(), SwFEShell::MoveMark(), SdrSnapView::SetAngleSnapEnabled(), and SdrSnapView::SetOrtho().
Referenced by SwEditWin::MouseMove().
void SwDrawBase::SetDrawPointer | ( | ) |
Definition at line 478 of file drawbase.cxx.
References SwViewShell::GetDrawView(), SwViewShell::GetOut(), SdrView::GetPreferredPointer(), m_pSh, and m_pWin.
Referenced by Activate(), MouseButtonDown(), and MouseButtonUp().
|
inline |
|
protected |
Definition at line 38 of file drawbase.hxx.
Referenced by MouseButtonDown(), ConstFormControl::MouseButtonDown(), and MouseButtonUp().
|
protected |
Definition at line 40 of file drawbase.hxx.
Referenced by DrawSelection::DrawSelection(), and IsCreateObj().
|
protected |
Definition at line 41 of file drawbase.hxx.
Referenced by ConstFormControl::ConstFormControl(), and IsInsertForm().
|
protected |
Definition at line 39 of file drawbase.hxx.
Referenced by CreateDefaultObject(), CreateDefaultObjectAtPosWithSize(), doConstructOrthogonal(), GetSlotId(), ConstRectangle::MouseButtonDown(), and SetSlotId().
|
protected |
Definition at line 36 of file drawbase.hxx.
Referenced by Activate(), ConstFormControl::Activate(), DrawSelection::Activate(), BreakCreate(), CreateDefaultObject(), ConstCustomShape::CreateDefaultObject(), ConstFormControl::CreateDefaultObject(), CreateDefaultObjectAtPosWithSize(), ConstCustomShape::CreateDefaultObjectAtPosWithSize(), Deactivate(), EnterSelectMode(), GetDefaultCenterPos(), MouseButtonDown(), ConstCustomShape::MouseButtonDown(), ConstFormControl::MouseButtonDown(), ConstRectangle::MouseButtonDown(), MouseButtonUp(), ConstArc::MouseButtonUp(), ConstPolygon::MouseButtonUp(), ConstRectangle::MouseButtonUp(), MouseMove(), SetDrawPointer(), SwDrawBase(), and ~SwDrawBase().
|
protected |
Definition at line 35 of file drawbase.hxx.
Referenced by CreateDefaultObjectAtPosWithSize(), EnterSelectMode(), ConstCustomShape::MouseButtonDown(), ConstRectangle::MouseButtonDown(), MouseButtonUp(), ConstRectangle::MouseButtonUp(), and ~SwDrawBase().
Definition at line 37 of file drawbase.hxx.
Referenced by Activate(), ConstArc::Activate(), ConstCustomShape::Activate(), ConstFormControl::Activate(), ConstPolygon::Activate(), ConstRectangle::Activate(), DrawSelection::Activate(), BreakCreate(), CreateDefaultObject(), ConstFormControl::CreateDefaultObject(), CreateDefaultObjectAtPosWithSize(), Deactivate(), EnterSelectMode(), MouseButtonDown(), ConstArc::MouseButtonDown(), ConstFormControl::MouseButtonDown(), ConstRectangle::MouseButtonDown(), MouseButtonUp(), ConstArc::MouseButtonUp(), ConstPolygon::MouseButtonUp(), ConstRectangle::MouseButtonUp(), MouseMove(), and SetDrawPointer().