]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxUSE_REARRANGECTRL
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 Jan 2009 00:44:02 +0000 (00:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 Jan 2009 00:44:02 +0000 (00:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

14 files changed:
configure
configure.in
include/wx/motif/setup0.h
include/wx/msw/setup0.h
include/wx/msw/wince/setup.h
include/wx/os2/setup0.h
include/wx/osx/setup0.h
include/wx/palmos/setup0.h
include/wx/rearrangectrl.h
include/wx/setup_inc.h
include/wx/univ/setup0.h
setup.h.in
src/common/headerctrlcmn.cpp
src/common/rearrangectrl.cpp

index 4771a8844621eee3c9805ef4959c81aca37059fe..dc2c2391c1a62c85b3775b6b66dfb2c6048cd810 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Id: configure.in 57597 2008-12-27 14:58:12Z FM .
+# From configure.in Id: configure.in 57865 2009-01-06 22:28:16Z VS .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0.
 #
@@ -661,10 +661,6 @@ host
 host_cpu
 host_vendor
 host_os
-target
-target_cpu
-target_vendor
-target_os
 wx_top_builddir
 CC
 CFLAGS
@@ -1645,7 +1641,6 @@ X features:
 System types:
   --build=BUILD     configure for building on BUILD [guessed]
   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-  --target=TARGET   configure for building compilers for TARGET [HOST]
 _ACEOF
 fi
 
@@ -1820,6 +1815,7 @@ Optional Features:
   --enable-odcombobox     use wxOwnerDrawnComboBox class
   --enable-radiobox       use wxRadioBox class
   --enable-radiobtn       use wxRadioButton class
+  --enable-rearrangectrl  use wxRearrangeList/Ctrl/Dialog
   --enable-sash           use wxSashWindow class
   --enable-scrollbar      use wxScrollBar class and scrollable windows
   --enable-searchctrl     use wxSearchCtrl class
@@ -2537,49 +2533,6 @@ IFS=$ac_save_IFS
 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
-{ echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
-if test "${ac_cv_target+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "x$target_alias" = x; then
-  ac_cv_target=$ac_cv_host
-else
-  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-echo "$as_me: error: invalid value of canonical target" >&2;}
-   { (exit 1); exit 1; }; };;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
 
 
 
@@ -9548,6 +9501,7 @@ elif test "$wxUSE_CONTROLS" = "no"; then
   DEFAULT_wxUSE_NOTEBOOK=no
   DEFAULT_wxUSE_RADIOBOX=no
   DEFAULT_wxUSE_RADIOBTN=no
+  DEFAULT_wxUSE_REARRANGECTRL=no
   DEFAULT_wxUSE_SASH=no
   DEFAULT_wxUSE_SCROLLBAR=no
   DEFAULT_wxUSE_SEARCHCTRL=no
 echo "${ECHO_T}$result" >&6; }
 
 
+          enablestring=
+          defaultval=$wxUSE_ALL_FEATURES
+          if test -z "$defaultval"; then
+              if test x"$enablestring" = xdisable; then
+                  defaultval=yes
+              else
+                  defaultval=no
+              fi
+          fi
+
+          { echo "$as_me:$LINENO: checking for --${enablestring:-enable}-rearrangectrl" >&5
+echo $ECHO_N "checking for --${enablestring:-enable}-rearrangectrl... $ECHO_C" >&6; }
+          # Check whether --enable-rearrangectrl was given.
+if test "${enable_rearrangectrl+set}" = set; then
+  enableval=$enable_rearrangectrl;
+                          if test "$enableval" = yes; then
+                            wx_cv_use_rearrangectrl='wxUSE_REARRANGECTRL=yes'
+                          else
+                            wx_cv_use_rearrangectrl='wxUSE_REARRANGECTRL=no'
+                          fi
+
+else
+
+                          wx_cv_use_rearrangectrl='wxUSE_REARRANGECTRL=${'DEFAULT_wxUSE_REARRANGECTRL":-$defaultval}"
+
+fi
+
+
+          eval "$wx_cv_use_rearrangectrl"
+
+          if test x"$enablestring" = xdisable; then
+            if test $wxUSE_REARRANGECTRL = yes; then
+              result=no
+            else
+              result=yes
+            fi
+          else
+            result=$wxUSE_REARRANGECTRL
+          fi
+
+          { echo "$as_me:$LINENO: result: $result" >&5
+echo "${ECHO_T}$result" >&6; }
+
+
           enablestring=
           defaultval=$wxUSE_ALL_FEATURES
           if test -z "$defaultval"; then
