20#include <config_wasm_strip.h>
30#include <svx/svxids.hrc>
54 : aUpdateIdle(
"svx GraphCtrl Update")
60 , mbInIdleUpdate(false)
79#if !ENABLE_WASM_STRIP_ACCESSIBILITY
124 pModel->GetItemPool().FreezeIdRanges();
126 pModel->SetDefaultFontHeight( 500 );
131 pPage->SetBorder( 0, 0, 0, 0 );
132 pModel->InsertPage( pPage.get() );
133 pModel->SetChanged(
false );
138 pView->EnableExtendedMouseEventDispatcher(
true );
139 pView->ShowSdrPage(
pView->GetModel().GetPage(0));
140 pView->SetFrameDragSingles();
142 pView->SetEditMode();
145 pView->SetPagePaintingAllowed(
false);
146 pView->SetBufferedOutputAllowed(
true);
147 pView->SetBufferedOverlayAllowed(
true);
149#if !ENABLE_WASM_STRIP_ACCESSIBILITY
159 xVD->SetOutputSizePixel(
Size(0, 0));
202 double fWinWH =
static_cast<double>(nWidth) / nHeight;
205 if ( fGrfWH < fWinWH)
216 aNewPos.setX( ( nWidth - aNewSize.
Width() ) >> 1 );
217 aNewPos.setY( ( nHeight - aNewSize.
Height() ) >> 1 );
225 xVD->SetMapMode( aDisplayMap );
257 pView->DoCompleteRedraw(*pPaintWindow, aRepaintRegion);
258 pView->EndCompleteRedraw(*pPaintWindow,
true);
298 pView->DeleteMarked();
308 if (
pView->IsAction() )
313 else if (
pView->AreObjectsMarked() )
315 pView->UnmarkAllObj();
329 bool bForward = !aCode.
IsShift();
331 if ( !
pView->MarkNextObj( bForward ))
335 pView->UnmarkAllObj();
336 pView->MarkNextObj (bForward);
344 bool bForward(!aCode.
IsShift());
346 const_cast<SdrHdlList&
>(rHdlList).TravelFocusHdl(bForward);
360 pView->UnmarkAllObj();
361 pView->MarkNextObj();
372 pView->UnmarkAllObj();
373 pView->MarkNextObj(
true);
419 nX *= aLogicSizeOnePixel.
Width();
420 nY *= aLogicSizeOnePixel.
Height();
441 aMarkRect.
Move(nX, nY);
445 if(aMarkRect.
Left() < rWorkArea.
Left())
447 nX += rWorkArea.
Left() - aMarkRect.
Left();
455 if(aMarkRect.
Top() < rWorkArea.
Top())
457 nY += rWorkArea.
Top() - aMarkRect.
Top();
468 if(0 != nX || 0 != nY)
484 pView->BegDragObj(aStartPoint,
nullptr, pHdl, 0);
486 if(
pView->IsDragObj())
488 bool bWasNoSnap = rDragStat.
IsNoSnap();
489 bool bWasSnapEnabled =
pView->IsSnapEnabled();
495 pView->SetSnapEnabled(
false);
497 pView->MovAction(aEndPoint);
502 const_cast<SdrDragStat&
>(rDragStat).SetNoSnap(bWasNoSnap);
504 pView->SetSnapEnabled(bWasSnapEnabled);
527 if(
pView->IsPointMarked(*pHdl))
531 pView->UnmarkPoint(*pHdl);
538 pView->UnmarkAllPoints();
541 pView->MarkPoint(*pHdl);
547 SdrHdl* pNewOne =
nullptr;
564 const_cast<SdrHdlList&
>(rHdlList).SetFocusHdl(pNewOne);
609 pView->MouseButtonDown( rMEvt, &rDevice );
612 pView->MouseButtonDown( rMEvt, &rDevice );
638 pView->MouseMove( rMEvt, &rDevice );
640 if( ( SID_BEZIER_INSERT ==
nPolyEdit ) &&
641 !
pView->PickHandle( aLogPos ) &&
642 !
pView->IsInsObjPoint() )
673 if (
pView->IsInsObjPoint() )
676 pView->MouseButtonUp( rMEvt, &rDevice );
749 mbInIdleUpdate =
true;
750 aUpdateLink.Call(
this );
751 mbInIdleUpdate =
false;
768 : OverlayManager(rDevice)
769 , m_rGraphCtrl(rGraphCtrl)
777 m_rGraphCtrl.Invalidate(aInvalidateRectangle);
789 return xOverlayManager;
821 for (sal_uInt32 nWinNum(0); nWinNum < nWindowCount; nWinNum++)
830 int x,
y, width, height;
838#if !ENABLE_WASM_STRIP_ACCESSIBILITY
const StyleSettings & GetStyleSettings() const
static OutputDevice * GetDefaultDevice()
static const AllSettings & GetSettings()
virtual void Changed(const SdrObject &rObj, SdrUserCallType eType, const tools::Rectangle &rOldBoundRect) override
virtual void InvalidateOneWin(OutputDevice &rWin) override
If the View should not call Invalidate() on the windows, override the following 2 methods and do some...
virtual rtl::Reference< sdr::overlay::OverlayManager > CreateOverlayManager(OutputDevice &rDevice) const override
virtual ~GraphCtrlView() override
SdrObject * GetSelectedSdrObject() const
ScopedVclPtrInstance< VirtualDevice > xVD
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
friend class GraphCtrlUserCall
std::unique_ptr< GraphCtrlUserCall > pUserCall
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
virtual void Resize() override
virtual bool KeyInput(const KeyEvent &rKEvt) override
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
void SetPolyEditMode(const sal_uInt16 nPolyEdit)
virtual ~GraphCtrl() override
std::unique_ptr< SdrView > pView
Point GetPositionInDialog() const
GraphCtrl(weld::Dialog *pDialog)
std::unique_ptr< SdrModel > pModel
void SetEditMode(const bool bEditMode)
virtual void MarkListHasChanged()
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
virtual void SdrObjChanged(const SdrObject &rObj)
Link< GraphCtrl *, void > aMousePosLink
void SetGraphic(const Graphic &rGraphic, bool bNewModel=true)
Link< GraphCtrl *, void > aGraphSizeLink
virtual bool MouseMove(const MouseEvent &rMEvt) override
void SetObjKind(const SdrObjKind eObjKind)
virtual void InitSdrModel()
rtl::Reference< SvxGraphCtrlAccessibleContext > mpAccContext
virtual void SdrObjCreated(const SdrObject &rObj)
friend class GraphCtrlView
GraphicType GetType() const
MapMode GetPrefMapMode() const
void Draw(OutputDevice &rOutDev, const Point &rDestPt) const
virtual void Start(bool bStartTimer=true) override
const vcl::KeyCode & GetKeyCode() const
void SetOrigin(const Point &rOrigin)
void SetScaleY(const Fraction &rScaleY)
MapUnit GetMapUnit() const
void SetScaleX(const Fraction &rScaleX)
sal_uInt16 GetClicks() const
const Point & GetPosPixel() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
const Wallpaper & GetBackground() const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
SAL_DLLPRIVATE void DrawOutDev(const Point &, const Size &, const Point &, const Size &, const Printer &)=delete
OutDevType GetOutDevType() const
size_t GetHdlCount() const
SdrHdl * GetFocusHdl() const
SdrHdl * GetHdl(size_t nNum) const
SdrHdlKind GetKind() const
sal_uInt32 GetPolyNum() const
const Point & GetPos() const
sal_uInt32 GetPointNum() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
SdrObject * GetMarkedSdrObj() const
SdrObjUserCall * GetUserCall() const
void SetUserCall(SdrObjUserCall *pUser)
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
SdrPaintWindow * GetPaintWindow(sal_uInt32 nIndex) const
virtual rtl::Reference< sdr::overlay::OverlayManager > CreateOverlayManager(OutputDevice &rDevice) const
virtual void InvalidateOneWin(OutputDevice &rWin)
If the View should not call Invalidate() on the windows, override the following 2 methods and do some...
sal_uInt32 PaintWindowCount() const
static void InitOverlayManager(rtl::Reference< sdr::overlay::OverlayManager > xOverlayManager)
OutputDevice & GetTargetOutputDevice()
void SetOutputToWindow(bool bOutputToWindow)
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetWindowColor() const
void SetPriority(TaskPriority ePriority)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
tools::Rectangle RangeToInvalidateRectangle(const basegfx::B2DRange &rRange) const
virtual void invalidateRange(const basegfx::B2DRange &rRange)
sal_uInt16 GetCode() const
virtual OutputDevice & get_ref_device()=0
IMPL_LINK_NOARG(GraphCtrl, UpdateHdl, Timer *, void)
constexpr sal_uInt16 KEY_ESCAPE
constexpr sal_uInt16 KEY_HOME
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DELETE
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_SPACE
constexpr sal_uInt16 KEY_F11
constexpr sal_uInt16 KEY_BACKSPACE
constexpr sal_uInt16 KEY_END
#define LINK(Instance, Class, Member)