// 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
EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
END_EVENT_TABLE()
-IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
-
// ============================================================================
// implementation
// ============================================================================
wxSizeEvent sizeEvent(newSize, GetId());
sizeEvent.SetEventObject(this);
- GetEventHandler()->ProcessEvent(sizeEvent);
+ HandleWindowEvent(sizeEvent);
return true;
}
wxFrame::~wxFrame()
{
- m_isBeingDeleted = true;
+ SendDestroyEvent();
if (m_clientArea)
{
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();
wxSizeEvent sizeEvent(newSize, GetId());
sizeEvent.SetEventObject(this);
- GetEventHandler()->ProcessEvent(sizeEvent);
+ HandleWindowEvent(sizeEvent);
}
if( !title.empty() )
XtVaSetValues( (Widget)m_frameShell,
- XmNtitle, title.mb_str(),
- XmNiconName, title.mb_str(),
+ XmNtitle, (const char*)title.mb_str(),
+ XmNiconName, (const char*)title.mb_str(),
NULL );
}
if (!m_frameShell)
return;
- if (!icon.Ok() || !icon.GetDrawable())
+ if (!icon.IsOk() || !icon.GetDrawable())
return;
XtVaSetValues((Widget) m_frameShell,
}
// 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)
{
{
wxSysColourChangedEvent event2;
event2.SetEventObject( m_frameStatusBar );
- m_frameStatusBar->ProcessEvent(event2);
+ m_frameStatusBar->HandleWindowEvent(event2);
}
// Propagate the event to the non-top-level children
}
}
-void wxFrame::SendSizeEvent()
-{
- wxSizeEvent event(GetSize(), GetId());
- event.SetEventObject(this);
- GetEventHandler()->AddPendingEvent(event);
-}
-
#if wxUSE_TOOLBAR
wxToolBar* wxFrame::CreateToolBar(long style,