LibreOffice Module svx (master) 1
|
#include <graphctl.hxx>
Public Member Functions | |
GraphCtrl (weld::Dialog *pDialog) | |
virtual void | SetDrawingArea (weld::DrawingArea *pDrawingArea) override |
virtual | ~GraphCtrl () override |
void | SetGraphic (const Graphic &rGraphic, bool bNewModel=true) |
const Graphic & | GetGraphic () const |
const Size & | GetGraphicSize () const |
const Point & | GetMousePos () const |
void | SetEditMode (const bool bEditMode) |
void | SetPolyEditMode (const sal_uInt16 nPolyEdit) |
sal_uInt16 | GetPolyEditMode () const |
void | SetObjKind (const SdrObjKind eObjKind) |
SdrModel * | GetSdrModel () const |
SdrView * | GetSdrView () const |
SdrObject * | GetSelectedSdrObject () const |
bool | IsChanged () const |
void | SetMousePosLink (const Link< GraphCtrl *, void > &rLink) |
void | SetGraphSizeLink (const Link< GraphCtrl *, void > &rLink) |
void | SetUpdateLink (const Link< GraphCtrl *, void > &rLink) |
void | QueueIdleUpdate () |
void | SetSdrMode (bool b) |
Point | GetPositionInDialog () const |
virtual css::uno::Reference< css::accessibility::XAccessible > | CreateAccessible () override |
Public Member Functions inherited from weld::CustomWidgetController | |
virtual css::uno::Reference< css::accessibility::XAccessible > | CreateAccessible () |
virtual void | Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)=0 |
virtual void | Resize () |
virtual bool | MouseButtonDown (const MouseEvent &) |
virtual bool | MouseMove (const MouseEvent &) |
virtual bool | MouseButtonUp (const MouseEvent &) |
virtual void | GetFocus () |
virtual void | LoseFocus () |
virtual void | StyleUpdated () |
virtual bool | Command (const CommandEvent &) |
virtual bool | KeyInput (const KeyEvent &) |
virtual tools::Rectangle | GetFocusRect () |
virtual FactoryFunction | GetUITestFactory () const |
virtual OUString | RequestHelp (tools::Rectangle &) |
virtual OUString | GetHelpText () const |
Size const & | GetOutputSizePixel () const |
void | SetOutputSizePixel (const Size &rSize) |
virtual void | SetDrawingArea (weld::DrawingArea *pDrawingArea) |
weld::DrawingArea * | GetDrawingArea () const |
void | Invalidate () |
void | Invalidate (const tools::Rectangle &rRect) |
virtual void | Show () |
virtual void | Hide () |
void | SetCursor (void *pData) |
void | GrabFocus () |
bool | HasFocus () const |
bool | HasChildFocus () const |
bool | IsVisible () const |
bool | IsReallyVisible () const |
bool | IsEnabled () const |
void | Enable () const |
void | Disable () const |
bool | IsActive () const |
int | GetTextHeight () const |
int | GetTextWidth (const OUString &rText) const |
OUString | GetAccessibleName () const |
OUString | GetAccessibleDescription () const |
void | CaptureMouse () |
bool | IsMouseCaptured () const |
Point | GetPointerPosPixel () const |
void | EnableRTL (bool bEnable) |
bool | IsRTLEnabled () const |
void | ReleaseMouse () |
void | SetPointer (PointerStyle ePointerStyle) |
void | SetHelpId (const OUString &rHelpId) |
void | SetAccessibleName (const OUString &rName) |
void | SetInputContext (const InputContext &rInputContext) |
void | SetCursorRect (const tools::Rectangle &rCursorRect, int nExtTextInputWidth) |
virtual int | GetSurroundingText (OUString &) |
virtual bool | DeleteSurroundingText (const Selection &) |
css::uno::Reference< css::datatransfer::dnd::XDropTarget > | GetDropTarget () |
css::uno::Reference< css::datatransfer::clipboard::XClipboard > | GetClipboard () const |
void | SetDragDataTransferable (rtl::Reference< TransferDataContainer > &rTransferable, sal_uInt8 eDNDConstants) |
virtual bool | StartDrag () |
void | set_size_request (int nWidth, int nHeight) |
void | queue_resize () |
CustomWidgetController () | |
virtual | ~CustomWidgetController () |
CustomWidgetController (CustomWidgetController const &)=default | |
CustomWidgetController (CustomWidgetController &&)=default | |
CustomWidgetController & | operator= (CustomWidgetController const &)=default |
CustomWidgetController & | operator= (CustomWidgetController &&)=default |
Protected Member Functions | |
virtual void | Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override |
virtual void | Resize () override |
virtual bool | KeyInput (const KeyEvent &rKEvt) override |
virtual bool | MouseButtonDown (const MouseEvent &rMEvt) override |
virtual bool | MouseButtonUp (const MouseEvent &rMEvt) override |
virtual bool | MouseMove (const MouseEvent &rMEvt) override |
virtual void | InitSdrModel () |
virtual void | SdrObjCreated (const SdrObject &rObj) |
virtual void | SdrObjChanged (const SdrObject &rObj) |
virtual void | MarkListHasChanged () |
void | GraphicToVD () |
SdrObjUserCall * | GetSdrUserCall () |
Protected Attributes | |
std::unique_ptr< SdrModel > | pModel |
std::unique_ptr< SdrView > | pView |
Private Member Functions | |
DECL_DLLPRIVATE_LINK (UpdateHdl, Timer *, void) | |
Private Attributes | |
Graphic | aGraphic |
ScopedVclPtrInstance< VirtualDevice > | xVD |
Idle | aUpdateIdle |
Link< GraphCtrl *, void > | aMousePosLink |
Link< GraphCtrl *, void > | aGraphSizeLink |
Link< GraphCtrl *, void > | aUpdateLink |
MapMode | aMap100 |
Size | aGraphSize |
Point | aMousePos |
std::unique_ptr< GraphCtrlUserCall > | pUserCall |
SdrObjKind | eObjKind |
sal_uInt16 | nPolyEdit |
bool | bEditMode |
bool | mbSdrMode |
bool | mbInIdleUpdate |
weld::Dialog * | mpDialog |
rtl::Reference< SvxGraphCtrlAccessibleContext > | mpAccContext |
Friends | |
class | GraphCtrlView |
class | GraphCtrlUserCall |
Additional Inherited Members | |
Static Public Member Functions inherited from weld::CustomWidgetController | |
static bool | IsUpdateMode () |
Definition at line 46 of file graphctl.hxx.
GraphCtrl::GraphCtrl | ( | weld::Dialog * | pDialog | ) |
Definition at line 53 of file graphctl.cxx.
References aUpdateIdle, GraphCtrlUserCall, LINK, Map100thMM, NONE, pUserCall, Timer::SetInvokeHandler(), Task::SetPriority(), and Idle::Start().
|
overridevirtual |
Definition at line 75 of file graphctl.cxx.
References aUpdateIdle, mpAccContext, pModel, pUserCall, pView, and Task::Stop().
|
overridevirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 837 of file graphctl.cxx.
References mpAccContext, pModel, and pView.
|
private |
|
inline |
Definition at line 101 of file graphctl.hxx.
Referenced by ContourWindow::Paint().
|
inline |
Definition at line 102 of file graphctl.hxx.
Referenced by IMapWindow::CreateObj(), IMapWindow::GetHitSdrObj(), ContourWindow::MouseButtonDown(), ContourWindow::MouseButtonUp(), ContourWindow::MouseMove(), ContourWindow::Paint(), and IMapWindow::RequestHelp().
|
inline |
Definition at line 104 of file graphctl.hxx.
|
inline |
Definition at line 109 of file graphctl.hxx.
Point GraphCtrl::GetPositionInDialog | ( | ) | const |
Definition at line 829 of file graphctl.cxx.
References weld::CustomWidgetController::GetDrawingArea(), mpDialog, x, and y.
Referenced by SvxGraphCtrlAccessibleContext::LogicToPixel().
|
inline |
Definition at line 113 of file graphctl.hxx.
Referenced by IMapWindow::ReplaceImageMap(), and SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext().
|
inlineprotected |
Definition at line 92 of file graphctl.hxx.
Referenced by IMapWindow::CreateObj().
|
inline |
Definition at line 114 of file graphctl.hxx.
Referenced by IMapWindow::ReplaceImageMap(), and SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext().
SdrObject * GraphCtrl::GetSelectedSdrObject | ( | ) | const |
Definition at line 690 of file graphctl.cxx.
References SdrMarkList::GetMark(), SdrMarkList::GetMarkCount(), SdrMark::GetMarkedSdrObj(), mbSdrMode, and pView.
Referenced by IMapWindow::Command(), IMapWindow::DoMacroAssign(), IMapWindow::DoPropertyDialog(), IMapWindow::ReplaceActualIMapInfo(), IMapWindow::SetCurrentObjState(), and IMapWindow::UpdateInfo().
|
protected |
Definition at line 178 of file graphctl.cxx.
References aGraphic, aGraphSize, Graphic::Draw(), weld::DrawingArea::get_ref_device(), OutputDevice::GetBackground(), weld::CustomWidgetController::GetDrawingArea(), weld::CustomWidgetController::GetOutputSizePixel(), Graphic::GetType(), and xVD.
Referenced by Paint().
|
protectedvirtual |
Reimplemented in ContourWindow, and IMapWindow.
Definition at line 112 of file graphctl.cxx.
References aGraphSize, aMap100, MapMode::GetMapUnit(), GraphCtrlView, mpAccContext, pModel, pView, and Symmetric.
Referenced by ContourWindow::InitSdrModel(), IMapWindow::InitSdrModel(), SetGraphic(), and SetSdrMode().
|
inline |
Definition at line 116 of file graphctl.hxx.
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 285 of file graphctl.cxx.
References a, tools::Rectangle::Bottom(), tools::Rectangle::Contains(), weld::DrawingArea::get_ref_device(), vcl::KeyCode::GetCode(), weld::CustomWidgetController::GetDrawingArea(), SdrHdlList::GetFocusHdl(), SdrHdlList::GetHdl(), SdrHdlList::GetHdlCount(), KeyEvent::GetKeyCode(), SdrHdl::GetKind(), SdrHdl::GetPointNum(), SdrHdl::GetPolyNum(), SdrHdl::GetPos(), Size::Height(), tools::Rectangle::IsEmpty(), vcl::KeyCode::IsMod1(), vcl::KeyCode::IsMod2(), SdrDragStat::IsNoSnap(), vcl::KeyCode::IsShift(), KEY_BACKSPACE, KEY_DELETE, KEY_DOWN, KEY_END, KEY_ESCAPE, KEY_F11, KEY_HOME, KEY_LEFT, KEY_RIGHT, KEY_SPACE, KEY_TAB, KEY_UP, tools::Rectangle::Left(), mbSdrMode, tools::Rectangle::Move(), OutputDevice::PixelToLogic(), Poly, pView, QueueIdleUpdate(), weld::CustomWidgetController::ReleaseMouse(), tools::Rectangle::Right(), tools::Rectangle::Top(), and Size::Width().
|
protectedvirtual |
Reimplemented in IMapWindow.
Definition at line 280 of file graphctl.cxx.
References QueueIdleUpdate().
Referenced by GraphCtrlView::MarkListHasChanged(), and IMapWindow::MarkListHasChanged().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Reimplemented in ContourWindow.
Definition at line 587 of file graphctl.cxx.
References aGraphSize, BUTTONDOWN, weld::DrawingArea::get_ref_device(), MouseEvent::GetClicks(), weld::CustomWidgetController::GetDrawingArea(), MouseEvent::GetPosPixel(), SdrObject::GetUserCall(), weld::CustomWidgetController::GrabFocus(), MouseEvent::IsMod1(), MarkedObject, mbSdrMode, weld::CustomWidgetController::MouseButtonDown(), nPolyEdit, OutputDevice::PixelToLogic(), pUserCall, pView, QueueIdleUpdate(), weld::CustomWidgetController::SetPointer(), and SdrObject::SetUserCall().
Referenced by ContourWindow::MouseButtonDown().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Reimplemented in ContourWindow, and IMapWindow.
Definition at line 668 of file graphctl.cxx.
References ForceEnd, weld::DrawingArea::get_ref_device(), weld::CustomWidgetController::GetDrawingArea(), MouseEvent::GetPosPixel(), mbSdrMode, weld::CustomWidgetController::MouseButtonUp(), OutputDevice::PixelToLogic(), pView, QueueIdleUpdate(), weld::CustomWidgetController::ReleaseMouse(), and weld::CustomWidgetController::SetPointer().
Referenced by ContourWindow::MouseButtonUp(), and IMapWindow::MouseButtonUp().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Reimplemented in ContourWindow.
Definition at line 632 of file graphctl.cxx.
References aGraphSize, aMousePos, aMousePosLink, Link< typename Arg, typename Ret >::Call(), weld::DrawingArea::get_ref_device(), weld::CustomWidgetController::GetDrawingArea(), MouseEvent::GetPosPixel(), Link< typename Arg, typename Ret >::IsSet(), mbSdrMode, weld::CustomWidgetController::MouseButtonUp(), nPolyEdit, OutputDevice::PixelToLogic(), pView, QueueIdleUpdate(), and weld::CustomWidgetController::SetPointer().
Referenced by ContourWindow::MouseMove().
|
overrideprotectedvirtual |
Implements weld::CustomWidgetController.
Reimplemented in ContourWindow.
Definition at line 232 of file graphctl.cxx.
References aGraphic, OutputDevice::DrawOutDev(), weld::DrawingArea::get_ref_device(), OutputDevice::GetBackground(), weld::CustomWidgetController::GetDrawingArea(), weld::CustomWidgetController::GetOutputSizePixel(), tools::Rectangle::GetSize(), SdrPaintWindow::GetTargetOutputDevice(), Graphic::GetType(), GraphicToVD(), mbSdrMode, pView, rTarget, SdrPaintWindow::SetOutputToWindow(), tools::Rectangle::TopLeft(), and xVD.
void GraphCtrl::QueueIdleUpdate | ( | ) |
Definition at line 755 of file graphctl.cxx.
References aUpdateIdle, mbInIdleUpdate, and Idle::Start().
Referenced by GraphCtrlUserCall::Changed(), KeyInput(), MarkListHasChanged(), MouseButtonDown(), MouseButtonUp(), MouseMove(), SdrObjChanged(), SdrObjCreated(), SetEditMode(), SetGraphic(), SetObjKind(), SetPolyEditMode(), and SetSdrMode().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 189 of file graphctl.cxx.
References aGraphSize, aMap100, Fraction, weld::DrawingArea::get_ref_device(), weld::CustomWidgetController::GetDrawingArea(), weld::CustomWidgetController::GetOutputSizePixel(), Size::Height(), weld::CustomWidgetController::Invalidate(), OutputDevice::LogicToLogic(), OutputDevice::PixelToLogic(), weld::CustomWidgetController::Resize(), Size::setHeight(), OutputDevice::SetMapMode(), MapMode::SetOrigin(), MapMode::SetScaleX(), MapMode::SetScaleY(), Size::setWidth(), Point::setX(), Point::setY(), Size::Width(), and xVD.
Referenced by SetGraphic().
|
protectedvirtual |
Reimplemented in IMapWindow.
Definition at line 270 of file graphctl.cxx.
References QueueIdleUpdate().
Referenced by GraphCtrlUserCall::Changed().
|
protectedvirtual |
Reimplemented in ContourWindow, and IMapWindow.
Definition at line 275 of file graphctl.cxx.
References QueueIdleUpdate().
Referenced by GraphCtrlUserCall::Changed().
|
overridevirtual |
Reimplemented from weld::CustomWidgetController.
Reimplemented in ContourWindow, and IMapWindow.
Definition at line 69 of file graphctl.cxx.
References weld::CustomWidgetController::EnableRTL(), and weld::CustomWidgetController::SetDrawingArea().
Referenced by ContourWindow::SetDrawingArea().
void GraphCtrl::SetEditMode | ( | const bool | bEditMode | ) |
Definition at line 705 of file graphctl.cxx.
References bEditMode, eObjKind, mbSdrMode, NONE, pView, and QueueIdleUpdate().
Referenced by ContourWindow::MouseButtonDown().
void GraphCtrl::SetGraphic | ( | const Graphic & | rGraphic, |
bool | bNewModel = true |
||
) |
Definition at line 157 of file graphctl.cxx.
References aGraphic, aGraphSize, aGraphSizeLink, aMap100, Link< typename Arg, typename Ret >::Call(), Application::GetDefaultDevice(), MapMode::GetMapUnit(), Graphic::GetPrefMapMode(), Graphic::GetPrefSize(), InitSdrModel(), weld::CustomWidgetController::Invalidate(), OutputDevice::LogicToLogic(), mbSdrMode, OutputDevice::PixelToLogic(), QueueIdleUpdate(), Resize(), and xVD.
Definition at line 120 of file graphctl.hxx.
Definition at line 118 of file graphctl.hxx.
void GraphCtrl::SetObjKind | ( | const SdrObjKind | eObjKind | ) |
Definition at line 733 of file graphctl.cxx.
References bEditMode, eObjKind, mbSdrMode, NONE, pView, and QueueIdleUpdate().
void GraphCtrl::SetPolyEditMode | ( | const sal_uInt16 | nPolyEdit | ) |
Definition at line 720 of file graphctl.cxx.
References mbSdrMode, nPolyEdit, pView, and QueueIdleUpdate().
void GraphCtrl::SetSdrMode | ( | bool | b | ) |
Definition at line 92 of file graphctl.cxx.
References aMap100, weld::DrawingArea::get_ref_device(), weld::CustomWidgetController::GetDrawingArea(), Application::GetSettings(), AllSettings::GetStyleSettings(), StyleSettings::GetWindowColor(), InitSdrModel(), mbSdrMode, pModel, pView, QueueIdleUpdate(), OutputDevice::SetBackground(), OutputDevice::SetMapMode(), and xVD.
Referenced by ContourWindow::SetDrawingArea(), and IMapWindow::SetDrawingArea().
Definition at line 122 of file graphctl.hxx.
|
friend |
Definition at line 49 of file graphctl.hxx.
Referenced by GraphCtrl().
|
friend |
Definition at line 48 of file graphctl.hxx.
Referenced by InitSdrModel().
|
private |
Definition at line 51 of file graphctl.hxx.
Referenced by GraphicToVD(), Paint(), and SetGraphic().
|
private |
Definition at line 58 of file graphctl.hxx.
Referenced by GraphicToVD(), InitSdrModel(), MouseButtonDown(), MouseMove(), Resize(), and SetGraphic().
Definition at line 55 of file graphctl.hxx.
Referenced by SetGraphic().
|
private |
Definition at line 57 of file graphctl.hxx.
Referenced by InitSdrModel(), Resize(), SetGraphic(), and SetSdrMode().
|
private |
Definition at line 59 of file graphctl.hxx.
Referenced by MouseMove().
Definition at line 54 of file graphctl.hxx.
Referenced by MouseMove().
|
private |
Definition at line 53 of file graphctl.hxx.
Referenced by GraphCtrl(), QueueIdleUpdate(), and ~GraphCtrl().
Definition at line 56 of file graphctl.hxx.
|
private |
Definition at line 63 of file graphctl.hxx.
Referenced by SetEditMode(), and SetObjKind().
|
private |
Definition at line 61 of file graphctl.hxx.
Referenced by SetEditMode(), and SetObjKind().
|
private |
Definition at line 65 of file graphctl.hxx.
Referenced by QueueIdleUpdate().
|
private |
Definition at line 64 of file graphctl.hxx.
Referenced by GetSelectedSdrObject(), KeyInput(), MouseButtonDown(), MouseButtonUp(), MouseMove(), Paint(), SetEditMode(), SetGraphic(), SetObjKind(), SetPolyEditMode(), and SetSdrMode().
|
private |
Definition at line 70 of file graphctl.hxx.
Referenced by CreateAccessible(), InitSdrModel(), and ~GraphCtrl().
|
private |
Definition at line 66 of file graphctl.hxx.
Referenced by GetPositionInDialog().
|
private |
Definition at line 62 of file graphctl.hxx.
Referenced by MouseButtonDown(), MouseMove(), and SetPolyEditMode().
|
protected |
Definition at line 74 of file graphctl.hxx.
Referenced by IMapWindow::Command(), CreateAccessible(), IMapWindow::CreateObj(), IMapWindow::DoMacroAssign(), IMapWindow::DoPropertyDialog(), IMapWindow::ExecuteDrop(), IMapWindow::GetHitSdrObj(), IMapWindow::GetImageMap(), ContourWindow::GetPolyPolygon(), InitSdrModel(), ContourWindow::InitSdrModel(), IMapWindow::InitSdrModel(), ContourWindow::IsContourChanged(), IMapWindow::ReplaceActualIMapInfo(), IMapWindow::SetCurrentObjState(), ContourWindow::SetPolyPolygon(), SetSdrMode(), IMapWindow::SetTargetList(), and ~GraphCtrl().
|
private |
Definition at line 60 of file graphctl.hxx.
Referenced by GraphCtrl(), MouseButtonDown(), and ~GraphCtrl().
|
protected |
Definition at line 75 of file graphctl.hxx.
Referenced by IMapWindow::Command(), CreateAccessible(), IMapWindow::ExecuteDrop(), GetSelectedSdrObject(), InitSdrModel(), ContourWindow::InitSdrModel(), IMapWindow::InitSdrModel(), KeyInput(), IMapWindow::MenuSelectHdl(), MouseButtonDown(), MouseButtonUp(), ContourWindow::MouseButtonUp(), MouseMove(), Paint(), ContourWindow::Paint(), IMapWindow::RequestHelp(), ContourWindow::SdrObjCreated(), IMapWindow::SetCurrentObjState(), SetEditMode(), SetObjKind(), SetPolyEditMode(), ContourWindow::SetPolyPolygon(), SetSdrMode(), and ~GraphCtrl().
|
private |
Definition at line 52 of file graphctl.hxx.
Referenced by GraphicToVD(), Paint(), Resize(), SetGraphic(), and SetSdrMode().