diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-11-12 20:48:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-11-20 21:07:56 +0100 |
commit | 75b9109a2da35cf0f0914504145d84cf918c6af2 (patch) | |
tree | ce444db75d6f2282e86d86c89c0cce66ab937c8d /sfx2/inc | |
parent | 94ea1c89e959069aa7c735317470712012df2362 (diff) |
weld TabBar
Change-Id: I698f4dfc64bfa9bc4896111757616b4051b10293
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105797
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/inc')
-rw-r--r-- | sfx2/inc/pch/precompiled_sfx.hxx | 6 | ||||
-rw-r--r-- | sfx2/inc/sidebar/ControlFactory.hxx | 50 | ||||
-rw-r--r-- | sfx2/inc/sidebar/DrawHelper.hxx | 2 | ||||
-rw-r--r-- | sfx2/inc/sidebar/MenuButton.hxx | 45 | ||||
-rw-r--r-- | sfx2/inc/sidebar/PanelTitleBar.hxx | 5 | ||||
-rw-r--r-- | sfx2/inc/sidebar/TabItem.hxx | 46 |
6 files changed, 10 insertions, 144 deletions
diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx index 8b5d21edc38f..36b9d794c0af 100644 --- a/sfx2/inc/pch/precompiled_sfx.hxx +++ b/sfx2/inc/pch/precompiled_sfx.hxx @@ -13,7 +13,7 @@ manual changes will be rewritten by the next run of update_pch.sh (which presumably also fixes all possible problems, so it's usually better to use it). - Generated on 2020-09-03 20:51:12 using: + Generated on 2020-11-14 15:11:04 using: ./bin/update_pch sfx2 sfx --cutoff=3 --exclude:system --exclude:module --exclude:local If after updating build fails, use the following command to locate conflicting headers: @@ -25,6 +25,7 @@ #include <assert.h> #include <cassert> #include <cstddef> +#include <cstdlib> #include <functional> #include <initializer_list> #include <limits> @@ -96,6 +97,7 @@ #include <vcl/commandevent.hxx> #include <vcl/commandinfoprovider.hxx> #include <vcl/ctrl.hxx> +#include <vcl/customweld.hxx> #include <vcl/dibtools.hxx> #include <vcl/dllapi.h> #include <vcl/errcode.hxx> @@ -352,12 +354,14 @@ #include <tools/color.hxx> #include <tools/datetime.hxx> #include <tools/debug.hxx> +#include <tools/degree.hxx> #include <tools/diagnose_ex.h> #include <tools/fract.hxx> #include <tools/gen.hxx> #include <tools/globname.hxx> #include <tools/json_writer.hxx> #include <tools/link.hxx> +#include <tools/long.hxx> #include <tools/poly.hxx> #include <tools/ref.hxx> #include <tools/solar.h> diff --git a/sfx2/inc/sidebar/ControlFactory.hxx b/sfx2/inc/sidebar/ControlFactory.hxx deleted file mode 100644 index 22fd2fdeb119..000000000000 --- a/sfx2/inc/sidebar/ControlFactory.hxx +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- 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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_SFX2_SIDEBAR_CONTROLFACTORY_HXX -#define INCLUDED_SFX2_SIDEBAR_CONTROLFACTORY_HXX - -#include <sfx2/dllapi.h> -#include <vcl/vclptr.hxx> - -class RadioButton; -namespace vcl { class Window; } - -namespace sfx2::sidebar { - -/** Factory for controls used in sidebar panels. - The reason to use this factory instead of creating the controls - directly is that this way the sidebar has a little more control - over look and feel of its controls. -*/ -class ControlFactory -{ -public: - /** Create the menu button for the task bar. - */ - static VclPtr<RadioButton> CreateMenuButton (vcl::Window* pParentWindow); - - static VclPtr<RadioButton> CreateTabItem (vcl::Window* pParentWindow); -}; - - -} // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/DrawHelper.hxx b/sfx2/inc/sidebar/DrawHelper.hxx index a066b157aee4..8ac1c7e51c49 100644 --- a/sfx2/inc/sidebar/DrawHelper.hxx +++ b/sfx2/inc/sidebar/DrawHelper.hxx @@ -36,8 +36,6 @@ public: const sal_Int32 nY, const sal_Int32 nHeight, const Color& rColor); static void DrawVerticalLine(vcl::RenderContext& rRenderContext, const sal_Int32 nTop, const sal_Int32 nBottom, const sal_Int32 nX, const sal_Int32 nWidth, const Color& rColor); - static void DrawRoundedRectangle(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBox, const sal_Int32 nCornerRadius, - const Color& rBorderColor, const Color& rFillColor); }; } // end of namespace sfx2::sidebar diff --git a/sfx2/inc/sidebar/MenuButton.hxx b/sfx2/inc/sidebar/MenuButton.hxx deleted file mode 100644 index eab32a463b64..000000000000 --- a/sfx2/inc/sidebar/MenuButton.hxx +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- 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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#pragma once - -#include <vcl/button.hxx> - -namespace sfx2::sidebar { - -class MenuButton final - : public RadioButton -{ -public: - MenuButton (vcl::Window* pParentWindow); - - virtual void Paint (vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rUpdateArea) override; - virtual void MouseMove (const MouseEvent& rEvent) override; - virtual void MouseButtonDown (const MouseEvent& rMouseEvent) override; - virtual void MouseButtonUp (const MouseEvent& rMouseEvent) override; - -protected: - using RadioButton::FillLayoutData; - -private: - bool mbIsLeftButtonDown; -}; - -} // end of namespace sfx2::sidebar - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/PanelTitleBar.hxx b/sfx2/inc/sidebar/PanelTitleBar.hxx index 63b7a3b9e7af..745fc8cd3030 100644 --- a/sfx2/inc/sidebar/PanelTitleBar.hxx +++ b/sfx2/inc/sidebar/PanelTitleBar.hxx @@ -45,6 +45,11 @@ public: void UpdateExpandedState(); + weld::Expander& GetExpander() + { + return *mxExpander; + } + virtual void DataChanged(const DataChangedEvent& rEvent) override; private: diff --git a/sfx2/inc/sidebar/TabItem.hxx b/sfx2/inc/sidebar/TabItem.hxx deleted file mode 100644 index 44e5cf6b5141..000000000000 --- a/sfx2/inc/sidebar/TabItem.hxx +++ /dev/null @@ -1,46 +0,0 @@ -/* -*- 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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#pragma once - -#include <vcl/button.hxx> - -namespace vcl { class Window; } - -namespace sfx2::sidebar { - -/** A single button in the tab bar. -*/ -class TabItem final - : public RadioButton -{ -public: - TabItem (vcl::Window* pParentWindow); - - virtual void Paint (vcl::RenderContext& rRenderContext, const tools::Rectangle& rUpdateArea) override; - virtual void MouseMove (const MouseEvent& rEvent) override; - virtual void MouseButtonDown (const MouseEvent& rMouseEvent) override; - virtual void MouseButtonUp (const MouseEvent& rMouseEvent) override; - -private: - bool mbIsLeftButtonDown; -}; - -} // end of namespace sfx2::sidebar - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |