From df61a5e277074e016ceaecb2297bb307a5e71819 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 23 Dec 2019 21:25:23 +0000 Subject: DialControl is now unused MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ifdaa6322c3eb12cb0df5130b0da0596ebca15321 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85769 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- include/svx/dialcontrol.hxx | 66 +-------------------------------------------- 1 file changed, 1 insertion(+), 65 deletions(-) (limited to 'include/svx/dialcontrol.hxx') diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx index 07f95bb04420..b17b39cf5615 100644 --- a/include/svx/dialcontrol.hxx +++ b/include/svx/dialcontrol.hxx @@ -21,9 +21,7 @@ #define INCLUDED_SVX_DIALCONTROL_HXX #include -#include #include -#include #include #include @@ -68,74 +66,12 @@ private: state of the control. It is possible to link a numeric field to this control using the function - SetLinkedField(). The DialControl will take full control of this numeric + SetLinkedField(). The SvxDialControl will take full control of this numeric field: - Sets the rotation angle to the numeric field in mouse operations. - Shows the value entered/modified in the numeric field. - Enables/disables/shows/hides the field according to own state changes. */ -class SAL_WARN_UNUSED DialControl : public Control -{ -public: - explicit DialControl( vcl::Window* pParent, WinBits nBits ); - - virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; - - virtual void StateChanged( StateChangedType nStateChange ) override; - virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; - - virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - virtual void MouseMove( const MouseEvent& rMEvt ) override; - virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; - virtual void KeyInput( const KeyEvent& rKEvt ) override; - virtual void LoseFocus() override; - - virtual Size GetOptimalSize() const override; - virtual void Resize() override; - - /** Returns the current rotation angle in 1/100 degrees. */ - sal_Int32 GetRotation() const; - /** Sets the rotation to the passed value (in 1/100 degrees). */ - void SetRotation( sal_Int32 nAngle ); - - /** The passed handler is called whenever the rotation value changes. */ - void SetModifyHdl( const Link& rLink ); - -protected: - struct DialControl_Impl - { - ScopedVclPtr mxBmpEnabled; - ScopedVclPtr mxBmpDisabled; - ScopedVclPtr mxBmpBuffered; - Link maModifyHdl; - VclPtr mpLinkField; - sal_Int32 mnLinkedFieldValueMultiplyer; - Size maWinSize; - vcl::Font maWinFont; - sal_Int32 mnAngle; - sal_Int32 mnOldAngle; - long mnCenterX; - long mnCenterY; - bool mbNoRot; - - explicit DialControl_Impl( vcl::Window& rParent ); - void Init( const Size& rWinSize, const vcl::Font& rWinFont ); - void SetSize( const Size& rWinSize ); - }; - std::unique_ptr< DialControl_Impl > mpImpl; - - virtual void HandleMouseEvent( const Point& rPos, bool bInitial ); - void HandleEscapeEvent(); - - void SetRotation( sal_Int32 nAngle, bool bBroadcast ); - - void Init( const Size& rWinSize, const vcl::Font& rWinFont ); - void Init( const Size& rWinSize ); - -private: - void InvalidateControl(); -}; - class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxDialControl final : public weld::CustomWidgetController { public: -- cgit