diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-01-08 22:41:56 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-01-09 04:01:39 +0100 |
commit | 5f5ee992bd8377dc984b576950d468f6407d5c63 (patch) | |
tree | 7568ed41640f6f4b0f3d24d363968198bfba92ed /svx | |
parent | d656da9bc4f2df0bb99c65a288847e3fdd43a37c (diff) |
devtools: Implement development tools docking window
Change-Id: Id3b8f424e24bac5164b8b3069580ffee65dd265c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107993
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/Library_svx.mk | 1 | ||||
-rw-r--r-- | svx/UIConfig_svx.mk | 1 | ||||
-rw-r--r-- | svx/source/devtools/DevelopmentToolDockingWindow.cxx | 55 | ||||
-rw-r--r-- | svx/uiconfig/ui/developmenttool.ui | 26 |
4 files changed, 83 insertions, 0 deletions
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index b98a3cc12a6a..0e8557ecb0f8 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -104,6 +104,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/customshapes/EnhancedCustomShapeEngine \ svx/source/customshapes/EnhancedCustomShapeFontWork \ svx/source/customshapes/EnhancedCustomShapeHandle \ + svx/source/devtools/DevelopmentToolDockingWindow \ svx/source/dialog/AccessibilityCheckDialog \ svx/source/dialog/_bmpmask \ svx/source/dialog/charmap \ diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk index b8e18d763c1f..4773c6826620 100644 --- a/svx/UIConfig_svx.mk +++ b/svx/UIConfig_svx.mk @@ -41,6 +41,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\ svx/uiconfig/ui/deletefooterdialog \ svx/uiconfig/ui/depthwindow \ svx/uiconfig/ui/directionwindow \ + svx/uiconfig/ui/developmenttool \ svx/uiconfig/ui/docking3deffects \ svx/uiconfig/ui/dockingcolorreplace \ svx/uiconfig/ui/dockingcolorwindow \ diff --git a/svx/source/devtools/DevelopmentToolDockingWindow.cxx b/svx/source/devtools/DevelopmentToolDockingWindow.cxx new file mode 100644 index 000000000000..a435cd9b9c04 --- /dev/null +++ b/svx/source/devtools/DevelopmentToolDockingWindow.cxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +#include <memory> + +#include <svx/devtools/DevelopmentToolDockingWindow.hxx> + +#include <sfx2/dispatch.hxx> +#include <sfx2/sfxmodelfactory.hxx> +#include <svx/svxids.hrc> + +SFX_IMPL_DOCKINGWINDOW_WITHID(DevelopmentToolChildWindow, SID_DEVELOPMENT_TOOLS_DOCKING_WINDOW); + +DevelopmentToolChildWindow::DevelopmentToolChildWindow(vcl::Window* pParentWindow, sal_uInt16 nId, + SfxBindings* pBindings, + SfxChildWinInfo* pInfo) + : SfxChildWindow(pParentWindow, nId) +{ + VclPtr<DevelopmentToolDockingWindow> pWin + = VclPtr<DevelopmentToolDockingWindow>::Create(pBindings, this, pParentWindow); + SetWindow(pWin); + SetAlignment(SfxChildAlignment::BOTTOM); + pWin->Initialize(pInfo); +} + +DevelopmentToolChildWindow::~DevelopmentToolChildWindow() {} + +DevelopmentToolDockingWindow::DevelopmentToolDockingWindow(SfxBindings* pInputBindings, + SfxChildWindow* pChildWindow, + vcl::Window* pParent) + : SfxDockingWindow(pInputBindings, pChildWindow, pParent, "DevelopmentTool", + "svx/ui/developmenttool.ui") +{ +} + +DevelopmentToolDockingWindow::~DevelopmentToolDockingWindow() { disposeOnce(); } + +void DevelopmentToolDockingWindow::ToggleFloatingMode() +{ + SfxDockingWindow::ToggleFloatingMode(); + + if (GetFloatingWindow()) + GetFloatingWindow()->SetMinOutputSizePixel(Size(300, 300)); + + Invalidate(); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/uiconfig/ui/developmenttool.ui b/svx/uiconfig/ui/developmenttool.ui new file mode 100644 index 000000000000..6bb0d69a339c --- /dev/null +++ b/svx/uiconfig/ui/developmenttool.ui @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.38.2 --> +<interface domain="svx"> + <requires lib="gtk+" version="3.20"/> + <!-- n-columns=1 n-rows=1 --> + <object class="GtkGrid" id="DevelopmentTool"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="row-spacing">24</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="label" translatable="no">Test</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> + </child> + </object> +</interface> |