LibreOffice Module sd (master) 1
PaneChildWindows.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 <PaneChildWindows.hxx>
21#include <titledockwin.hxx>
22#include <ViewShellBase.hxx>
24#include <app.hrc>
25#include <strings.hrc>
26#include <sdresid.hxx>
27
28#include <sfx2/bindings.hxx>
29#include <sfx2/dispatch.hxx>
30
31namespace sd {
32
33
34SFX_IMPL_DOCKINGWINDOW_WITHID(LeftPaneImpressChildWindow, SID_LEFT_PANE_IMPRESS)
35SFX_IMPL_DOCKINGWINDOW_WITHID(LeftPaneDrawChildWindow, SID_LEFT_PANE_DRAW)
36
37//===== PaneChildWindow =======================================================
39 vcl::Window* pParentWindow,
40 sal_uInt16 nId,
41 SfxBindings* pBindings,
42 SfxChildWinInfo* pInfo,
43 TranslateId pTitleBarResId)
44 : SfxChildWindow (pParentWindow, nId)
45{
47 pBindings,
48 this,
49 pParentWindow,
50 SdResId(pTitleBarResId)));
51 SetAlignment(SfxChildAlignment::LEFT);
52 SfxDockingWindow* pDockingWindow = static_cast<SfxDockingWindow*>(GetWindow());
53 pDockingWindow->EnableInput();
54 pDockingWindow->Initialize(pInfo);
55 SetHideNotDelete(true);
56
57 ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pBindings->GetDispatcher()->GetFrame());
58 if (pBase != nullptr)
59 {
60 framework::FrameworkHelper::Instance(*pBase)->UpdateConfiguration();
61 }
62}
63
65{
66 ViewShellBase* pBase = nullptr;
67 TitledDockingWindow* pDockingWindow = dynamic_cast<TitledDockingWindow*>(GetWindow());
68 if (pDockingWindow != nullptr)
70 pDockingWindow->GetBindings().GetDispatcher()->GetFrame());
71 if (pBase != nullptr)
72 framework::FrameworkHelper::Instance(*pBase)->UpdateConfiguration();
73}
74
75//===== LeftPaneImpressChildWindow ============================================
77 vcl::Window* pParentWindow,
78 sal_uInt16 nId,
79 SfxBindings* pBindings,
80 SfxChildWinInfo* pInfo)
82 pParentWindow,
83 nId,
84 pBindings,
85 pInfo,
86 STR_LEFT_PANE_IMPRESS_TITLE)
87{
88}
89
90//===== LeftPaneDrawChildWindow ===============================================
92 vcl::Window* pParentWindow,
93 sal_uInt16 nId,
94 SfxBindings* pBindings,
95 SfxChildWinInfo* pInfo)
97 pParentWindow,
98 nId,
99 pBindings,
100 pInfo,
101 STR_LEFT_PANE_DRAW_TITLE)
102{
103}
104
105} // end of namespace ::sd
106
107/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxDispatcher * GetDispatcher() const
vcl::Window * GetWindow() const
SfxViewFrame * GetFrame() const
void Initialize(SfxChildWinInfo *pInfo)
SfxBindings & GetBindings() const
LeftPaneDrawChildWindow(vcl::Window *pParentWindow, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo)
LeftPaneImpressChildWindow(vcl::Window *pParentWindow, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo)
Base class of Impress and Draw left sidebars/panes.
virtual ~PaneChildWindow() override
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
static ViewShellBase * GetViewShellBase(SfxViewFrame const *pFrame)
When given a view frame this static method returns the corresponding sd::ViewShellBase object.
An SdWindow contains the actual working area of ViewShell.
Definition: Window.hxx:45
static ::std::shared_ptr< FrameworkHelper > Instance(ViewShellBase &rBase)
Return the FrameworkHelper object that is associated with the given ViewShellBase.
SFX_IMPL_DOCKINGWINDOW_WITHID(SvxFontWorkChildWindow, SID_FONTWORK)
sal_Int16 nId
OUString SdResId(TranslateId aId)
Definition: sdmod.cxx:83