]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/textentry.h
use gtk_entry_set_activates_default() instead of redoing its work manually ourselves
[wxWidgets.git] / include / wx / textentry.h
index 3050074282ff5956915399bbd65d3930b2cc8c2b..d8482d42f066db3c6f981406b3ca4f7c90a48984 100644 (file)
@@ -125,13 +125,11 @@ protected:
     {
     public:
         EventsSuppressor(wxTextEntryBase *text, bool suppress = true)
+            : m_text(text),
+              m_suppress(suppress)
         {
-            m_suppress = suppress;
             if ( m_suppress )
-            {
-                m_text = text;
                 m_text->SuppressTextChangedEvents();
-            }
         }
 
         ~EventsSuppressor()
@@ -145,6 +143,8 @@ protected:
         bool m_suppress;
     };
 
+    friend class EventsSuppressor;
+
     // return true if the events are currently not suppressed
     bool EventsAllowed() const { return m_eventsBlock == 0; }
 
@@ -171,14 +171,17 @@ private:
     // initially the generation of the events is enabled
     virtual void EnableTextChangedEvents(bool WXUNUSED(enable)) { }
 
-
-    friend class EventsSuppressor;
-
     // if this counter is non-null, events are blocked
     unsigned m_eventsBlock;
 };
 
-#ifdef __WXGTK20__
+#ifdef __WXUNIVERSAL__
+    // TODO: we need to use wxTextEntryDelegate here, but for now just prevent
+    //       the GTK/MSW classes from being used in wxUniv build
+    class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase
+    {
+    };
+#elif defined(__WXGTK20__)
     #include "wx/gtk/textentry.h"
 #elif defined(__WXMSW__)
     #include "wx/msw/textentry.h"