LibreOffice Module sfx2 (master)
1
sfx2
inc
sidebar
TitleBar.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/Theme.hxx
>
22
#include <
vcl/weld.hxx
>
23
24
namespace
sfx2::sidebar
{
25
26
class
TitleBar
27
{
28
public
:
29
TitleBar
(
weld::Builder
& rBuilder,
Theme::ThemeItem
eThemeItem);
30
virtual
~TitleBar
();
31
32
virtual
void
SetTitle
(
const
OUString& rsTitle) = 0;
33
virtual
OUString
GetTitle
()
const
= 0;
34
35
virtual
void
DataChanged
();
36
37
void
Show
(
bool
bShow);
38
bool
GetVisible
()
const
;
39
40
Size
get_preferred_size
()
const
;
41
42
void
SetIcon
(
const
css::uno::Reference<css::graphic::XGraphic>& rIcon);
43
44
weld::Toolbar
&
GetToolBox
()
45
{
46
return
*
mxToolBox
;
47
}
48
const
weld::Toolbar
&
GetToolBox
()
const
49
{
50
return
*
mxToolBox
;
51
}
52
53
protected
:
54
weld::Builder
&
mrBuilder
;
55
std::unique_ptr<weld::Box>
mxTitlebar
;
56
std::unique_ptr<weld::Image>
mxAddonImage
;
57
std::unique_ptr<weld::Toolbar>
mxToolBox
;
58
Theme::ThemeItem
meThemeItem
;
59
60
virtual
void
HandleToolBoxItemClick
() = 0;
61
62
DECL_LINK
(SelectionHandler,
const
OUString&,
void
);
63
64
private
:
65
void
SetBackground
();
66
};
67
68
}
// end of namespace sfx2::sidebar
69
70
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Theme.hxx
Size
sfx2::sidebar::Theme::ThemeItem
ThemeItem
Definition:
Theme.hxx:47
sfx2::sidebar::TitleBar
Definition:
TitleBar.hxx:27
sfx2::sidebar::TitleBar::~TitleBar
virtual ~TitleBar()
Definition:
TitleBar.cxx:48
sfx2::sidebar::TitleBar::GetVisible
bool GetVisible() const
Definition:
TitleBar.cxx:62
sfx2::sidebar::TitleBar::GetToolBox
weld::Toolbar & GetToolBox()
Definition:
TitleBar.hxx:44
sfx2::sidebar::TitleBar::meThemeItem
Theme::ThemeItem meThemeItem
Definition:
TitleBar.hxx:58
sfx2::sidebar::TitleBar::HandleToolBoxItemClick
virtual void HandleToolBoxItemClick()=0
sfx2::sidebar::TitleBar::SetIcon
void SetIcon(const css::uno::Reference< css::graphic::XGraphic > &rIcon)
Definition:
TitleBar.cxx:67
sfx2::sidebar::TitleBar::DataChanged
virtual void DataChanged()
Definition:
TitleBar.cxx:43
sfx2::sidebar::TitleBar::mrBuilder
weld::Builder & mrBuilder
Definition:
TitleBar.hxx:54
sfx2::sidebar::TitleBar::TitleBar
TitleBar(weld::Builder &rBuilder, Theme::ThemeItem eThemeItem)
Definition:
TitleBar.cxx:24
sfx2::sidebar::TitleBar::Show
void Show(bool bShow)
Definition:
TitleBar.cxx:57
sfx2::sidebar::TitleBar::GetTitle
virtual OUString GetTitle() const =0
sfx2::sidebar::TitleBar::mxTitlebar
std::unique_ptr< weld::Box > mxTitlebar
Definition:
TitleBar.hxx:55
sfx2::sidebar::TitleBar::mxAddonImage
std::unique_ptr< weld::Image > mxAddonImage
Definition:
TitleBar.hxx:56
sfx2::sidebar::TitleBar::GetToolBox
const weld::Toolbar & GetToolBox() const
Definition:
TitleBar.hxx:48
sfx2::sidebar::TitleBar::mxToolBox
std::unique_ptr< weld::Toolbar > mxToolBox
Definition:
TitleBar.hxx:57
sfx2::sidebar::TitleBar::DECL_LINK
DECL_LINK(SelectionHandler, const OUString &, void)
sfx2::sidebar::TitleBar::get_preferred_size
Size get_preferred_size() const
Definition:
TitleBar.cxx:52
sfx2::sidebar::TitleBar::SetTitle
virtual void SetTitle(const OUString &rsTitle)=0
sfx2::sidebar::TitleBar::SetBackground
void SetBackground()
Definition:
TitleBar.cxx:36
weld::Builder
weld::Toolbar
sfx2::sidebar
Definition:
appdata.hxx:56
weld.hxx
Generated on Sun Jul 30 2023 04:33:36 for LibreOffice Module sfx2 (master) by
1.9.3