LibreOffice Module sd (master) 1
TabControl.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <svtools/tabbar.hxx>
23#include <vcl/transfer.hxx>
24
25namespace sd {
26
31class DrawViewShell;
32
33class TabControl final
34 : public TabBar,
35 public DragSourceHelper,
36 public DropTargetHelper
37{
38public:
40 virtual void dispose() override;
41 virtual ~TabControl() override;
42
48
54
55private:
58
59 // TabBar
60 virtual void Select() override;
61 virtual void DoubleClick() override;
62 virtual void MouseButtonDown(const MouseEvent& rMEvt) override;
63
64 virtual void Command(const CommandEvent& rCEvt) override;
65
66 virtual bool StartRenaming() override;
68 virtual void EndRenaming() override;
69
70 virtual void ActivatePage() override;
71 virtual bool DeactivatePage() override;
72
73 // DragSourceHelper
74 virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
75
76 // DropTargetHelper
77 virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
78 virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
79
80 // nested class to implement the TransferableHelper
82 {
83 public:
84 explicit TabControlTransferable( TabControl& rParent ) :
85 mrParent( rParent ) {}
86 private:
87
89
90 virtual ~TabControlTransferable() override;
91
92 virtual void AddSupportedFormats() override;
93 virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
94 virtual void DragFinished( sal_Int8 nDropAction ) override;
95
96 };
97
99
100 void DragFinished();
101
102 using TabBar::StartDrag;
103};
104
105} // end of namespace sd
106
107/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool StartDrag(const CommandEvent &rCEvt, vcl::Region &rRegion)
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
virtual bool GetData(const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) override
Definition: tabcontr.cxx:47
virtual ~TabControlTransferable() override
Definition: tabcontr.cxx:38
virtual void DragFinished(sal_Int8 nDropAction) override
Definition: tabcontr.cxx:52
virtual void AddSupportedFormats() override
Definition: tabcontr.cxx:42
TabControlTransferable(TabControl &rParent)
Definition: TabControl.hxx:84
void SendDeactivatePageEvent()
Inform all listeners of this control that the current page has been deactivated.
Definition: tabcontr.cxx:350
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
Definition: tabcontr.cxx:198
virtual ~TabControl() override
Definition: tabcontr.cxx:70
DrawViewShell * pDrViewSh
Definition: TabControl.hxx:56
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
Definition: tabcontr.cxx:159
virtual void EndRenaming() override
Definition: tabcontr.cxx:323
virtual bool DeactivatePage() override
Definition: tabcontr.cxx:339
virtual void dispose() override
Definition: tabcontr.cxx:75
virtual bool StartRenaming() override
Definition: tabcontr.cxx:283
virtual void ActivatePage() override
Definition: tabcontr.cxx:329
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
Definition: tabcontr.cxx:89
void DragFinished()
Definition: tabcontr.cxx:154
virtual TabBarAllowRenamingReturnCode AllowRenaming() override
Definition: tabcontr.cxx:300
void SendActivatePageEvent()
Inform all listeners of this control that the current page has been activated.
Definition: tabcontr.cxx:344
virtual void DoubleClick() override
Definition: tabcontr.cxx:136
TabControl(DrawViewShell *pDrViewSh, vcl::Window *pParent)
Definition: tabcontr.cxx:57
virtual void Command(const CommandEvent &rCEvt) override
Definition: tabcontr.cxx:274
virtual void StartDrag(sal_Int8 nAction, const Point &rPosPixel) override
Definition: tabcontr.cxx:146
virtual void Select() override
Definition: tabcontr.cxx:82
TabBarAllowRenamingReturnCode
signed char sal_Int8