Commit Graph

59 Commits

Author SHA1 Message Date
Vadim Zeitlin
c3f641cb5e Add wxBITMAP_PNG() macro similar to wxBITMAP() but for PNG images.
Just as wxBITMAP() provides a portable way of loading bitmaps from either
Windows BMP resources or embedded XPM data depending on the platform,
wxBITMAP_PNG() hides the difference between loading bitmaps from PNG resources
under Windows and embedded PNG data elsewhere.

Also add wxBITMAP_PNG_FROM_DATA() macro which always loads PNG data from
memory: it's needed anyhow as part of wxBITMAP_PNG() implementation and some
people may prefer to always use it under all platforms.

Finally modify the image sample to demonstrate loading PNG images from both
resources and memory. This involved creation of a new Windows .rc file for it
and copying its data files to Resources bundle directory under OS X.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:15:25 +00:00
Vadim Zeitlin
20e6714a67 Add wxBitmap::NewFromPNGData() for creating bitmaps from PNG data.
This simple function can be used to create a wxBitmap from the raw image data
in PNG format. It is just a thin wrapper around wxImage load functions under
almost all platforms but has two advantages:

1. It can be implemented natively for some platforms (currently only OS X).
2. It can be used in a single expression as it doesn't require creating a
   temporary wxMemoryInputStream and this will be required by wxBITMAP_PNG()
   macro that will be added soon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:15:00 +00:00
Vadim Zeitlin
327972e7b6 Use bitmaps from resources by default in wxGTK under Windows.
Use wxBITMAP_TYPE_{BMP,CUR,ICON}_RESOURCE by default under Windows, even for
non-wxMSW ports.

Also allow loading wxImage from resources in all ports under MSW as a side
effect of this change.

Closes #14425.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 16:33:23 +00:00
Vadim Zeitlin
0e1f8ea4a3 Remove wxMGL port.
The company behind MGL toolkit (SciTech) doesn't exist since several years and
this port is not used by anybody, so remove it to ease maintenance burden.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-15 14:46:41 +00:00
Vadim Zeitlin
bd362275b8 Remove Palm OS port.
The platform targeted by this port doesn't exist any more and the port never
achieved really working state so remove the code to avoid having to maintain
it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-15 01:05:28 +00:00
Dimitri Schoolwerth
4ca8531f61 Added wxBITMAP_TYPE_TIFF and wxBITMAP_TYPE_TIFF_RESOURCE.
Having wxBITMAP_TYPE_TIFF and wxBITMAP_TYPE_TIFF_RESOURCE is more consistent with already using the complete short name of an image format elsewhere (e.g. wxBITMAP_TYPE_JPEG, not wxBTMAP_TYPE_JPG, and wxTIFFHandler as opposed to wxTIFHandler). Renamed all existing occurrences and kept the old enum values for backwards compatibility.

Also renamed occurrences of wxBITMAP_TYPE_RESOURCE to the already existing wxBITMAP_TYPE_BMP_RESOURCE.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-23 04:55:46 +00:00
Vadim Zeitlin
ac04aa9943 Make wxBitmap::ConvertToDisabled() available in all ports.
This method was defined in wxBitmapBase which is not used by wxMSW (and wxOS2)
so it wasn't available there. Move the definition of the method inline and
reuse it for all ports, making it part of either wxBitmapBase or wxBitmap as
appropriate.

This is clearly ugly but we still have no good solution for deriving wxBitmap
from wxBitmapBase in wxMSW as it already inherits from MSW-specific wxGDIImage
there.

Also document that ConvertToDisabled() is only available when wxUSE_IMAGE==1.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-10 13:51:51 +00:00
Julian Smart
240071a415 Added missing const
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 20:47:34 +00:00
Julian Smart
198c264dbc Applied part of #10034: wxImage::ConvertToDisabled()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-24 20:05:33 +00:00
Francesco Montorsi
732d8c74f8 add wxSize overloads to wxBitmap ctors and to wxBitmap::Create
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-14 13:57:51 +00:00
Vadim Zeitlin
d3b9f782ef don't use annoying and unneeded in C++ casts of NULL to "T *" in all other files neither
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-19 13:55:27 +00:00
Francesco Montorsi
c74b07ac26 provide GetSize() getters in wxBitmap and wxImage
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-28 22:29:29 +00:00
Francesco Montorsi
cbea3ec6ae introduced wxICON_DEFAULT_TYPE and wxBITMAP_DEFAULT_TYPE; documented these default argument values; matched the wxBitmap and wxIcon interfaces to their real implementations; revised icon.h interface header
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-21 20:03:14 +00:00
Stefan Csomor
ef0e92205a fixing file paths after renaming
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-11 19:17:41 +00:00
Francesco Montorsi
53a2db124c substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-26 15:06:00 +00:00
Francesco Montorsi
e86f2cc84a reorganized wxBitmap/wxBitmapHandler classes to use wxBitmapType instead of "long" where possible; made them const-correct; introduce wxBITMAP_SCREEN_DEPTH instead of -1 for clearness (specially in the docs); remove wxBitmapHandler empty stubs and rename wxBitmapHandlerBase as wxBitmapHandler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-25 20:31:48 +00:00
Vadim Zeitlin
8f884a0dcc Fix Ok/IsOk() mess in wxGDIObject-derived classes; also added
wxGDIObject::Create/CloneGDIRefData() and implemented them for (almost) all
ports


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-15 17:54:20 +00:00
Vadim Zeitlin
c052164410 compilation fixes for wxUSE_IMAGE==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-11 00:02:11 +00:00
Václav Slavík
b5dbe15d0b added WXDLLIMPEXP_FWD_FOO macros in addition to WXDLLIMPEXP_FOO for use with forward declarations (in preparation for GCC visibility support)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-09 10:09:52 +00:00
Vadim Zeitlin
55ccdb93e4 COW cleanup patch (1583966):
1. perform deep comparison for the classes for which it makes sense in the
   ports where this wasn't done yet
