Add wxArtProvider using Tango icons.

The icons are embedded as PNG images directly in the source code to avoid the
need for installing them. This does make the library larger though so provide
a wxUSE_ARTPROVIDER_TANGO option to turn the new code and associated bloat off.
Also turn it off by default under wxGTK as the native art provider is used
there anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-12-31 17:39:25 +00:00
parent a7cfad3ad6
commit c1d2466a79
62 changed files with 9217 additions and 8 deletions

View File

@@ -203,6 +203,10 @@ protected:
friend class wxArtProviderModule;
// Initializes default provider
static void InitStdProvider();
// Initializes Tango-based icon provider
#if wxUSE_ARTPROVIDER_TANGO
static void InitTangoProvider();
#endif // wxUSE_ARTPROVIDER_TANGO
// Initializes platform's native provider, if available (e.g. GTK2)
static void InitNativeProvider();
// Destroy caches & all providers

View File

@@ -407,6 +407,14 @@
# endif
#endif /* !defined(wxUSE_ANIMATIONCTRL) */
#ifndef wxUSE_ARTPROVIDER_TANGO
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ARTPROVIDER_TANGO must be defined, please read comment near the top of this file."
# else
# define wxUSE_ARTPROVIDER_TANGO 0
# endif
#endif /* !defined(wxUSE_ARTPROVIDER_TANGO) */
#ifndef wxUSE_AUTOID_MANAGEMENT
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_AUTOID_MANAGEMENT must be defined, please read comment near the top of this file."
@@ -1615,6 +1623,17 @@
#endif /* wxUSE_FILEDLG */
/* common dependencies */
#if wxUSE_ARTPROVIDER_TANGO
# if !(wxUSE_STREAMS && wxUSE_IMAGE && wxUSE_LIBPNG)
# ifdef wxABORT_ON_CONFIG_ERROR
# error "Tango art provider requires wxImage with streams and PNG support"
# else
# undef wxUSE_ARTPROVIDER_TANGO
# define wxUSE_ARTPROVIDER_TANGO 0
# endif
# endif
#endif /* wxUSE_ARTPROVIDER_TANGO */
#if wxUSE_CALENDARCTRL
# if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
# ifdef wxABORT_ON_CONFIG_ERROR

View File

@@ -912,6 +912,15 @@
// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar)
#define wxUSE_ACCEL 1
// Use art provider providing Tango icons: this art provider has higher quality
// icons than the default ones using smaller size XPM icons without
// transparency but the embedded PNG icons add to the library size.
//
// Default is 1.
//
// Recommended setting: 1 but can be turned off to reduce the library size.
#define wxUSE_ARTPROVIDER_TANGO 1
// Hotkey support (currently Windows only)
#define wxUSE_HOTKEY 1

View File

@@ -470,13 +470,13 @@
#define wxUSE_DIALUP_MANAGER 1
// Compile in classes for run-time DLL loading and function calling.
// Required by wxUSE_DIALUP_MANAGER and used by many other wxMSW classes so
// disabling it can result in a loss of a lot of functionality, don't do it
// unless you really know what you are doing.
// Required by wxUSE_DIALUP_MANAGER.
//
// This setting is for Win32 only
//
// Default is 1.
//
// Recommended setting: 1 (you should never disable this for wxMSW).
// Recommended setting: 1
#define wxUSE_DYNLIB_CLASS 1
// experimental, don't use for now
@@ -912,6 +912,15 @@
// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar)
#define wxUSE_ACCEL 1
// Use art provider providing Tango icons: this art provider has higher quality
// icons than the default ones using smaller size XPM icons without
// transparency but the embedded PNG icons add to the library size.
//
// Default is 1.
//
// Recommended setting: 1 but can be turned off to reduce the library size.
#define wxUSE_ARTPROVIDER_TANGO 1
// Hotkey support (currently Windows only)
#define wxUSE_HOTKEY 1

View File

@@ -912,6 +912,15 @@
// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar)
#define wxUSE_ACCEL 1
// Use art provider providing Tango icons: this art provider has higher quality
// icons than the default ones using smaller size XPM icons without
// transparency but the embedded PNG icons add to the library size.
//
// Default is 1.
//
// Recommended setting: 1 but can be turned off to reduce the library size.
#define wxUSE_ARTPROVIDER_TANGO 1
// Hotkey support (currently Windows only)
#define wxUSE_HOTKEY 1

View File

@@ -912,6 +912,15 @@
// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar)
#define wxUSE_ACCEL 1
// Use art provider providing Tango icons: this art provider has higher quality
// icons than the default ones using smaller size XPM icons without
// transparency but the embedded PNG icons add to the library size.
//
// Default is 1.
//
// Recommended setting: 1 but can be turned off to reduce the library size.
#define wxUSE_ARTPROVIDER_TANGO 1
// Hotkey support (currently Windows only)
#define wxUSE_HOTKEY 1

View File

@@ -913,6 +913,15 @@
// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar)
#define wxUSE_ACCEL 1
// Use art provider providing Tango icons: this art provider has higher quality
// icons than the default ones using smaller size XPM icons without
// transparency but the embedded PNG icons add to the library size.
//
// Default is 1.
//
// Recommended setting: 1 but can be turned off to reduce the library size.
#define wxUSE_ARTPROVIDER_TANGO 1
// Hotkey support (currently Windows only)
#define wxUSE_HOTKEY 1

View File

@@ -912,6 +912,15 @@
// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar)
#define wxUSE_ACCEL 1
// Use art provider providing Tango icons: this art provider has higher quality
// icons than the default ones using smaller size XPM icons without
// transparency but the embedded PNG icons add to the library size.
//
// Default is 1.
//
// Recommended setting: 1 but can be turned off to reduce the library size.
#define wxUSE_ARTPROVIDER_TANGO 1
// Hotkey support (currently Windows only)
#define wxUSE_HOTKEY 1

View File

@@ -908,6 +908,16 @@
// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar)
#define wxUSE_ACCEL 1
// Use art provider providing Tango icons: this art provider has higher quality
// icons than the default ones using smaller size XPM icons without
// transparency but the embedded PNG icons add to the library size.
//
// Default is 1 under non-GTK ports. Under wxGTK the native art provider using
// the GTK+ stock icons replaces it so it is normally not necessary.
//
// Recommended setting: 1 but can be turned off to reduce the library size.
#define wxUSE_ARTPROVIDER_TANGO 1
// Hotkey support (currently Windows only)
#define wxUSE_HOTKEY 1

View File

@@ -911,6 +911,15 @@
// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar)
#define wxUSE_ACCEL 1
// Use art provider providing Tango icons: this art provider has higher quality
// icons than the default ones using smaller size XPM icons without
// transparency but the embedded PNG icons add to the library size.
//
// Default is 1.
//
// Recommended setting: 1 but can be turned off to reduce the library size.
#define wxUSE_ARTPROVIDER_TANGO 1
// Hotkey support (currently Windows only)
#define wxUSE_HOTKEY 1