]> git.saurik.com Git - wxWidgets.git/blobdiff - src/palmos/control.cpp
switch OSX implementations to unicode text ctrl meanwhile
[wxWidgets.git] / src / palmos / control.cpp
index 5dd719b4c3666e67afc93993f611c1973f69cc60..90a0b34af30b9c75ca3c1679f52d68dcbe410189 100644 (file)
@@ -286,6 +286,17 @@ void wxControl::DoGetBounds( RectangleType &rect ) const
     FrmGetObjectBounds(form,index,&rect);
 }
 
+void wxControl::DoSetBounds( RectangleType &rect )
+{
+    FormType* form = GetParentForm();
+    if(form==NULL)
+        return;
+    uint16_t index = FrmGetObjectIndex(form,GetId());
+    if(index==frmInvalidObjectId)
+        return;
+    FrmSetObjectBounds(form,index,&rect);
+}
+
 void wxControl::DoGetPosition( int *x, int *y ) const
 {
     RectangleType rect;
@@ -306,10 +317,22 @@ void wxControl::DoGetSize( int *width, int *height ) const
         *height = rect.extent.y;
 }
 
+void wxControl::DoMoveWindow(int x, int y, int width, int height)
+{
+    wxRect area = GetRect();
+    RectangleType rect;
+    rect.topLeft.x = x;
+    rect.topLeft.y = y;
+    rect.extent.x = width;
+    rect.extent.y = height;
+    DoSetBounds(rect);
+    GetParent()->Refresh(true, &area);
+}
+
 bool wxControl::Enable(bool enable)
 {
     ControlType *control = (ControlType *)GetObjectPtr();
-    if( (IsPalmControl()) || (control == NULL))
+    if( !IsPalmControl() || (control == NULL))
         return false;
     if( CtlEnabled(control) == enable)
         return false;
@@ -320,7 +343,7 @@ bool wxControl::Enable(bool enable)
 bool wxControl::IsEnabled() const
 {
     ControlType *control = (ControlType *)GetObjectPtr();
-    if( (IsPalmControl()) || (control == NULL))
+    if( !IsPalmControl() || (control == NULL))
         return false;
     return CtlEnabled(control);
 }
@@ -468,17 +491,4 @@ void wxControl::OnEraseBackground(wxEraseEvent& event)
 {
 }
 
-WXHBRUSH wxControl::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
-                               WXUINT WXUNUSED(message),
-                               WXWPARAM WXUNUSED(wParam),
-                               WXLPARAM WXUNUSED(lParam)
-    )
-{
-    return (WXHBRUSH)0;
-}
-
-// ---------------------------------------------------------------------------
-// global functions
-// ---------------------------------------------------------------------------
-
 #endif // wxUSE_CONTROLS