add compilation options to allow compiling in just the selected wxUniv themes and not all of them (which is still the default)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-09-28 22:55:28 +00:00
parent 91885f468a
commit 4353a8df6e
16 changed files with 302 additions and 64 deletions

View File

@ -1778,6 +1778,11 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<!-- ====================================================================== -->
<set var="DFB_LOWLEVEL_SRC" hints="files">
src/generic/caret.cpp
src/generic/colour.cpp
src/generic/icon.cpp
src/generic/imaglist.cpp
src/generic/timer.cpp
src/dfb/app.cpp
src/dfb/bitmap.cpp
src/dfb/brush.cpp
@ -1797,13 +1802,13 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/dfb/utils.cpp
src/dfb/window.cpp
src/dfb/wrapdfb.cpp
src/generic/caret.cpp
src/generic/colour.cpp
src/generic/icon.cpp
src/generic/imaglist.cpp
src/generic/timer.cpp
</set>
<set var="DFB_LOWLEVEL_HDR" hints="files">
wx/generic/caret.h
wx/generic/colour.h
wx/generic/icon.h
wx/generic/imaglist.h
wx/generic/timer.h
wx/dfb/app.h
wx/dfb/bitmap.h
wx/dfb/brush.h
@ -1823,11 +1828,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/dfb/toplevel.h
wx/dfb/window.h
wx/dfb/wrapdfb.h
wx/generic/caret.h
wx/generic/colour.h
wx/generic/icon.h
wx/generic/imaglist.h
wx/generic/timer.h
</set>
@ -2559,6 +2559,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/univ/button.h
wx/univ/checkbox.h
wx/univ/checklst.h
wx/univ/chkconf.h
wx/univ/choice.h
wx/univ/colschem.h
wx/univ/combobox.h

27
configure vendored
View File

@ -1162,6 +1162,7 @@ Optional Packages:
--with-gnomevfs use GNOME VFS for associating MIME types
--with-hildon use Hildon framework for Nokia 770
--with-opengl use OpenGL (or Mesa)
--with-themes=all|list use only the specified comma-separated list of wxUniversal themes
--with-dmalloc use dmalloc library (http://dmalloc.com/)
--with-regex enable support for wxRegEx class
--with-zlib use zlib for LZW compression
@ -3460,6 +3461,15 @@ echo "${ECHO_T}no" >&6
fi
if test "$wxUSE_UNIVERSAL" = "yes"; then
# Check whether --with-themes or --without-themes was given.
if test "${with_themes+set}" = set; then
withval="$with_themes"
wxUNIV_THEMES="$withval"
fi;
fi
fi
@ -46420,6 +46430,23 @@ done
if test "x$wxUSE_UNIVERSAL" = "xyes" ; then
WXUNIV=1
case "$wxUNIV_THEMES" in
''|all)
cat >>confdefs.h <<\_ACEOF
#define wxUSE_ALL_THEMES 1
_ACEOF
;;
*)
for t in `echo $wxUNIV_THEMES | tr , ' ' | tr a-z A-Z`; do
cat >>confdefs.h <<_ACEOF
#define wxUSE_THEME_$t 1
_ACEOF
done
esac
else
WXUNIV=0
fi

View File

@ -864,6 +864,10 @@ WX_ARG_WITH(gnomevfs, [ --with-gnomevfs use GNOME VFS for associat
WX_ARG_WITH(hildon, [ --with-hildon use Hildon framework for Nokia 770], wxUSE_LIBHILDON)
WX_ARG_WITH(opengl, [ --with-opengl use OpenGL (or Mesa)], wxUSE_OPENGL)
if test "$wxUSE_UNIVERSAL" = "yes"; then
AC_ARG_WITH(themes, [ --with-themes=all|list use only the specified comma-separated list of wxUniversal themes], [wxUNIV_THEMES="$withval"])
fi
fi
dnl for GUI only
@ -7337,6 +7341,17 @@ done
if test "x$wxUSE_UNIVERSAL" = "xyes" ; then
WXUNIV=1
case "$wxUNIV_THEMES" in
''|all)
AC_DEFINE(wxUSE_ALL_THEMES)
;;
*)
for t in `echo $wxUNIV_THEMES | tr , ' ' | tr a-z A-Z`; do
AC_DEFINE_UNQUOTED(wxUSE_THEME_$t)
done
esac
else
WXUNIV=0
fi

