LibreOffice Module vcl (master) 1
menubarupdateicon.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
20#pragma once
21
22#include <tools/link.hxx>
23#include <vcl/idle.hxx>
24#include <vcl/image.hxx>
25
26class BubbleWindow;
27class MenuBar;
28class SystemWindow;
29class VclSimpleEvent;
30class VclWindowEvent;
32
34{
35private:
36 OUString maBubbleTitle;
37 OUString maBubbleText;
42 std::vector<VclPtr<MenuBar>> maIconMBars;
43 std::vector<sal_uInt16> maIconIDs;
44
48
51
55
56 DECL_DLLPRIVATE_LINK(UserEventHdl, void*, void);
57 DECL_DLLPRIVATE_LINK(TimeOutHdl, Timer*, void);
58 DECL_DLLPRIVATE_LINK(WindowEventHdl, VclWindowEvent&, void);
59 DECL_DLLPRIVATE_LINK(ApplicationEventHdl, VclSimpleEvent&, void);
60 DECL_DLLPRIVATE_LINK(WaitTimeOutHdl, Timer*, void);
63
64 VclPtr<BubbleWindow> GetBubbleWindow();
65 void SetBubbleChanged();
66
67 sal_uInt16 GetIconID(MenuBar* pMenuBar) const;
68
69 void AddMenuBarIcon(SystemWindow& rSysWin, bool bAddEventHdl);
70 void RemoveMenuBarIcon(MenuBar* pMenuBar);
71 void RemoveMenuBarIcons();
72
73public:
76
77 void SetShowMenuIcon(bool bShowMenuIcon);
78 void SetShowBubble(bool bShowBubble);
79 void SetBubbleImage(const Image& rImage);
80 void SetBubbleTitle(const OUString& rTitle);
81 void SetBubbleText(const OUString& rText);
82
83 void SetClickHdl(const Link<LinkParamNone*, void>& rHdl) { maClickHdl = rHdl; }
84
85 bool GetShowMenuIcon() const { return mbShowMenuIcon; }
86 bool GetShowBubble() const { return mbShowBubble; }
87 const OUString& GetBubbleTitle() const { return maBubbleTitle; }
88 const OUString& GetBubbleText() const { return maBubbleText; }
89
90 void RemoveBubbleWindow();
91};
92
93/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
An idle is a timer to be scheduled immediately.
Definition: idle.hxx:35
Definition: image.hxx:40
Link< VclSimpleEvent &, void > maApplicationEventHdl
const OUString & GetBubbleTitle() const
Link< LinkParamNone *, void > maClickHdl
DECL_DLLPRIVATE_LINK(TimeOutHdl, Timer *, void)
void SetClickHdl(const Link< LinkParamNone *, void > &rHdl)
std::vector< sal_uInt16 > maIconIDs
Link< VclWindowEvent &, void > maWindowEventHdl
DECL_DLLPRIVATE_LINK(ClickHdl, MenuBarButtonCallbackArg &, bool)
DECL_DLLPRIVATE_LINK(HighlightHdl, MenuBarButtonCallbackArg &, bool)
DECL_DLLPRIVATE_LINK(WaitTimeOutHdl, Timer *, void)
DECL_DLLPRIVATE_LINK(ApplicationEventHdl, VclSimpleEvent &, void)
VclPtr< SystemWindow > mpActiveSysWin
const OUString & GetBubbleText() const
VclPtr< MenuBar > mpActiveMBar
VclPtr< BubbleWindow > mpBubbleWin
DECL_DLLPRIVATE_LINK(UserEventHdl, void *, void)
std::vector< VclPtr< MenuBar > > maIconMBars
DECL_DLLPRIVATE_LINK(WindowEventHdl, VclWindowEvent &, void)
Definition: timer.hxx:27
#define VCL_DLLPUBLIC
Definition: dllapi.h:29