X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e273151278d28cceefe6eee8c49bc6915306805d..8ba7c77150d74a5385f2385e5448ca491263179f:/src/palmos/frame.cpp diff --git a/src/palmos/frame.cpp b/src/palmos/frame.cpp index 25c7b23fc0..6015a059d3 100644 --- a/src/palmos/frame.cpp +++ b/src/palmos/frame.cpp @@ -2,10 +2,10 @@ // Name: src/palmos/frame.cpp // Purpose: wxFrame // Author: William Osborne - minimal working wxPalmOS port -// Modified by: +// Modified by: Wlodzimierz ABX Skiba - more than minimal functionality // Created: 10/13/04 // RCS-ID: $Id$ -// Copyright: (c) William Osborne +// Copyright: (c) William Osborne, Wlodzimierz Skiba // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -162,7 +162,7 @@ bool wxFrame::Create(wxWindow *parent, long style, const wxString& name) { - if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name, this) ) + if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) ) return false; return true; @@ -183,6 +183,10 @@ void wxFrame::DoSetClientSize(int width, int height) // 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; } // ---------------------------------------------------------------------------- @@ -193,24 +197,8 @@ void wxFrame::Raise() { } -// generate an artificial resize event -void wxFrame::SendSizeEvent() -{ -} - #if wxUSE_MENUS_NATIVE -void wxFrame::AttachMenuBar(wxMenuBar *menubar) -{ - wxFrameBase::AttachMenuBar(menubar); - - if ( !menubar ) - { - // actually remove the menu from the frame - m_hMenu = (WXHMENU)0; - } -} - void wxFrame::InternalSetMenuBar() { } @@ -224,8 +212,10 @@ bool wxFrame::HandleMenuOpen() return true; } -bool wxFrame::HandleMenuSelect(int ItemID) +bool wxFrame::HandleMenuSelect(EventType* event) { + int ItemID = event->data.menu.itemID; + if (!m_frameMenuBar) return false; @@ -255,7 +245,7 @@ void wxFrame::OnPaint(wxPaintEvent& event) #endif // wxUSE_STATUSBAR } -// Pass TRUE to show full screen, FALSE to restore. +// Pass true to show full screen, false to restore. bool wxFrame::ShowFullScreen(bool show, long style) { return false; @@ -289,25 +279,10 @@ void wxFrame::IconizeChildFrames(bool bIconize) { } -WXHICON wxFrame::GetDefaultIcon() const -{ - // we don't have any standard icons (any more) - return (WXHICON)0; -} - // =========================================================================== // message processing // =========================================================================== -// --------------------------------------------------------------------------- -// preprocessing -// --------------------------------------------------------------------------- - -bool wxFrame::MSWTranslateMessage(WXMSG* pMsg) -{ - return false; -} - // --------------------------------------------------------------------------- // our private (non virtual) message handlers // --------------------------------------------------------------------------- @@ -322,20 +297,6 @@ bool wxFrame::HandleSize(int x, int y, WXUINT id) return false; } -bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control) -{ - return false; -} - -// --------------------------------------------------------------------------- -// the window proc for wxFrame -// --------------------------------------------------------------------------- - -WXLRESULT wxFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) -{ - 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 @@ -345,6 +306,17 @@ WXLRESULT wxFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPara // get the origin of the client area in the client coordinates wxPoint wxFrame::GetClientAreaOrigin() const { - wxPoint pt; - 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); }