X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de564874d60233c977c93496da1aa406245c37c2..16d0c403faf0b6f64e4798479abfddf8a8090d79:/src/msw/textctrl.cpp?ds=inline diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index cd347f4764..a26f012890 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -13,7 +13,7 @@ // declarations // ============================================================================ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "textctrl.h" #endif @@ -116,7 +116,22 @@ IMPLEMENT_DYNAMIC_CLASS(wxRichEditModule, wxModule) // event tables and other macros // ---------------------------------------------------------------------------- +#if wxUSE_EXTENDED_RTTI +IMPLEMENT_DYNAMIC_CLASS_XTI(wxTextCtrl, wxControl,"wx/textctrl.h") + +WX_BEGIN_PROPERTIES_TABLE(wxTextCtrl) + WX_PROPERTY( Font , wxFont , SetFont , GetFont , ) + WX_PROPERTY( Value , wxString , SetValue, GetValue, wxEmptyString ) +WX_END_PROPERTIES_TABLE() + +WX_BEGIN_HANDLERS_TABLE(wxTextCtrl) +WX_END_HANDLERS_TABLE() + +WX_CONSTRUCTOR_6( wxTextCtrl , wxWindow* , Parent , wxWindowID , Id , wxString , Value , wxPoint , Position , wxSize , Size , long , WindowStyle) +#else IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) +#endif + BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) EVT_CHAR(wxTextCtrl::OnChar) @@ -533,6 +548,11 @@ void wxTextCtrl::SetValue(const wxString& value) { DoWriteText(value, FALSE /* not selection only */); } + else // same text + { + // still send an event for consistency + SendUpdateEvent(); + } // we should reset the modified flag even if the value didn't really change @@ -1664,7 +1684,7 @@ void wxTextCtrl::OnRedo(wxCommandEvent& WXUNUSED(event)) Redo(); } -void wxTextCtrl::OnDelete(wxCommandEvent& event) +void wxTextCtrl::OnDelete(wxCommandEvent& WXUNUSED(event)) { long from, to; GetSelection(& from, & to); @@ -1672,7 +1692,7 @@ void wxTextCtrl::OnDelete(wxCommandEvent& event) Remove(from, to); } -void wxTextCtrl::OnSelectAll(wxCommandEvent& event) +void wxTextCtrl::OnSelectAll(wxCommandEvent& WXUNUSED(event)) { SetSelection(-1, -1); } @@ -1740,7 +1760,7 @@ void wxTextCtrl::OnRightClick(wxMouseEvent& event) event.Skip(); } -void wxTextCtrl::OnSetFocus(wxFocusEvent& event) +void wxTextCtrl::OnSetFocus(wxFocusEvent& WXUNUSED(event)) { // be sure the caret remains invisible if the user had hidden it if ( !m_isNativeCaretShown ) @@ -1844,7 +1864,7 @@ bool wxTextCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) } return TRUE; } - + // not processed, leave it to the base class return wxTextCtrlBase::MSWOnNotify(idCtrl, lParam, result); }