X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bdb5436554c910fe850db1470514ee83ded76db3..b4a5e7b6f19bcef7449c87d46ab46af1b4aaec6b:/src/palmos/toplevel.cpp diff --git a/src/palmos/toplevel.cpp b/src/palmos/toplevel.cpp index 58fe1ddc46..2a31a6b83e 100644 --- a/src/palmos/toplevel.cpp +++ b/src/palmos/toplevel.cpp @@ -98,12 +98,14 @@ bool wxTopLevelWindowPalm::Create(wxWindow *parent, if ( parent ) parent->AddChild(this); - m_windowId = id == wxID_ANY ? NewControlId() : id; + SetId( id == wxID_ANY ? NewControlId() : id ); WinConstraintsType constraints; memset(&constraints, 0, sizeof(WinConstraintsType)); + // position constraints.x_pos = ( pos.x == wxDefaultCoord ) ? winUndefConstraint : pos.x; constraints.y_pos = ( pos.y == wxDefaultCoord ) ? winUndefConstraint : pos.y; + // size constraints.x_min = winUndefConstraint; constraints.x_max = winMaxConstraint; constraints.x_pref = ( size.x == wxDefaultCoord ) ? winUndefConstraint : size.x; @@ -112,7 +114,7 @@ bool wxTopLevelWindowPalm::Create(wxWindow *parent, constraints.y_pref = ( size.y == wxDefaultCoord ) ? winUndefConstraint : size.y; FrameForm = FrmNewFormWithConstraints( - m_windowId, + GetId(), title.c_str(), winFlagBackBuffer, &constraints, @@ -184,6 +186,16 @@ void wxTopLevelWindowPalm::Restore() { } +void wxTopLevelWindowPalm::DoGetSize( int *width, int *height ) const +{ + RectangleType rect; + FrmGetFormBounds( GetForm() , &rect ); + if(width) + *width = rect.extent.x; + if(height) + *height = rect.extent.y; +} + // ---------------------------------------------------------------------------- // wxTopLevelWindowPalm fullscreen // ---------------------------------------------------------------------------- @@ -210,9 +222,9 @@ bool wxTopLevelWindowPalm::EnableCloseButton(bool enable) return false; } -FormType *wxTopLevelWindowPalm::GetForm() +FormType *wxTopLevelWindowPalm::GetForm() const { - return FrmGetActiveForm (); + return FrmGetActiveForm(); } #ifndef __WXWINCE__