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 #include <com/sun/star/uno/Reference.hxx>
27 
28 class Menu;
29 
31  class XAccessible;
32 }
33 
34 namespace vcl
35 {
36  class Window;
37 }
38 
39 enum class VclEventId
40 {
41  NONE,
42  ApplicationDataChanged, // pData = DataChangedEvent*
47  ComboboxItemAdded, // pData = itempos
48  ComboboxItemRemoved, // pData = itempos, -1=All
58  EditModify,
66  ListboxItemAdded, // pData = itempos
67  ListboxItemRemoved, // pData = itempos, -1=All
76  MenuEnable,
77  MenuHide,
84  MenuSelect,
85  MenuShow,
100  SpinfieldUp,
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
125  ToolboxClick,
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*
141  WindowClose,
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
152  WindowHide,
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*
162  WindowMove,
164  WindowPaint, // pData = Rectangle*
165  WindowPrepareToggleFloating, // pData = bool
166  WindowResize,
167  WindowShow,
168  WindowStartDocking, // pData = DockingData
171 };
172 
174 {
175 private:
177 
178  VclSimpleEvent(VclSimpleEvent const &) = delete;
179  VclSimpleEvent& operator =(VclSimpleEvent const &) = delete;
180 
181 public:
182  VclSimpleEvent( VclEventId n ) { nId = n; }
183  virtual ~VclSimpleEvent() {}
184 
185  VclEventId GetId() const { return nId; }
186 };
187 
189 {
190 private:
192  void* pData;
193 
194 public:
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 {
204 private:
206  sal_uInt16 mnPos;
207 
208  VclMenuEvent(VclMenuEvent const &) = delete;
209  VclMenuEvent& operator =(VclMenuEvent const &) = delete;
210 
211 public:
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: */
virtual ~VclSimpleEvent()
Definition: vclevent.hxx:183
VclEventId GetId() const
Definition: vclevent.hxx:185
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
sal_uInt16 GetItemPos() const
Definition: vclevent.hxx:216
VclEventId
Definition: vclevent.hxx:39
VclPtr< Menu > pMenu
Definition: vclevent.hxx:205
VclSimpleEvent(VclEventId n)
Definition: vclevent.hxx:182
void * GetData() const
Definition: vclevent.hxx:199
VclSimpleEvent & operator=(VclSimpleEvent const &)=delete
sal_uInt16 mnPos
Definition: vclevent.hxx:206
VclEventId nId
Definition: vclevent.hxx:176
VclPtr< vcl::Window > pWindow
Definition: vclevent.hxx:191
Definition: menu.hxx:118
vcl::Window * GetWindow() const
Definition: vclevent.hxx:198