/////////////////////////////////////////////////////////////////////////////
// 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;
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
-
+
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
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()
wxString wxWindowPalm::GetTitle() const
{
- return wxString("");
+ return wxEmptyString;
}
void wxWindowPalm::DoCaptureMouse()
// 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
// ---------------------------------------------------------------------------
return false;
}
-int wxWindowPalm::HandleMenuChar(int chAccel, WXLPARAM lParam)
-{
- return 0;
-}
-
// ---------------------------------------------------------------------------
// joystick
// ---------------------------------------------------------------------------
bool wxWindowPalm::PalmOnScroll(int orientation, WXWORD wParam,
WXWORD pos, WXHWND control)
-{
+{
return false;
}
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)