@@ -33968,7 +33966,12 @@ if test "$cross_compiling" = "yes"; then
     TOOLCHAIN_FULLNAME="${host_alias}-$TOOLCHAIN_FULLNAME"
 fi
 
-WX_LIBRARY_BASENAME_NOGUI="wx_base${WXBASEPORT}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}"
+
+if test "$wxUSE_OSX_CARBON" = 1 -o "$wxUSE_OSX_COCOA" = 1 -o "$wxUSE_COCOA" = 1; then
+    WX_LIBRARY_BASENAME_NOGUI="wx_base${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}"
+else
+    WX_LIBRARY_BASENAME_NOGUI="wx_base${WXBASEPORT}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}"
+fi
 if test "${TOOLKIT_DIR}" = "os2"; then
     WX_LIBRARY_BASENAME_GUI="wx_pm${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}${WX_LIB_FLAVOUR}"
 else
@@ -45976,6 +45979,13 @@ _ACEOF
     USES_CONTROLS=1
 fi
 
+if test "$wxUSE_REARRANGECTRL" = "yes"; then
+    cat >>confdefs.h <<\_ACEOF
+#define wxUSE_REARRANGECTRL 1
+_ACEOF
+
+fi
+
 if test "$wxUSE_SASH" = "yes"; then
     cat >>confdefs.h <<\_ACEOF
 #define wxUSE_SASH 1
@@ -51813,10 +51823,6 @@ host!$host$ac_delim
 host_cpu!$host_cpu$ac_delim
 host_vendor!$host_vendor$ac_delim
 host_os!$host_os$ac_delim
-target!$target$ac_delim
-target_cpu!$target_cpu$ac_delim
-target_vendor!$target_vendor$ac_delim
-target_os!$target_os$ac_delim
 wx_top_builddir!$wx_top_builddir$ac_delim
 CC!$CC$ac_delim
 CFLAGS!$CFLAGS$ac_delim
@@ -51865,6 +51871,10 @@ GNOMEVFS_CFLAGS!$GNOMEVFS_CFLAGS$ac_delim
 GNOMEVFS_LIBS!$GNOMEVFS_LIBS$ac_delim
 HILDON_CFLAGS!$HILDON_CFLAGS$ac_delim
 HILDON_LIBS!$HILDON_LIBS$ac_delim
+CAIRO_CFLAGS!$CAIRO_CFLAGS$ac_delim
+CAIRO_LIBS!$CAIRO_LIBS$ac_delim
+GST_CFLAGS!$GST_CFLAGS$ac_delim
+GST_LIBS!$GST_LIBS$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -51906,10 +51916,6 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
-CAIRO_CFLAGS!$CAIRO_CFLAGS$ac_delim
-CAIRO_LIBS!$CAIRO_LIBS$ac_delim
-GST_CFLAGS!$GST_CFLAGS$ac_delim
-GST_LIBS!$GST_LIBS$ac_delim
 ALL_WX_LIBS!$ALL_WX_LIBS$ac_delim
 BUILT_WX_LIBS!$BUILT_WX_LIBS$ac_delim
 STD_BASE_LIBS!$STD_BASE_LIBS$ac_delim
@@ -52003,6 +52009,10 @@ REZ!$REZ$ac_delim
 SETFILE!$SETFILE$ac_delim
 OBJCXXFLAGS!$OBJCXXFLAGS$ac_delim
 GCC_PCH!$GCC_PCH$ac_delim
