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 
26 class Menu;
27 
29  class XAccessible;
30 }
31 
32 namespace vcl
33 {
34  class Window;
35 }
36 
37 enum class VclEventId
38 {
39  NONE,
40  ApplicationDataChanged, // pData = DataChangedEvent*
45  ComboboxItemAdded, // pData = itempos
46  ComboboxItemRemoved, // pData = itempos, -1=All
56  EditModify,
64  ListboxItemAdded, // pData = itempos
65  ListboxItemRemoved, // pData = itempos, -1=All
75  MenuEnable,
76  MenuHide,
83  MenuSelect,
84  MenuShow,
101  StatusbarDrawItem, // pData = itemid
102  StatusbarHideItem, // pData = itemid
103  StatusbarItemAdded, // pData = itemid
104  StatusbarItemRemoved, // pData = itemid
105  StatusbarNameChanged, // pData = itemid
106  StatusbarShowItem, // pData = itemid
107  TabbarPageActivated, // pData = pageid
108  TabbarPageDeactivated, // pData = pageid
109  TabbarPageInserted, // pData = pageid
110  TabbarPageMoved, // pData = Pair( pagepos_old, pagepos_new )
111  TabbarPageRemoved, // pData = pageid
112  TabbarPageSelected, // pData = pageid
113  TabbarPageTextChanged, // pData = pageid
115  TabpageActivate, // pData = pageid
116  TabpageDeactivate, // pData = pageid
117  TabpageInserted, // pData = pageid
118  TabpagePageTextChanged, // pData = pageid
119  TabpageRemoved, // pData = pageid
123  ToolboxButtonStateChanged, // pData = itempos
124  ToolboxClick,
127  ToolboxFormatChanged, // request new layout
129  ToolboxHighlightOff, // pData = itempos
130  ToolboxItemAdded, // pData = itempos
131  ToolboxItemDisabled, // pData = itempos
132  ToolboxItemEnabled, // pData = itempos
133  ToolboxItemRemoved, // pData = itempos
134  ToolboxItemTextChanged, // pData = itempos
139  WindowChildDestroyed, // pData = vcl::Window*
140  WindowClose,
141  WindowCommand, // pData = CommandEvent*
142  WindowDataChanged, // pData = DataChangedEvent*
143  WindowDeactivate, // pData = vcl::Window* = pPrevActiveWindow
147  WindowEndDocking, // pData = EndDockingData
148  WindowEndPopupMode, // pData = EndPopupModeData
149  WindowFrameTitleChanged,// pData = OUString* = oldTitle
151  WindowHide,
152  WindowKeyInput, // pData = KeyEvent*
153  WindowKeyUp, // pData = KeyEvent*
155  WindowMenubarAdded, // pData = pMenuBar
156  WindowMenubarRemoved, // pData = pMenuBar
158  WindowMouseButtonDown, // pData = MouseEvent*
159  WindowMouseButtonUp, // pData = MouseEvent*
160  WindowMouseMove, // pData = MouseEvent*
161  WindowMove,
163  WindowPaint, // pData = Rectangle*
164  WindowPrepareToggleFloating, // pData = bool
165  WindowResize,
166  WindowShow,
167  WindowStartDocking, // pData = DockingData
170 };
171 
173 {
174 private:
176 
177  VclSimpleEvent(VclSimpleEvent const &) = delete;
178  VclSimpleEvent& operator =(VclSimpleEvent const &) = delete;
179 
180 public:
181  VclSimpleEvent( VclEventId n ) { nId = n; }
182  virtual ~VclSimpleEvent() {}
183 
184  VclEventId GetId() const { return nId; }
185 };
186 
188 {
189 private:
191  void* pData;
192 
193 public:
194  VclWindowEvent( vcl::Window* pWin, VclEventId n, void* pDat );
195  virtual ~VclWindowEvent() override;
196 
197  vcl::Window* GetWindow() const { return pWindow; }
198  void* GetData() const { return pData; }
199 };
200 
202 {
203 private:
205  sal_uInt16 mnPos;
206 
207  VclMenuEvent(VclMenuEvent const &) = delete;
208  VclMenuEvent& operator =(VclMenuEvent const &) = delete;
209 
210 public:
211  VclMenuEvent( Menu* pM, VclEventId n, sal_uInt16 nPos );
212  virtual ~VclMenuEvent() override;
213 
214  Menu* GetMenu() const;
215  sal_uInt16 GetItemPos() const { return mnPos; }
216 };
217 
218 #endif // INCLUDED_VCL_VCLEVENT_HXX
219 
220 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~VclSimpleEvent()
Definition: vclevent.hxx:182
VclEventId GetId() const
Definition: vclevent.hxx:184
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
sal_uInt16 GetItemPos() const
Definition: vclevent.hxx:215
VclEventId
Definition: vclevent.hxx:37
VclPtr< Menu > pMenu
Definition: vclevent.hxx:204
VclSimpleEvent(VclEventId n)
Definition: vclevent.hxx:181
void * GetData() const
Definition: vclevent.hxx:198
VclSimpleEvent & operator=(VclSimpleEvent const &)=delete
sal_uInt16 mnPos
Definition: vclevent.hxx:205
VclEventId nId
Definition: vclevent.hxx:175
VclPtr< vcl::Window > pWindow
Definition: vclevent.hxx:190
Definition: menu.hxx:118
vcl::Window * GetWindow() const
Definition: vclevent.hxx:197