// ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
- EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
EVT_PAINT(wxFrame::OnPaint)
END_EVENT_TABLE()
// Get size *available for subwindows* i.e. excluding menu bar, toolbar etc.
void wxFrame::DoGetClientSize(int *x, int *y) const
{
+ wxSize size = GetSize();
+ wxPoint pos = GetClientAreaOrigin();
+ *x = size.x - pos.x - 1;
+ *y = size.y - pos.y - 1;
}
// ----------------------------------------------------------------------------
#endif // wxUSE_MENUS_NATIVE
-// Responds to colour changes, and passes event on to children.
-void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
-{
-}
-
void wxFrame::OnPaint(wxPaintEvent& event)
{
#if wxUSE_STATUSBAR
{
}
-// ===========================================================================
-// message processing
-// ===========================================================================
-
-// ---------------------------------------------------------------------------
-// our private (non virtual) message handlers
-// ---------------------------------------------------------------------------
-
-bool wxFrame::HandlePaint()
-{
- return false;
-}
-
-bool wxFrame::HandleSize(int x, int y, WXUINT id)
-{
- return false;
-}
-
// ----------------------------------------------------------------------------
// wxFrame size management: we exclude the areas taken by menu/status/toolbars
// from the client area, so the client area is what's really available for the
// get the origin of the client area in the client coordinates
wxPoint wxFrame::GetClientAreaOrigin() const
{
- Coord x, y;
- WinWindowToDisplayPt(&x,&y);
- wxPoint pt(x,y);
- return pt;
+ // there is no API to get client area but we know
+ // it starts after titlebar and 1 pixel of form border
+ Coord maxY = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y),
+ X = 1,
+ Y = 0;
+ while ( Y < maxY )
+ {
+ if(!FrmPointInTitle(GetForm(),X,Y))
+ return wxPoint(X,Y+1);
+ Y++;
+ }
+
+ return wxPoint(X,0);
}