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
117  TableCellNameChanged, // pData = struct(Entry, Column, oldText)
119  TabpageActivate, // pData = pageid
120  TabpageDeactivate, // pData = pageid
121  TabpageInserted, // pData = pageid
122  TabpagePageTextChanged, // pData = pageid
123  TabpageRemoved, // pData = pageid
127  ToolboxButtonStateChanged, // pData = itempos
128  ToolboxClick,
131  ToolboxFormatChanged, // request new layout
133  ToolboxHighlightOff, // pData = itempos
134  ToolboxItemAdded, // pData = itempos
135  ToolboxItemDisabled, // pData = itempos
136  ToolboxItemEnabled, // pData = itempos
137  ToolboxItemRemoved, // pData = itempos
138  ToolboxItemTextChanged, // pData = itempos
143  WindowChildDestroyed, // pData = vcl::Window*
144  WindowClose,
145  WindowCommand, // pData = CommandEvent*
146  WindowDataChanged, // pData = DataChangedEvent*
147  WindowDeactivate, // pData = vcl::Window* = pPrevActiveWindow
151  WindowEndDocking, // pData = EndDockingData
152  WindowEndPopupMode, // pData = EndPopupModeData
153  WindowFrameTitleChanged,// pData = OUString* = oldTitle
155  WindowHide,
156  WindowKeyInput, // pData = KeyEvent*
157  WindowKeyUp, // pData = KeyEvent*
159  WindowMenubarAdded, // pData = pMenuBar
160  WindowMenubarRemoved, // pData = pMenuBar
162  WindowMouseButtonDown, // pData = MouseEvent*
163  WindowMouseButtonUp, // pData = MouseEvent*
164  WindowMouseMove, // pData = MouseEvent*
165  WindowMove,
167  WindowPaint, // pData = Rectangle*
168  WindowPrepareToggleFloating, // pData = bool
169  WindowResize,
170  WindowShow,
171  WindowStartDocking, // pData = DockingData
174 };
175 
177 {
178 private:
180 
181  VclSimpleEvent(VclSimpleEvent const &) = delete;
182  VclSimpleEvent& operator =(VclSimpleEvent const &) = delete;
183 
184 public:
185  VclSimpleEvent( VclEventId n ) { nId = n; }
186  virtual ~VclSimpleEvent() {}
187 
188  VclEventId GetId() const { return nId; }
189 };
190 
192 {
193 private:
195  void* pData;
196 
197 public:
198  VclWindowEvent( vcl::Window* pWin, VclEventId n, void* pDat );
199  virtual ~VclWindowEvent() override;
200 
201  vcl::Window* GetWindow() const { return pWindow; }
202  void* GetData() const { return pData; }
203 };
204 
206 {
207 private:
209  sal_uInt16 const mnPos;
210 
211  VclMenuEvent(VclMenuEvent const &) = delete;
212  VclMenuEvent& operator =(VclMenuEvent const &) = delete;
213 
214 public:
215  VclMenuEvent( Menu* pM, VclEventId n, sal_uInt16 nPos );
216  virtual ~VclMenuEvent() override;
217 
218  Menu* GetMenu() const;
219  sal_uInt16 GetItemPos() const { return mnPos; }
220 };
221 
223 {
224 public:
225  VclAccessibleEvent( VclEventId n, const css::uno::Reference< css::accessibility::XAccessible >& rxAccessible );
226  virtual ~VclAccessibleEvent() override;
227  const css::uno::Reference< css::accessibility::XAccessible >& GetAccessible() const { return mxAccessible;}
228 
229 private:
230  css::uno::Reference< css::accessibility::XAccessible > mxAccessible;
231 };
232 
233 #endif // INCLUDED_VCL_VCLEVENT_HXX
234 
235 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~VclSimpleEvent()
Definition: vclevent.hxx:186
VclEventId GetId() const
Definition: vclevent.hxx:188
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
sal_uInt16 const mnPos
Definition: vclevent.hxx:209
css::uno::Reference< css::accessibility::XAccessible > mxAccessible
Definition: vclevent.hxx:230
sal_uInt16 GetItemPos() const
Definition: vclevent.hxx:219
VclEventId
Definition: vclevent.hxx:41
VclPtr< Menu > pMenu
Definition: vclevent.hxx:208
VclSimpleEvent(VclEventId n)
Definition: vclevent.hxx:185
void * GetData() const
Definition: vclevent.hxx:202
VclSimpleEvent & operator=(VclSimpleEvent const &)=delete
const css::uno::Reference< css::accessibility::XAccessible > & GetAccessible() const
Definition: vclevent.hxx:227
VclEventId nId
Definition: vclevent.hxx:179
VclPtr< vcl::Window > pWindow
Definition: vclevent.hxx:194
Definition: menu.hxx:121
vcl::Window * GetWindow() const
Definition: vclevent.hxx:201