diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-04-04 16:19:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-04-05 20:24:51 +0100 |
commit | 92d43df81e282d20c129b105b2c7300a312091eb (patch) | |
tree | 2163a30e7ac2defdabc0214fc0aeba7f351669c9 /include | |
parent | 3c36ba50f65d663f35264f2a11c99c0ff98674a2 (diff) |
convert src line width popup to .ui format
Change-Id: I39e8bfd89538c36c97afb3e4e86c3ba9156274e0
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/dialogs.hrc | 8 | ||||
-rw-r--r-- | include/svx/sidebar/LinePropertyPanelBase.hxx | 9 | ||||
-rw-r--r-- | include/svx/sidebar/LineWidthPopup.hxx | 38 |
3 files changed, 35 insertions, 20 deletions
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index afa3889aa75a..4ff3dc5936da 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -201,7 +201,6 @@ #define RID_POPUPPANEL_AREAPAGE_TRGR (RID_SVX_START + 320) #define RID_SIDEBAR_LINE_PANEL (RID_SVX_START + 321) -#define RID_POPUPPANEL_LINEPAGE_WIDTH (RID_SVX_START + 324) #define RID_SIDEBAR_POSSIZE_PANEL (RID_SVX_START + 325) #define RID_SIDEBAR_GRAPHIC_PANEL (RID_SVX_START + 326) @@ -1089,8 +1088,13 @@ #define RID_SVXSTR_ZOOM_PAGE_WIDTH (RID_SVX_START + 1389) #define RID_SVXSTR_ZOOM_OPTIMAL_VIEW (RID_SVX_START + 1390) +#define RID_SVXSTR_WIDTH_LAST_CUSTOM (RID_SVX_START + 1391) +#define RID_SVXSTR_PT (RID_SVX_START + 1392) +#define RID_SVXIMG_WIDTH_CUSTOM (RID_SVX_START + 1393) +#define RID_SVXIMG_WIDTH_CUSTOM_GRAY (RID_SVX_START + 1394) + // !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!! -#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1391) +#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1395) // if we have _a_lot_ time, we should group the resource ids by type, instead // of grouping them by semantics. The reason is that resource ids have to be diff --git a/include/svx/sidebar/LinePropertyPanelBase.hxx b/include/svx/sidebar/LinePropertyPanelBase.hxx index ac354de4efb6..93398f80a42c 100644 --- a/include/svx/sidebar/LinePropertyPanelBase.hxx +++ b/include/svx/sidebar/LinePropertyPanelBase.hxx @@ -65,9 +65,6 @@ namespace svx namespace sidebar { -class PopupContainer; -class LineWidthControl; - class SVX_DLLPUBLIC LinePropertyPanelBase : public PanelLayout { public: @@ -81,8 +78,6 @@ public: void SetWidthIcon(int n); void SetWidthIcon(); - void EndLineWidthPopupMode(); - // constructor/destuctor LinePropertyPanelBase( vcl::Window* pParent, @@ -152,7 +147,7 @@ private: std::unique_ptr<XLineEndItem> mpEndItem; //popup windows - LineWidthPopup maLineWidthPopup; + VclPtr<LineWidthPopup> mxLineWidthPopup; // images from resource Image maIMGNone; @@ -173,8 +168,6 @@ private: DECL_LINK_TYPED(ChangeEndHdl, ListBox&, void); DECL_LINK_TYPED(ChangeEdgeStyleHdl, ListBox&, void); DECL_LINK_TYPED(ChangeCapStyleHdl, ListBox&, void); - - VclPtr<PopupControl> CreateLineWidthPopupControl (PopupContainer* pParent); }; } } // end of namespace svx::sidebar diff --git a/include/svx/sidebar/LineWidthPopup.hxx b/include/svx/sidebar/LineWidthPopup.hxx index d507e9c39e16..79952c1f0b9f 100644 --- a/include/svx/sidebar/LineWidthPopup.hxx +++ b/include/svx/sidebar/LineWidthPopup.hxx @@ -19,28 +19,46 @@ #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHPOPUP_HXX #define INCLUDED_SVX_SOURCE_SIDEBAR_LINE_LINEWIDTHPOPUP_HXX -#include "svx/sidebar/Popup.hxx" - #include <svl/poolitem.hxx> +#include <vcl/floatwin.hxx> +#include <vcl/layout.hxx> -#include <functional> - +class Edit; +class MetricField; +class ValueSet; namespace svx { namespace sidebar { -class LineWidthPopup - : public Popup +class LinePropertyPanelBase; +class LineWidthValueSet; + +class LineWidthPopup : public FloatingWindow { public: - LineWidthPopup ( - vcl::Window* pParent, - const ::std::function<PopupControl*(PopupContainer*)>& rControlCreator); + LineWidthPopup(LinePropertyPanelBase& rParent); + virtual void dispose() override; virtual ~LineWidthPopup(); void SetWidthSelect (long lValue, bool bValuable, SfxMapUnit eMapUnit); private: - void PopupModeEndCallback(); + LinePropertyPanelBase& m_rParent; + OUString* m_pStr; + OUString m_sPt; + SfxMapUnit m_eMapUnit; + bool m_bVSFocus; + bool m_bCustom; + bool m_bCloseByEdit; + long m_nCustomWidth; + long m_nTmpCustomWidth; + VclPtr<MetricField> m_xMFWidth; + VclPtr<VclContainer> m_xBox; + VclPtr<LineWidthValueSet> m_xVSWidth; + Image m_aIMGCus; + Image m_aIMGCusGray; + + DECL_LINK_TYPED(VSSelectHdl, ValueSet*, void); + DECL_LINK_TYPED(MFModifyHdl, Edit&, void); }; } } // end of namespace svx::sidebar |