]> git.saurik.com Git - wxWidgets.git/blobdiff - src/palmos/toplevel.cpp
Close tree edit even if the change is vetoed to be consistent with MSW [patch 1110252]
[wxWidgets.git] / src / palmos / toplevel.cpp
index 58fe1ddc4661615deafaf676665bb977a248a30f..2a31a6b83eda6071013cc785be96ac2bdd25152e 100644 (file)
@@ -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__