X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/44cc96a80c09c8572e1315be66d29f6d610cbf78..3d8662ab0f0ff20a2548474ad92e92bf96c8cded:/include/wx/textctrl.h?ds=sidebyside diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index 75ad314bc1..23f9a46549 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 wxChar) wxTextCtrlNameStr[]; +extern WXDLLEXPORT_DATA(const char) wxTextCtrlNameStr[]; // this is intentionally not enum to avoid warning fixes with // typecasting from enum type to wxTextCoord @@ -280,9 +278,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 +334,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; } @@ -360,7 +355,7 @@ public: // accessors bool HasTextColour() const { return m_colText.Ok() && HasFlag(wxTEXT_ATTR_TEXT_COLOUR) ; } bool HasBackgroundColour() const { return m_colBack.Ok() && HasFlag(wxTEXT_ATTR_BACKGROUND_COLOUR) ; } - bool HasAlignment() const { return (m_textAlignment != wxTEXT_ALIGNMENT_DEFAULT) || HasFlag(wxTEXT_ATTR_ALIGNMENT) ; } + bool HasAlignment() const { return (m_textAlignment != wxTEXT_ALIGNMENT_DEFAULT) && HasFlag(wxTEXT_ATTR_ALIGNMENT) ; } bool HasTabs() const { return HasFlag(wxTEXT_ATTR_TABS) ; } bool HasLeftIndent() const { return HasFlag(wxTEXT_ATTR_LEFT_INDENT); } bool HasRightIndent() const { return HasFlag(wxTEXT_ATTR_RIGHT_INDENT); } @@ -697,22 +692,18 @@ protected: #include "wx/cocoa/textctrl.h" #elif defined(__WXPM__) #include "wx/os2/textctrl.h" +#elif defined(__WXPALMOS__) + #include "wx/palmos/textctrl.h" #endif // ---------------------------------------------------------------------------- // wxTextCtrl events // ---------------------------------------------------------------------------- -#if !WXWIN_COMPATIBILITY_EVENT_TYPES - -BEGIN_DECLARE_EVENT_TYPES() - DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_UPDATED, 7) - DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_ENTER, 8) - DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_URL, 13) - DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_MAXLEN, 14) -END_DECLARE_EVENT_TYPES() - -#endif // !WXWIN_COMPATIBILITY_EVENT_TYPES +extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_TEXT_UPDATED; +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 {