Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / vcl / vclevent.hxx
blobe56ed670cc1e762ed3ad3db4faaca141e1ea2c6f
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 #include <com/sun/star/uno/Reference.hxx>
28 class Menu;
30 namespace com { namespace sun { namespace star {
31 namespace accessibility {
32 class XAccessible;
34 }}}
36 namespace vcl
38 class Window;
41 enum class VclEventId
43 NONE,
44 ApplicationDataChanged, // pData = DataChangedEvent*
45 ButtonClick,
46 CheckboxToggle,
47 ComboboxDeselect,
48 ComboboxDoubleClick,
49 ComboboxItemAdded, // pData = itempos
50 ComboboxItemRemoved, // pData = itempos, -1=All
51 ComboboxSelect,
52 ComboboxSetText,
53 ControlGetFocus,
54 ControlLoseFocus,
55 DropdownClose,
56 DropdownOpen,
57 DropdownPreOpen,
58 DropdownSelect,
59 EditCaretChanged,
60 EditModify,
61 EditSelectionChanged,
62 ItemCollapsed,
63 ItemExpanded,
64 ListboxDoubleClick,
65 ListboxFocus,
66 ListboxItemAdded, // pData = itempos
67 ListboxItemRemoved, // pData = itempos, -1=All
68 ListboxScrolled,
69 ListboxSelect,
70 ListboxStateUpdate,
71 ListboxTreeFocus,
72 ListboxTreeSelect,
73 MenuActivate,
74 MenuDeactivate,
75 MenuDehighlight,
76 MenuDisable,
77 MenuEnable,
78 MenuHide,
79 MenuHighlight,
80 MenuInsertItem,
81 MenuItemChecked,
82 MenuItemTextChanged,
83 MenuItemUnchecked,
84 MenuRemoveItem,
85 MenuSelect,
86 MenuShow,
87 MenuSubmenuActivate,
88 MenuSubmenuChanged,
89 MenuSubmenuDeactivate,
90 ObjectDying,
91 PushbuttonToggle,
92 RadiobuttonToggle,
93 RoadmapItemSelected,
94 ScrollbarEndScroll,
95 ScrollbarScroll,
96 SpinbuttonDown,
97 SpinbuttonUp,
98 SpinfieldDown,
99 SpinfieldFirst,
100 SpinfieldLast,
101 SpinfieldUp,
102 StatusbarAllItemsRemoved,
103 StatusbarClick,
104 StatusbarDoubleClick,
105 StatusbarDrawItem, // pData = itemid
106 StatusbarHideItem, // pData = itemid
107 StatusbarItemAdded, // pData = itemid
108 StatusbarItemRemoved, // pData = itemid
109 StatusbarNameChanged, // pData = itemid
110 StatusbarShowItem, // pData = itemid
111 TabbarPageActivated, // pData = pageid
112 TabbarPageDeactivated, // pData = pageid
113 TabbarPageInserted, // pData = pageid
114 TabbarPageMoved, // pData = Pair( pagepos_old, pagepos_new )
115 TabbarPageRemoved, // pData = pageid
116 TabbarPageSelected, // pData = pageid
117 TabbarPageTextChanged, // pData = pageid
118 TableCellNameChanged, // pData = struct(Entry, Column, oldText)
119 TableRowSelect,
120 TabpageActivate, // pData = pageid
121 TabpageDeactivate, // pData = pageid
122 TabpageInserted, // pData = pageid
123 TabpagePageTextChanged, // pData = pageid
124 TabpageRemoved, // pData = pageid
125 TabpageRemovedAll,
126 ToolboxActivate,
127 ToolboxAllItemsChanged,
128 ToolboxButtonStateChanged, // pData = itempos
129 ToolboxClick,
130 ToolboxDeactivate,
131 ToolboxDoubleClick,
132 ToolboxFormatChanged, // request new layout
133 ToolboxHighlight,
134 ToolboxHighlightOff, // pData = itempos
135 ToolboxItemAdded, // pData = itempos
136 ToolboxItemDisabled, // pData = itempos
137 ToolboxItemEnabled, // pData = itempos
138 ToolboxItemRemoved, // pData = itempos
139 ToolboxItemTextChanged, // pData = itempos
140 ToolboxItemUpdated,
141 ToolboxItemWindowChanged,
142 ToolboxSelect,
143 WindowActivate,
144 WindowChildCreated, // pData = vcl::Window*
145 WindowChildDestroyed, // pData = vcl::Window*
146 WindowClose,
147 WindowCommand, // pData = CommandEvent*
148 WindowDataChanged, // pData = DataChangedEvent*
149 WindowDeactivate, // pData = vcl::Window* = pPrevActiveWindow
150 WindowDisabled,
151 WindowDocking,
152 WindowEnabled,
153 WindowEndDocking, // pData = EndDockingData
154 WindowEndPopupMode, // pData = EndPopupModeData
155 WindowFrameTitleChanged,// pData = OUString* = oldTitle
156 WindowGetFocus,
157 WindowHide,
158 WindowKeyInput, // pData = KeyEvent*
159 WindowKeyUp, // pData = KeyEvent*
160 WindowLoseFocus,
161 WindowMenubarAdded, // pData = pMenuBar
162 WindowMenubarRemoved, // pData = pMenuBar
163 WindowMinimize,
164 WindowMouseButtonDown, // pData = MouseEvent*
165 WindowMouseButtonUp, // pData = MouseEvent*
166 WindowMouseMove, // pData = MouseEvent*
167 WindowMove,
168 WindowNormalize,
169 WindowPaint, // pData = Rectangle*
170 WindowPrepareToggleFloating, // pData = bool
171 WindowResize,
172 WindowShow,
173 WindowStartDocking, // pData = DockingData
174 WindowToggleFloating,
177 class VCL_DLLPUBLIC VclSimpleEvent
179 private:
180 VclEventId nId;
182 VclSimpleEvent(VclSimpleEvent &) = delete;
183 void operator =(VclSimpleEvent) = delete;
185 public:
186 VclSimpleEvent( VclEventId n ) { nId = n; }
187 virtual ~VclSimpleEvent() {}
189 VclEventId GetId() const { return nId; }
192 class VCL_DLLPUBLIC VclWindowEvent : public VclSimpleEvent
194 private:
195 VclPtr<vcl::Window> pWindow;
196 void* pData;
198 public:
199 VclWindowEvent( vcl::Window* pWin, VclEventId n, void* pDat );
200 virtual ~VclWindowEvent() override;
202 vcl::Window* GetWindow() const { return pWindow; }
203 void* GetData() const { return pData; }
206 class VCL_DLLPUBLIC VclMenuEvent : public VclSimpleEvent
208 private:
209 VclPtr<Menu> pMenu;
210 sal_uInt16 mnPos;
212 VclMenuEvent(VclMenuEvent &) = delete;
213 void operator =(VclMenuEvent) = delete;
215 public:
216 VclMenuEvent( Menu* pM, VclEventId n, sal_uInt16 nPos );
217 virtual ~VclMenuEvent() override;
219 Menu* GetMenu() const;
220 sal_uInt16 GetItemPos() const { return mnPos; }
223 class VCL_DLLPUBLIC VclAccessibleEvent: public VclSimpleEvent
225 public:
226 VclAccessibleEvent( VclEventId n, const css::uno::Reference< css::accessibility::XAccessible >& rxAccessible );
227 virtual ~VclAccessibleEvent() override;
228 const css::uno::Reference< css::accessibility::XAccessible >& GetAccessible() const { return mxAccessible;}
230 private:
231 css::uno::Reference< css::accessibility::XAccessible > mxAccessible;
234 #endif // INCLUDED_VCL_VCLEVENT_HXX
236 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */