X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f241653c17d39de2cce512bb8ecfba80b9ac0351..317121eac556b34b3ca4ba87ab6b6c747ab7a0df:/src/palmos/frame.cpp?ds=sidebyside diff --git a/src/palmos/frame.cpp b/src/palmos/frame.cpp index c81817af92..8d2f51ee16 100644 --- a/src/palmos/frame.cpp +++ b/src/palmos/frame.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "frame.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -28,8 +24,9 @@ #pragma hdrstop #endif +#include "wx/frame.h" + #ifndef WX_PRECOMP - #include "wx/frame.h" #include "wx/app.h" #include "wx/menu.h" #include "wx/utils.h" @@ -38,6 +35,7 @@ #include "wx/dcclient.h" #include "wx/mdi.h" #include "wx/panel.h" + #include "wx/log.h" #endif // WX_PRECOMP #if wxUSE_STATUSBAR @@ -50,13 +48,15 @@ #endif // wxUSE_TOOLBAR #include "wx/menuitem.h" -#include "wx/log.h" #ifdef __WXUNIVERSAL__ #include "wx/univ/theme.h" #include "wx/univ/colschem.h" #endif // __WXUNIVERSAL__ +#include +#include + // ---------------------------------------------------------------------------- // globals // ---------------------------------------------------------------------------- @@ -70,7 +70,6 @@ // ---------------------------------------------------------------------------- BEGIN_EVENT_TABLE(wxFrame, wxFrameBase) - EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged) EVT_PAINT(wxFrame::OnPaint) END_EVENT_TABLE() @@ -108,10 +107,14 @@ wxBEGIN_FLAGS( wxFrameStyle ) // frame styles wxFLAGS_MEMBER(wxSTAY_ON_TOP) wxFLAGS_MEMBER(wxCAPTION) +#if WXWIN_COMPATIBILITY_2_6 wxFLAGS_MEMBER(wxTHICK_FRAME) +#endif // WXWIN_COMPATIBILITY_2_6 wxFLAGS_MEMBER(wxSYSTEM_MENU) wxFLAGS_MEMBER(wxRESIZE_BORDER) +#if WXWIN_COMPATIBILITY_2_6 wxFLAGS_MEMBER(wxRESIZE_BOX) +#endif // WXWIN_COMPATIBILITY_2_6 wxFLAGS_MEMBER(wxCLOSE_BOX) wxFLAGS_MEMBER(wxMAXIMIZE_BOX) wxFLAGS_MEMBER(wxMINIMIZE_BOX) @@ -183,6 +186,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; } // ---------------------------------------------------------------------------- @@ -208,15 +215,16 @@ bool wxFrame::HandleMenuOpen() return true; } -bool wxFrame::HandleMenuSelect(EventType* event) +bool wxFrame::HandleMenuSelect(WXEVENTPTR event) { - int ItemID = event->data.menu.itemID; + const EventType *palmEvent = (EventType *)event; + const int ItemID = palmEvent->data.menu.itemID; if (!m_frameMenuBar) return false; - int item=m_frameMenuBar->ProcessCommand(ItemID); - if(item==-1) + const int item = m_frameMenuBar->ProcessCommand(ItemID); + if (item==-1) return false; wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, item); @@ -228,11 +236,6 @@ bool wxFrame::HandleMenuSelect(EventType* event) #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 @@ -275,24 +278,6 @@ void wxFrame::IconizeChildFrames(bool bIconize) { } -// =========================================================================== -// 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 @@ -309,7 +294,7 @@ wxPoint wxFrame::GetClientAreaOrigin() const Y = 0; while ( Y < maxY ) { - if(!FrmPointInTitle(GetForm(),X,Y)) + if(!FrmPointInTitle((FormType*)GetForm(),X,Y)) return wxPoint(X,Y+1); Y++; }