diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-09-14 15:39:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-18 18:11:49 +0200 |
commit | 03cecc2985c10ecfb2efab28f5b03e451e82c777 (patch) | |
tree | 1132f9c8f26107c870ac2ee0d3c7e743816f938a /cui/source/inc/tabstpge.hxx | |
parent | dc139f00106a27aa6f4683294fa75d84461e910e (diff) |
weld SvxTabulatorTabPage
Change-Id: Ife45f59e63309046e532fcb4377e66a887d11f34
Reviewed-on: https://gerrit.libreoffice.org/60504
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/inc/tabstpge.hxx')
-rw-r--r-- | cui/source/inc/tabstpge.hxx | 117 |
1 files changed, 73 insertions, 44 deletions
diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx index 289de2b346cc..a6a7b6cb3ac5 100644 --- a/cui/source/inc/tabstpge.hxx +++ b/cui/source/inc/tabstpge.hxx @@ -19,17 +19,35 @@ #ifndef INCLUDED_CUI_SOURCE_INC_TABSTPGE_HXX #define INCLUDED_CUI_SOURCE_INC_TABSTPGE_HXX -#include <vcl/group.hxx> -#include <vcl/edit.hxx> -#include <vcl/field.hxx> -#include <vcl/fixed.hxx> -#include <vcl/layout.hxx> +#include <vcl/customweld.hxx> +#include <vcl/weld.hxx> #include <sfx2/tabdlg.hxx> #include <editeng/tstpitem.hxx> #include <svx/flagsdef.hxx> -class TabWin_Impl; +class SvxTabulatorTabPage; + +// class TabWin_Impl ----------------------------------------------------- + +class TabWin_Impl : public weld::CustomWidgetController +{ +private: + VclPtr<SvxTabulatorTabPage> mpPage; + sal_uInt16 nTabStyle; + +public: + + TabWin_Impl() + : mpPage(nullptr) + , nTabStyle(0) + { + } + virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; + + void SetTabulatorTabPage(SvxTabulatorTabPage* pPage); + void SetTabStyle(sal_uInt16 nStyle) {nTabStyle = nStyle; } +}; // class SvxTabulatorTabPage --------------------------------------------- /* @@ -64,59 +82,70 @@ protected: virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; private: - SvxTabulatorTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); + SvxTabulatorTabPage(TabPageParent pParent, const SfxItemSet& rSet); + // local variables, internal functions + SvxTabStop aCurrentTab; + SvxTabStopItem aNewTabs; + long nDefDist; + FieldUnit eDefUnit; + + TabWin_Impl m_aLeftWin; + TabWin_Impl m_aRightWin; + TabWin_Impl m_aCenterWin; + TabWin_Impl m_aDezWin; + + // just to format the numbers, not shown + std::unique_ptr<weld::MetricSpinButton> m_xTabSpin; // tabulators and positions - VclPtr<MetricBox> m_pTabBox; + std::unique_ptr<weld::EntryTreeView> m_xTabBox; // TabType - VclPtr<RadioButton> m_pLeftTab; - VclPtr<RadioButton> m_pRightTab; - VclPtr<RadioButton> m_pCenterTab; - VclPtr<RadioButton> m_pDezTab; + std::unique_ptr<weld::RadioButton> m_xLeftTab; + std::unique_ptr<weld::RadioButton> m_xRightTab; + std::unique_ptr<weld::RadioButton> m_xCenterTab; + std::unique_ptr<weld::RadioButton> m_xDezTab; - VclPtr<TabWin_Impl> m_pLeftWin; - VclPtr<TabWin_Impl> m_pRightWin; - VclPtr<TabWin_Impl> m_pCenterWin; - VclPtr<TabWin_Impl> m_pDezWin; + std::unique_ptr<weld::Entry> m_xDezChar; + std::unique_ptr<weld::Label> m_xDezCharLabel; - VclPtr<FixedText> m_pDezCharLabel; - VclPtr<Edit> m_pDezChar; + std::unique_ptr<weld::RadioButton> m_xNoFillChar; + std::unique_ptr<weld::RadioButton> m_xFillPoints; + std::unique_ptr<weld::RadioButton> m_xFillDashLine ; + std::unique_ptr<weld::RadioButton> m_xFillSolidLine; + std::unique_ptr<weld::RadioButton> m_xFillSpecial; + std::unique_ptr<weld::Entry> m_xFillChar; - VclPtr<RadioButton> m_pNoFillChar; - VclPtr<RadioButton> m_pFillPoints; - VclPtr<RadioButton> m_pFillDashLine ; - VclPtr<RadioButton> m_pFillSolidLine; - VclPtr<RadioButton> m_pFillSpecial; - VclPtr<Edit> m_pFillChar; + std::unique_ptr<weld::Button> m_xNewBtn; + std::unique_ptr<weld::Button> m_xDelAllBtn; + std::unique_ptr<weld::Button> m_xDelBtn; - VclPtr<PushButton> m_pNewBtn; - VclPtr<PushButton> m_pDelAllBtn; - VclPtr<PushButton> m_pDelBtn; + std::unique_ptr<weld::Container> m_xTypeFrame; + std::unique_ptr<weld::Container> m_xFillFrame; - VclPtr<VclContainer> m_pTypeFrame; - VclPtr<VclContainer> m_pFillFrame; - - // local variables, internal functions - SvxTabStop aCurrentTab; - SvxTabStopItem aNewTabs; - long nDefDist; - FieldUnit eDefUnit; + std::unique_ptr<weld::CustomWeld> m_xLeftWin; + std::unique_ptr<weld::CustomWeld> m_xRightWin; + std::unique_ptr<weld::CustomWeld> m_xCenterWin; + std::unique_ptr<weld::CustomWeld> m_xDezWin; void InitTabPos_Impl( sal_uInt16 nPos = 0 ); void SetFillAndTabType_Impl(); + void NewHdl_Impl(weld::Button*); // Handler - DECL_LINK( NewHdl_Impl, Button*, void ); - DECL_LINK( DelHdl_Impl, Button*, void ); - DECL_LINK( DelAllHdl_Impl, Button*, void ); + DECL_LINK(NewHdl_Impl, weld::Button&, void); + DECL_LINK(DelHdl_Impl, weld::Button&, void); + DECL_LINK(DelAllHdl_Impl, weld::Button&, void); + + DECL_LINK(FillTypeCheckHdl_Impl, weld::Button&, void); + DECL_LINK(TabTypeCheckHdl_Impl, weld::Button&, void); - DECL_LINK( FillTypeCheckHdl_Impl, Button*, void ); - DECL_LINK( TabTypeCheckHdl_Impl, Button*, void ); + DECL_LINK(SelectHdl_Impl, weld::TreeView&, void); + DECL_LINK(ModifyHdl_Impl, weld::ComboBox&, void); + DECL_LINK(ReformatHdl_Impl, weld::Widget&, void); + DECL_LINK(GetFillCharHdl_Impl, weld::Widget&, void); + DECL_LINK(GetDezCharHdl_Impl, weld::Widget&, void); - DECL_LINK( SelectHdl_Impl, ComboBox&, void ); - DECL_LINK( ModifyHdl_Impl, Edit&, void ); - DECL_LINK( GetFillCharHdl_Impl, Control&, void ); - DECL_LINK( GetDezCharHdl_Impl, Control&, void ); + int FindCurrentTab(); virtual void PageCreated(const SfxAllItemSet& aSet) override; }; |