X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0ed460c2e7802793d591c84f3cfdbff159c5549..081eb1b120c1bc9147582cff84de756b4a3a63af:/src/stubs/window.cpp?ds=sidebyside diff --git a/src/stubs/window.cpp b/src/stubs/window.cpp index 10ec3976dd..0eeda07dfc 100644 --- a/src/stubs/window.cpp +++ b/src/stubs/window.cpp @@ -39,24 +39,25 @@ extern wxList wxPendingDelete; -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxEvtHandler) BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler) EVT_CHAR(wxWindow::OnChar) + EVT_KEY_DOWN(wxWindow::OnKeyDown) + EVT_KEY_UP(wxWindow::OnKeyUp) EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground) EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged) EVT_INIT_DIALOG(wxWindow::OnInitDialog) EVT_IDLE(wxWindow::OnIdle) END_EVENT_TABLE() -#endif // Constructor wxWindow::wxWindow() { // Generic + m_isWindow = TRUE; // An optimization m_windowId = 0; m_windowStyle = 0; m_windowParent = NULL; @@ -144,6 +145,7 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id, const wxString& name) { // Generic + m_isWindow = TRUE; // An optimization m_windowId = 0; m_windowStyle = 0; m_windowParent = NULL; @@ -551,6 +553,7 @@ void wxWindow::SetFont(const wxFont& font) void wxWindow::OnChar(wxKeyEvent& event) { +/* ?? if ( event.KeyCode() == WXK_TAB ) { // propagate the TABs to the parent - it's up to it to decide what // to do with it @@ -559,6 +562,18 @@ void wxWindow::OnChar(wxKeyEvent& event) return; } } +*/ + Default(); +} + +void wxWindow::OnKeyDown(wxKeyEvent& event) +{ + Default(); +} + +void wxWindow::OnKeyUp(wxKeyEvent& event) +{ + Default(); } void wxWindow::OnPaint(wxPaintEvent& event) @@ -1110,7 +1125,10 @@ bool wxWindow::Close(bool force) { wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId); event.SetEventObject(this); +#if WXWIN_COMPATIBILITY event.SetForce(force); +#endif + event.SetCanVeto(!force); return GetEventHandler()->ProcessEvent(event); } @@ -1278,6 +1296,11 @@ bool wxWindow::IsExposed(const wxRect& rect) const return (m_updateRegion.Contains(rect) != wxOutRegion); } +void wxWindow::SetToolTip(const wxString& tooltip) +{ + // TODO +} + /* * Allocates control IDs */