Kaydet (Commit) 6b7819db authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SwGrfExtPage

Change-Id: Iffcefbcef92d278803112635b0d3e98606c820b9
Reviewed-on: https://gerrit.libreoffice.org/61744
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 0d87cfbd
......@@ -522,10 +522,6 @@
generic-name="Writer Navigator ToolBox" parent="GtkToolbar"
icon-name="widget-gtk-toolbar"/>
<glade-widget-class title="BmpWindow" name="swuilo-BmpWindow"
generic-name="BmpWindow" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="ClientBox" name="sduilo-ClientBox"
generic-name="ClientBox" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
......
This diff is collapsed.
......@@ -20,12 +20,12 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_BMPWIN_HXX
#define INCLUDED_SW_SOURCE_UIBASE_INC_BMPWIN_HXX
#include <vcl/graph.hxx>
#include <vcl/customweld.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/window.hxx>
#include <vcl/graph.hxx>
// extended page for graphics
class BmpWindow : public vcl::Window
class BmpWindow : public weld::CustomWidgetController
{
private:
Graphic aGraphic;
......@@ -37,10 +37,10 @@ private:
virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rRect) override;
virtual Size GetOptimalSize() const override;
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
public:
BmpWindow(vcl::Window* pPar, WinBits nStyle);
BmpWindow();
virtual ~BmpWindow() override;
void MirrorVert(bool bMirror) { bVert = bMirror; Invalidate(); }
void MirrorHorz(bool bMirror) { bHorz = bMirror; Invalidate(); }
......
......@@ -200,35 +200,39 @@ public:
void EnableVerticalPositioning( bool bEnable );
};
class SwGrfExtPage: public SfxTabPage
class SwGrfExtPage : public SfxTabPage
{
// mirror
VclPtr<VclContainer> m_pMirror;
VclPtr<CheckBox> m_pMirrorVertBox;
VclPtr<CheckBox> m_pMirrorHorzBox;
VclPtr<RadioButton> m_pAllPagesRB;
VclPtr<RadioButton> m_pLeftPagesRB;
VclPtr<RadioButton> m_pRightPagesRB;
VclPtr<BmpWindow> m_pBmpWin;
OUString aFilterName;
OUString aGrfName, aNewGrfName;
VclPtr<Edit> m_pConnectED;
VclPtr<PushButton> m_pBrowseBT;
std::unique_ptr<::sfx2::FileDialogHelper> m_xGrfDlg;
// RotGrfFlyFrame: Need Angle and RotateControls now
VclPtr<VclFrame> m_pFlAngle;
VclPtr<NumericField> m_pNfAngle;
VclPtr<svx::DialControl> m_pCtlAngle;
bool m_bHtmlMode;
OUString aFilterName;
OUString aGrfName, aNewGrfName;
// mirror
BmpWindow m_aBmpWin;
svx::SvxDialControl m_aCtlAngle;
std::unique_ptr<weld::Widget> m_xMirror;
std::unique_ptr<weld::CheckButton> m_xMirrorVertBox;
std::unique_ptr<weld::CheckButton> m_xMirrorHorzBox;
std::unique_ptr<weld::RadioButton> m_xAllPagesRB;
std::unique_ptr<weld::RadioButton> m_xLeftPagesRB;
std::unique_ptr<weld::RadioButton> m_xRightPagesRB;
std::unique_ptr<weld::Entry> m_xConnectED;
std::unique_ptr<weld::Button> m_xBrowseBT;
std::unique_ptr<weld::Frame> m_xLinkFrame;
std::unique_ptr<::sfx2::FileDialogHelper> pGrfDlg;
// RotGrfFlyFrame: Need Angle and RotateControls now
std::unique_ptr<weld::Frame> m_xFlAngle;
std::unique_ptr<weld::SpinButton> m_xNfAngle;
std::unique_ptr<weld::CustomWeld> m_xCtlAngle;
std::unique_ptr<weld::CustomWeld> m_xBmpWin;
bool bHtmlMode;
// handler for mirroring
DECL_LINK(MirrorHdl, Button*, void);
DECL_LINK(BrowseHdl, Button*, void);
DECL_LINK(MirrorHdl, weld::ToggleButton&, void);
DECL_LINK(BrowseHdl, weld::Button&, void);
virtual void ActivatePage(const SfxItemSet& rSet) override;
virtual ~SwGrfExtPage() override;
......@@ -238,7 +242,7 @@ class SwGrfExtPage: public SfxTabPage
using SfxTabPage::DeactivatePage;
public:
SwGrfExtPage(vcl::Window *pParent, const SfxItemSet &rSet);
SwGrfExtPage(TabPageParent pParent, const SfxItemSet &rSet);
static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet *rSet);
......
......@@ -44,6 +44,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="activates_default">True</property>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -147,7 +148,6 @@
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">leftpages</property>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -164,7 +164,7 @@
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<property name="group">rightpages</property>
<property name="group">allpages</property>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -193,7 +193,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="swuilo-BmpWindow" id="preview">
<object class="GtkDrawingArea" id="preview">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
......@@ -311,11 +311,25 @@
</packing>
</child>
<child>
<object class="svxlo-DialControl" id="CTL_ANGLE">
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes" context="picturepage|CTL_ANGLE|tooltip_text">Rotation Angle</property>
<property name="can_focus">True</property>
<property name="halign">center</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkDrawingArea" id="CTL_ANGLE">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="tooltip_text" translatable="yes" context="picturepage|CTL_ANGLE|tooltip_text">Rotation Angle</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
......
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