libyui
 
Loading...
Searching...
No Matches
YSimpleEventHandler.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YSimpleEventHandler.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YSimpleEventHandler_h
26#define YSimpleEventHandler_h
27
28
29class YEvent;
30class YWidget;
31
32
40{
41public:
42
47
53 virtual ~YSimpleEventHandler();
54
68 void sendEvent( YEvent * event_disown );
69
73 bool eventPendingFor( YWidget * widget ) const;
74
80 YEvent * pendingEvent() const { return _pendingEvent; }
81
93
98 void deletePendingEventsFor( YWidget * widget );
99
103 void clear();
104
110 void blockEvents( bool block = true );
111
116 void unblockEvents() { blockEvents( false ); }
117
121 bool eventsBlocked() const { return _eventsBlocked; }
122
127 void deleteEvent( YEvent * event );
128
129
130protected:
131
132 // Data members
133
134 YEvent * _pendingEvent;
135 bool _eventsBlocked;
136};
137
138
139
140
141#endif // YSimpleEventHandler_h
Definition YEvent.h:44
void sendEvent(YEvent *event_disown)
Definition YSimpleEventHandler.cc:75
YSimpleEventHandler()
Definition YSimpleEventHandler.cc:37
bool eventPendingFor(YWidget *widget) const
Definition YSimpleEventHandler.cc:119
void deletePendingEventsFor(YWidget *widget)
Definition YSimpleEventHandler.cc:130
void clear()
Definition YSimpleEventHandler.cc:50
void deleteEvent(YEvent *event)
Definition YSimpleEventHandler.cc:156
void blockEvents(bool block=true)
Definition YSimpleEventHandler.cc:145
YEvent * pendingEvent() const
Definition YSimpleEventHandler.h:80
void unblockEvents()
Definition YSimpleEventHandler.h:116
YEvent * consumePendingEvent()
Definition YSimpleEventHandler.cc:62
bool eventsBlocked() const
Definition YSimpleEventHandler.h:121
virtual ~YSimpleEventHandler()
Definition YSimpleEventHandler.cc:44
Definition YWidget.h:55