View File

@ -35,6 +35,10 @@
# include "wx/x11/chkconf.h"
#endif
#ifdef __WXUNIVERSAL__
# include "wx/univ/chkconf.h"
#endif
/*
this global setting determines what should we do if the setting FOO
requires BAR and BAR is not set: we can either silently unset FOO as well
@ -1234,60 +1238,6 @@
# endif
#endif
/* wxUniv-specific dependencies */
#if defined(__WXUNIVERSAL__)
# if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
# else
# undef wxUSE_POPUPWIN
# define wxUSE_POPUPWIN 1
# endif
# endif
# if wxUSE_COMBOBOX
# if !wxUSE_LISTBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxComboBox requires wxListBox in wxUniversal"
# else
# undef wxUSE_LISTBOX
# define wxUSE_LISTBOX 1
# endif
# endif
# endif /* wxUSE_COMBOBOX */
# if wxUSE_RADIOBTN
# if !wxUSE_CHECKBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
# else
# undef wxUSE_CHECKBOX
# define wxUSE_CHECKBOX 1
# endif
# endif
# endif /* wxUSE_RADIOBTN */
# if wxUSE_TEXTCTRL
# if !wxUSE_CARET
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxTextCtrl requires wxCaret in wxUniversal"
# else
# undef wxUSE_CARET
# define wxUSE_CARET 1
# endif
# endif /* wxUSE_CARET */
# if !wxUSE_SCROLLBAR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxTextCtrl requires wxScrollBar in wxUniversal"
# else
# undef wxUSE_SCROLLBAR
# define wxUSE_SCROLLBAR 1
# endif
# endif /* wxUSE_SCROLLBAR */
# endif /* wxUSE_TEXTCTRL */
#endif /* __WXUNIVERSAL__ */
/* wxGTK-specific dependencies */
#ifdef __WXGTK__
# ifndef __WXUNIVERSAL__

View File

@ -1130,6 +1130,22 @@
// Set to 1 to compile in wxPalette class
#define wxUSE_PALETTE 1
// ----------------------------------------------------------------------------
// wxUniversal-only options
// ----------------------------------------------------------------------------
// Set to 1 to enable compilation of all themes, this is the default
#define wxUSE_ALL_THEMES 1
// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES
// is unset, if it is set these options are not used; notice that metal theme
// uses Win32 one
#define wxUSE_THEME_GTK 0
#define wxUSE_THEME_METAL 0
#define wxUSE_THEME_MONO 0
#define wxUSE_THEME_WIN32 0
/* --- end common options --- */
// ----------------------------------------------------------------------------

View File

@ -1129,6 +1129,22 @@
// Set to 1 to compile in wxPalette class
#define wxUSE_PALETTE 1
// ----------------------------------------------------------------------------
// wxUniversal-only options
// ----------------------------------------------------------------------------
// Set to 1 to enable compilation of all themes, this is the default
#define wxUSE_ALL_THEMES 1
// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES
// is unset, if it is set these options are not used; notice that metal theme
// uses Win32 one
#define wxUSE_THEME_GTK 0
#define wxUSE_THEME_METAL 0
#define wxUSE_THEME_MONO 0
#define wxUSE_THEME_WIN32 0
/* --- end common options --- */
// ----------------------------------------------------------------------------

View File

@ -1129,6 +1129,22 @@
// Set to 1 to compile in wxPalette class
#define wxUSE_PALETTE 1
// ----------------------------------------------------------------------------
// wxUniversal-only options
// ----------------------------------------------------------------------------
// Set to 1 to enable compilation of all themes, this is the default
#define wxUSE_ALL_THEMES 1
// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES
// is unset, if it is set these options are not used; notice that metal theme
// uses Win32 one
#define wxUSE_THEME_GTK 0
#define wxUSE_THEME_METAL 0
#define wxUSE_THEME_MONO 0
#define wxUSE_THEME_WIN32 0
/* --- end common options --- */
// ----------------------------------------------------------------------------

