/***************************************************************************
QEvent.h - description
-------------------
begin : Wed Mar 8 2000
copyright : (C) 2000 by Richard Dale
email : Richard_Dale@tipitina.demon.co.uk
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QEVENT_H
#define QEVENT_H
#include <Foundation/NSObject.h>
#include <qtobjc/QtSupport.h>
#include <qtobjc/QRect.h>
#define Event_None 0 // invalid event
#define Event_Timer 1 // timer event
#define Event_MouseButtonPress 2 // mouse button pressed
#define Event_MouseButtonRelease 3 // mouse button released
#define Event_MouseButtonDblClick 4 // mouse button double click
#define Event_MouseMove 5 // mouse move
#define Event_KeyPress 6 // key pressed
#define Event_KeyRelease 7 // key released
#define Event_FocusIn 8 // keyboard focus received
#define Event_FocusOut 9 // keyboard focus lost
#define Event_Enter 10 // mouse enters widget
#define Event_Leave 11 // mouse leaves widget
#define Event_Paint 12 // paint widget
#define Event_Move 13 // move widget
#define Event_Resize 14 // resize widget
#define Event_Create 15 // after object creation
#define Event_Destroy 16 // during object destruction
#define Event_Show 17 // widget is shown
#define Event_Hide 18 // widget is hidden
#define Event_Close 19 // request to close widget
#define Event_Quit 20 // request to quit application
#define Event_Accel 30 // accelerator event
#define Event_Clipboard 40 // internal clipboard event
#define Event_SockAct 50 // socket activation
#define Event_DragEnter 60 // drag moves into widget
#define Event_DragMove 61 // drag moves in widget
#define Event_DragLeave 62 // drag leaves or is cancelled
#define Event_Drop 63 // actual drop
#define Event_DragResponse 64 // drag accepted/rejected
#define Event_ChildInserted 70 // new child widget
#define Event_ChildRemoved 71 // deleted child widget
#define Event_LayoutHint 72 // child min/max size changed
#define Event_ActivateControl 80 // ActiveX activation
#define Event_DeactivateControl 81 // ActiveX deactivation
#define Event_User 1000 // first user event id
#define ButtonState int
// mouse/keyboard state values
#define NoButton 0x00
#define LeftButton 0x01
#define RightButton 0x02
#define MidButton 0x04
#define MouseButtonMask 0x07
#define ShiftButton 0x08
#define ControlButton 0x10
#define AltButton 0x20
#define KeyButtonMask =0x38
/**
*@author Richard Dale
*/
@interface QEvent : NSObject <QtSupport>
{
@private
void * _qt;
}
- initFromType: (int) type;
- (void) dealloc;
- (int) type;
@end
@interface QTimerEvent : QEvent
- initFromTimerId: (int) timerId;
- (void) dealloc;
- (int) timerId;
@end
@interface QMouseEvent : QEvent
- initFromType: (int) type position: (QPoint *) pos button: (int) button state: (int) state;
- initFromType: (int) type position: (QPoint *) pos globalPosition: globalPos button: (int) button state: (int) state;
- (QPoint *) pos;
- (QPoint *) globalPos;
- (int) x;
- (int) y;
- (int) globalX;
- (int) globalY;
- (int) button;
- (int) state;
@end
@interface QKeyEvent : QEvent
- initFromType: (int) type key: (int) key ascii: (int) ascii state: (int) state;
- dealloc;
- (int) key;
- (int) ascii;
- (int) state;
- (BOOL) isAccepted;
- accept;
- ignore;
@end
@interface QFocusEvent : QEvent
- initFromFocusType: (int) focusType;
- (BOOL) gotFocus;
- (BOOL) lostFocus;
@end
@interface QPaintEvent : QEvent
- initFromRect: (QRect *) rect;
- (QRect *) rect;
@end
@interface QMoveEvent : QEvent
- initFromPosition: (QPoint *) position oldPosition: (QPoint *) oldPosition;
- (QPoint *) position;
- (QPoint *) oldPosition;
@end
@interface QResizeEvent : QEvent
- initFromSize: (QSize *) size oldSize: (QSize *) oldSize;
- (QSize *) size;
- (QSize *) oldSize;
@end
@interface QCloseEvent : QEvent
- init;
- (BOOL) isAccepted;
- accept;
- ignore;
@end
#endif
Documentation generated by duke@tipitina on Sat May 6 11:42:52 EDT 2000