LibreOffice Module svx (master) 1
labelitemwindow.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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
11
12LabelItemWindow::LabelItemWindow(vcl::Window* pParent, const OUString& rLabel)
13 : InterimItemWindow(pParent, "svx/ui/labelbox.ui", "LabelBox")
14 , m_xLabel(m_xBuilder->weld_label("label"))
15{
17
18 m_xLabel->set_label(rLabel);
19
21
22 m_xLabel->set_toolbar_background();
23}
24
26{
27 Size aSize(m_xLabel->get_preferred_size());
28 aSize.AdjustWidth(12);
29
30 SetSizePixel(aSize);
31}
32
33void LabelItemWindow::set_label(const OUString& rLabel) { m_xLabel->set_label(rLabel); }
34
35OUString LabelItemWindow::get_label() const { return m_xLabel->get_label(); }
36
38{
39 m_xLabel.reset();
41}
42
44
45/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
virtual void dispose() override
void InitControlBase(weld::Widget *pWidget)
void set_label(const OUString &rLabel)
virtual void dispose() override
LabelItemWindow(vcl::Window *pParent, const OUString &rLabel)
OUString get_label() const
std::unique_ptr< weld::Label > m_xLabel
virtual ~LabelItemWindow() override
tools::Long AdjustWidth(tools::Long n)
std::unique_ptr< weld::Label > m_xLabel
virtual void SetSizePixel(const Size &rNewSize)