tdf#154285 Check upper bound of arguments in SbRtl_Minute function
[LibreOffice.git] / include / vcl / vclevent.hxx
blob2bdf07d9c254ba0687ca2a2f01ade1c6f259b0cf
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_VCL_VCLEVENT_HXX
21 #define INCLUDED_VCL_VCLEVENT_HXX
23 #include <vcl/dllapi.h>
24 #include <vcl/vclptr.hxx>
26 class Menu;
28 namespace vcl
30 class Window;
33 enum class VclEventId
35 NONE,
36 ApplicationDataChanged, // pData = DataChangedEvent*
37 ButtonClick,
38 CheckboxToggle,
39 ComboboxDeselect,
40 ComboboxDoubleClick,
41 ComboboxItemAdded, // pData = itempos
42 ComboboxItemRemoved, // pData = itempos, -1=All
43 ComboboxSelect,
44 ComboboxSetText,
45 ControlGetFocus,
46 ControlLoseFocus,
47 DropdownClose,
48 DropdownOpen,
49 DropdownPreOpen,
50 DropdownSelect,
51 EditCaretChanged,
52 EditModify,
53 EditSelectionChanged,
54 ExtTextInput,
55 EndExtTextInput,
56 ItemCollapsed,
57 ItemExpanded,
58 ListboxDoubleClick,
59 ListboxFocus,
60 ListboxItemAdded, // pData = itempos
61 ListboxItemRemoved, // pData = itempos, -1=All
62 ListboxScrolled,
63 ListboxSelect,
64 ListboxTreeFocus,
65 ListboxTreeSelect,
66 MenuAccessibleNameChanged,
67 MenuActivate,
68 MenuDeactivate,
69 MenuDehighlight,
70 MenuDisable,
71 MenuEnable,
72 MenuHide,
73 MenuHighlight,
74 MenuInsertItem,
75 MenuItemChecked,
76 MenuItemRoleChanged,
77 MenuItemTextChanged,
78 MenuItemUnchecked,
79 MenuRemoveItem,
80 MenuSelect,
81 MenuShow,
82 MenuSubmenuActivate,
83 MenuSubmenuChanged,
84 MenuSubmenuDeactivate,
85 ObjectDying,
86 PushbuttonToggle,
87 RadiobuttonToggle,
88 RoadmapItemSelected,
89 ScrollbarEndScroll,
90 ScrollbarScroll,
91 SpinbuttonDown,
92 SpinbuttonUp,
93 SpinfieldDown,
94 SpinfieldFirst,
95 SpinfieldLast,
96 SpinfieldUp,
97 StatusbarAllItemsRemoved,
98 StatusbarDrawItem, // pData = itemid
99 StatusbarHideItem, // pData = itemid
100 StatusbarItemAdded, // pData = itemid
101 StatusbarItemRemoved, // pData = itemid
102 StatusbarNameChanged, // pData = itemid
103 StatusbarShowItem, // pData = itemid
104 TabbarPageActivated, // pData = pageid
105 TabbarPageDeactivated, // pData = pageid
106 TabbarPageInserted, // pData = pageid
107 TabbarPageMoved, // pData = Pair( pagepos_old, pagepos_new )
108 TabbarPageRemoved, // pData = pageid
109 TabbarPageSelected, // pData = pageid
110 TabbarPageTextChanged, // pData = pageid
111 TableRowSelect,
112 TabpageActivate, // pData = pageid
113 TabpageDeactivate, // pData = pageid
114 TabpageInserted, // pData = pageid
115 TabpagePageTextChanged, // pData = pageid
116 TabpageRemoved, // pData = pageid
117 TabpageRemovedAll,
118 ToolboxActivate,
119 ToolboxAllItemsChanged,
120 ToolboxClick,
121 ToolboxDeactivate,
122 ToolboxDoubleClick,
123 ToolboxFormatChanged, // request new layout
124 ToolboxHighlight,
125 ToolboxHighlightOff, // pData = itempos
126 ToolboxItemAdded, // pData = itempos
127 ToolboxItemDisabled, // pData = itempos
128 ToolboxItemEnabled, // pData = itempos
129 ToolboxItemRemoved, // pData = itempos
130 ToolboxItemTextChanged, // pData = itempos
131 ToolboxItemUpdated,
132 ToolboxItemWindowChanged,
133 ToolboxSelect,
134 WindowActivate,
135 WindowChildDestroyed, // pData = vcl::Window*
136 WindowClose,
137 WindowCommand, // pData = CommandEvent*
138 WindowDataChanged, // pData = DataChangedEvent*
139 WindowDeactivate, // pData = vcl::Window* = pPrevActiveWindow
140 WindowDisabled,
141 WindowDocking,
142 WindowEnabled,
143 WindowEndDocking, // pData = EndDockingData
144 WindowEndPopupMode, // pData = EndPopupModeData
145 WindowFrameTitleChanged,// pData = OUString* = oldTitle
146 WindowGetFocus,
147 WindowHide,
148 WindowKeyInput, // pData = KeyEvent*
149 WindowKeyUp, // pData = KeyEvent*
150 WindowLoseFocus,
151 WindowMenubarAdded, // pData = pMenuBar
152 WindowMenubarRemoved, // pData = pMenuBar
153 WindowMinimize,
154 WindowMouseButtonDown, // pData = MouseEvent*
155 WindowMouseButtonUp, // pData = MouseEvent*
156 WindowMouseMove, // pData = MouseEvent*
157 WindowMove,
158 WindowNormalize,
159 WindowPaint, // pData = Rectangle*
160 WindowPrepareToggleFloating, // pData = bool
161 WindowResize,
162 WindowShow,
163 WindowStartDocking, // pData = DockingData
164 WindowToggleFloating,
165 WindowGestureEvent,
168 class VCL_DLLPUBLIC VclSimpleEvent
170 private:
171 VclEventId nId;
173 VclSimpleEvent(VclSimpleEvent const &) = delete;
174 VclSimpleEvent& operator =(VclSimpleEvent const &) = delete;
176 public:
177 VclSimpleEvent( VclEventId n ) { nId = n; }
178 virtual ~VclSimpleEvent() {}
180 VclEventId GetId() const { return nId; }
183 class VCL_DLLPUBLIC VclWindowEvent final : public VclSimpleEvent
185 private:
186 VclPtr<vcl::Window> pWindow;
187 void* pData;
189 public:
190 VclWindowEvent( vcl::Window* pWin, VclEventId n, void* pDat );
191 virtual ~VclWindowEvent() override;
193 vcl::Window* GetWindow() const { return pWindow; }
194 void* GetData() const { return pData; }
197 class VCL_DLLPUBLIC VclMenuEvent final : public VclSimpleEvent
199 private:
200 VclPtr<Menu> pMenu;
201 sal_uInt16 mnPos;
203 VclMenuEvent(VclMenuEvent const &) = delete;
204 VclMenuEvent& operator =(VclMenuEvent const &) = delete;
206 public:
207 VclMenuEvent( Menu* pM, VclEventId n, sal_uInt16 nPos );
208 virtual ~VclMenuEvent() override;
210 Menu* GetMenu() const;
211 sal_uInt16 GetItemPos() const { return mnPos; }
214 #endif // INCLUDED_VCL_VCLEVENT_HXX
216 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */