From: Stefan Neis <Stefan.Neis@t-online.de>
Date: Sat, 9 Apr 2005 11:07:00 +0000 (+0000)
Subject: Added support for toggle button on OS/2.
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/fbe2ca438b746a509ca04c456166b984650ecaac

Added support for toggle button on OS/2.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl
index 624273135c..f5fce37aac 100644
--- a/build/bakefiles/files.bkl
+++ b/build/bakefiles/files.bkl
@@ -1631,6 +1631,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     src/os2/stattext.cpp
     src/os2/tabctrl.cpp
     src/os2/textctrl.cpp
+    src/os2/tglbtn.cpp
     src/os2/timer.cpp
     src/os2/toolbar.cpp
     src/os2/tooltip.cpp
@@ -1708,6 +1709,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     wx/os2/stattext.h
     wx/os2/tabctrl.h
     wx/os2/textctrl.h
+    wx/os2/tglbtn.h
     wx/os2/timer.h
     wx/os2/toolbar.h
     wx/os2/tooltip.h
diff --git a/configure b/configure
index c00bc8e0e3..57f1eb7d0a 100755
--- a/configure
+++ b/configure
@@ -1025,6 +1025,7 @@ Optional Features:
   --enable-miniframe      use wxMiniFrame class
   --enable-tooltips       use wxToolTip class
   --enable-splines        use spline drawing code
+  --enable-mousewheel     use mousewheel
   --enable-validators     use wxValidator and derived classes
   --enable-busyinfo       use wxBusyInfo
   --enable-joystick       use wxJoystick
@@ -2111,6 +2112,7 @@ if test $DEBUG_CONFIGURE = 1; then
   DEFAULT_wxUSE_DRAG_AND_DROP=no
   DEFAULT_wxUSE_DRAGIMAGE=no
   DEFAULT_wxUSE_SPLINES=no
+  DEFAULT_wxUSE_MOUSEWHEEL=no
 
   DEFAULT_wxUSE_MDI=no
   DEFAULT_wxUSE_MDI_ARCHITECTURE=no
@@ -2307,6 +2309,7 @@ else
   DEFAULT_wxUSE_DRAG_AND_DROP=yes
   DEFAULT_wxUSE_DRAGIMAGE=yes
   DEFAULT_wxUSE_SPLINES=yes
+  DEFAULT_wxUSE_MOUSEWHEEL=yes
 
   DEFAULT_wxUSE_MDI=yes
   DEFAULT_wxUSE_MDI_ARCHITECTURE=yes
@@ -9784,6 +9787,47 @@ echo "${ECHO_T}no" >&6
           fi
 
 
+	  enablestring=
+          echo "$as_me:$LINENO: checking for --${enablestring:-enable}-mousewheel" >&5
+echo $ECHO_N "checking for --${enablestring:-enable}-mousewheel... $ECHO_C" >&6
+          no_cache=0
+          # Check whether --enable-mousewheel or --disable-mousewheel was given.
+if test "${enable_mousewheel+set}" = set; then
+  enableval="$enable_mousewheel"
+
+                          if test "$enableval" = yes; then
+                            ac_cv_use_mousewheel='wxUSE_MOUSEWHEEL=yes'
+                          else
+                            ac_cv_use_mousewheel='wxUSE_MOUSEWHEEL=no'
+                          fi
+
+else
+
+                          LINE=`grep "wxUSE_MOUSEWHEEL" ${wx_arg_cache_file}`
+                          if test "x$LINE" != x ; then
+                            eval "DEFAULT_$LINE"
+                          else
+                            no_cache=1
+                          fi
+
+                          ac_cv_use_mousewheel='wxUSE_MOUSEWHEEL='$DEFAULT_wxUSE_MOUSEWHEEL
+
+fi;
+
+          eval "$ac_cv_use_mousewheel"
+          if test "$no_cache" != 1; then
+            echo $ac_cv_use_mousewheel >> ${wx_arg_cache_file}.tmp
+          fi
+
+          if test "$wxUSE_MOUSEWHEEL" = yes; then
+            echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+          else
+            echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+          fi
+
+
 	  enablestring=
           echo "$as_me:$LINENO: checking for --${enablestring:-enable}-validators" >&5
 echo $ECHO_N "checking for --${enablestring:-enable}-validators... $ECHO_C" >&6
@@ -38748,6 +38792,13 @@ _ACEOF
 
 fi
 
+if test "$wxUSE_MOUSEWHEEL" = "yes" ; then
+  cat >>confdefs.h <<\_ACEOF
+#define wxUSE_MOUSEWHEEL 1
+_ACEOF
+
+fi
+
 
 USES_CONTROLS=0
 if test "$wxUSE_CONTROLS" = "yes"; then
@@ -39050,12 +39101,6 @@ if test "$wxUSE_TOGGLEBTN" = "yes"; then
         { echo "$as_me:$LINENO: WARNING: Toggle button not yet supported under Mac OS X... disabled" >&5
 echo "$as_me: WARNING: Toggle button not yet supported under Mac OS X... disabled" >&2;}
         wxUSE_TOGGLEBTN=no
-    else
-        if test "$wxUSE_PM" = 1; then
-            { echo "$as_me:$LINENO: WARNING: Toggle button not yet supported under PM... disabled" >&5
-echo "$as_me: WARNING: Toggle button not yet supported under PM... disabled" >&2;}
-            wxUSE_TOGGLEBTN=no
-        fi
     fi
     if test "$wxUSE_UNIVERSAL" = "yes"; then
         { echo "$as_me:$LINENO: WARNING: Toggle button not yet supported under wxUniversal... disabled" >&5
diff --git a/configure.in b/configure.in
index e4e80308c8..3479bd09a7 100644
--- a/configure.in
+++ b/configure.in
@@ -5780,11 +5780,6 @@ if test "$wxUSE_TOGGLEBTN" = "yes"; then
     if test "$wxUSE_COCOA" = 1 ; then
         AC_MSG_WARN([Toggle button not yet supported under Mac OS X... disabled])
         wxUSE_TOGGLEBTN=no
-    else
-        if test "$wxUSE_PM" = 1; then
-            AC_MSG_WARN([Toggle button not yet supported under PM... disabled])
-            wxUSE_TOGGLEBTN=no
-        fi
     fi
     if test "$wxUSE_UNIVERSAL" = "yes"; then
         AC_MSG_WARN([Toggle button not yet supported under wxUniversal... disabled])