+ICC_PCH!$ICC_PCH$ac_delim
+ICC_PCH_CREATE_SWITCH!$ICC_PCH_CREATE_SWITCH$ac_delim
+ICC_PCH_USE_SWITCH!$ICC_PCH_USE_SWITCH$ac_delim
+BK_MAKE_PCH!$BK_MAKE_PCH$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -52044,10 +52054,6 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
-ICC_PCH!$ICC_PCH$ac_delim
-ICC_PCH_CREATE_SWITCH!$ICC_PCH_CREATE_SWITCH$ac_delim
-ICC_PCH_USE_SWITCH!$ICC_PCH_USE_SWITCH$ac_delim
-BK_MAKE_PCH!$BK_MAKE_PCH$ac_delim
 COND_BUILD_DEBUG!$COND_BUILD_DEBUG$ac_delim
 COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT!$COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT$ac_delim
 COND_BUILD_DEBUG_DEBUG_INFO_DEFAULT!$COND_BUILD_DEBUG_DEBUG_INFO_DEFAULT$ac_delim
@@ -52141,6 +52147,10 @@ COND_SHARED_0_TOOLKIT_PM_WXUNIV_0!$COND_SHARED_0_TOOLKIT_PM_WXUNIV_0$ac_delim
 COND_SHARED_0_USE_GUI_1_USE_OPENGL_1!$COND_SHARED_0_USE_GUI_1_USE_OPENGL_1$ac_delim
 COND_SHARED_0_USE_GUI_1_wxUSE_LIBJPEG_builtin!$COND_SHARED_0_USE_GUI_1_wxUSE_LIBJPEG_builtin$ac_delim
 COND_SHARED_0_USE_GUI_1_wxUSE_LIBPNG_builtin!$COND_SHARED_0_USE_GUI_1_wxUSE_LIBPNG_builtin$ac_delim
+COND_SHARED_0_USE_GUI_1_wxUSE_LIBTIFF_builtin!$COND_SHARED_0_USE_GUI_1_wxUSE_LIBTIFF_builtin$ac_delim
+COND_SHARED_0_USE_STC_1!$COND_SHARED_0_USE_STC_1$ac_delim
+COND_SHARED_0_wxUSE_EXPAT_builtin!$COND_SHARED_0_wxUSE_EXPAT_builtin$ac_delim
+COND_SHARED_0_wxUSE_REGEX_builtin!$COND_SHARED_0_wxUSE_REGEX_builtin$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -52182,10 +52192,6 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
-COND_SHARED_0_USE_GUI_1_wxUSE_LIBTIFF_builtin!$COND_SHARED_0_USE_GUI_1_wxUSE_LIBTIFF_builtin$ac_delim
-COND_SHARED_0_USE_STC_1!$COND_SHARED_0_USE_STC_1$ac_delim
-COND_SHARED_0_wxUSE_EXPAT_builtin!$COND_SHARED_0_wxUSE_EXPAT_builtin$ac_delim
-COND_SHARED_0_wxUSE_REGEX_builtin!$COND_SHARED_0_wxUSE_REGEX_builtin$ac_delim
 COND_SHARED_0_wxUSE_ZLIB_builtin!$COND_SHARED_0_wxUSE_ZLIB_builtin$ac_delim
 COND_SHARED_1!$COND_SHARED_1$ac_delim
 COND_SHARED_1_USE_GUI_1_USE_OPENGL_1!$COND_SHARED_1_USE_GUI_1_USE_OPENGL_1$ac_delim
@@ -52279,6 +52285,10 @@ WX_LIBRARY_BASENAME_NOGUI!$WX_LIBRARY_BASENAME_NOGUI$ac_delim
 WX_LIBRARY_BASENAME_GUI!$WX_LIBRARY_BASENAME_GUI$ac_delim
 USE_GUI!$USE_GUI$ac_delim
 AFMINSTALL!$AFMINSTALL$ac_delim
