Added event class constructors

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
1999-10-07 16:51:10 +00:00
parent e9f2ef9429
commit 1475671a66

View File

@@ -31,6 +31,9 @@
class wxEvent { class wxEvent {
public: public:
wxEvent(int id = 0);
~wxEvent();
wxObject* GetEventObject(); wxObject* GetEventObject();
wxEventType GetEventType(); wxEventType GetEventType();
int GetId(); int GetId();
@@ -47,6 +50,7 @@ public:
class wxSizeEvent : public wxEvent { class wxSizeEvent : public wxEvent {
public: public:
wxSizeEvent(const wxSize& sz, int id = 0);
wxSize GetSize(); wxSize GetSize();
}; };
@@ -54,6 +58,8 @@ public:
class wxCloseEvent : public wxEvent { class wxCloseEvent : public wxEvent {
public: public:
wxCloseEvent(int commandEventType = 0, int id = 0);
void SetLoggingOff(bool loggingOff); void SetLoggingOff(bool loggingOff);
bool GetLoggingOff(); bool GetLoggingOff();
void Veto(bool veto = TRUE); void Veto(bool veto = TRUE);
@@ -66,6 +72,8 @@ public:
class wxCommandEvent : public wxEvent { class wxCommandEvent : public wxEvent {
public: public:
wxCommandEvent(int commandEventType = 0, int id = 0);
bool Checked(); bool Checked();
long GetExtraLong(); long GetExtraLong();
int GetInt(); int GetInt();
@@ -79,6 +87,9 @@ public:
class wxScrollEvent: public wxCommandEvent { class wxScrollEvent: public wxCommandEvent {
public: public:
wxScrollEvent(int commandType = 0, int id = 0, int pos = 0,
int orientation = 0);
int GetOrientation(); int GetOrientation();
int GetPosition(); int GetPosition();
}; };
@@ -87,6 +98,9 @@ public:
class wxScrollWinEvent: public wxEvent { class wxScrollWinEvent: public wxEvent {
public: public:
wxScrollWinEvent(int commandType = 0, int pos = 0,
int orientation = 0);
int GetOrientation(); int GetOrientation();
int GetPosition(); int GetPosition();
}; };
@@ -95,6 +109,7 @@ public:
class wxSpinEvent : public wxScrollEvent { class wxSpinEvent : public wxScrollEvent {
public: public:
wxSpinEvent(int commandType = 0, int id = 0);
}; };
@@ -102,6 +117,8 @@ public:
class wxMouseEvent: public wxEvent { class wxMouseEvent: public wxEvent {
public: public:
wxMouseEvent(int mouseEventType = 0);
bool IsButton(); bool IsButton();
bool ButtonDown(int but = -1); bool ButtonDown(int but = -1);
bool ButtonDClick(int but = -1); bool ButtonDClick(int but = -1);
@@ -139,33 +156,41 @@ public:
class wxKeyEvent: public wxEvent { class wxKeyEvent: public wxEvent {
public: public:
wxKeyEvent(int keyEventType);
bool ControlDown(); bool ControlDown();
bool MetaDown(); bool MetaDown();
bool AltDown(); bool AltDown();
bool ShiftDown(); bool ShiftDown();
long KeyCode(); long KeyCode();
long GetX();
long GetY();
wxPoint GetPosition();
%name(GetPositionTuple) void GetPosition(long* OUTPUT, long* OUTPUT);
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// class wxNavigationKeyEvent : public wxCommandEvent { class wxNavigationKeyEvent : public wxCommandEvent {
// public: public:
// wxNavigationKeyEvent(); wxNavigationKeyEvent();
// bool GetDirection(); bool GetDirection();
// void SetDirection(bool bForward); void SetDirection(bool bForward);
// bool IsWindowChange(); bool IsWindowChange();
// void SetWindowChange(bool bIs); void SetWindowChange(bool bIs);
// wxWindow* GetCurrentFocus(); wxWindow* GetCurrentFocus();
// void SetCurrentFocus(wxWindow *win); void SetCurrentFocus(wxWindow *win);
// }; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class wxMoveEvent: public wxEvent { class wxMoveEvent: public wxEvent {
public: public:
wxMoveEvent(const wxPoint& pt, int id = 0);
wxPoint GetPosition(); wxPoint GetPosition();
}; };
@@ -173,6 +198,7 @@ public:
class wxPaintEvent: public wxEvent { class wxPaintEvent: public wxEvent {
public: public:
wxPaintEvent(int id = 0);
}; };
@@ -180,6 +206,8 @@ public:
class wxEraseEvent: public wxEvent { class wxEraseEvent: public wxEvent {
public: public:
wxEraseEvent(int id = 0, wxDC* dc = NULL);
wxDC *GetDC(); wxDC *GetDC();
}; };
@@ -187,13 +215,14 @@ public:
class wxFocusEvent: public wxEvent { class wxFocusEvent: public wxEvent {
public: public:
wxFocusEvent(WXTYPE eventType = 0, int id = 0);
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class wxActivateEvent: public wxEvent{ class wxActivateEvent: public wxEvent{
public: public:
wxActivateEvent(WXTYPE eventType = 0, int active = TRUE, int id = 0);
bool GetActive(); bool GetActive();
}; };
@@ -201,13 +230,14 @@ public:
class wxInitDialogEvent: public wxEvent { class wxInitDialogEvent: public wxEvent {
public: public:
wxInitDialogEvent(int id = 0);
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class wxMenuEvent: public wxEvent { class wxMenuEvent: public wxEvent {
public: public:
wxMenuEvent(WXTYPE id = 0, int id = 0);
int GetMenuId(); int GetMenuId();
}; };
@@ -215,6 +245,7 @@ public:
class wxShowEvent: public wxEvent { class wxShowEvent: public wxEvent {
public: public:
wxShowEvent(int id = 0, int show = FALSE);
void SetShow(bool show); void SetShow(bool show);
bool GetShow(); bool GetShow();
}; };
@@ -223,19 +254,24 @@ public:
class wxIconizeEvent: public wxEvent { class wxIconizeEvent: public wxEvent {
public: public:
wxIconizeEvent(int id = 0);
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class wxMaximizeEvent: public wxEvent { class wxMaximizeEvent: public wxEvent {
public: public:
wxMaximizeEvent(int id = 0);
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class wxJoystickEvent: public wxEvent { class wxJoystickEvent: public wxEvent {
public: public:
wxJoystickEvent(int type = wxEVT_NULL,
int state = 0,
int joystick = wxJOYSTICK1,
int change = 0);
wxPoint GetPosition(); wxPoint GetPosition();
int GetZPosition(); int GetZPosition();
int GetButtonState(); int GetButtonState();
@@ -284,6 +320,7 @@ public:
class wxIdleEvent: public wxEvent { class wxIdleEvent: public wxEvent {
public: public:
wxIdleEvent();
void RequestMore(bool needMore = TRUE); void RequestMore(bool needMore = TRUE);
bool MoreRequested(); bool MoreRequested();
}; };
@@ -292,6 +329,7 @@ public:
class wxUpdateUIEvent: public wxEvent { class wxUpdateUIEvent: public wxEvent {
public: public:
wxUpdateUIEvent(wxWindowID commandId = 0);
bool GetChecked(); bool GetChecked();
bool GetEnabled(); bool GetEnabled();
wxString GetText(); wxString GetText();
@@ -308,7 +346,7 @@ public:
class wxSysColourChangedEvent: public wxEvent { class wxSysColourChangedEvent: public wxEvent {
public: public:
wxSysColourChangedEvent();
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@@ -316,11 +354,52 @@ public:
class wxNotifyEvent : public wxCommandEvent { class wxNotifyEvent : public wxCommandEvent {
public: public:
wxNotifyEvent(int commandType = wxEVT_NULL, int id = 0);
bool IsAllowed(); bool IsAllowed();
void Veto(); void Veto();
}; };
//---------------------------------------------------------------------------
class wxPaletteChangedEvent : public wxEvent {
public:
wxPaletteChangedEvent(wxWindowID id = 0);
void SetChangedWindow(wxWindow* win);
wxWindow* GetChangedWindow();
};
//---------------------------------------------------------------------------
class wxQueryNewPaletteEvent : public wxEvent {
public:
wxQueryNewPaletteEvent(wxWindowID id = 0);
void SetPaletteRealized(bool realized);
bool GetPaletteRealized();
};
//---------------------------------------------------------------------------
class wxWindowCreateEvent : public wxEvent {
public:
wxWindowCreateEvent(wxWindow *win = NULL);
wxWindow *GetWindow();
};
class wxWindowDestroyEvent : public wxEvent {
public:
wxWindowDestroyEvent(wxWindow *win = NULL);
wxWindow *GetWindow();
};
//---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// This one can be derived from in Python and passed through the event // This one can be derived from in Python and passed through the event