View File

@ -1129,6 +1129,22 @@
// Set to 1 to compile in wxPalette class
#define wxUSE_PALETTE 1
// ----------------------------------------------------------------------------
// wxUniversal-only options
// ----------------------------------------------------------------------------
// Set to 1 to enable compilation of all themes, this is the default
#define wxUSE_ALL_THEMES 1
// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES
// is unset, if it is set these options are not used; notice that metal theme
// uses Win32 one
#define wxUSE_THEME_GTK 0
#define wxUSE_THEME_METAL 0
#define wxUSE_THEME_MONO 0
#define wxUSE_THEME_WIN32 0
/* --- end common options --- */
// ----------------------------------------------------------------------------

View File

@ -1129,6 +1129,22 @@
// Set to 1 to compile in wxPalette class
#define wxUSE_PALETTE 1
// ----------------------------------------------------------------------------
// wxUniversal-only options
// ----------------------------------------------------------------------------
// Set to 1 to enable compilation of all themes, this is the default
#define wxUSE_ALL_THEMES 1
// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES
// is unset, if it is set these options are not used; notice that metal theme
// uses Win32 one
#define wxUSE_THEME_GTK 0
#define wxUSE_THEME_METAL 0
#define wxUSE_THEME_MONO 0
#define wxUSE_THEME_WIN32 0
/* --- end common options --- */
// ----------------------------------------------------------------------------

View File

@ -1129,6 +1129,22 @@
// Set to 1 to compile in wxPalette class
#define wxUSE_PALETTE 1
// ----------------------------------------------------------------------------
// wxUniversal-only options
// ----------------------------------------------------------------------------
// Set to 1 to enable compilation of all themes, this is the default
#define wxUSE_ALL_THEMES 1
// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES
// is unset, if it is set these options are not used; notice that metal theme
// uses Win32 one
#define wxUSE_THEME_GTK 0
#define wxUSE_THEME_METAL 0
#define wxUSE_THEME_MONO 0
#define wxUSE_THEME_WIN32 0
/* --- end common options --- */
// ----------------------------------------------------------------------------

View File

@ -1125,3 +1125,19 @@
// Set to 1 to compile in wxPalette class
#define wxUSE_PALETTE 1
// ----------------------------------------------------------------------------
// wxUniversal-only options
// ----------------------------------------------------------------------------
// Set to 1 to enable compilation of all themes, this is the default
#define wxUSE_ALL_THEMES 1
// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES
// is unset, if it is set these options are not used; notice that metal theme
// uses Win32 one
#define wxUSE_THEME_GTK 0
#define wxUSE_THEME_METAL 0
#define wxUSE_THEME_MONO 0
#define wxUSE_THEME_WIN32 0

117
include/wx/univ/chkconf.h Normal file
View File