+WIN32INSTALL!$WIN32INSTALL$ac_delim
+TOOLKIT!$TOOLKIT$ac_delim
+TOOLKIT_DIR!$TOOLKIT_DIR$ac_delim
+TOOLCHAIN_NAME!$TOOLCHAIN_NAME$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -52320,10 +52330,6 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
-WIN32INSTALL!$WIN32INSTALL$ac_delim
-TOOLKIT!$TOOLKIT$ac_delim
-TOOLKIT_DIR!$TOOLKIT_DIR$ac_delim
-TOOLCHAIN_NAME!$TOOLCHAIN_NAME$ac_delim
 TOOLCHAIN_FULLNAME!$TOOLCHAIN_FULLNAME$ac_delim
 cross_compiling!$cross_compiling$ac_delim
 WIDGET_SET!$WIDGET_SET$ac_delim
@@ -52361,7 +52367,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 39; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 35; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index 8bd62e0bcb24f3e5f8184d55ac0bf0216e7d65b9..393d0202f4fdaed017a869b4eeace96e874d9065 100644 (file)
@@ -878,6 +878,7 @@ elif test "$wxUSE_CONTROLS" = "no"; then
   DEFAULT_wxUSE_NOTEBOOK=no
   DEFAULT_wxUSE_RADIOBOX=no
   DEFAULT_wxUSE_RADIOBTN=no
+  DEFAULT_wxUSE_REARRANGECTRL=no
   DEFAULT_wxUSE_SASH=no
   DEFAULT_wxUSE_SCROLLBAR=no
   DEFAULT_wxUSE_SEARCHCTRL=no
