#include <Xm/AtomMgr.h>
#include <Xm/LabelG.h>
#include <Xm/Frame.h>
-#include <Xm/DrawingA.h>
#if XmVersion > 1000
#include <Xm/Protocols.h>
#endif
static void wxFrameMapProc(Widget frameShell, XtPointer clientData,
XCrossingEvent * event);
-// From wxWindow
-extern void wxCanvasRepaintProc (Widget, XtPointer, XmDrawingAreaCallbackStruct * cbs);
-extern void wxCanvasInputEvent (Widget drawingArea, XtPointer data, XmDrawingAreaCallbackStruct * cbs);
-
extern wxList wxModelessWindows;
extern wxList wxPendingDelete;
XmNbottomAttachment, XmATTACH_FORM,
// XmNresizePolicy, XmRESIZE_ANY,
NULL);
-
- XtAddCallback ((Widget) m_clientArea, XmNexposeCallback, (XtCallbackProc) wxCanvasRepaintProc, (XtPointer) this);
- XtAddCallback ((Widget) m_clientArea, XmNinputCallback, (XtCallbackProc) wxCanvasInputEvent, (XtPointer) this);
+ XtAddEventHandler((Widget) m_clientArea, ExposureMask,FALSE,
+ wxUniversalRepaintProc, (XtPointer) this);
+
XtVaSetValues((Widget) m_frameWidget,
XmNworkWindow, (Widget) m_workArea,
NULL);
wxFrame::~wxFrame()
{
+ if (m_clientArea)
+ XtRemoveEventHandler((Widget) m_clientArea, ExposureMask, FALSE,
+ wxUniversalRepaintProc, (XtPointer) this);
+
if (GetMainWidget())
Show(FALSE);
- XtRemoveCallback ((Widget) m_clientArea, XmNexposeCallback, (XtCallbackProc) wxCanvasRepaintProc, (XtPointer) this);
- XtRemoveCallback ((Widget) m_clientArea, XmNinputCallback, (XtCallbackProc) wxCanvasInputEvent, (XtPointer) this);
-
if (m_frameMenuBar)
{
m_frameMenuBar->DestroyMenuBar();
// Set the client size (i.e. leave the calculation of borders etc.
// to wxWindows)
-void wxFrame::SetClientSize(int width, int height)
+void wxFrame::DoSetClientSize(int width, int height)
{
// Calculate how large the new main window should be
// by finding the difference between the client area and the
if (y) *y = yy;
}
-void wxFrame::SetSize(int x, int y, int width, int height, int sizeFlags)
+void wxFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
if (x > -1)
XtVaSetValues((Widget) m_frameShell, XmNx, x, NULL);