LibreOffice Module vcl (master) 1
vclevent.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#ifndef INCLUDED_VCL_VCLEVENT_HXX
21#define INCLUDED_VCL_VCLEVENT_HXX
22
23#include <vcl/dllapi.h>
24#include <vcl/vclptr.hxx>
25
26class Menu;
27
29 class XAccessible;
30}
31
32namespace vcl
33{
34 class Window;
35}
36
37enum class VclEventId
38{
39 NONE,
40 ApplicationDataChanged, // pData = DataChangedEvent*
45 ComboboxItemAdded, // pData = itempos
46 ComboboxItemRemoved, // pData = itempos, -1=All
64 ListboxItemAdded, // pData = itempos
65 ListboxItemRemoved, // pData = itempos, -1=All
102 StatusbarDrawItem, // pData = itemid
103 StatusbarHideItem, // pData = itemid
104 StatusbarItemAdded, // pData = itemid
105 StatusbarItemRemoved, // pData = itemid
106 StatusbarNameChanged, // pData = itemid
107 StatusbarShowItem, // pData = itemid
108 TabbarPageActivated, // pData = pageid
109 TabbarPageDeactivated, // pData = pageid
110 TabbarPageInserted, // pData = pageid
111 TabbarPageMoved, // pData = Pair( pagepos_old, pagepos_new )
112 TabbarPageRemoved, // pData = pageid
113 TabbarPageSelected, // pData = pageid
114 TabbarPageTextChanged, // pData = pageid
116 TabpageActivate, // pData = pageid
117 TabpageDeactivate, // pData = pageid
118 TabpageInserted, // pData = pageid
119 TabpagePageTextChanged, // pData = pageid
120 TabpageRemoved, // pData = pageid
124 ToolboxButtonStateChanged, // pData = itempos
128 ToolboxFormatChanged, // request new layout
130 ToolboxHighlightOff, // pData = itempos
131 ToolboxItemAdded, // pData = itempos
132 ToolboxItemDisabled, // pData = itempos
133 ToolboxItemEnabled, // pData = itempos
134 ToolboxItemRemoved, // pData = itempos
135 ToolboxItemTextChanged, // pData = itempos
140 WindowChildDestroyed, // pData = vcl::Window*
142 WindowCommand, // pData = CommandEvent*
143 WindowDataChanged, // pData = DataChangedEvent*
144 WindowDeactivate, // pData = vcl::Window* = pPrevActiveWindow
148 WindowEndDocking, // pData = EndDockingData
149 WindowEndPopupMode, // pData = EndPopupModeData
150 WindowFrameTitleChanged,// pData = OUString* = oldTitle
153 WindowKeyInput, // pData = KeyEvent*
154 WindowKeyUp, // pData = KeyEvent*
156 WindowMenubarAdded, // pData = pMenuBar
157 WindowMenubarRemoved, // pData = pMenuBar
159 WindowMouseButtonDown, // pData = MouseEvent*
160 WindowMouseButtonUp, // pData = MouseEvent*
161 WindowMouseMove, // pData = MouseEvent*
164 WindowPaint, // pData = Rectangle*
165 WindowPrepareToggleFloating, // pData = bool
168 WindowStartDocking, // pData = DockingData
171};
172
174{
175private:
177
179 VclSimpleEvent& operator =(VclSimpleEvent const &) = delete;
180
181public:
183 virtual ~VclSimpleEvent() {}
184
185 VclEventId GetId() const { return nId; }
186};
187
189{
190private:
192 void* pData;
193
194public:
195 VclWindowEvent( vcl::Window* pWin, VclEventId n, void* pDat );
196 virtual ~VclWindowEvent() override;
197
198 vcl::Window* GetWindow() const { return pWindow; }
199 void* GetData() const { return pData; }
200};
201
203{
204private:
206 sal_uInt16 mnPos;
207
208 VclMenuEvent(VclMenuEvent const &) = delete;
209 VclMenuEvent& operator =(VclMenuEvent const &) = delete;
210
211public:
212 VclMenuEvent( Menu* pM, VclEventId n, sal_uInt16 nPos );
213 virtual ~VclMenuEvent() override;
214
215 Menu* GetMenu() const;
216 sal_uInt16 GetItemPos() const { return mnPos; }
217};
218
219#endif // INCLUDED_VCL_VCLEVENT_HXX
220
221/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: menu.hxx:116
sal_uInt16 GetItemPos() const
Definition: vclevent.hxx:216
VclMenuEvent(VclMenuEvent const &)=delete
VclPtr< Menu > pMenu
Definition: vclevent.hxx:205
sal_uInt16 mnPos
Definition: vclevent.hxx:206
VclSimpleEvent(VclEventId n)
Definition: vclevent.hxx:182
VclSimpleEvent(VclSimpleEvent const &)=delete
VclEventId nId
Definition: vclevent.hxx:176
virtual ~VclSimpleEvent()
Definition: vclevent.hxx:183
VclEventId GetId() const
Definition: vclevent.hxx:185
void * GetData() const
Definition: vclevent.hxx:199
vcl::Window * GetWindow() const
Definition: vclevent.hxx:198
VclPtr< vcl::Window > pWindow
Definition: vclevent.hxx:191
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
sal_Int64 n
std::unique_ptr< sal_Int32[]> pData
std::vector< SvtDynMenuEntry > GetMenu(EDynamicMenuType eMenu)
NONE
sal_Int16 nId
@ EndExtTextInput
@ MenuDeactivate
VclEventId
Definition: vclevent.hxx:38
@ StatusbarNameChanged
@ MenuSubmenuChanged
@ WindowMenubarAdded
@ ToolboxItemUpdated
@ TabbarPageInserted
@ ComboboxDoubleClick
@ ToolboxItemEnabled
@ TabbarPageDeactivated
@ WindowMenubarRemoved
@ ToolboxFormatChanged
@ TabbarPageActivated
@ WindowEndPopupMode
@ ToolboxItemWindowChanged
@ TabbarPageTextChanged
@ WindowMouseButtonDown
@ TabpagePageTextChanged
@ ToolboxItemRemoved
@ ToolboxDoubleClick
@ MenuItemRoleChanged
@ WindowGestureEvent
@ ToolboxButtonStateChanged
@ WindowChildDestroyed
@ MenuSubmenuDeactivate
@ WindowStartDocking
@ ListboxItemRemoved
@ ToolboxItemTextChanged
@ ApplicationDataChanged
@ RoadmapItemSelected
@ WindowFrameTitleChanged
@ WindowPrepareToggleFloating
@ ScrollbarEndScroll
@ ListboxDoubleClick
@ ToolboxItemDisabled
@ ComboboxItemRemoved
@ StatusbarAllItemsRemoved
@ StatusbarItemRemoved
@ WindowToggleFloating
@ StatusbarItemAdded
@ TabbarPageSelected
@ ToolboxAllItemsChanged
@ MenuItemTextChanged
@ EditSelectionChanged
@ WindowMouseButtonUp
@ MenuAccessibleNameChanged
@ ToolboxHighlightOff
@ MenuSubmenuActivate