LibreOffice Module sfx2 (master)
1
include
sfx2
sidebar
Deck.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
#pragma once
20
21
#include <
sfx2/sidebar/Panel.hxx
>
22
#include <
vcl/InterimItemWindow.hxx
>
23
#include <
vcl/weld.hxx
>
24
25
namespace
sfx2::sidebar
26
{
27
class
DeckDescriptor;
28
class
DeckTitleBar;
29
class
SidebarDockingWindow;
30
37
class
Deck
final :
public
InterimItemWindow
38
{
39
public
:
40
Deck
(
const
DeckDescriptor
& rDeckDescriptor,
SidebarDockingWindow
* pParentWindow,
41
const
std::function<
void
()>& rCloserAction);
42
virtual
~Deck
()
override
;
43
virtual
void
dispose
()
override
;
44
45
const
OUString&
GetId
()
const
{
return
msId
; }
46
47
DeckTitleBar
*
GetTitleBar
()
const
;
48
tools::Rectangle
GetContentArea
()
const
;
49
void
ResetPanels
(
SharedPanelContainer
&& rPanels);
50
const
SharedPanelContainer
&
GetPanels
()
const
{
return
maPanels
; }
51
52
std::shared_ptr<Panel>
GetPanel
(std::u16string_view panelId);
53
54
void
RequestLayout
();
55
weld::Widget
*
GetPanelParentWindow
();
56
61
void
ShowPanel
(
const
Panel
& rPanel);
62
63
virtual
void
DataChanged
(
const
DataChangedEvent
& rEvent)
override
;
64
65
virtual
void
DumpAsPropertyTree
(
tools::JsonWriter
&)
override
;
66
67
sal_Int32
GetMinimalWidth
()
const
{
return
mnMinimalWidth
; }
68
69
static
void
LOKSendSidebarFullUpdate
();
70
71
private
:
72
void
RequestLayoutInternal
();
73
74
private
:
75
const
OUString
msId
;
76
sal_Int32
mnMinimalWidth
;
77
sal_Int32
mnScrolledWindowExtraWidth
;
78
sal_Int32
mnMinimalHeight
;
79
SharedPanelContainer
maPanels
;
80
81
VclPtr<SidebarDockingWindow>
mxParentWindow
;
82
std::unique_ptr<DeckTitleBar>
mxTitleBar
;
83
std::unique_ptr<weld::ScrolledWindow>
mxVerticalScrollBar
;
84
std::unique_ptr<weld::Box>
mxContents
;
85
};
86
87
}
// end of namespace sfx2::sidebar
88
89
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
InterimItemWindow.hxx
Panel.hxx
DataChangedEvent
InterimItemWindow
VclPtr
sfx2::sidebar::DeckDescriptor
Definition:
DeckDescriptor.hxx:28
sfx2::sidebar::DeckTitleBar
Definition:
DeckTitleBar.hxx:30
sfx2::sidebar::Deck
This is the parent window of the panels.
Definition:
Deck.hxx:38
sfx2::sidebar::Deck::GetId
const OUString & GetId() const
Definition:
Deck.hxx:45
sfx2::sidebar::Deck::~Deck
virtual ~Deck() override
Definition:
Deck.cxx:79
sfx2::sidebar::Deck::mxTitleBar
std::unique_ptr< DeckTitleBar > mxTitleBar
Definition:
Deck.hxx:82
sfx2::sidebar::Deck::GetPanelParentWindow
weld::Widget * GetPanelParentWindow()
Definition:
Deck.cxx:258
sfx2::sidebar::Deck::RequestLayoutInternal
void RequestLayoutInternal()
Definition:
Deck.cxx:208
sfx2::sidebar::Deck::mnScrolledWindowExtraWidth
sal_Int32 mnScrolledWindowExtraWidth
Definition:
Deck.hxx:77
sfx2::sidebar::Deck::mxVerticalScrollBar
std::unique_ptr< weld::ScrolledWindow > mxVerticalScrollBar
Definition:
Deck.hxx:83
sfx2::sidebar::Deck::Deck
Deck(const DeckDescriptor &rDeckDescriptor, SidebarDockingWindow *pParentWindow, const std::function< void()> &rCloserAction)
Definition:
Deck.cxx:49
sfx2::sidebar::Deck::maPanels
SharedPanelContainer maPanels
Definition:
Deck.hxx:79
sfx2::sidebar::Deck::DumpAsPropertyTree
virtual void DumpAsPropertyTree(tools::JsonWriter &) override
Definition:
Deck.cxx:137
sfx2::sidebar::Deck::mnMinimalHeight
sal_Int32 mnMinimalHeight
Definition:
Deck.hxx:78
sfx2::sidebar::Deck::GetPanel
std::shared_ptr< Panel > GetPanel(std::u16string_view panelId)
Definition:
Deck.cxx:263
sfx2::sidebar::Deck::ShowPanel
void ShowPanel(const Panel &rPanel)
Try to make the panel completely visible.
Definition:
Deck.cxx:276
sfx2::sidebar::Deck::msId
const OUString msId
Definition:
Deck.hxx:75
sfx2::sidebar::Deck::GetTitleBar
DeckTitleBar * GetTitleBar() const
Definition:
Deck.cxx:105
sfx2::sidebar::Deck::GetContentArea
tools::Rectangle GetContentArea() const
Definition:
Deck.cxx:110
sfx2::sidebar::Deck::LOKSendSidebarFullUpdate
static void LOKSendSidebarFullUpdate()
Definition:
Deck.cxx:40
sfx2::sidebar::Deck::mxContents
std::unique_ptr< weld::Box > mxContents
Definition:
Deck.hxx:84
sfx2::sidebar::Deck::dispose
virtual void dispose() override
Definition:
Deck.cxx:84
sfx2::sidebar::Deck::GetMinimalWidth
sal_Int32 GetMinimalWidth() const
Definition:
Deck.hxx:67
sfx2::sidebar::Deck::mxParentWindow
VclPtr< SidebarDockingWindow > mxParentWindow
Definition:
Deck.hxx:81
sfx2::sidebar::Deck::GetPanels
const SharedPanelContainer & GetPanels() const
Definition:
Deck.hxx:50
sfx2::sidebar::Deck::DataChanged
virtual void DataChanged(const DataChangedEvent &rEvent) override
Definition:
Deck.cxx:124
sfx2::sidebar::Deck::ResetPanels
void ResetPanels(SharedPanelContainer &&rPanels)
This container may contain existing panels that are being re-used, and new ones too.
Definition:
Deck.cxx:179
sfx2::sidebar::Deck::mnMinimalWidth
sal_Int32 mnMinimalWidth
Definition:
Deck.hxx:76
sfx2::sidebar::Deck::RequestLayout
void RequestLayout()
Definition:
Deck.cxx:226
sfx2::sidebar::Panel
Multiple panels form a single deck.
Definition:
Panel.hxx:54
sfx2::sidebar::SidebarDockingWindow
Definition:
SidebarDockingWindow.hxx:36
tools::JsonWriter
tools::Rectangle
weld::Widget
sfx2::sidebar
Definition:
appdata.hxx:56
sfx2::sidebar::SharedPanelContainer
std::vector< std::shared_ptr< Panel > > SharedPanelContainer
Definition:
Panel.hxx:118
weld.hxx
Generated on Sun Jul 30 2023 04:33:35 for LibreOffice Module sfx2 (master) by
1.9.3