]> 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 2d67f37da62780cc4e46b97fc2fc471cd6bdcaaa..2a31a6b83eda6071013cc785be96ac2bdd25152e 100644 (file)
@@ -98,12 +98,14 @@ bool wxTopLevelWindowPalm::Create(wxWindow *parent,
     if ( parent )
         parent->AddChild(this);
 
     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));
 
     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;
     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;
     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(
     constraints.y_pref = ( size.y == wxDefaultCoord ) ? winUndefConstraint : size.y;
 
     FrameForm = FrmNewFormWithConstraints(
-                    m_windowId,
+                    GetId(),
                     title.c_str(),
                     winFlagBackBuffer,
                     &constraints,
                     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
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxTopLevelWindowPalm fullscreen
 // ----------------------------------------------------------------------------
@@ -210,6 +222,11 @@ bool wxTopLevelWindowPalm::EnableCloseButton(bool enable)
     return false;
 }
 
     return false;
 }
 
+FormType *wxTopLevelWindowPalm::GetForm() const
+{
+    return FrmGetActiveForm();
+}
+
 #ifndef __WXWINCE__
 
 bool wxTopLevelWindowPalm::SetShape(const wxRegion& region)
 #ifndef __WXWINCE__
 
 bool wxTopLevelWindowPalm::SetShape(const wxRegion& region)