LibreOffice Module framework (master) 1
statusbaritem.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 <com/sun/star/ui/XStatusbarItem.hpp>
23#include <vcl/vclptr.hxx>
24
25class StatusBar;
26
27namespace framework
28{
29
30struct AddonStatusbarItemData;
31
33
35{
36public:
37 explicit StatusbarItem(
38 StatusBar *pStatusBar,
39 sal_uInt16 nId,
40 OUString aCommand );
41 virtual ~StatusbarItem() override;
42
43 void disposing(std::unique_lock<std::mutex>&) override;
44
45 // css::ui::XStatusbarItem Attributes
46 virtual OUString SAL_CALL getCommand() override;
47 virtual ::sal_uInt16 SAL_CALL getItemId() override;
48 virtual ::sal_uInt32 SAL_CALL getWidth() override;
49 virtual ::sal_uInt16 SAL_CALL getStyle() override;
50 virtual ::sal_Int32 SAL_CALL getOffset() override;
51 virtual css::awt::Rectangle SAL_CALL getItemRect() override;
52 virtual OUString SAL_CALL getText() override;
53 virtual void SAL_CALL setText( const OUString& rText ) override;
54 virtual OUString SAL_CALL getHelpText() override;
55 virtual void SAL_CALL setHelpText( const OUString& rHelpText ) override;
56 virtual OUString SAL_CALL getQuickHelpText() override;
57 virtual void SAL_CALL setQuickHelpText( const OUString& rQuickHelpText ) override;
58 virtual OUString SAL_CALL getAccessibleName() override;
59 virtual void SAL_CALL setAccessibleName( const OUString& rAccessibleName ) override;
60 virtual sal_Bool SAL_CALL getVisible() override;
61 virtual void SAL_CALL setVisible( sal_Bool bVisible ) override;
62
63 // css::ui::XStatusbarItem Methods
64 virtual void SAL_CALL repaint( ) override;
65
66private:
68 sal_uInt16 m_nId;
69 sal_uInt16 m_nStyle;
70 OUString m_aCommand;
71
72};
73
74}
75
76/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_Bool SAL_CALL getVisible() override
virtual ::sal_uInt16 SAL_CALL getStyle() override
virtual ~StatusbarItem() override
virtual void SAL_CALL setVisible(sal_Bool bVisible) override
virtual void SAL_CALL setQuickHelpText(const OUString &rQuickHelpText) override
virtual void SAL_CALL repaint() override
virtual void SAL_CALL setAccessibleName(const OUString &rAccessibleName) override
void disposing(std::unique_lock< std::mutex > &) override
virtual OUString SAL_CALL getQuickHelpText() override
virtual OUString SAL_CALL getCommand() override
virtual OUString SAL_CALL getAccessibleName() override
virtual OUString SAL_CALL getHelpText() override
virtual ::sal_Int32 SAL_CALL getOffset() override
virtual css::awt::Rectangle SAL_CALL getItemRect() override
StatusbarItem(StatusBar *pStatusBar, sal_uInt16 nId, OUString aCommand)
virtual void SAL_CALL setText(const OUString &rText) override
virtual OUString SAL_CALL getText() override
virtual ::sal_uInt16 SAL_CALL getItemId() override
VclPtr< StatusBar > m_pStatusBar
virtual void SAL_CALL setHelpText(const OUString &rHelpText) override
virtual ::sal_uInt32 SAL_CALL getWidth() override
comphelper::WeakComponentImplHelper< css::ui::XStatusbarItem > StatusbarItem_Base
sal_Int16 nId
bool bVisible
OUString aCommand
unsigned char sal_Bool