LibreOffice Module vcl (master)
1
include
vcl
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
26
class
BubbleWindow
;
27
class
MenuBar
;
28
class
SystemWindow
;
29
class
VclSimpleEvent
;
30
class
VclWindowEvent
;
31
struct
MenuBarButtonCallbackArg
;
32
33
class
VCL_DLLPUBLIC
MenuBarUpdateIconManager
34
{
35
private
:
36
OUString
maBubbleTitle
;
37
OUString
maBubbleText
;
38
Image
maBubbleImage
;
39
VclPtr<BubbleWindow>
mpBubbleWin
;
40
VclPtr<SystemWindow>
mpActiveSysWin
;
41
VclPtr<MenuBar>
mpActiveMBar
;
42
std::vector<VclPtr<MenuBar>>
maIconMBars
;
43
std::vector<sal_uInt16>
maIconIDs
;
44
45
Link<VclWindowEvent&, void>
maWindowEventHdl
;
46
Link<VclSimpleEvent&, void>
maApplicationEventHdl
;
47
Link<LinkParamNone*, void>
maClickHdl
;
48
49
Timer
maTimeoutTimer
;
50
Idle
maWaitIdle
;
51
52
bool
mbShowMenuIcon
;
53
bool
mbShowBubble
;
54
bool
mbBubbleChanged
;
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
);
61
DECL_DLLPRIVATE_LINK
(ClickHdl,
MenuBarButtonCallbackArg
&,
bool
);
62
DECL_DLLPRIVATE_LINK
(HighlightHdl,
MenuBarButtonCallbackArg
&,
bool
);
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
73
public
:
74
MenuBarUpdateIconManager
();
75
~MenuBarUpdateIconManager
();
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: */
BubbleWindow
Definition:
bubblewindow.hxx:27
Idle
An idle is a timer to be scheduled immediately.
Definition:
idle.hxx:35
Image
Definition:
image.hxx:40
Link< VclWindowEvent &, void >
MenuBarUpdateIconManager
Definition:
menubarupdateicon.hxx:34
MenuBarUpdateIconManager::maApplicationEventHdl
Link< VclSimpleEvent &, void > maApplicationEventHdl
Definition:
menubarupdateicon.hxx:46
MenuBarUpdateIconManager::GetBubbleTitle
const OUString & GetBubbleTitle() const
Definition:
menubarupdateicon.hxx:87
MenuBarUpdateIconManager::maClickHdl
Link< LinkParamNone *, void > maClickHdl
Definition:
menubarupdateicon.hxx:47
MenuBarUpdateIconManager::DECL_DLLPRIVATE_LINK
DECL_DLLPRIVATE_LINK(TimeOutHdl, Timer *, void)
MenuBarUpdateIconManager::maBubbleImage
Image maBubbleImage
Definition:
menubarupdateicon.hxx:38
MenuBarUpdateIconManager::mbShowMenuIcon
bool mbShowMenuIcon
Definition:
menubarupdateicon.hxx:52
MenuBarUpdateIconManager::SetClickHdl
void SetClickHdl(const Link< LinkParamNone *, void > &rHdl)
Definition:
menubarupdateicon.hxx:83
MenuBarUpdateIconManager::maIconIDs
std::vector< sal_uInt16 > maIconIDs
Definition:
menubarupdateicon.hxx:43
MenuBarUpdateIconManager::maWindowEventHdl
Link< VclWindowEvent &, void > maWindowEventHdl
Definition:
menubarupdateicon.hxx:45
MenuBarUpdateIconManager::DECL_DLLPRIVATE_LINK
DECL_DLLPRIVATE_LINK(ClickHdl, MenuBarButtonCallbackArg &, bool)
MenuBarUpdateIconManager::DECL_DLLPRIVATE_LINK
DECL_DLLPRIVATE_LINK(HighlightHdl, MenuBarButtonCallbackArg &, bool)
MenuBarUpdateIconManager::DECL_DLLPRIVATE_LINK
DECL_DLLPRIVATE_LINK(WaitTimeOutHdl, Timer *, void)
MenuBarUpdateIconManager::maTimeoutTimer
Timer maTimeoutTimer
Definition:
menubarupdateicon.hxx:49
MenuBarUpdateIconManager::DECL_DLLPRIVATE_LINK
DECL_DLLPRIVATE_LINK(ApplicationEventHdl, VclSimpleEvent &, void)
MenuBarUpdateIconManager::GetShowMenuIcon
bool GetShowMenuIcon() const
Definition:
menubarupdateicon.hxx:85
MenuBarUpdateIconManager::mpActiveSysWin
VclPtr< SystemWindow > mpActiveSysWin
Definition:
menubarupdateicon.hxx:40
MenuBarUpdateIconManager::mbShowBubble
bool mbShowBubble
Definition:
menubarupdateicon.hxx:53
MenuBarUpdateIconManager::mbBubbleChanged
bool mbBubbleChanged
Definition:
menubarupdateicon.hxx:54
MenuBarUpdateIconManager::GetBubbleText
const OUString & GetBubbleText() const
Definition:
menubarupdateicon.hxx:88
MenuBarUpdateIconManager::maBubbleText
OUString maBubbleText
Definition:
menubarupdateicon.hxx:37
MenuBarUpdateIconManager::GetShowBubble
bool GetShowBubble() const
Definition:
menubarupdateicon.hxx:86
MenuBarUpdateIconManager::mpActiveMBar
VclPtr< MenuBar > mpActiveMBar
Definition:
menubarupdateicon.hxx:41
MenuBarUpdateIconManager::maWaitIdle
Idle maWaitIdle
Definition:
menubarupdateicon.hxx:50
MenuBarUpdateIconManager::maBubbleTitle
OUString maBubbleTitle
Definition:
menubarupdateicon.hxx:36
MenuBarUpdateIconManager::mpBubbleWin
VclPtr< BubbleWindow > mpBubbleWin
Definition:
menubarupdateicon.hxx:39
MenuBarUpdateIconManager::DECL_DLLPRIVATE_LINK
DECL_DLLPRIVATE_LINK(UserEventHdl, void *, void)
MenuBarUpdateIconManager::maIconMBars
std::vector< VclPtr< MenuBar > > maIconMBars
Definition:
menubarupdateicon.hxx:42
MenuBarUpdateIconManager::DECL_DLLPRIVATE_LINK
DECL_DLLPRIVATE_LINK(WindowEventHdl, VclWindowEvent &, void)
MenuBar
Definition:
menu.hxx:413
SystemWindow
Definition:
syswin.hxx:95
Timer
Definition:
timer.hxx:27
VclPtr< BubbleWindow >
VclSimpleEvent
Definition:
vclevent.hxx:174
VclWindowEvent
Definition:
vclevent.hxx:189
VCL_DLLPUBLIC
#define VCL_DLLPUBLIC
Definition:
dllapi.h:29
idle.hxx
image.hxx
link.hxx
MenuBarButtonCallbackArg
Definition:
menu.hxx:407
Generated on Sun Jul 30 2023 04:34:49 for LibreOffice Module vcl (master) by
1.9.3