Commit Graph

52276 Commits

Author SHA1 Message Date
Vadim Zeitlin
b9acd101f7 No real changes, just remove an unneeded header dependency.
There was some commented out code in (core) valgen.cpp file using
wxDatePickerCtrl (from adv library). Also comment out the inclusion of
wx/datectrl.h header as it's not needed as long as this code remains commented
out and creates an unexpected dependency of a core library file on an adv
library header.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-03 11:23:49 +00:00
Dimitri Schoolwerth
df16cb09b1 Fixed compilation of datectlg.cpp.
Only including wx/datectrl.h does not always include wx/generic/datectrl.h, for example it does not for MSW non-Universal. As a result when compiling datectlg.cpp wxDatePickerCtrlGeneric is unknown and compilation fails. Fixed by including wx/generic/datectrl.h again (regression since r66524).



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-03 11:01:59 +00:00
Vadim Zeitlin
18f42b94df Remove calls to wxApp::SetTopWindow() from the samples and documentation.
It is definitely not necessary to call SetTopWindow() when there is only a
single top level window and it is arguable whether it's useful to do it even
when there are many of them so don't encourage its use in the documentation
and also remove all its occurrences from the samples.

Closes #12816.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-02 22:05:14 +00:00
Vadim Zeitlin
30d6c59b29 Simplify wxFileNameFromPath() implementation to avoid redundancy.
No real changes, just use wxFileName::GetFullName() in wxFileNameFromPath()
instead of reimplementing it there.

Closes #12818.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-02 22:04:48 +00:00
Vadim Zeitlin
13705b8ccf Fix memory leak if wxDC::DrawBitmap() fails in wxOS2.
Don't forget to free the buffer if we return abnormally.

Closes #12825.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-02 22:04:38 +00:00
Vadim Zeitlin
b622441a8d Use correct delete[] for a buffer allocated with new[].
Fix mismatch between scalar new and array delete in GetPathForIconFile() in
wxOSX wxMimeTypeManager code.

