]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stubs/window.cpp
Removed TABs that had gotten in to the source
[wxWidgets.git] / src / stubs / window.cpp
index 10ec3976dd283405badbaea6bddbe998945603a2..0eeda07dfc5d81bbb1269641ed4d7ab655eae19c 100644 (file)
 
 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
  */