Kaydet (Commit) 03cecc29 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SvxTabulatorTabPage

Change-Id: Ife45f59e63309046e532fcb4377e66a887d11f34
Reviewed-on: https://gerrit.libreoffice.org/60504
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst dc139f00
......@@ -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;
};
......
This diff is collapsed.
......@@ -605,10 +605,6 @@
generic-name="Writer Navigator ToolBox" parent="GtkToolbar"
icon-name="widget-gtk-toolbar"/>
<glade-widget-class title="Tab Stop Images" name="cuilo-TabWin_Impl"
generic-name="TabWin_Impl" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="BmpWindow" name="swuilo-BmpWindow"
generic-name="BmpWindow" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
......
......@@ -380,6 +380,8 @@ cui/uiconfig/ui/screenshotannotationdialog.ui://GtkLabel[@id='label1'] orphan-la
cui/uiconfig/ui/screenshotannotationdialog.ui://GtkTextView[@id='text:border'] no-labelled-by
cui/uiconfig/ui/pastespecial.ui://GtkLabel[@id='label2'] orphan-label
cui/uiconfig/ui/pastespecial.ui://GtkLabel[@id='source'] orphan-label
cui/uiconfig/ui/paratabspage.ui://GtkSpinButton[@id='SP_TABPOS'] no-labelled-by
cui/uiconfig/ui/paratabspage.ui://GtkEntry[@id='ED_TABPOS'] no-labelled-by
cui/uiconfig/ui/patterntabpage.ui://GtkLabel[@id='label4'] orphan-label
cui/uiconfig/ui/patterntabpage.ui://GtkMenuButton[@id='LB_COLOR'] button-no-label
cui/uiconfig/ui/patterntabpage.ui://GtkMenuButton[@id='LB_BACKGROUND_COLOR'] button-no-label
......
......@@ -2440,6 +2440,18 @@ public:
rEntry.SetAutocompleteHdl(Link<Edit&, void>());
}
virtual void grab_focus() override { m_xEntry->grab_focus(); }
virtual void connect_focus_in(const Link<Widget&, void>& rLink) override
{
m_xEntry->connect_focus_in(rLink);
}
virtual void connect_focus_out(const Link<Widget&, void>& rLink) override
{
m_xEntry->connect_focus_out(rLink);
}
virtual ~SalInstanceEntryTreeView() override
{
Edit& rEntry = m_pEntry->getEntry();
......
......@@ -5012,6 +5012,8 @@ public:
gtk_entry_set_completion(GTK_ENTRY(m_pEntry->getWidget()), nullptr);
}
virtual void grab_focus() override { m_xEntry->grab_focus(); }
virtual void connect_focus_in(const Link<Widget&, void>& rLink) override
{
m_xEntry->connect_focus_in(rLink);
......@@ -5027,7 +5029,6 @@ public:
GtkWidget* pWidget = m_pEntry->getWidget();
g_signal_handler_disconnect(pWidget, m_nKeyPressSignalId);
}
};
class GtkInstanceExpander : public GtkInstanceContainer, public virtual weld::Expander
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment