#include <iostream>
#endif
-#if defined(__WIN95__) && !defined(__TWIN32__)
+#if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__WXWINE__)
#define wxUSE_RICHEDIT 1
#else
#define wxUSE_RICHEDIT 0
wxTextCtrl(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = 0,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr)
#ifndef NO_TEXT_WINDOW_STREAM
bool Create(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = wxTE_PROCESS_TAB,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr);
// accessors
// ---------
- virtual wxString GetValue() const ;
+
+ virtual wxString GetValue() const;
virtual void SetValue(const wxString& value);
virtual int GetLineLength(long lineNo) const;
virtual void ShowPosition(long pos);
virtual void Clear();
+ // Implementation from now on
+ // --------------------------
+
+ virtual void Command(wxCommandEvent& event);
+ virtual bool MSWCommand(WXUINT param, WXWORD id);
+
+#if wxUSE_RICHEDIT
+ bool IsRich() const { return m_isRich; }
+ void SetRichEdit(bool isRich) { m_isRich = isRich; }
+#endif
+
+ virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
+ WXUINT message, WXWPARAM wParam,
+ WXLPARAM lParam);
+
+ virtual void AdoptAttributesFromHWND();
+ virtual void SetupColours();
+
+ virtual bool AcceptsFocus() const;
+
// callbacks
// ---------
void OnDropFiles(wxDropFilesEvent& event);
void OnUpdateUndo(wxUpdateUIEvent& event);
void OnUpdateRedo(wxUpdateUIEvent& event);
- // Implementation
- // --------------
- virtual void Command(wxCommandEvent& event);
- virtual bool MSWCommand(WXUINT param, WXWORD id);
-
-#if wxUSE_RICHEDIT
- bool IsRich() const { return m_isRich; }
- void SetRichEdit(bool isRich) { m_isRich = isRich; }
-#endif
-
- virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
- WXUINT message, WXWPARAM wParam,
- WXLPARAM lParam);
-
- virtual void AdoptAttributesFromHWND();
- virtual void SetupColours();
- virtual long MSWGetDlgCode();
-
protected:
#if wxUSE_RICHEDIT
bool m_isRich; // Are we using rich text edit to implement this?
wxString m_fileName;
- virtual void DoSetSize(int x, int y,
- int width, int height,
- int sizeFlags = wxSIZE_AUTO);
+ // call this to increase the size limit (will do nothing if the current
+ // limit is big enough)
+ void AdjustSpaceLimit();
+
+ virtual wxSize DoGetBestSize();
private:
DECLARE_EVENT_TABLE()