X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b4da62701dbe8ccfbe447ce8d1bc77fcb40e9e5..328fafa1db150b08d1793bafd1b17208857d0102:/include/wx/textctrl.h diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index b86137bc11..d92157292a 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -25,13 +25,11 @@ #include "wx/dynarray.h" // wxArrayInt #include "wx/gdicmn.h" // wxPoint -// Open Watcom 1.3 does allow only ios::rdbuf() while -// we want something with streambuf parameter -// Also, can't use streambuf if making or using a DLL :-( - +// some compilers don't have standard compliant rdbuf() (and MSVC has it only +// in its new iostream library, not in the old one used with iostream.h) #if defined(__WATCOMC__) || \ defined(__MWERKS__) || \ - (defined(__WINDOWS__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL))) + ((defined(__VISUALC5__) || defined(__VISUALC6__)) && wxUSE_IOSTREAMH) #define wxHAS_TEXT_WINDOW_STREAM 0 #elif wxUSE_STD_IOSTREAM #include "wx/ioswrap.h" @@ -55,7 +53,7 @@ typedef long wxTextCoord; // constants // ---------------------------------------------------------------------------- -extern WXDLLEXPORT_DATA(const char) wxTextCtrlNameStr[]; +extern WXDLLIMPEXP_DATA_CORE(const char) wxTextCtrlNameStr[]; // this is intentionally not enum to avoid warning fixes with // typecasting from enum type to wxTextCoord @@ -67,7 +65,6 @@ const wxTextCoord wxInvalidTextCoord = -2; // ---------------------------------------------------------------------------- #define wxTE_NO_VSCROLL 0x0002 -#define wxTE_AUTO_SCROLL 0x0008 #define wxTE_READONLY 0x0010 #define wxTE_MULTILINE 0x0020 @@ -110,6 +107,11 @@ const wxTextCoord wxInvalidTextCoord = -2; #define wxTE_LINEWRAP wxTE_CHARWRAP #endif // WXWIN_COMPATIBILITY_2_6 +#if WXWIN_COMPATIBILITY_2_8 + // this style is (or at least should be) on by default now, don't use it + #define wxTE_AUTO_SCROLL 0 +#endif // WXWIN_COMPATIBILITY_2_8 + // force using RichEdit version 2.0 or 3.0 instead of 1.0 (default) for // wxTE_RICH controls - can be used together with or instead of wxTE_RICH #define wxTE_RICH2 0x8000 @@ -254,7 +256,7 @@ enum wxTextAttrAlignment // wxTextAttr: a structure containing the visual attributes of a text // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxTextAttr +class WXDLLIMPEXP_CORE wxTextAttr { public: // ctors @@ -280,9 +282,6 @@ public: // Partial equality test taking flags into account bool EqPartial(const wxTextAttr& attr, int flags) const; - // Create font from font attributes. - wxFont CreateFont() const; - // Get attributes from font. bool GetFontAttributes(const wxFont& font, int flags = wxTEXT_ATTR_FONT); @@ -339,7 +338,7 @@ public: const wxString& GetFontFaceName() const { return m_fontFaceName; } wxFontEncoding GetFontEncoding() const { return m_fontEncoding; } - wxFont GetFont() const { return CreateFont(); } + wxFont GetFont() const; const wxString& GetCharacterStyleName() const { return m_characterStyleName; } const wxString& GetParagraphStyleName() const { return m_paragraphStyleName; } @@ -596,7 +595,7 @@ private: // wxTextCtrl: a single or multiple line text zone where user can edit text // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxTextCtrlBase : public wxControl, +class WXDLLIMPEXP_CORE wxTextCtrlBase : public wxControl, #if wxHAS_TEXT_WINDOW_STREAM public wxSTD streambuf, #endif @@ -620,9 +619,10 @@ public: wxTextCtrl& operator<<(const wxString& s); wxTextCtrl& operator<<(int i); wxTextCtrl& operator<<(long i); - wxTextCtrl& operator<<(float f); + wxTextCtrl& operator<<(float f) { return *this << double(f); } wxTextCtrl& operator<<(double d); - wxTextCtrl& operator<<(const wxChar c); + wxTextCtrl& operator<<(char c) { return *this << wxString(c); } + wxTextCtrl& operator<<(wchar_t c) { return *this << wxString(c); } // insert the character which would have resulted from this key event, // return true if anything has been inserted @@ -692,7 +692,7 @@ protected: #elif defined(__WXGTK__) #include "wx/gtk1/textctrl.h" #elif defined(__WXMAC__) - #include "wx/mac/textctrl.h" + #include "wx/osx/textctrl.h" #elif defined(__WXCOCOA__) #include "wx/cocoa/textctrl.h" #elif defined(__WXPM__) @@ -710,7 +710,7 @@ extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_TEXT_ENTER; extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_TEXT_URL; extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_TEXT_MAXLEN; -class WXDLLEXPORT wxTextUrlEvent : public wxCommandEvent +class WXDLLIMPEXP_CORE wxTextUrlEvent : public wxCommandEvent { public: wxTextUrlEvent(int winid, const wxMouseEvent& evtMouse, @@ -768,7 +768,7 @@ typedef void (wxEvtHandler::*wxTextUrlEventFunction)(wxTextUrlEvent&); // C++ stream to the wxTextCtrl given to its ctor during its lifetime. // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxStreamToTextRedirector +class WXDLLIMPEXP_CORE wxStreamToTextRedirector { private: void Init(wxTextCtrl *text)