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 #include <vcl/menu.hxx>
26 
27 class BubbleWindow;
28 class SystemWindow;
29 class VclSimpleEvent;
30 class VclWindowEvent;
31 
33 {
34 private:
35  OUString maBubbleTitle;
36  OUString maBubbleText;
41 
45 
48 
49  sal_uInt16 mnIconID;
50 
54 
55  DECL_LINK(UserEventHdl, void*, void);
56  DECL_LINK(TimeOutHdl, Timer*, void);
57  DECL_LINK(WindowEventHdl, VclWindowEvent&, void);
58  DECL_LINK(ApplicationEventHdl, VclSimpleEvent&, void);
59  DECL_LINK(WaitTimeOutHdl, Timer*, void);
61  DECL_LINK(HighlightHdl, MenuBar::MenuBarButtonCallbackArg&, bool);
62 
63  VclPtr<BubbleWindow> GetBubbleWindow();
64  void SetBubbleChanged();
65 
66 public:
69 
70  void SetShowMenuIcon(bool bShowMenuIcon);
71  void SetShowBubble(bool bShowBubble);
72  void SetBubbleImage(const Image& rImage);
73  void SetBubbleTitle(const OUString& rTitle);
74  void SetBubbleText(const OUString& rText);
75 
76  void SetClickHdl(const Link<LinkParamNone*, void>& rHdl) { maClickHdl = rHdl; }
77 
78  bool GetShowMenuIcon() const { return mbShowMenuIcon; }
79  bool GetShowBubble() const { return mbShowBubble; }
80  OUString GetBubbleTitle() const { return maBubbleTitle; }
81  OUString GetBubbleText() const { return maBubbleText; }
82 
83  void RemoveBubbleWindow(bool bRemoveIcon);
84 
85  void AddMenuBarIcon(SystemWindow* pSysWin, bool bAddEventHdl);
86 };
87 
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
Link< VclWindowEvent &, void > maWindowEventHdl
OUString GetBubbleTitle() const
VclPtr< MenuBar > mpIconMBar
VclPtr< SystemWindow > mpIconSysWin
VclPtr< BubbleWindow > mpBubbleWin
Definition: image.hxx:39
Link< VclSimpleEvent &, void > maApplicationEventHdl
Definition: timer.hxx:26
OUString GetBubbleText() const
Link< LinkParamNone *, void > maClickHdl
void SetClickHdl(const Link< LinkParamNone *, void > &rHdl)
An idle is a timer to be scheduled immediately.
Definition: idle.hxx:34