LibreOffice Module sd (master) 1
grviewsh.cxx
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#include <GraphicViewShell.hxx>
21#include <LayerTabBar.hxx>
22#include <FrameView.hxx>
23#include <sfx2/objsh.hxx>
24#include <sfx2/viewfrm.hxx>
25
26constexpr sal_Int32 TAB_HEIGHT_MARGIN = 10;
27
28namespace sd {
29
31 ViewShellBase& rViewShellBase,
32 vcl::Window* pParentWindow,
33 FrameView* pFrameView)
35 rViewShellBase,
36 pParentWindow,
38 pFrameView)
39{
41}
42
44{
45}
46
48{
50
52
53 // #i67363# no layer tabbar in preview mode
54 if ( !GetObjectShell()->IsPreview() )
55 mpLayerTabBar->Show();
56}
57
59 EditMode eMode,
60 bool )
61{
62 // There is no page tab that could be shown instead of the layer tab.
63 // Therefore we have it always visible regardless of what the caller
64 // said. (We have to change the callers behaviour, of course.)
66}
67
69{
70 if (mpLayerTabBar && mpLayerTabBar->IsVisible())
71 {
72 Size aSize = mpLayerTabBar->GetSizePixel();
73 const Size aFrameSize (GetViewFrame()->GetWindow().GetOutputSizePixel());
74
76 aSize.setWidth( aFrameSize.Width() );
77
78 Point aPos (0, maViewSize.Height() - aSize.Height());
79
80 mpLayerTabBar->SetPosSizePixel (aPos, aSize);
81 }
82
84}
85
86} // end of namespace sd
87
88/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual SfxObjectShell * GetObjectShell()
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
virtual void ChangeEditMode(EditMode eMode, bool bIsLayerModeActive)
Set status (enabled/disabled) of menu SfxSlots.
Definition: drviews1.cxx:333
virtual void ArrangeGUIElements() override
Arrange and resize the GUI elements like rulers, sliders, and buttons as well as the actual document ...
Definition: drviews5.cxx:99
View for MDIFrame.
Definition: FrameView.hxx:36
GraphicViewShell(ViewShellBase &rViewShellBase, vcl::Window *pParentWindow, FrameView *pFrameView)
Create a new view shell for the Draw application.
Definition: grviewsh.cxx:30
virtual void ChangeEditMode(EditMode eMode, bool bIsLayerModeActive) override
Override this method in order to have the layer mode always active.
Definition: grviewsh.cxx:58
void ConstructGraphicViewShell()
Definition: grviewsh.cxx:47
virtual void ArrangeGUIElements() override
Arrange and resize the GUI elements like rulers, sliders, and buttons as well as the actual document ...
Definition: grviewsh.cxx:68
virtual ~GraphicViewShell() override
Definition: grviewsh.cxx:43
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
ShellType meShellType
The type of the shell. Returned by GetShellType().
Definition: ViewShell.hxx:483
vcl::Window * GetParentWindow() const
Return the window that is the parent of all controls of this view shell.
Definition: ViewShell.hxx:140
VclPtr< LayerTabBar > mpLayerTabBar
Layer tab bar.
Definition: ViewShell.hxx:445
SD_DLLPUBLIC SfxViewFrame * GetViewFrame() const
Definition: viewshel.cxx:118
constexpr sal_Int32 TAB_HEIGHT_MARGIN
Definition: grviewsh.cxx:26
Mode eMode
size_t GetFontHeight()
vcl::Font GetFont(vcl::Font const &rFont, DrawModeFlags nDrawMode, StyleSettings const &rStyleSettings)
EditMode
Definition: pres.hxx:53
PageKind
Definition: pres.hxx:45