X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fa03f04345b620d1a14529b05961116b20a1297..05c3f0fc73d9124061c08e3d707b4e3d6bab4ff4:/include/wx/textctrl.h diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index 1598d25416..43c6cfda0a 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -106,7 +106,7 @@ const wxTextCoord wxInvalidTextCoord = -2; // automatically detect the URLs and generate the events when mouse is // moved/clicked over an URL // -// this is for Win32 richedit controls only so far +// this is for Win32 richedit and wxGTK2 multiline controls only so far #define wxTE_AUTO_URL 0x1000 // by default, the Windows text control doesn't show the selection when it @@ -123,6 +123,13 @@ const wxTextCoord wxInvalidTextCoord = -2; // wxTE_RICH controls - can be used together with or instead of wxTE_RICH #define wxTE_RICH2 0x8000 +// reuse wxTE_RICH2's value for CAPEDIT control on Windows CE +#if defined(__SMARTPHONE__) || defined(__POCKETPC__) +#define wxTE_CAPITALIZE wxTE_RICH2 +#else +#define wxTE_CAPITALIZE 0 +#endif + // ---------------------------------------------------------------------------- // wxTextCtrl::HitTest return values // ---------------------------------------------------------------------------- @@ -282,7 +289,7 @@ public: virtual bool IsEditable() const = 0; // more readable flag testing methods - bool IsSingleLine() const { return !(GetWindowStyle() & wxTE_MULTILINE); } + bool IsSingleLine() const { return !HasFlag(wxTE_MULTILINE); } bool IsMultiLine() const { return !IsSingleLine(); } // If the return values from and to are the same, there is no selection. @@ -476,13 +483,18 @@ public: typedef void (wxEvtHandler::*wxTextUrlEventFunction)(wxTextUrlEvent&); #define wxTextEventHandler(func) wxCommandEventHandler(func) +#define wxTextUrlEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxTextUrlEventFunction, &func) #define wx__DECLARE_TEXTEVT(evt, id, fn) \ wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_ ## evt, id, wxTextEventHandler(fn)) +#define wx__DECLARE_TEXTURLEVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_ ## evt, id, wxTextUrlEventHandler(fn)) + #define EVT_TEXT(id, fn) wx__DECLARE_TEXTEVT(UPDATED, id, fn) #define EVT_TEXT_ENTER(id, fn) wx__DECLARE_TEXTEVT(ENTER, id, fn) -#define EVT_TEXT_URL(id, fn) wx__DECLARE_TEXTEVT(URL, id, fn) +#define EVT_TEXT_URL(id, fn) wx__DECLARE_TEXTURLEVT(URL, id, fn) #define EVT_TEXT_MAXLEN(id, fn) wx__DECLARE_TEXTEVT(MAXLEN, id, fn) #ifndef NO_TEXT_WINDOW_STREAM