]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/frame.cpp
Ignore non-existant string selection in wxComboBox::SetValue() in read-only mode...
[wxWidgets.git] / src / motif / frame.cpp
index c81a189d9781d978d6774c39040528ee65d239c7..ea5e99675873e3a34a1b05edd9e4621c35728f92 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#ifdef __VMS
-#define XtDisplay XTDISPLAY
-#define XtWindow XTWINDOW
-#define XtScreen XTSCREEN
-#endif
-
 #include "wx/frame.h"
 
 #ifndef WX_PRECOMP
 #include "wx/frame.h"
 
 #ifndef WX_PRECOMP
@@ -182,7 +176,7 @@ bool wxFrame::Create(wxWindow *parent,
     wxSizeEvent sizeEvent(newSize, GetId());
     sizeEvent.SetEventObject(this);
 
     wxSizeEvent sizeEvent(newSize, GetId());
     sizeEvent.SetEventObject(this);
 
-    GetEventHandler()->ProcessEvent(sizeEvent);
+    HandleWindowEvent(sizeEvent);
 
     return true;
 }
 
     return true;
 }
@@ -259,7 +253,7 @@ bool wxFrame::XmDoCreateTLW(wxWindow* WXUNUSED(parent),
 
 wxFrame::~wxFrame()
 {
 
 wxFrame::~wxFrame()
 {
-    m_isBeingDeleted = true;
+    SendDestroyEvent();
 
     if (m_clientArea)
     {
 
     if (m_clientArea)
     {
@@ -273,15 +267,10 @@ wxFrame::~wxFrame()
     if (m_frameMenuBar)
     {
         m_frameMenuBar->DestroyMenuBar();
     if (m_frameMenuBar)
     {
         m_frameMenuBar->DestroyMenuBar();
-        delete m_frameMenuBar;
-        m_frameMenuBar = NULL;
+        wxDELETE(m_frameMenuBar);
     }
 
     }
 
-    if (m_frameStatusBar)
-    {
-        delete m_frameStatusBar;
-        m_frameStatusBar = NULL;
-    }
+    wxDELETE(m_frameStatusBar);
 
     PreDestroy();
 
 
     PreDestroy();
 
@@ -384,7 +373,7 @@ void wxFrame::DoSetClientSize(int width, int height)
     wxSizeEvent sizeEvent(newSize, GetId());
     sizeEvent.SetEventObject(this);
 
     wxSizeEvent sizeEvent(newSize, GetId());
     sizeEvent.SetEventObject(this);
 
-    GetEventHandler()->ProcessEvent(sizeEvent);
+    HandleWindowEvent(sizeEvent);
 
 }
 
 
 }
 
@@ -514,7 +503,7 @@ void wxFrame::SetMenuBar(wxMenuBar *menuBar)
     }
 
     // Currently can't set it twice
     }
 
     // Currently can't set it twice
-    //    wxASSERT_MSG( (m_frameMenuBar == (wxMenuBar*) NULL), "Cannot set the menubar more than once");
+    //    wxASSERT_MSG( (m_frameMenuBar == NULL), "Cannot set the menubar more than once");
 
     if (m_frameMenuBar)
     {
 
     if (m_frameMenuBar)
     {
@@ -536,7 +525,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
     {
         wxSysColourChangedEvent event2;
         event2.SetEventObject( m_frameStatusBar );
     {
         wxSysColourChangedEvent event2;
         event2.SetEventObject( m_frameStatusBar );
-        m_frameStatusBar->GetEventHandler()->ProcessEvent(event2);
+        m_frameStatusBar->HandleWindowEvent(event2);
     }
 
     // Propagate the event to the non-top-level children
     }
 
     // Propagate the event to the non-top-level children
@@ -563,13 +552,6 @@ void wxFrame::OnActivate(wxActivateEvent& event)
     }
 }
 
     }
 }
 
-void wxFrame::SendSizeEvent()
-{
-    wxSizeEvent event(GetSize(), GetId());
-    event.SetEventObject(this);
-    GetEventHandler()->AddPendingEvent(event);
-}
-
 #if wxUSE_TOOLBAR
 
 wxToolBar* wxFrame::CreateToolBar(long style,
 #if wxUSE_TOOLBAR
 
 wxToolBar* wxFrame::CreateToolBar(long style,