LibreOffice Module svx (master) 1
|
#include <dlgctl3d.hxx>
Public Member Functions | |
Svx3DLightControl () | |
virtual void | SetDrawingArea (weld::DrawingArea *pDrawingArea) override |
virtual void | Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override |
virtual tools::Rectangle | GetFocusRect () override |
virtual bool | MouseButtonDown (const MouseEvent &rMEvt) override |
virtual bool | MouseMove (const MouseEvent &rMEvt) override |
virtual bool | MouseButtonUp (const MouseEvent &rMEvt) override |
virtual void | Resize () override |
virtual void | SetObjectType (SvxPreviewObjectType nType) override |
void | SetChangeCallback (Link< Svx3DLightControl *, void > aNew) |
void | SetSelectionChangeCallback (Link< Svx3DLightControl *, void > aNew) |
bool | IsSelectionValid () |
bool | IsGeometrySelected () const |
void | GetPosition (double &rHor, double &rVer) |
void | SetPosition (double fHor, double fVer) |
void | SetRotation (double fRotX, double fRotY, double fRotZ) |
void | GetRotation (double &rRotX, double &rRotY, double &rRotZ) |
void | SelectLight (sal_uInt32 nLightNumber) |
virtual void | Set3DAttributes (const SfxItemSet &rAttr) override |
sal_uInt32 | GetSelectedLight () const |
bool | GetLightOnOff (sal_uInt32 nNum) const |
Color | GetLightColor (sal_uInt32 nNum) const |
basegfx::B3DVector | GetLightDirection (sal_uInt32 nNum) const |
Public Member Functions inherited from Svx3DPreviewControl | |
Svx3DPreviewControl () | |
virtual void | SetDrawingArea (weld::DrawingArea *pDrawingArea) override |
virtual | ~Svx3DPreviewControl () override |
virtual void | Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override |
virtual bool | MouseButtonDown (const MouseEvent &rMEvt) override |
virtual void | Resize () override |
virtual void | SetObjectType (SvxPreviewObjectType nType) |
SvxPreviewObjectType | GetObjectType () const |
SfxItemSet const & | Get3DAttributes () const |
virtual void | Set3DAttributes (const SfxItemSet &rAttr) |
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 |
Private Member Functions | |
void | Construct2 () |
void | ConstructLightObjects () |
void | AdaptToSelectedLight () |
void | TrySelection (Point aPosPixel) |
Private Attributes | |
Link< Svx3DLightControl *, void > | maChangeCallback |
Link< Svx3DLightControl *, void > | maSelectionChangeCallback |
sal_uInt32 | maSelectedLight |
rtl::Reference< E3dObject > | mpExpansionObject |
rtl::Reference< E3dObject > | mpLampBottomObject |
rtl::Reference< E3dObject > | mpLampShaftObject |
std::vector< E3dObject * > | maLightObjects |
double | mfRotateX |
double | mfRotateY |
double | mfRotateZ |
Point | maActionStartPoint |
double | mfSaveActionStartHor |
double | mfSaveActionStartVer |
double | mfSaveActionStartRotZ |
bool | mbMouseMoved: 1 |
bool | mbMouseCaptured: 1 |
bool | mbGeometrySelected: 1 |
Additional Inherited Members | |
Static Public Member Functions inherited from weld::CustomWidgetController | |
static bool | IsUpdateMode () |
Protected Member Functions inherited from Svx3DPreviewControl | |
void | Construct () |
Protected Attributes inherited from Svx3DPreviewControl | |
std::unique_ptr< FmFormModel > | mpModel |
rtl::Reference< FmFormPage > | mxFmPage |
std::unique_ptr< E3dView > | mp3DView |
rtl::Reference< E3dScene > | mpScene |
rtl::Reference< E3dObject > | mp3DObj |
SvxPreviewObjectType | mnObjectType |
Definition at line 65 of file dlgctl3d.hxx.
Svx3DLightControl::Svx3DLightControl | ( | ) |
Definition at line 243 of file dlgctl3d.cxx.
References mbMouseCaptured.
|
private |
Definition at line 397 of file dlgctl3d.cxx.
References aDirection, COL_YELLOW(), basegfx::fTools::equalZero(), GetLightDirection(), basegfx::B3DHomMatrix::identity(), maLightObjects, maSelectedLight, mpLampBottomObject, mpLampShaftObject, Svx3DPreviewControl::mpModel, NO_LIGHT_SELECTED, SfxItemSet::Put(), RADIUS_LAMP_PREVIEW_SIZE, basegfx::B3DHomMatrix::rotate(), E3dObject::SetTransform(), and basegfx::B3DHomMatrix::translate().
Referenced by SelectLight(), Set3DAttributes(), SetPosition(), and TrySelection().
|
private |
Definition at line 264 of file dlgctl3d.cxx.
References basegfx::B2DPolygon::append(), basegfx::utils::createB3DPolygonFromB2DPolygon(), basegfx::utils::createPolygonFromCircle(), basegfx::utils::createPolygonFromEllipseSegment(), basegfx::B3DRange::getHeight(), basegfx::B3DRange::getMaxZ(), Application::GetSettings(), basegfx::B3DRange::getWidth(), Svx3DPreviewControl::mp3DView, mpExpansionObject, mpLampBottomObject, mpLampShaftObject, Svx3DPreviewControl::mpModel, Svx3DPreviewControl::mpScene, SfxItemSet::Put(), RADIUS_LAMP_BIG, RADIUS_LAMP_PREVIEW_SIZE, basegfx::B3DHomMatrix::rotate(), Camera3D::SetAutoAdjustProjection(), Camera3D::SetFocalLength(), Camera3D::SetPosAndLookAt(), Camera3D::SetViewWindow(), basegfx::B3DPolygon::transform(), and basegfx::B3DHomMatrix::translate().
Referenced by SetDrawingArea().
|
private |
Definition at line 356 of file dlgctl3d.cxx.
References a, aDirection, GetLightColor(), GetLightDirection(), GetLightOnOff(), maLightObjects, maSelectedLight, MAX_NUMBER_LIGHTS, Svx3DPreviewControl::mp3DView, Svx3DPreviewControl::mpModel, Svx3DPreviewControl::mpScene, SfxItemSet::Put(), RADIUS_LAMP_BIG, RADIUS_LAMP_PREVIEW_SIZE, RADIUS_LAMP_SMALL, and basegfx::B3DHomMatrix::translate().
Referenced by SelectLight(), Set3DAttributes(), and TrySelection().
|
overridevirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 520 of file dlgctl3d.cxx.
References Size::AdjustHeight(), Size::AdjustWidth(), weld::CustomWidgetController::GetOutputSizePixel(), and weld::CustomWidgetController::HasFocus().
Color Svx3DLightControl::GetLightColor | ( | sal_uInt32 | nNum | ) | const |
Definition at line 863 of file dlgctl3d.cxx.
References COL_BLACK(), SfxItemSet::Get(), Svx3DPreviewControl::Get3DAttributes(), SDRATTR_3DSCENE_LIGHTCOLOR_1(), SDRATTR_3DSCENE_LIGHTCOLOR_2(), SDRATTR_3DSCENE_LIGHTCOLOR_3(), SDRATTR_3DSCENE_LIGHTCOLOR_4(), SDRATTR_3DSCENE_LIGHTCOLOR_5(), SDRATTR_3DSCENE_LIGHTCOLOR_6(), SDRATTR_3DSCENE_LIGHTCOLOR_7(), and SDRATTR_3DSCENE_LIGHTCOLOR_8().
Referenced by ConstructLightObjects().
basegfx::B3DVector Svx3DLightControl::GetLightDirection | ( | sal_uInt32 | nNum | ) | const |
Definition at line 885 of file dlgctl3d.cxx.
References SfxItemSet::Get(), Svx3DPreviewControl::Get3DAttributes(), SDRATTR_3DSCENE_LIGHTDIRECTION_1(), SDRATTR_3DSCENE_LIGHTDIRECTION_2(), SDRATTR_3DSCENE_LIGHTDIRECTION_3(), SDRATTR_3DSCENE_LIGHTDIRECTION_4(), SDRATTR_3DSCENE_LIGHTDIRECTION_5(), SDRATTR_3DSCENE_LIGHTDIRECTION_6(), SDRATTR_3DSCENE_LIGHTDIRECTION_7(), and SDRATTR_3DSCENE_LIGHTDIRECTION_8().
Referenced by AdaptToSelectedLight(), ConstructLightObjects(), GetPosition(), and SetPosition().
bool Svx3DLightControl::GetLightOnOff | ( | sal_uInt32 | nNum | ) | const |
Definition at line 841 of file dlgctl3d.cxx.
References SfxItemSet::Get(), Svx3DPreviewControl::Get3DAttributes(), SDRATTR_3DSCENE_LIGHTON_1(), SDRATTR_3DSCENE_LIGHTON_2(), SDRATTR_3DSCENE_LIGHTON_3(), SDRATTR_3DSCENE_LIGHTON_4(), SDRATTR_3DSCENE_LIGHTON_5(), SDRATTR_3DSCENE_LIGHTON_6(), SDRATTR_3DSCENE_LIGHTON_7(), and SDRATTR_3DSCENE_LIGHTON_8().
Referenced by ConstructLightObjects(), IsSelectionValid(), SelectLight(), and Set3DAttributes().
void Svx3DLightControl::GetPosition | ( | double & | rHor, |
double & | rVer | ||
) |
Definition at line 700 of file dlgctl3d.cxx.
References aDirection, GetLightDirection(), IsGeometrySelected(), IsSelectionValid(), maSelectedLight, mfRotateX, mfRotateY, and basegfx::rad2deg().
Referenced by SvxLightCtl3D::CheckSelection(), MouseMove(), and SvxLightCtl3D::move().
void Svx3DLightControl::GetRotation | ( | double & | rRotX, |
double & | rRotY, | ||
double & | rRotZ | ||
) |
Definition at line 792 of file dlgctl3d.cxx.
References mfRotateX, mfRotateY, and mfRotateZ.
Referenced by MouseMove().
|
inline |
Definition at line 131 of file dlgctl3d.hxx.
|
inline |
Definition at line 119 of file dlgctl3d.hxx.
Referenced by SvxLightCtl3D::CheckSelection(), GetPosition(), SetPosition(), and SetRotation().
bool Svx3DLightControl::IsSelectionValid | ( | ) |
Definition at line 695 of file dlgctl3d.cxx.
References GetLightOnOff(), maSelectedLight, and NO_LIGHT_SELECTED.
Referenced by SvxLightCtl3D::CheckSelection(), GetPosition(), MouseButtonDown(), and SetPosition().
|
overridevirtual |
Reimplemented from Svx3DPreviewControl.
Definition at line 530 of file dlgctl3d.cxx.
References weld::CustomWidgetController::CaptureMouse(), MouseEvent::GetPosPixel(), MouseEvent::IsLeft(), IsSelectionValid(), maActionStartPoint, mbGeometrySelected, mbMouseCaptured, mbMouseMoved, Svx3DPreviewControl::MouseButtonDown(), and TrySelection().
|
overridevirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 651 of file dlgctl3d.cxx.
References MouseEvent::GetPosPixel(), mbMouseCaptured, mbMouseMoved, weld::CustomWidgetController::ReleaseMouse(), and TrySelection().
|
overridevirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 559 of file dlgctl3d.cxx.
References Link< typename Arg, typename Ret >::Call(), basegfx::deg2rad(), g_nInteractionStartDistance, GetPosition(), MouseEvent::GetPosPixel(), GetRotation(), Link< typename Arg, typename Ret >::IsSet(), maActionStartPoint, maChangeCallback, mbGeometrySelected, mbMouseCaptured, mbMouseMoved, mfSaveActionStartHor, mfSaveActionStartRotZ, mfSaveActionStartVer, NormAngle360(), SetPosition(), SetRotation(), Point::X(), and Point::Y().
|
overridevirtual |
Reimplemented from Svx3DPreviewControl.
Definition at line 515 of file dlgctl3d.cxx.
References Svx3DPreviewControl::Paint().
|
overridevirtual |
Reimplemented from Svx3DPreviewControl.
Definition at line 671 of file dlgctl3d.cxx.
References weld::CustomWidgetController::GetDrawingArea(), weld::CustomWidgetController::GetOutputSizePixel(), Svx3DPreviewControl::mpScene, and Svx3DPreviewControl::mxFmPage.
void Svx3DLightControl::SelectLight | ( | sal_uInt32 | nLightNumber | ) |
Definition at line 816 of file dlgctl3d.cxx.
References AdaptToSelectedLight(), ConstructLightObjects(), GetLightOnOff(), weld::CustomWidgetController::Invalidate(), maSelectedLight, mbGeometrySelected, and NO_LIGHT_SELECTED.
Referenced by TrySelection().
|
overridevirtual |
Reimplemented from Svx3DPreviewControl.
Definition at line 799 of file dlgctl3d.cxx.
References AdaptToSelectedLight(), ConstructLightObjects(), GetLightOnOff(), weld::CustomWidgetController::Invalidate(), maSelectedLight, NO_LIGHT_SELECTED, and Svx3DPreviewControl::Set3DAttributes().
|
inline |
Definition at line 114 of file dlgctl3d.hxx.
Referenced by SvxLightCtl3D::Init().
|
overridevirtual |
Reimplemented from Svx3DPreviewControl.
Definition at line 258 of file dlgctl3d.cxx.
References Construct2(), and Svx3DPreviewControl::SetDrawingArea().
|
overridevirtual |
Reimplemented from Svx3DPreviewControl.
Definition at line 681 of file dlgctl3d.cxx.
References mfRotateX, mfRotateY, mfRotateZ, Svx3DPreviewControl::mp3DObj, nType, basegfx::B3DHomMatrix::rotate(), and Svx3DPreviewControl::SetObjectType().
void Svx3DLightControl::SetPosition | ( | double | fHor, |
double | fVer | ||
) |
Definition at line 716 of file dlgctl3d.cxx.
References AdaptToSelectedLight(), aDirection, basegfx::deg2rad(), GetLightDirection(), weld::CustomWidgetController::Invalidate(), IsGeometrySelected(), IsSelectionValid(), makeSvx3DLightDirection1Item(), makeSvx3DLightDirection2Item(), makeSvx3DLightDirection3Item(), makeSvx3DLightDirection4Item(), makeSvx3DLightDirection5Item(), makeSvx3DLightDirection6Item(), makeSvx3DLightDirection7Item(), makeSvx3DLightDirection8Item(), maSelectedLight, mfRotateX, mfRotateY, mfRotateZ, Svx3DPreviewControl::mp3DObj, Svx3DPreviewControl::mpModel, Svx3DPreviewControl::mpScene, SfxItemSet::Put(), and basegfx::B3DHomMatrix::rotate().
Referenced by MouseMove(), and SvxLightCtl3D::move().
void Svx3DLightControl::SetRotation | ( | double | fRotX, |
double | fRotY, | ||
double | fRotZ | ||
) |
Definition at line 770 of file dlgctl3d.cxx.
References weld::CustomWidgetController::Invalidate(), IsGeometrySelected(), mfRotateX, mfRotateY, mfRotateZ, Svx3DPreviewControl::mp3DObj, and basegfx::B3DHomMatrix::rotate().
Referenced by MouseMove().
|
inline |
Definition at line 115 of file dlgctl3d.hxx.
Referenced by SvxLightCtl3D::Init().
|
private |
Definition at line 449 of file dlgctl3d.cxx.
References a, AdaptToSelectedLight(), Link< typename Arg, typename Ret >::Call(), ConstructLightObjects(), getAllHit3DObjectsSortedFrontToBack(), weld::CustomWidgetController::GetDrawingArea(), weld::CustomWidgetController::Invalidate(), Link< typename Arg, typename Ret >::IsSet(), maLightObjects, maSelectedLight, maSelectionChangeCallback, MAX_NUMBER_LIGHTS, mbGeometrySelected, Svx3DPreviewControl::mp3DObj, mpExpansionObject, Svx3DPreviewControl::mpScene, NO_LIGHT_SELECTED, SelectLight(), Point::X(), and Point::Y().
Referenced by MouseButtonDown(), and MouseButtonUp().
|
private |
Definition at line 86 of file dlgctl3d.hxx.
Referenced by MouseButtonDown(), and MouseMove().
|
private |
Definition at line 68 of file dlgctl3d.hxx.
Referenced by MouseMove().
|
private |
Definition at line 78 of file dlgctl3d.hxx.
Referenced by AdaptToSelectedLight(), ConstructLightObjects(), and TrySelection().
|
private |
Definition at line 72 of file dlgctl3d.hxx.
Referenced by AdaptToSelectedLight(), ConstructLightObjects(), GetPosition(), IsSelectionValid(), SelectLight(), Set3DAttributes(), SetPosition(), and TrySelection().
|
private |
Definition at line 69 of file dlgctl3d.hxx.
Referenced by TrySelection().
|
private |
Definition at line 93 of file dlgctl3d.hxx.
Referenced by MouseButtonDown(), MouseMove(), SelectLight(), and TrySelection().
|
private |
Definition at line 92 of file dlgctl3d.hxx.
Referenced by MouseButtonDown(), MouseButtonUp(), and MouseMove().
|
private |
Definition at line 91 of file dlgctl3d.hxx.
Referenced by MouseButtonDown(), MouseButtonUp(), and MouseMove().
|
private |
Definition at line 81 of file dlgctl3d.hxx.
Referenced by GetPosition(), GetRotation(), SetObjectType(), SetPosition(), and SetRotation().
|
private |
Definition at line 82 of file dlgctl3d.hxx.
Referenced by GetPosition(), GetRotation(), SetObjectType(), SetPosition(), and SetRotation().
|
private |
Definition at line 83 of file dlgctl3d.hxx.
Referenced by GetRotation(), SetObjectType(), SetPosition(), and SetRotation().
|
private |
Definition at line 87 of file dlgctl3d.hxx.
Referenced by MouseMove().
|
private |
Definition at line 89 of file dlgctl3d.hxx.
Referenced by MouseMove().
|
private |
Definition at line 88 of file dlgctl3d.hxx.
Referenced by MouseMove().
|
private |
Definition at line 75 of file dlgctl3d.hxx.
Referenced by Construct2(), and TrySelection().
|
private |
Definition at line 76 of file dlgctl3d.hxx.
Referenced by AdaptToSelectedLight(), and Construct2().
|
private |
Definition at line 77 of file dlgctl3d.hxx.
Referenced by AdaptToSelectedLight(), and Construct2().