@@ -936,6 +937,7 @@ WX_ARG_FEATURE(notifmsg,    [  --enable-notifmsg       use wxNotificationMessage
 WX_ARG_FEATURE(odcombobox,  [  --enable-odcombobox     use wxOwnerDrawnComboBox class], wxUSE_ODCOMBOBOX)
 WX_ARG_FEATURE(radiobox,    [  --enable-radiobox       use wxRadioBox class], wxUSE_RADIOBOX)
 WX_ARG_FEATURE(radiobtn,    [  --enable-radiobtn       use wxRadioButton class], wxUSE_RADIOBTN)
+WX_ARG_FEATURE(rearrangectrl,[  --enable-rearrangectrl  use wxRearrangeList/Ctrl/Dialog], wxUSE_REARRANGECTRL)
 WX_ARG_FEATURE(sash,        [  --enable-sash           use wxSashWindow class], wxUSE_SASH)
 WX_ARG_FEATURE(scrollbar,   [  --enable-scrollbar      use wxScrollBar class and scrollable windows], wxUSE_SCROLLBAR)
 WX_ARG_FEATURE(searchctrl,  [  --enable-searchctrl     use wxSearchCtrl class], wxUSE_SEARCHCTRL)
@@ -6726,6 +6728,10 @@ if test "$wxUSE_RADIOBTN" = "yes"; then
     USES_CONTROLS=1
 fi
 
+if test "$wxUSE_REARRANGECTRL" = "yes"; then
+    AC_DEFINE(wxUSE_REARRANGECTRL)
+fi
+
 if test "$wxUSE_SASH" = "yes"; then
     AC_DEFINE(wxUSE_SASH)
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sashtest"
index 4e927062a31deb1678066f2834170980243db015..db9c472c78762b7ecf5a5a2844f5a3abafc427b2 100644 (file)
 // Recommended setting: 1 but can be safely set to 0
 #define wxUSE_BITMAPCOMBOBOX 1
 
+// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items
+// up and down in it. It is also used as part of wxRearrangeDialog.
+//
+// Default is 1.
+//
+// Recommended setting: 1 but can be safely set to 0 (currently used only by
+// wxHeaderCtrl)
+#define wxUSE_REARRANGECTRL 1
+
 // ----------------------------------------------------------------------------
 // Miscellaneous GUI stuff
 // ----------------------------------------------------------------------------
index 16b8dd9f43956438f4be8c949f88256c04f0ce64..d71d0b69ff7688eeeddf4471280dbbc3a30c86a9 100644 (file)
 // Recommended setting: 1 but can be safely set to 0
 #define wxUSE_BITMAPCOMBOBOX 1
 
+// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items
+// up and down in it. It is also used as part of wxRearrangeDialog.
+//
+// Default is 1.
+//
+// Recommended setting: 1 but can be safely set to 0 (currently used only by
+// wxHeaderCtrl)
+#define wxUSE_REARRANGECTRL 1
+
 // ----------------------------------------------------------------------------
 // Miscellaneous GUI stuff
 // ----------------------------------------------------------------------------
index f436ef8d00af6b6e2dcf09bd2bd6e9b8849edd7b..1d56ed74426664f45069557e1657fad818470e74 100644 (file)
 // Recommended setting: 1 but can be safely set to 0
 #define wxUSE_BITMAPCOMBOBOX 1
 
+// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items
+// up and down in it. It is also used as part of wxRearrangeDialog.
+//
+// Default is 1.
+//
+// Recommended setting: 1 but can be safely set to 0 (currently used only by
+// wxHeaderCtrl)
+#define wxUSE_REARRANGECTRL 1
+
 // ----------------------------------------------------------------------------
 // Miscellaneous GUI stuff
 // ----------------------------------------------------------------------------
index 5f3c7670f52f838351c5e1e7ba5ca8496aa19bbe..4befbfd0fc18f037b63170f0120b5c67c57a012b 100644 (file)
 // Recommended setting: 1 but can be safely set to 0
 #define wxUSE_BITMAPCOMBOBOX 1
 
+// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items
+// up and down in it. It is also used as part of wxRearrangeDialog.
+//
+// Default is 1.
+//
+// Recommended setting: 1 but can be safely set to 0 (currently used only by
+// wxHeaderCtrl)
+#define wxUSE_REARRANGECTRL 1
+
 // ----------------------------------------------------------------------------
 // Miscellaneous GUI stuff
 // ----------------------------------------------------------------------------
index e7ca7c52f3189d6b54612b7228f707a8a2282a62..b498e66a520ca47a297cf94b295e7798ee622cd7 100644 (file)
 // Recommended setting: 1 but can be safely set to 0
 #define wxUSE_BITMAPCOMBOBOX 1
 
+// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items
+// up and down in it. It is also used as part of wxRearrangeDialog.
+//
+// Default is 1.
+//
+// Recommended setting: 1 but can be safely set to 0 (currently used only by
+// wxHeaderCtrl)
+#define wxUSE_REARRANGECTRL 1
+
 // ----------------------------------------------------------------------------
 // Miscellaneous GUI stuff
 // ----------------------------------------------------------------------------
index 0885cc9aeb60cab543d65ac43ee0be4660a780d3..4cfc3d0a08c3f45bb8cedb98d062910db20f5e12 100644 (file)
 // Recommended setting: 1 but can be safely set to 0
 #define wxUSE_BITMAPCOMBOBOX 1
 
+// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items
+// up and down in it. It is also used as part of wxRearrangeDialog.
+//
+// Default is 1.
+//
+// Recommended setting: 1 but can be safely set to 0 (currently used only by
+// wxHeaderCtrl)
+#define wxUSE_REARRANGECTRL 1
+
 // ----------------------------------------------------------------------------
 // Miscellaneous GUI stuff
 // ----------------------------------------------------------------------------
index da809d5cbf97e0dad54d3a12a8f3aae0740edce8..737671db3bfeb8756a26739bff8f9f62ae7e8eed 100644 (file)
@@ -12,6 +12,9 @@
 #define _WX_REARRANGECTRL_H_
 
 #include "wx/checklst.h"
+
+#if wxUSE_REARRANGECTRL
+
 #include "wx/panel.h"
 #include "wx/dialog.h"
 
@@ -224,5 +227,7 @@ private:
     DECLARE_NO_COPY_CLASS(wxRearrangeDialog)
 };
 
+#endif // wxUSE_REARRANGECTRL
+
 #endif // _WX_REARRANGECTRL_H_
 
index f6df77f7d33f60c0de69d19cfa777cf31d036531..bafac5cdd8b67949fcd24ced045d6015ae12a60d 100644 (file)
 // Recommended setting: 1 but can be safely set to 0
 #define wxUSE_BITMAPCOMBOBOX 1
 
+// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items
+// up and down in it. It is also used as part of wxRearrangeDialog.
+//
+// Default is 1.
+//
+// Recommended setting: 1 but can be safely set to 0 (currently used only by
+// wxHeaderCtrl)
+#define wxUSE_REARRANGECTRL 1
+
 // ----------------------------------------------------------------------------
 // Miscellaneous GUI stuff
 // ----------------------------------------------------------------------------
index 4ee844bb60c7289bd2713ee9acce372e36241389..50efe043bb648ddb0be0c1c0d2c6aa6b47b5e358 100644 (file)
 // Recommended setting: 1 but can be safely set to 0
 #define wxUSE_BITMAPCOMBOBOX 1
 
+// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items
+// up and down in it. It is also used as part of wxRearrangeDialog.
+//
+// Default is 1.
+//
+// Recommended setting: 1 but can be safely set to 0 (currently used only by
+// wxHeaderCtrl)
+#define wxUSE_REARRANGECTRL 1
+
 // ----------------------------------------------------------------------------
 // Miscellaneous GUI stuff
 // ----------------------------------------------------------------------------
index 90a263b3f9e63361164ffb42fb755ec9a3480d54..db432fca599f7aa1eb7523876ae0dac242817d8a 100644 (file)
 
 #define wxUSE_BITMAPCOMBOBOX 0
 
+#define wxUSE_REARRANGECTRL 0
+
 
 #define wxUSE_ACCEL 0
 
index a1d79fe4afce1c4f5b57d1b8eb252d112ed1504c..991dc7b710518dbe455c342a689db71db917c432 100644 (file)
@@ -322,6 +322,7 @@ bool wxHeaderCtrlBase::ShowColumnsMenu(const wxPoint& pt, const wxString& title)
 
 bool wxHeaderCtrlBase::ShowCustomizeDialog()
 {
+#if wxUSE_REARRANGECTRL
     // prepare the data for showing the dialog
     wxArrayInt order = GetColumnsOrder();
 
@@ -348,29 +349,32 @@ bool wxHeaderCtrlBase::ShowCustomizeDialog()
 
     // do show it
     wxHeaderColumnsRearrangeDialog dlg(this, order, titles);
-    if ( dlg.ShowModal() != wxID_OK )
-        return false;
-
-    // and apply the changes
-    order = dlg.GetOrder();
-    for ( pos = 0; pos < count; pos++ )
+    if ( dlg.ShowModal() == wxID_OK )
     {
-        int& idx = order[pos];
-        const bool show = idx >= 0;
-        if ( !show )
+        // and apply the changes
+        order = dlg.GetOrder();
+        for ( pos = 0; pos < count; pos++ )
         {
-            // make all indices positive for passing them to SetColumnsOrder()
-            idx = ~idx;
+            int& idx = order[pos];
+            const bool show = idx >= 0;
+            if ( !show )
+            {
+                // make all indices positive for passing them to SetColumnsOrder()
+                idx = ~idx;
+            }
+
+            if ( show != GetColumn(idx).IsShown() )
+                UpdateColumnVisibility(idx, show);
         }
 
-        if ( show != GetColumn(idx).IsShown() )
-            UpdateColumnVisibility(idx, show);
-    }
+        UpdateColumnsOrder(order);
+        SetColumnsOrder(order);
 
-    UpdateColumnsOrder(order);
-    SetColumnsOrder(order);
+        return true;
+    }
+#endif // wxUSE_REARRANGECTRL
 
-    return true;
+    return false;
 }
 
 // ============================================================================
index 33df826505db94dfdcb4bb55b06d5ca5fccd6bb4..a77167f47b11c226540fc57a73939b08831dc943 100644 (file)
@@ -23,6 +23,8 @@
     #pragma hdrstop
 #endif
 
+#if wxUSE_REARRANGECTRL
+
 #ifndef WX_PRECOMP
     #include "wx/button.h"
     #include "wx/stattext.h"
@@ -294,3 +296,5 @@ wxArrayInt wxRearrangeDialog::GetOrder() const
 
     return m_ctrl->GetList()->GetCurrentOrder();
 }
+
+#endif // wxUSE_REARRANGECTRL