@ -0,0 +1,117 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/univ/chkconf.h
// Purpose: wxUniversal-specific configuration options checks
// Author: Vadim Zeitlin
// Created: 2006-09-28 (extracted from wx/chkconf.h)
// RCS-ID: $Id$
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_UNIV_CHKCONF_H_
#define _WX_UNIV_CHKCONF_H_
#if (wxUSE_COMBOBOX || wxUSE_MENUS) && !wxUSE_POPUPWIN
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_POPUPWIN must be defined to use comboboxes/menus"
# else
# undef wxUSE_POPUPWIN
# define wxUSE_POPUPWIN 1
# endif
#endif
#if wxUSE_COMBOBOX
# if !wxUSE_LISTBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxComboBox requires wxListBox in wxUniversal"
# else
# undef wxUSE_LISTBOX
# define wxUSE_LISTBOX 1
# endif
# endif
#endif /* wxUSE_COMBOBOX */
#if wxUSE_RADIOBTN
# if !wxUSE_CHECKBOX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RADIOBTN requires wxUSE_CHECKBOX in wxUniversal"
# else
# undef wxUSE_CHECKBOX
# define wxUSE_CHECKBOX 1
# endif
# endif
#endif /* wxUSE_RADIOBTN */
#if wxUSE_TEXTCTRL
# if !wxUSE_CARET
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxTextCtrl requires wxCaret in wxUniversal"
# else
# undef wxUSE_CARET
# define wxUSE_CARET 1
# endif
# endif /* wxUSE_CARET */
# if !wxUSE_SCROLLBAR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxTextCtrl requires wxScrollBar in wxUniversal"
# else
# undef wxUSE_SCROLLBAR
# define wxUSE_SCROLLBAR 1
# endif
# endif /* wxUSE_SCROLLBAR */
#endif /* wxUSE_TEXTCTRL */
/* Themes checks */
#ifndef wxUSE_ALL_THEMES
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ALL_THEMES must be defined"
# else
# define wxUSE_ALL_THEMES 1
# endif
#endif /* wxUSE_ALL_THEMES */
#ifndef wxUSE_THEME_GTK
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_THEME_GTK must be defined"
# else
# define wxUSE_THEME_GTK 1
# endif
#endif /* wxUSE_THEME_GTK */
#ifndef wxUSE_THEME_METAL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_THEME_METAL must be defined"
# else
# define wxUSE_THEME_METAL 1
# endif
#endif /* wxUSE_THEME_METAL */
#ifndef wxUSE_THEME_MONO
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_THEME_MONO must be defined"
# else
# define wxUSE_THEME_MONO 1
# endif
#endif /* wxUSE_THEME_MONO */
#ifndef wxUSE_THEME_WIN32
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_THEME_WIN32 must be defined"
# else
# define wxUSE_THEME_WIN32 1
# endif
#endif /* wxUSE_THEME_WIN32 */
#if !wxUSE_ALL_THEMES && wxUSE_THEME_METAL && !wxUSE_THEME_WIN32
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Metal theme requires Win32 one"
# else
# undef wxUSE_THEME_WIN32
# define wxUSE_THEME_WIN32 1
# endif
#endif /* wxUSE_THEME_METAL && !wxUSE_THEME_WIN32 */
#endif /* _WX_UNIV_CHKCONF_H_ */

View File

@ -24,6 +24,8 @@
#pragma hdrstop
#endif
#if wxUSE_ALL_THEMES || wxUSE_THEME_GTK
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/log.h"
@ -2771,3 +2773,5 @@ bool wxGTKTextCtrlInputHandler::HandleKey(wxInputConsumer *control,
}
#endif // wxUSE_TEXTCTRL
#endif // wxUSE_ALL_THEMES || wxUSE_THEME_GTK

View File

@ -24,6 +24,8 @@
#pragma hdrstop
#endif
#if wxUSE_ALL_THEMES || wxUSE_THEME_METAL
#ifndef WX_PRECOMP
#include "wx/timer.h"
#include "wx/intl.h"
@ -591,3 +593,5 @@ void wxMetalRenderer::DrawMetal(wxDC &dc, const wxRect &rect )
dc.DrawRectangle( rect.x, y, rect.width, 1 );
}
}
#endif // wxUSE_ALL_THEMES || wxUSE_THEME_METAL

View File

@ -24,6 +24,8 @@
#pragma hdrstop
#endif
#if wxUSE_ALL_THEMES || wxUSE_THEME_MONO
#ifndef WX_PRECOMP
#include "wx/dc.h"
#endif // WX_PRECOMP
@ -1047,3 +1049,5 @@ wxBitmap wxMonoArtProvider::CreateBitmap(const wxArtID& WXUNUSED(id),
{
return wxNullBitmap;
}
#endif // wxUSE_ALL_THEMES || wxUSE_THEME_MONO

View File

@ -24,6 +24,8 @@
#pragma hdrstop
#endif
#if wxUSE_ALL_THEMES || wxUSE_THEME_WIN32
#ifndef WX_PRECOMP
#include "wx/timer.h"
#include "wx/intl.h"
@ -3772,3 +3774,5 @@ bool wxWin32FrameInputHandler::HandleActivation(wxInputConsumer *consumer,
return wxStdInputHandler::HandleActivation(consumer, activated);
}
#endif // wxUSE_ALL_THEMES || wxUSE_THEME_WIN32