diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-03-04 17:31:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-03-11 10:00:31 +0100 |
commit | ccb2b0078f07194befa61f1e3fd88e53ff236871 (patch) | |
tree | 0bfe058721741581eb3ef6489737fdbd902f8d04 /vcl/inc | |
parent | 96d0cf0d7bccfea0b9d867cf00a17c7a2409aa87 (diff) |
weld SvxMenuConfigPage/SvxToolbarConfigPage
Change-Id: I166ac6c0be8461ea38db711796d1e14fc5b78998
Reviewed-on: https://gerrit.libreoffice.org/68889
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/salframe.hxx | 11 | ||||
-rw-r--r-- | vcl/inc/treeglue.hxx | 79 |
2 files changed, 89 insertions, 1 deletions
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx index 70f06988db4b..b77ceafa8079 100644 --- a/vcl/inc/salframe.hxx +++ b/vcl/inc/salframe.hxx @@ -28,7 +28,6 @@ #include <o3tl/typed_flags_set.hxx> #include <vcl/window.hxx> -#include <vcl/weld.hxx> // complete vcl::Window for SalFrame::CallCallback under -fsanitize=function class AllSettings; @@ -52,6 +51,15 @@ namespace o3tl { template<> struct typed_flags<SalFrameToTop> : is_typed_flags<SalFrameToTop, 0x0f> {}; }; +namespace vcl { class KeyCode; } + +namespace weld +{ + class Window; +} + +enum class FloatWinPopupFlags; + // SalFrame styles enum class SalFrameStyleFlags { @@ -81,6 +89,7 @@ enum class SalFrameStyleFlags // toolwindows should be painted with a smaller decoration TOOLWINDOW = 0x40000000, }; + namespace o3tl { template<> struct typed_flags<SalFrameStyleFlags> : is_typed_flags<SalFrameStyleFlags, 0x788001ff> {}; }; diff --git a/vcl/inc/treeglue.hxx b/vcl/inc/treeglue.hxx new file mode 100644 index 000000000000..a314c7099e2a --- /dev/null +++ b/vcl/inc/treeglue.hxx @@ -0,0 +1,79 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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 <vcl/svtabbx.hxx> + +//the default NotifyStartDrag is weird to me, and defaults to enabling all +//possibilities when drag starts, while restricting it to some subset of +//the configured drag drop mode would make more sense to me, but I'm not +//going to change the baseclass + +class LclHeaderTabListBox : public SvHeaderTabListBox +{ +public: + LclHeaderTabListBox(vcl::Window* pParent, WinBits nWinStyle) + : SvHeaderTabListBox(pParent, nWinStyle) + { + } + + virtual DragDropMode NotifyStartDrag(TransferDataContainer&, SvTreeListEntry*) override + { + return GetDragDropMode(); + } +}; + +class LclTabListBox : public SvTabListBox +{ + Link<SvTreeListBox*, void> m_aModelChangedHdl; + +public: + LclTabListBox(vcl::Window* pParent, WinBits nWinStyle) + : SvTabListBox(pParent, nWinStyle) + { + } + + void SetModelChangedHdl(const Link<SvTreeListBox*, void>& rLink) { m_aModelChangedHdl = rLink; } + + virtual DragDropMode NotifyStartDrag(TransferDataContainer&, SvTreeListEntry*) override + { + return GetDragDropMode(); + } + + virtual void ModelHasCleared() override + { + SvTabListBox::ModelHasCleared(); + m_aModelChangedHdl.Call(this); + } + + virtual void ModelHasInserted(SvTreeListEntry* pEntry) override + { + SvTabListBox::ModelHasInserted(pEntry); + m_aModelChangedHdl.Call(this); + } + + virtual void ModelHasInsertedTree(SvTreeListEntry* pEntry) override + { + SvTabListBox::ModelHasInsertedTree(pEntry); + m_aModelChangedHdl.Call(this); + } + + virtual void ModelHasMoved(SvTreeListEntry* pSource) override + { + SvTabListBox::ModelHasMoved(pSource); + m_aModelChangedHdl.Call(this); + } + + virtual void ModelHasRemoved(SvTreeListEntry* pEntry) override + { + SvTabListBox::ModelHasRemoved(pEntry); + m_aModelChangedHdl.Call(this); + } +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |