]> git.saurik.com Git - wxWidgets.git/blobdiff - src/palmos/window.cpp
regen configure for tab sample removal
[wxWidgets.git] / src / palmos / window.cpp
index 7be136109f0c30e0d6090f928ee317016698901d..5eba9aed6a763f4af0909333d1770177b524d6d2 100644 (file)
@@ -1,11 +1,11 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        src/palmos/windows.cpp
 // Purpose:     wxWindow
-// Author:      William Osborne
-// Modified by:
+// Author:      William Osborne - minimal working wxPalmOS port
+// Modified by: Wlodzimierz ABX Skiba - more than minimal functionality
 // Created:     10/13/04
-// RCS-ID:      $Id
-// Copyright:   (c) William Osborne
+// RCS-ID:      $Id$
+// Copyright:   (c) William Osborne, Wlodzimierz Skiba
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/textctrl.h"
 #include "wx/notebook.h"
 #include "wx/listctrl.h"
-
-#include <string.h>
-
-#include "wx/palmos/window.h"
+#include "wx/window.h"
 
 // ---------------------------------------------------------------------------
 // global variables
 wxMenu *wxCurrentPopupMenu = NULL;
 #endif // wxUSE_MENUS_NATIVE
 
-#ifdef __WXWINCE__
-extern       wxChar *wxCanvasClassName;
-#else
-extern const wxChar *wxCanvasClassName;
-#endif
-
 // true if we had already created the std colour map, used by
 // wxGetStdColourMap() and wxWindow::OnSysColourChanged()           (FIXME-MT)
 static bool gs_hasStdCmap = false;
@@ -153,7 +144,7 @@ wxBEGIN_FLAGS( wxWindowStyle )
     wxFLAGS_MEMBER(wxBORDER_RAISED)
     wxFLAGS_MEMBER(wxBORDER_STATIC)
     wxFLAGS_MEMBER(wxBORDER_NONE)
-    
+
     // old style border flags
     wxFLAGS_MEMBER(wxSIMPLE_BORDER)
     wxFLAGS_MEMBER(wxSUNKEN_BORDER)
@@ -278,7 +269,16 @@ bool wxWindowPalm::Create(wxWindow *parent,
                          long style,
                          const wxString& name)
 {
-    return false;
+    wxCHECK_MSG( parent, false, wxT("can't create wxWindow without parent") );
+
+    if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
+        return false;
+
+    parent->AddChild(this);
+
+    InheritAttributes();
+
+    return true;
 }
 
 FormType *wxWindowPalm::GetFormPtr()
@@ -334,7 +334,7 @@ void wxWindowPalm::SetTitle( const wxString& title)
 
 wxString wxWindowPalm::GetTitle() const
 {
-    return wxString("");
+    return wxEmptyString;
 }
 
 void wxWindowPalm::DoCaptureMouse()
@@ -706,37 +706,6 @@ bool wxWindowPalm::PalmCreate(const wxChar *wclass,
 // Palm message handlers
 // ===========================================================================
 
-// ---------------------------------------------------------------------------
-// WM_NOTIFY
-// ---------------------------------------------------------------------------
-
-#ifdef __WIN95__
-
-bool wxWindowPalm::HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
-{
-    return false;
-}
-
-#if wxUSE_TOOLTIPS
-
-bool wxWindowPalm::HandleTooltipNotify(WXUINT code,
-                                      WXLPARAM lParam,
-                                      const wxString& ttip)
-{
-    return false;
-}
-
-#endif // wxUSE_TOOLTIPS
-
-bool wxWindowPalm::PalmOnNotify(int WXUNUSED(idCtrl),
-                              WXLPARAM lParam,
-                              WXLPARAM* WXUNUSED(result))
-{
-    return false;
-}
-
-#endif // __WIN95__
-
 // ---------------------------------------------------------------------------
 // end session messages
 // ---------------------------------------------------------------------------
@@ -1042,11 +1011,6 @@ bool wxWindowPalm::HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam)
     return false;
 }
 
-int wxWindowPalm::HandleMenuChar(int chAccel, WXLPARAM lParam)
-{
-    return 0;
-}
-
 // ---------------------------------------------------------------------------
 // joystick
 // ---------------------------------------------------------------------------
@@ -1062,7 +1026,7 @@ bool wxWindowPalm::HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags)
 
 bool wxWindowPalm::PalmOnScroll(int orientation, WXWORD wParam,
                               WXWORD pos, WXHWND control)
-{    
+{
     return false;
 }
 
@@ -1101,21 +1065,6 @@ extern wxWindow *wxGetWindowFromHWND(WXHWND hWnd)
     return NULL;
 }
 
-#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
-
-void wxSetKeyboardHook(bool doIt)
-{
-}
-
-#endif // !__WXMICROWIN__
-
-#ifdef __WXDEBUG__
-const char *wxGetMessageName(int message)
-{
-    return "";
-}
-#endif //__WXDEBUG__
-
 // Find the wxWindow at the current mouse position, returning the mouse
 // position.
 wxWindow* wxFindWindowAtPointer(wxPoint& pt)