2. remove (shallow) comparison operators for the classes for which it does
   not make sense (such as wxBitmap)
3. makes wxBitmap use COW on all ports
4. adds wxObject::IsRefTo()
5. centralizes and improves COW docs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-30 19:26:48 +00:00
Vadim Zeitlin
b7cacb43db add IsOk() to all classes having Ok() method (patch 1570985)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 21:56:55 +00:00
Paul Cornett
452418c4b0 Move some things to wxBitmapBase to avoid much duplication.
Use proper const for XPM data, and const void* for arbitary bitmap data.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-08 08:04:49 +00:00
Robert Roebling
6f5d78250c Move wxVariant support for GDI classes to their
files (and thus away from wxBase).
  Add export declaration field for variant macros.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-30 20:45:15 +00:00
Włodzimierz Skiba
acb53ea542 Tinderbox build fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-29 17:31:57 +00:00
Vadim Zeitlin
87f83ac867 The Lesser wxMask Refactoring: merged wxMGL and wxDFB version, added wxMaskBase which could/should be used by other ports later
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-28 23:02:39 +00:00
Vadim Zeitlin
91885f468a no real changes, just replaced a long preprocessor expression occuring in 2 places with a simple wxUSE_BITMAP_BASE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-28 17:11:02 +00:00
Václav Slavík
b3c861501a initial (not yet working) code for DirectFB port
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-27 09:42:42 +00:00
Vadim Zeitlin
f8855e4725 great copy ctor/assignment operators cleanup by Paul Cornett (patch 1307665)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-09 00:51:23 +00:00
Mart Raudsepp
1be7a35c5e Include gtk1 headers for non-gtk2. I don't really like this CPP logic, or more exactly __WXGTK__ without __WXGTK20__
being GTK1, oh well.
Might have missed some.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-23 03:27:34 +00:00
Mart Raudsepp
8907154c1a Nuke #pragma implementation/interface's
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-23 12:56:45 +00:00
Robert Roebling
4b61c88d55 Second try to add "support" for deriving from
wxBitmapHandlerBase.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-05 14:17:27 +00:00
Robert Roebling
4611dd06a1 Make wxBitmap inherit from wxBitmapBase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-05 13:08:44 +00:00
Włodzimierz Skiba
4055ed8281 Use __WXPALMOS__ for PalmOS port which fits __WX$(TOOLKIT)__ of bakefiles. Do not depend on MSW macros in PalmOS port. Source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-20 12:44:22 +00:00
Julian Smart
ffecfa5aeb Committed William Osborne's wxPalmOS port
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-19 13:40:30 +00:00
Włodzimierz Skiba
d22004c4f4 Make some long #ifs shorter but multiline so diffs of other ports are more readable.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-23 15:01:33 +00:00
Julian Smart
655719367a Use old licence name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 20:53:33 +00:00
Julian Smart
77ffb5937e Name and version changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 14:56:36 +00:00
Václav Slavík
1202890513 added support for gcc precompiled headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-09 12:38:21 +00:00
Julian Smart
7919cba5b7 Removed very obsolete Set/GetColourMap accessors.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-06-18 16:19:26 +00:00
Mattia Barbon
aae0472bf3 Use the wxBitmap implementation from wxX11
in wxMotif; solves various bugs related to wxMask
handling (and effectively adds a lot of wxMask
functionality previously missing).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-09 16:44:27 +00:00
Mattia Barbon
62ad3cb358 Derive wxBitmap from wxBitmapBase.
Move code from LoadFile/SaveFile/Create* to
bitmap handlers.
  Implemented wxBitmap::GetSubBitmap.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-05 12:11:05 +00:00
Vadim Zeitlin
f28e099ec3 added (very) preliminary raw bitmap support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-22 19:09:33 +00:00
David Elliott
fed66a8797 - Modify #if to include wxCocoa as a platform using wxBitmapBase
- Include wxCocoa specific header


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-22 05:57:18 +00:00
Mattia Barbon
1bc822dfb5 Derive wxBitmap from wxBitmapBase in wxMotif, with the appropriate
changes to wxIcon.
  Fix deprecation warnings and use %p to format WXWidget in debug output
(fixes the 4 non-deprecation warnings).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-01-19 09:52:29 +00:00
Mattia Barbon
e9e4acc519 Remove #ifdef __WXSTUBS__ from headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-01-04 09:22:53 +00:00
Gilles Depeyrot
af49c4b8a2 disable use of #pragma interface under Mac OS X
GNU compiler included with Mac OS X 10.2 (Jaguar) as well as August Developer
Tools update contain a bug concerning #pragma interface handling that can only
be worked around by not using them (and they are not necessary anyways)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-31 11:29:13 +00:00
Gilles Depeyrot
7ee31b00ed corrected warnings when compiling with -Wall -W
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-05-03 19:41:22 +00:00
Julian Smart
83df96d63a Reformatted Motif headers; added __WXX11__ symbol support to common headers;
added place-holding src/x11 and include/wx/x11 files.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-02-05 16:34:33 +00:00
Vadim Zeitlin
6e711d5c09 applied patch 446836: removed qt headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-08-25 14:52:26 +00:00
Gilles Depeyrot
581acb9180 corrected conditional compilation for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-08-05 16:32:48 +00:00