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 
30 namespace com { namespace sun { namespace star {
31  namespace accessibility {
32  class XAccessible;
33  }
34 }}}
35 
36 namespace vcl
37 {
38  class Window;
39 }
40 
41 enum class VclEventId
42 {
43  NONE,
44  ApplicationDataChanged, // pData = DataChangedEvent*
49  ComboboxItemAdded, // pData = itempos
50  ComboboxItemRemoved, // pData = itempos, -1=All
60  EditModify,
68  ListboxItemAdded, // pData = itempos
69  ListboxItemRemoved, // pData = itempos, -1=All
78  MenuEnable,
79  MenuHide,
86  MenuSelect,
87  MenuShow,
102  SpinfieldUp,
104  StatusbarDrawItem, // pData = itemid
105  StatusbarHideItem, // pData = itemid
106  StatusbarItemAdded, // pData = itemid
107  StatusbarItemRemoved, // pData = itemid
108  StatusbarNameChanged, // pData = itemid
109  StatusbarShowItem, // pData = itemid
110  TabbarPageActivated, // pData = pageid
111  TabbarPageDeactivated, // pData = pageid
112  TabbarPageInserted, // pData = pageid
113  TabbarPageMoved, // pData = Pair( pagepos_old, pagepos_new )
114  TabbarPageRemoved, // pData = pageid
115  TabbarPageSelected, // pData = pageid
116  TabbarPageTextChanged, // pData = pageid
118  TabpageActivate, // pData = pageid
119  TabpageDeactivate, // pData = pageid
120  TabpageInserted, // pData = pageid
121  TabpagePageTextChanged, // pData = pageid
122  TabpageRemoved, // pData = pageid
126  ToolboxButtonStateChanged, // pData = itempos
127  ToolboxClick,
130  ToolboxFormatChanged, // request new layout
132  ToolboxHighlightOff, // pData = itempos
133  ToolboxItemAdded, // pData = itempos
134  ToolboxItemDisabled, // pData = itempos
135  ToolboxItemEnabled, // pData = itempos
136  ToolboxItemRemoved, // pData = itempos
137  ToolboxItemTextChanged, // pData = itempos
142  WindowChildDestroyed, // pData = vcl::Window*
143  WindowClose,
144  WindowCommand, // pData = CommandEvent*
145  WindowDataChanged, // pData = DataChangedEvent*
146  WindowDeactivate, // pData = vcl::Window* = pPrevActiveWindow
150  WindowEndDocking, // pData = EndDockingData
151  WindowEndPopupMode, // pData = EndPopupModeData
152  WindowFrameTitleChanged,// pData = OUString* = oldTitle
154  WindowHide,
155  WindowKeyInput, // pData = KeyEvent*
156  WindowKeyUp, // pData = KeyEvent*
158  WindowMenubarAdded, // pData = pMenuBar
159  WindowMenubarRemoved, // pData = pMenuBar
161  WindowMouseButtonDown, // pData = MouseEvent*
162  WindowMouseButtonUp, // pData = MouseEvent*
163  WindowMouseMove, // pData = MouseEvent*
164  WindowMove,
166  WindowPaint, // pData = Rectangle*
167  WindowPrepareToggleFloating, // pData = bool
168  WindowResize,
169  WindowShow,
170  WindowStartDocking, // pData = DockingData
173 };
174 
176 {
177 private:
179 
180  VclSimpleEvent(VclSimpleEvent const &) = delete;
181  VclSimpleEvent& operator =(VclSimpleEvent const &) = delete;
182 
183 public:
184  VclSimpleEvent( VclEventId n ) { nId = n; }
185  virtual ~VclSimpleEvent() {}
186 
187  VclEventId GetId() const { return nId; }
188 };
189 
191 {
192 private:
194  void* pData;
195 
196 public:
197  VclWindowEvent( vcl::Window* pWin, VclEventId n, void* pDat );
198  virtual ~VclWindowEvent() override;
199 
200  vcl::Window* GetWindow() const { return pWindow; }
201  void* GetData() const { return pData; }
202 };
203 
205 {
206 private:
208  sal_uInt16 const mnPos;
209 
210  VclMenuEvent(VclMenuEvent const &) = delete;
211  VclMenuEvent& operator =(VclMenuEvent const &) = delete;
212 
213 public:
214  VclMenuEvent( Menu* pM, VclEventId n, sal_uInt16 nPos );
215  virtual ~VclMenuEvent() override;
216 
217  Menu* GetMenu() const;
218  sal_uInt16 GetItemPos() const { return mnPos; }
219 };
220 
222 {
223 public:
224  VclAccessibleEvent( VclEventId n, const css::uno::Reference< css::accessibility::XAccessible >& rxAccessible );
225  virtual ~VclAccessibleEvent() override;
226  const css::uno::Reference< css::accessibility::XAccessible >& GetAccessible() const { return mxAccessible;}
227 
228 private:
229  css::uno::Reference< css::accessibility::XAccessible > mxAccessible;
230 };
231 
232 #endif // INCLUDED_VCL_VCLEVENT_HXX
233 
234 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~VclSimpleEvent()
Definition: vclevent.hxx:185
VclEventId GetId() const
Definition: vclevent.hxx:187
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
sal_uInt16 const mnPos
Definition: vclevent.hxx:208
sal_Int64 n
css::uno::Reference< css::accessibility::XAccessible > mxAccessible
Definition: vclevent.hxx:229
sal_uInt16 GetItemPos() const
Definition: vclevent.hxx:218
VclEventId
Definition: vclevent.hxx:41
VclPtr< Menu > pMenu
Definition: vclevent.hxx:207
VclSimpleEvent(VclEventId n)
Definition: vclevent.hxx:184
void * GetData() const
Definition: vclevent.hxx:201
VclSimpleEvent & operator=(VclSimpleEvent const &)=delete
const css::uno::Reference< css::accessibility::XAccessible > & GetAccessible() const
Definition: vclevent.hxx:226
VclEventId nId
Definition: vclevent.hxx:178
VclPtr< vcl::Window > pWindow
Definition: vclevent.hxx:193
Definition: menu.hxx:121
vcl::Window * GetWindow() const
Definition: vclevent.hxx:200