X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e40298d54ecd5b109222a7c60aa2ef084a304d69..3684ade82ec6f5fb7ff72341e26060b6ea0793c8:/include/wx/mac/textctrl.h diff --git a/include/wx/mac/textctrl.h b/include/wx/mac/textctrl.h index df241fbdcf..df3a964339 100644 --- a/include/wx/mac/textctrl.h +++ b/include/wx/mac/textctrl.h @@ -12,14 +12,13 @@ #ifndef _WX_TEXTCTRL_H_ #define _WX_TEXTCTRL_H_ -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "textctrl.h" #endif #include "wx/control.h" -WXDLLEXPORT_DATA(extern const char*) wxTextCtrlNameStr; -WXDLLEXPORT_DATA(extern const char*) wxEmptyString; +WXDLLEXPORT_DATA(extern const wxChar*) wxTextCtrlNameStr; // Single-line text item class WXDLLEXPORT wxTextCtrl: public wxTextCtrlBase @@ -29,16 +28,18 @@ class WXDLLEXPORT wxTextCtrl: public wxTextCtrlBase public: // creation // -------- - wxTextCtrl(); + wxTextCtrl() { Init(); } ~wxTextCtrl(); - inline wxTextCtrl(wxWindow *parent, wxWindowID id, - const wxString& value = wxEmptyString, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxTextCtrlNameStr) + wxTextCtrl(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxTextCtrlNameStr) { - Create(parent, id, value, pos, size, style, validator, name); + Init(); + + Create(parent, id, value, pos, size, style, validator, name); } bool Create(wxWindow *parent, wxWindowID id, @@ -75,7 +76,8 @@ public: // load the controls contents from the file virtual bool LoadFile(const wxString& file); - // clears the dirty flag + // sets/clears the dirty flag + virtual void MarkDirty(); virtual void DiscardEdits(); // set the max number of characters which may be entered in a single line @@ -158,9 +160,16 @@ public: virtual bool Show(bool show = TRUE) ; protected: + // common part of all ctors + void Init(); + virtual wxSize DoGetBestSize() const; bool m_editable ; + + // flag is set to true when the user edits the controls contents + bool m_dirty; + // one of the following objects is used for representation, the other one is NULL void* m_macTE ; void* m_macTXN ;