+// do the window-specific processing after processing the update event
+void wxTextCtrlBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
+{
+ // call inherited, but skip the wxControl's version, and call directly the
+ // wxWindow's one instead, because the only reason why we are overriding this
+ // function is that we want to use SetValue() instead of wxControl::SetLabel()
+ wxWindowBase::DoUpdateWindowUI(event);
+
+ // update text
+ if ( event.GetSetText() )
+ {
+ if ( event.GetText() != GetValue() )
+ SetValue(event.GetText());
+ }
+}
+
+// ----------------------------------------------------------------------------
+// hit testing
+// ----------------------------------------------------------------------------
+
+wxTextCtrlHitTestResult
+wxTextCtrlBase::HitTest(const wxPoint& pt, wxTextCoord *x, wxTextCoord *y) const
+{
+ // implement in terms of the other overload as the native ports typically
+ // can get the position and not (x, y) pair directly (although wxUniv
+ // directly gets x and y -- and so overrides this method as well)
+ long pos;
+ wxTextCtrlHitTestResult rc = HitTest(pt, &pos);
+
+ if ( rc != wxTE_HT_UNKNOWN )
+ {
+ PositionToXY(pos, x, y);
+ }
+
+ return rc;
+}
+
+wxTextCtrlHitTestResult
+wxTextCtrlBase::HitTest(const wxPoint& WXUNUSED(pt),
+ long * WXUNUSED(pos)) const
+{
+ // not implemented
+ return wxTE_HT_UNKNOWN;
+}
+