X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ccb234b4d0b4f52ddb3100b55b53b32d1ea78d52..a83ea9c15a7ac7bbdc6686164cfcbbc21ae5031a:/src/motif/textctrl.cpp diff --git a/src/motif/textctrl.cpp b/src/motif/textctrl.cpp index 26d60b1878..090da09f5a 100644 --- a/src/motif/textctrl.cpp +++ b/src/motif/textctrl.cpp @@ -17,10 +17,13 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "textctrl.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #ifdef __VMS #define XtParent XTPARENT #endif @@ -197,7 +200,6 @@ bool wxTextCtrl::Create(wxWindow *parent, if( size.x != -1 ) best.x = size.x; if( size.y != -1 ) best.y = size.y; - SetCanAddEventHandler(TRUE); AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, best.x, best.y); @@ -401,7 +403,7 @@ void wxTextCtrl::WriteText(const wxString& text) void wxTextCtrl::AppendText(const wxString& text) { - long textPosition = GetLastPosition() + strlen(text); + long textPosition = GetLastPosition() + text.length(); XmTextInsert ((Widget) m_mainWidget, GetLastPosition(), wxConstCast(text.c_str(), char)); XtVaSetValues ((Widget) m_mainWidget, XmNcursorPosition, textPosition, NULL); @@ -421,7 +423,12 @@ bool wxTextCtrl::IsModified() const return m_modified; } -// Makes 'unmodified' +// Makes modified or unmodified +void wxTextCtrl::MarkDirty() +{ + m_modified = TRUE; +} + void wxTextCtrl::DiscardEdits() { m_modified = FALSE; @@ -581,9 +588,9 @@ void wxTextCtrl::ChangeBackgroundColour() NULL); wxColour backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); if (hsb) - DoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE); + wxDoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE); if (vsb) - DoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE); + wxDoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE); // MBN: why change parent background? // DoChangeBackgroundColour((WXWidget) parent, m_backgroundColour, TRUE); @@ -611,7 +618,7 @@ void wxTextCtrl::ChangeForegroundColour() if (vsb) DoChangeForegroundColour((WXWidget) vsb, m_foregroundColour); */ - DoChangeForegroundColour((WXWidget) parent, m_foregroundColour); + wxDoChangeForegroundColour((WXWidget) parent, m_foregroundColour); } }