Closes #12826.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-02 22:04:18 +00:00
Vadim Zeitlin
4a40cd9bae Forward declare classes instead of including their declarations.
No real changes, just reduce the compilation dependencies a bit by only
forward declaring wxComboCtrl and wxCalendarCtrl in wx/generic/datectrl.h
instead of including the headers with their full declarations.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-02 22:03:56 +00:00
Paul Cornett
da2f117200 fix preprocessor expression, closes #12822
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-02 16:59:15 +00:00
Jaakko Salli
103bfa6f95 Allow any.cpp to compile without wxDateTime support (see #12821)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-02 16:49:50 +00:00
Jaakko Salli
6f3f38980f Added 'HasAlpha' attribute for wxColourProperty. Setting it to true allows user to edit the alpha component.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-02 10:14:29 +00:00
Stefan Csomor
2e5f9929e6 pusing a dummy event, to make sure the stop: succeeds in immediate runloop termination, instead of waiting for the next user event
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-01 16:25:37 +00:00
Stefan Csomor
29188693b3 bracketing msw enhanced metafile usage
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-01 11:10:35 +00:00
Stefan Csomor
cb98e78b1e fixing iterator comparison
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-01 11:06:16 +00:00
Vadim Zeitlin
91d98deb2f PCH-less compilation fix in recently added wxTangoArtProvider.
The use of wxLogDebug() requires inclusion of wx/log.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 19:38:49 +00:00
Vadim Zeitlin
2e9b5717cd Add wxUSE_ARTPROVIDER_STD build option.
Make it possible to exclude wxDefaultArtProvider from build. Now that a
Tango-based provider exists, it may make sense to disable the standard bitmaps
if the program doesn't need the few of them not provided by Tango anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 17:39:37 +00:00
Vadim Zeitlin
c1d2466a79 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
2010-12-31 17:39:25 +00:00
Vadim Zeitlin
a7cfad3ad6 Add go to first/last and plus/minus art provider icons.
These icons will be used in the upcoming new implementation of the print
preview frame and as they are also natively supported by GTK+ it makes sense
to have support for them in wx itself.

Notice that the existing bookmark add/remove icons are already mapped to the
icons which look like plus and minus signs respectively in wxGTK but we need
plus/minus in print preview in the other ports too so add these icons under
explicit names.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 17:39:01 +00:00
Vadim Zeitlin
19be42b760 Make art provider id of type "char *" instead of "wxChar *".
These strings don't need to be wide and, as elsewhere, prefer the
compatibility with 2.8 ANSI build to compatibility with Unicode build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 17:38:51 +00:00
Vadim Zeitlin
46eada874a Add an option to embed image size in its name to PNG-to-C script.
When a PNG image exists in several sizes it makes sense to use its size as a
suffix to distinguish the different versions, so update the png2c script to
optionally allow to do this.

Current implementation simply checks the PNG header directly to avoid any
extra dependencies.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 17:38:40 +00:00
Vadim Zeitlin
7b8983996e Show wxART_BUTTON icons in art provider sample resource browser.
The button icons have a different size from all the other clients in wxGTK so
it may be interesting to see them in the sample, add wxART_BUTTON to the list
of art clients that can be chosen in it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 17:38:35 +00:00
Vadim Zeitlin
b8502fa7c4 Accept file names with dashes in PNG-to-C converter.
Tango icon files often have dashes in their names so accept them in png2c
conversion script and simply replace them with underscores to form a C
identifier for the array containing the image data.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 17:38:29 +00:00
Vadim Zeitlin
242df7673d Use open command to run the GUI unit test on Mac build slave.
Running the application binary directly still doesn't work quite the same as
when it's opened from Finder (or executed using open) and some tests involving
event loops fail because of this.

Run it using open even if it means that we lose the detailed log output.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 17:29:39 +00:00
Jaakko Salli
7fa3cf6a64 Revert unintended commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 15:23:19 +00:00
Jaakko Salli
4f320d7c57 Try to better revert to the original string value in wxBitmapComboBox::RecreateControl()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 15:20:32 +00:00
Vadim Zeitlin
204530b0f7 Document how to get the previous selection in wxEVT_GRID_SELECT_CELL handler.
Make explicit the fact that the cell coordinates in the event are the
coordinates of the newly selected cell and that the previously selected one is
available from wxGrid itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-31 13:12:56 +00:00
Vadim Zeitlin
0b0bed0fca Move wxMSW wxCommandLinkButton files to native-only part.
wxMSW wxCommandLinkButton implementation shouldn't be used in wxUniv so move
src/msw/commandlinkbutton.cpp and include/wx/msw/commandlinkbutton.h to
ADVANCED_MSW_NATIVE_{SRC,HDR} from ADVANCED_MSW_{SRC,HDR} in files.bkl and
rebake the makefiles.

This fixes wxUniv/MSW compilation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-30 22:37:17 +00:00
Vadim Zeitlin
402bacb376 Compilation fixes for wxUniversal/MSW.
Don't use wxMSW-specific functions when building wxUniversal.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-30 22:37:10 +00:00
Vadim Zeitlin
9aea251043 Move wxGetLibraryVersionInfo() to core from base.
This function uses the GUI toolkit information and so can't be defined in
wxBase. The code only compiled before because the function was erroneously
defined in wxCore even though it was declared as WXDLLIMPEXP_BASE.

Fix this by declaring it with WXDLLIMPEXP_CORE too. This corrects problems in
MSW DLL build.

If we need to get a string containing user-readable wxBase version too, we
should add another function (as it's not possible to virtualize this one) but
such function doesn't seem incredibly useful to have anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-30 22:37:03 +00:00
Vadim Zeitlin
2e49a8074e Don't crash on malformed HTML in wxHTML font tag handler.
Don't try to access the first character of the size parameter value before we
are sure that it is not empty.

Closes #12812.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-30 22:36:56 +00:00
Dimitri Schoolwerth
b4c470164c Tightened icon and cursor file detection heuristics.
When loading a TGA file that has an image type of uncompressed true colour it would be falsely detected as a cursor file and as an icon file if type is of uncompressed colour mapped. Lower the chance of this happening by also checking the remaining member of an ICO and CUR header which represents the number of images in the file. This member has to be non-zero (checked against all found ICO and CUR files in an XP installation).

See also #12702.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-29 12:31:37 +00:00
Vadim Zeitlin
f74686cba0 Update the generated makefile after wxOSX OpenGL changes.
Rebake the makefile after the changes in r66357.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-29 00:01:48 +00:00
Dimitri Schoolwerth
3d926ff8a9 Added saving support to TGA image handler.
Supports saving 24-bit and 32-bit (RGB with alpha).
Updated image unit test to verify the alpha channel of saved TGA images. Also removed a condition skipping a test which only was in place for TGA (formerly its saving handler would do nothing yet say saving was succesful).

See also #7661.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-28 22:38:04 +00:00
Dimitri Schoolwerth
5828d76add Expanded existing image saving test to also verify alpha content of saved images.
Compare the alpha data of saved images (where applicable, currently for PNG only) to a generated alpha channel. Refactored most of ImageTestCase.CompareSavedImage into (static) function CompareImage to easily compare with a 24-bit image and then a 32-bit one.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-28 22:05:01 +00:00
Dimitri Schoolwerth
2b39567fd4 Added some simple unit tests for verifying pixel content of loaded and saved images.
Compare the data of loaded images in different formats against a reference image (one for 8-bit images, another for 24-bit). Do the same for images saved using SaveFile. Excluded some formats because they are either lossy or don't pass the test right now.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-28 19:50:41 +00:00
Stefan Csomor
95647df73d removing obsolete NO_PRAGMA
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-28 16:44:15 +00:00
Dimitri Schoolwerth
4324917a76 Updated manual regarding image alpha support for BMP, PNG, and TIFF handlers.
For PNG it was mentioned only loading supports alpha, but alpha saving support has been available since r32414. Similarly there was no mention of alpha loading support for TIFF (supported since r47204) as well as BMP (since r54942).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-28 15:57:44 +00:00
Robin Dunn
05b0355af8 Fix various missing or broken stuff needed for Project Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-27 20:47:12 +00:00
Stefan Csomor
e0db57da4c adding backtab to exception list
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-27 13:16:54 +00:00
Jaakko Salli
61fac071c3 Removed AdvImageFileProperty from the wxPropertyGrid sample. It was somewhat impractical and bug-prone.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-27 11:50:34 +00:00
Jaakko Salli
6ea6c5127c Test wxPropertyGrid::DoubleToString()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-27 11:25:53 +00:00
Jaakko Salli
538f4dd82b No longer use semi-static IDs for wxPropertyGrid embedded controls and tool bar tools.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-27 11:17:40 +00:00
Stefan Csomor
a46cbd24b4 adding backtab to exception list
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-27 06:31:14 +00:00
Stefan Csomor
3a853d9e1e make sure we always have a return value
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-27 06:30:42 +00:00
Vadim Zeitlin
e279a9e799 Increase wxStaticText height in wxMSW to align its text with wxTextCtrl.
The base lines of the text in wxTextCtrl and wxStaticText which were
themselves vertically aligned didn't align, the text in the latter was one
pixel too low. This seems to be happening because we don't give enough
vertical space to the native static control by default and so, while the text
wasn't truncated, it was positioned differently than usual.

Work around this problem by allocating two extra pixels to wxStaticText
height. While the exact explanation of the problem remains mysterious, this
hack does result in correct appearance which seems to be sufficiently
important to apply it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-26 16:29:22 +00:00
Vadim Zeitlin
f740587c9d Compilation fix for wxMSW build without PCH.
We need wxApp declaration since the changes of r66425.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-25 14:19:07 +00:00
Vadim Zeitlin
3931f3ecc1 Test for wcsftime() in configure as it's not available everywhere.
Contrary to the comment in wx/wxcrtbase.h, wcsftime() doesn't seem to be
available under quite all the systems, notably it doesn't seem to be present
in OpenBSD at all, even in the very latest version.

Add a configure test for this function and fall back to our own implementation
if the system doesn't have it.

Closes #12766.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-25 14:18:58 +00:00
Vadim Zeitlin
869704349c Give an error from configure if wchar_t is not available.
wxWidgets 2.9 doesn't support building without wchar_t any more so always
define wxUSE_WCHAR_T and give an error from configure if wchar_t is really not
available.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-25 14:18:50 +00:00
Vadim Zeitlin
3013861102 Make the margin between wxSpinCtrlGeneric sub-windows compatible with MSW.
Native MSW wxSpinCtrl uses a single pixel margin between the text part and the
spin button while the generic version used 2 pixels which resulted in a
slightly different appearance (see #12767).

Use the same margin as MSW now in the generic version too, it should be fine
for the other platforms as well and if it isn't we can always tweak them
later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-25 13:46:29 +00:00
Vadim Zeitlin
6f0b6fd1e4 Correct bug in the wxSpinCtrlGeneric sub-controls resizing.
The code in DoMoveWindow() didn't account for the margin and made the text
control part of the window too large resulting in the truncation of the spin
button.

Simply remember to take margin into account when computing the text width.

See #12767.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-25 13:46:23 +00:00
Vadim Zeitlin
3256418982 Document wxItemContainer::SetStringSelection() as case-insensitive.
Add unit tests checking that the behaviour really corresponds to the
documentation too.

And also mention that it's not a good idea to have strings differing by case
only in wxComboBox anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-25 13:19:00 +00:00