/////////////////////////////////////////////////////////////////////////////
-// Name: palmos/textctrl.cpp
+// Name: src/palmos/textctrl.cpp
// Purpose: wxTextCtrl
-// Author: William Osborne
+// Author: William Osborne - minimal working wxPalmOS port
// Modified by:
// Created: 10/13/04
-// RCS-ID: $Id:
+// RCS-ID: $Id$
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// declarations
// ============================================================================
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "textctrl.h"
-#endif
-
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#if wxUSE_TEXTCTRL
+#include "wx/textctrl.h"
+
#ifndef WX_PRECOMP
- #include "wx/textctrl.h"
#include "wx/settings.h"
#include "wx/brush.h"
#include "wx/utils.h"
#include "wx/log.h"
#include "wx/app.h"
#include "wx/menu.h"
+ #include "wx/module.h"
#endif
-#include "wx/module.h"
-
#if wxUSE_CLIPBOARD
#include "wx/clipbrd.h"
#endif
wxFLAGS_MEMBER(wxBORDER_RAISED)
wxFLAGS_MEMBER(wxBORDER_STATIC)
wxFLAGS_MEMBER(wxBORDER_NONE)
-
+
// old style border flags
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
wxFLAGS_MEMBER(wxTE_CENTRE)
wxFLAGS_MEMBER(wxTE_RIGHT)
wxFLAGS_MEMBER(wxTE_DONTWRAP)
- wxFLAGS_MEMBER(wxTE_LINEWRAP)
+ wxFLAGS_MEMBER(wxTE_CHARWRAP)
wxFLAGS_MEMBER(wxTE_WORDWRAP)
wxEND_FLAGS( wxTextCtrlStyle )
IMPLEMENT_DYNAMIC_CLASS_XTI(wxTextCtrl, wxControl,"wx/textctrl.h")
wxBEGIN_PROPERTIES_TABLE(wxTextCtrl)
- wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent )
+ wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent )
wxEVENT_PROPERTY( TextEnter , wxEVT_COMMAND_TEXT_ENTER , wxCommandEvent )
wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
wxCONSTRUCTOR_6( wxTextCtrl , wxWindow* , Parent , wxWindowID , Id , wxString , Value , wxPoint , Position , wxSize , Size , long , WindowStyle)
#else
-IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase)
#endif
-BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
+BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase)
EVT_CHAR(wxTextCtrl::OnChar)
EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
return false;
}
-// Make sure the window style (etc.) reflects the HWND style (roughly)
-void wxTextCtrl::AdoptAttributesFromHWND()
-{
-}
-
WXDWORD wxTextCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
{
return 0;
}
-void wxTextCtrl::SetWindowStyleFlag(long style)
-{
-}
-
// ----------------------------------------------------------------------------
// set/get the controls text
// ----------------------------------------------------------------------------
return res;
}
-wxString wxTextCtrl::GetRange(long from, long to) const
+void wxTextCtrl::DoSetValue(const wxString& value, int flags)
{
- wxString str;
-
- return str;
}
-void wxTextCtrl::SetValue(const wxString& value)
-{
-}
-
-#if wxUSE_RICHEDIT && (!wxUSE_UNICODE || wxUSE_UNICODE_MSLU)
-
-// TODO: using memcpy() would improve performance a lot for big amounts of text
-
-DWORD CALLBACK
-wxRichEditStreamIn(DWORD dwCookie, BYTE *buf, LONG cb, LONG *pcb)
-{
- return 0;
-}
-
-// helper struct used to pass parameters from wxTextCtrl to wxRichEditStreamOut
-struct wxStreamOutData
-{
- wchar_t *wpc;
- size_t len;
-};
-
-DWORD CALLBACK
-wxRichEditStreamOut(DWORD_PTR dwCookie, BYTE *buf, LONG cb, LONG *pcb)
-{
- return 0;
-}
-
-
-#if wxUSE_UNICODE_MSLU
- #define UNUSED_IF_MSLU(param)
-#else
- #define UNUSED_IF_MSLU(param) param
-#endif
-
-bool
-wxTextCtrl::StreamIn(const wxString& value,
- wxFontEncoding UNUSED_IF_MSLU(encoding),
- bool selectionOnly)
-{
- return false;
-}
-
-#if !wxUSE_UNICODE_MSLU
-
-wxString
-wxTextCtrl::StreamOut(wxFontEncoding encoding, bool selectionOnly) const
-{
- wxString out;
-
- return out;
-}
-
-#endif // !wxUSE_UNICODE_MSLU
-
-#endif // wxUSE_RICHEDIT
-
void wxTextCtrl::WriteText(const wxString& value)
{
}
{
}
-#ifdef __WIN32__
-
-bool wxTextCtrl::EmulateKeyPress(const wxKeyEvent& event)
-{
- return false;
-}
-
-#endif // __WIN32__
-
// ----------------------------------------------------------------------------
// Clipboard operations
// ----------------------------------------------------------------------------
return 0;
}
-long wxTextCtrl::GetLastPosition() const
+wxTextPos wxTextCtrl::GetLastPosition() const
{
return 0;
}
// Working with files
// ----------------------------------------------------------------------------
-bool wxTextCtrl::LoadFile(const wxString& file)
+bool wxTextCtrl::DoLoadFile(const wxString& file, int fileType)
{
return false;
}
}
// ----------------------------------------------------------------------------
-//
+//
// ----------------------------------------------------------------------------
void wxTextCtrl::ShowPosition(long pos)
return false;
}
-WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
-#if wxUSE_CTL3D
- WXUINT message,
- WXWPARAM wParam,
- WXLPARAM lParam
-#else
- WXUINT WXUNUSED(message),
- WXWPARAM WXUNUSED(wParam),
- WXLPARAM WXUNUSED(lParam)
-#endif
- )
-{
- return (WXHBRUSH) 0;
-}
-
bool wxTextCtrl::AdjustSpaceLimit()
{
return false;