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 |
![]() | |
Svx3DPreviewControl () | |
virtual | ~Svx3DPreviewControl () override |
SvxPreviewObjectType | GetObjectType () const |
SfxItemSet const & | Get3DAttributes () const |
![]() | |
virtual css::uno::Reference< css::accessibility::XAccessible > | CreateAccessible () |
virtual void | GetFocus () |
virtual void | LoseFocus () |
virtual void | StyleUpdated () |
virtual bool | Command (const CommandEvent &) |
virtual bool | KeyInput (const KeyEvent &) |
virtual FactoryFunction | GetUITestFactory () const |
virtual OUString | RequestHelp (tools::Rectangle &) |
virtual OUString | GetHelpText () const |
Size const & | GetOutputSizePixel () const |
void | SetOutputSizePixel (const Size &rSize) |
weld::DrawingArea * | GetDrawingArea () const |
void | Invalidate () |
void | Invalidate (const tools::Rectangle &rRect) |
virtual void | Show () |
virtual void | Hide () |
void | GrabFocus () |
bool | HasFocus () 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 OString &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 () |
void | SetDragDataTransferrable (rtl::Reference< TransferDataContainer > &rTransferrable, 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 |
E3dObject * | mpExpansionObject |
E3dObject * | mpLampBottomObject |
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 bool | IsUpdateMode () |
![]() | |
void | Construct () |
![]() | |
std::unique_ptr< FmFormModel > | mpModel |
FmFormPage * | mpFmPage |
std::unique_ptr< E3dView > | mp3DView |
E3dScene * | mpScene |
E3dObject * | mp3DObj |
SvxPreviewObjectType | mnObjectType |
Definition at line 65 of file dlgctl3d.hxx.
Svx3DLightControl::Svx3DLightControl | ( | ) |
Definition at line 247 of file dlgctl3d.cxx.
References mbMouseCaptured.
|
private |
Definition at line 410 of file dlgctl3d.cxx.
References aDirection, COL_YELLOW, basegfx::fTools::equalZero(), GetLightDirection(), basegfx::B3DHomMatrix::identity(), maLightObjects, maSelectedLight, mpLampBottomObject, mpLampShaftObject, Svx3DPreviewControl::mpModel, NO_LIGHT_SELECTED, basegfx::B3DVector::normalize(), RADIUS_LAMP_PREVIEW_SIZE, basegfx::B3DHomMatrix::rotate(), SdrObject::SetMergedItemSet(), E3dObject::SetTransform(), and basegfx::B3DHomMatrix::translate().
Referenced by SelectLight(), Set3DAttributes(), SetPosition(), and TrySelection().
|
private |
Definition at line 274 of file dlgctl3d.cxx.
References basegfx::B2DPolygon::append(), basegfx::utils::createB3DPolygonFromB2DPolygon(), basegfx::utils::createPolygonFromCircle(), basegfx::utils::createPolygonFromEllipseSegment(), F_2PI, F_PI2, E3dObject::GetBoundVolume(), E3dScene::GetCamera(), basegfx::B3DRange::getHeight(), basegfx::B3DRange::getMaxZ(), Application::GetSettings(), basegfx::B3DRange::getWidth(), E3dScene::InsertObject(), Svx3DPreviewControl::mp3DView, mpExpansionObject, mpLampBottomObject, mpLampShaftObject, Svx3DPreviewControl::mpModel, Svx3DPreviewControl::mpScene, RADIUS_LAMP_BIG, RADIUS_LAMP_PREVIEW_SIZE, basegfx::B3DHomMatrix::rotate(), Camera3D::SetAutoAdjustProjection(), E3dScene::SetCamera(), Camera3D::SetFocalLength(), SdrObject::SetMergedItemSet(), Camera3D::SetPosAndLookAt(), E3dScene::SetRectsDirty(), E3dScene::SetTransform(), Camera3D::SetViewWindow(), basegfx::B3DPolygon::transform(), and basegfx::B3DHomMatrix::translate().
Referenced by SetDrawingArea().
|
private |
Definition at line 366 of file dlgctl3d.cxx.
References a, aDirection, SdrObject::Free(), GetLightColor(), GetLightDirection(), GetLightOnOff(), E3dScene::InsertObject(), maLightObjects, maSelectedLight, MAX_NUMBER_LIGHTS, Svx3DPreviewControl::mp3DView, Svx3DPreviewControl::mpModel, Svx3DPreviewControl::mpScene, basegfx::B3DVector::normalize(), RADIUS_LAMP_BIG, RADIUS_LAMP_PREVIEW_SIZE, RADIUS_LAMP_SMALL, E3dScene::RemoveObject(), SdrObject::SetMergedItemSet(), E3dObject::SetTransform(), and basegfx::B3DHomMatrix::translate().
Referenced by SelectLight(), Set3DAttributes(), and TrySelection().
|
overridevirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 533 of file dlgctl3d.cxx.
References Size::AdjustHeight(), Size::AdjustWidth(), weld::CustomWidgetController::GetOutputSizePixel(), weld::CustomWidgetController::HasFocus(), and Point.
Color Svx3DLightControl::GetLightColor | ( | sal_uInt32 | nNum | ) | const |
Definition at line 876 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 898 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 854 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 713 of file dlgctl3d.cxx.
References aDirection, F_PI, GetLightDirection(), basegfx::B3DVector::getXZLength(), IsGeometrySelected(), IsSelectionValid(), maSelectedLight, mfRotateX, mfRotateY, basegfx::B3DVector::normalize(), and basegfx::rad2deg().
Referenced by SvxLightCtl3D::CheckSelection(), MouseMove(), and SvxLightCtl3D::move().
void Svx3DLightControl::GetRotation | ( | double & | rRotX, |
double & | rRotY, | ||
double & | rRotZ | ||
) |
Definition at line 805 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 708 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 543 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 664 of file dlgctl3d.cxx.
References MouseEvent::GetPosPixel(), mbMouseCaptured, mbMouseMoved, weld::CustomWidgetController::ReleaseMouse(), and TrySelection().
|
overridevirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 572 of file dlgctl3d.cxx.
References Link< class, class >::Call(), basegfx::deg2rad(), F_2PI, F_PI2, g_nInteractionStartDistance, GetPosition(), MouseEvent::GetPosPixel(), GetRotation(), Link< class, class >::IsSet(), maActionStartPoint, maChangeCallback, mbGeometrySelected, mbMouseCaptured, mbMouseMoved, mfSaveActionStartHor, mfSaveActionStartRotZ, mfSaveActionStartVer, NormAngle360(), Point, SetPosition(), and SetRotation().
|
overridevirtual |
Reimplemented from Svx3DPreviewControl.
Definition at line 528 of file dlgctl3d.cxx.
References Svx3DPreviewControl::Paint().
|
overridevirtual |
Reimplemented from Svx3DPreviewControl.
Definition at line 684 of file dlgctl3d.cxx.
References weld::CustomWidgetController::GetDrawingArea(), weld::CustomWidgetController::GetOutputSizePixel(), Svx3DPreviewControl::mpFmPage, Svx3DPreviewControl::mpScene, Point, SdrPage::SetSize(), and SdrObject::SetSnapRect().
void Svx3DLightControl::SelectLight | ( | sal_uInt32 | nLightNumber | ) |
Definition at line 829 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 812 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 268 of file dlgctl3d.cxx.
References Construct2(), and Svx3DPreviewControl::SetDrawingArea().
|
overridevirtual |
Reimplemented from Svx3DPreviewControl.
Definition at line 694 of file dlgctl3d.cxx.
References mfRotateX, mfRotateY, mfRotateZ, Svx3DPreviewControl::mp3DObj, basegfx::B3DHomMatrix::rotate(), Svx3DPreviewControl::SetObjectType(), and E3dObject::SetTransform().
void Svx3DLightControl::SetPosition | ( | double | fHor, |
double | fVer | ||
) |
Definition at line 729 of file dlgctl3d.cxx.
References AdaptToSelectedLight(), aDirection, basegfx::deg2rad(), F_PI, GetLightDirection(), weld::CustomWidgetController::Invalidate(), IsGeometrySelected(), IsSelectionValid(), makeSvx3DLightDirection1Item(), makeSvx3DLightDirection2Item(), makeSvx3DLightDirection3Item(), makeSvx3DLightDirection4Item(), makeSvx3DLightDirection5Item(), makeSvx3DLightDirection6Item(), makeSvx3DLightDirection7Item(), makeSvx3DLightDirection8Item(), maSelectedLight, mfRotateX, mfRotateY, mfRotateZ, Svx3DPreviewControl::mp3DObj, Svx3DPreviewControl::mpModel, Svx3DPreviewControl::mpScene, basegfx::B3DVector::normalize(), basegfx::B3DHomMatrix::rotate(), SdrObject::SetMergedItemSet(), and E3dObject::SetTransform().
Referenced by MouseMove(), and SvxLightCtl3D::move().
void Svx3DLightControl::SetRotation | ( | double | fRotX, |
double | fRotY, | ||
double | fRotZ | ||
) |
Definition at line 783 of file dlgctl3d.cxx.
References weld::CustomWidgetController::Invalidate(), IsGeometrySelected(), mfRotateX, mfRotateY, mfRotateZ, Svx3DPreviewControl::mp3DObj, basegfx::B3DHomMatrix::rotate(), and E3dObject::SetTransform().
Referenced by MouseMove().
|
inline |
Definition at line 115 of file dlgctl3d.hxx.
Referenced by SvxLightCtl3D::Init().
Definition at line 462 of file dlgctl3d.cxx.
References a, AdaptToSelectedLight(), Link< class, class >::Call(), ConstructLightObjects(), getAllHit3DObjectsSortedFrontToBack(), weld::CustomWidgetController::GetDrawingArea(), weld::CustomWidgetController::Invalidate(), Link< class, class >::IsSet(), maLightObjects, maSelectedLight, maSelectionChangeCallback, MAX_NUMBER_LIGHTS, mbGeometrySelected, Svx3DPreviewControl::mp3DObj, mpExpansionObject, Svx3DPreviewControl::mpScene, NO_LIGHT_SELECTED, Point, and SelectLight().
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().