Commit Graph

193 Commits

Author SHA1 Message Date
Vadim Zeitlin
df13791078 Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 01:50:11 +00:00
Vadim Zeitlin
2098cafcad Implement bounding box computations for wxGDDC.
Update the bounding box in all the methods drawing something. This wasn't
done before in many of them, resulting in the bounding box remaining empty,
but it is updated now and a new test checking that it is was added.

Closes #12904.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-26 01:34:50 +00:00
Vadim Zeitlin
268b33d8a3 Add simple font tests for the drawing unit test.
Check that DrawText() results in the expected output.

Currently the tests are disabled for non-Windows systems because of the
problem with the reference file paths there.

See #16261.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 12:29:21 +00:00
Vadim Zeitlin
ba8d58df6c Don't build drawing test plugin in static builds.
Static wxWidgets library can't be used in dynamically loaded plugin, simply
don't build it in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 10:53:55 +00:00
Vadim Zeitlin
9d3921122f Fix drawing test link in static build.
We must use wx_append template which adds the required GUI libraries when
using static versions of wxWidgets libraries and not wx_append_base.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 09:59:10 +00:00
Vadim Zeitlin
0d4ad161d5 Remove support for Win9x from wxMSW.
Most importantly, this allows us to remove all MSLU-related stuff.

Some functions which were previously loaded dynamically can now be just used
directly, too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 02:33:40 +00:00
Vadim Zeitlin
01f9accd19 Remove wxPM, wxWidgets port to OS/2.
This port is not used and is not being worked on, so remove it to reduce the
amount of the code which needs to be updated for every global change.

Also remove tests for VisualAge compiler which isn't used since ages.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 23:56:58 +00:00
Vadim Zeitlin
72aad0d6ea Use the same wxWeakRef implementation for complete and incomplete classes.
This fixes an ODR violation which could arise if wxWeakRef<T> was seen both
when T was an incomplete (e.g. just forward-defined) class and when it was
complete. As different implementations, with different binary layouts, were
used in these two cases, this resulted in fatal run-time problems.

Fix this by always using the slightly less efficient (because storing an extra
pointer) but simpler and safe "dynamic" wxWeakRef implementation.

Also get rid of checks for the ancient compilers such as VC6 and g++ < 3.3,
they are not supported any longer.

Closes #15884.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 00:10:54 +00:00
Vadim Zeitlin
ec7d7f6356 Don't build the drawing test in GUI-less builds.
This test requires GUI parts.

Closes #16145.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-01 22:49:04 +00:00
Vadim Zeitlin
a4568e7c85 Add a new test checking wxGraphicsContext implementation correctness.
This test verifies that the output of wxGraphicsContext on the current system
matches the pregenerated reference output.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 19:31:21 +00:00
Vadim Zeitlin
4de86c0b26 Update version to 3.1.0.
And regenerate everything.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-21 13:47:05 +00:00
Vadim Zeitlin
910f1a96d2 Add wxOleConvertVariant_ReturnSafeArrays flag for better SAFEARRAY handling.
While we can't change the type of wxVariant to which SAFEARRAYs are converted
by default, it's much more convenient to work with the variant objects of the
correct type, i.e. using wxVariantDataSafeArray, when dealing with SAFEARRAYs,
so add a flag which can be set to tell a wxAutomationObject to behave in this
way.

Closes #14700.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:35 +00:00
Vadim Zeitlin
e7bdf0ac8d Change version to 3.0.0.
Keep "RC1" in the version string for now, but otherwise all version numbers
should be updated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 01:46:08 +00:00
Vadim Zeitlin
c80ae45452 Only link with libwxscintilla if using Scintilla is enabled.
Correct the changes of r74408 to avoid using libwxscintilla if we don't build
it at all.

See #13837.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 19:14:59 +00:00
Vadim Zeitlin
a4830bb560 Always add libwxscintilla in monolithic mode.
The library was already present in the makefiles but came before the
monolithic library itself, which broke the linking of the samples when using
GNU ld as the dependent libraries must come after the libraries using them.

Closes #13837.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 12:41:02 +00:00
Vadim Zeitlin
d6655d446d Run wxExecute() unit test in the GUI test suite too.
The same code works differently in console and GUI applications, so build this
test case as part of both of them.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:32:40 +00:00
Vadim Zeitlin
d3ad22bdb3 Add wxEventLoop::ScheduleExit().
This method allows to request exiting from the given event loop even if it's
not the currently active one, unlike Exit() which would assert in this case.
With it, it becomes possible to ask the loop to terminate as soon as possible
even if a nested loop is currently running.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:26:13 +00:00
Vadim Zeitlin
7b363ab621 Add benchmarks for wxImage methods.
Build a GUI version of the benchmark program too and use it to benchmark
wxImage loading methods for now (more will be added later).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-01 14:47:38 +00:00
Vadim Zeitlin
10e6908dd3 Add a minimal unit test for wxSimplebook.
This is just a test running the common wxBookCtrlBase tests for wxSimplebook.

See #15188.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 16:38:51 +00:00
Vadim Zeitlin
09ca8913fa Fix wxSearchCtrl::HasFocus() in the generic version.
Override GetMainWindowOfCompositeControl() in the windows composing the
generic wxSearchCtrl to ensure that HasFocus() correctly returns true for the
entire control when any of them has focus.

Add a trivial unit test to check that this really works and facilitate adding
more tests for this class later.

Closes #14970.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-20 02:09:44 +00:00
Václav Slavík
643e9cf9f6 Add wxTEST_DIALOG for testing of modal dialogs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-01 16:45:11 +00:00
Vadim Zeitlin
14b682f7c3 Increase version to 2.9.5.
Rebake all the project/make files.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-10 23:51:44 +00:00
Vadim Zeitlin
b02dd12239 Use /bin/echo for creation of Mac OS X PkgInfo files.
The built-in of /bin/sh doesn't handle "-n" option that we use (at least not
under OS X 10.6), so we were getting "-n APPL????" in the generated files.
Fix this by using /bin/echo which does support this option.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-28 22:48:39 +00:00
Vadim Zeitlin
51ec29ea5d Always link with expat in monolithic build.
Fix linking errors when using wxXML in sttaic monolithic build: in this case
we must link with expat but it was listed too early, before wxWidgets
libraries using it, in the bakefile-generated makefiles.

Now add it to the end of the linker command line too by including -lexpat in
EXTRALIBS_FOR_BASE which are appended to the linker arguments.

Notice that now -lexpat is linked twice because it is still added by
<wx-lib>xml</wx-lib> in bakefiles, even in monolithic build, but I don't know
how to avoid it and it is harmless anyhow.

Closes #12573.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-25 13:28:01 +00:00
Vadim Zeitlin
08670ea85a Update version to 2.9.4 in version.bkl too and rebake everything.
Change the version for Unix shared libraries too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-18 14:35:50 +00:00
Vadim Zeitlin
ea10101a15 Link tests with webview library only if it is actually available.
This allows the tests to build again even on the machines without the
prerequisites for building wxWebView.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-30 14:19:59 +00:00
Vadim Zeitlin
dd4eefcb29 Document and test behaviour of wxRegion methods when it is invalid.
Document which wxRegion methods can and can't be used when the region itself
is invalid.

Apply the minor changes to wxGTK (Xor() didn't do the right thing, Offset()
didn't assert) and wxOSX (Offset() crashed) to make their behaviour consistent
with wxMSW.

Add a (trivial, so far, but to be extended later) wxRegion unit test checking
that the methods do indeed behave as documented.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-10-18 21:56:48 +00:00
Steve Lamerton
92b4653a62 Rebake trunk after wxWebView merge and add missing project files for the wxWebView library.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-09-11 10:12:19 +00:00
Vadim Zeitlin
524cb04066 Add new wxTreeListCtrl class.
This is a facade for wxDataViewCtrl allowing to easily work with multi-column
trees, possibly with an optional checkbox in the first column. Its API is very
similar to wxTreeListCtrl and it provides a simple migration path from the
latter.

Add the class itself, documentation for it and minimal unit tests.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-27 14:11:03 +00:00
Vadim Zeitlin
36a96421b3 Replace wxComboBox::IsEmpty() with Is{List,Text}Empty().
IsEmpty() didn't exist in all ports (notably not wxMSW) and its meaning was
unclear anyhow, so remove it even from the ports where it did exist and add
clear Is{List,Text}Empty() replacements instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-21 12:06:16 +00:00
Dimitri Schoolwerth
409fe759e1 Fixed failing test in ImageTestCase for builds made with makefiles.
The recently added BMP images in tests/image/ were not being copied. Added them to test.bkl and regenerated makefiles.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-19 16:10:07 +00:00
Václav Slavík
cbef7338c1 Add some basic tests for wxDataViewCtrl selection handling.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-10 15:24:25 +00:00
Vadim Zeitlin
5f899cbe91 Fix bug when setting an out of range date in wxMSW wxDatePickerCtrl.
The internally stored date value was getting out of sync with the real date in
the control itself when SetValue() was called with a date out of the currently
set range. This resulted in an assert failure and other unpleasantness later.

Fix the bug and add a unit test checking for it (and also with some other
basic wxDatePickerCtrl checks).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-06-19 22:46:45 +00:00
Dimitri Schoolwerth
1b54c33f81 Rebaked test GUI projects with toplevel.cpp included.
Added toplevel.cpp to GUI test projects and removed the test suite from the unnamed registry so that by default its tests don't run (some regarding ShowWithoutActivating are failing). This way at least the source file has more of a chance to be in a compilable state (compilation was broken). toplevel.cpp has never been included in a project since its addition in r62508 ("[...] until the mainloop issues are resolved [...]").

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-01 14:58:58 +00:00
Vadim Zeitlin
ab797d5d34 Add a unit test for wxAffineMatrix2D class and its support in wxDC.
Verify that applying a world transformation to wxDC really does result in the
expected transformation.

See #13092.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-26 22:57:20 +00:00
Vadim Zeitlin
9bb9964e26 Add a class for parsing simple markup.
This code is not used anywhere yet, this commit only adds the parser for the
markup and the related classes as well as the corresponding unit test.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:46:42 +00:00
Vadim Zeitlin
e4c903b2ea Fix wxWrapSizer minimal size calculation.
Add a unit test checking that wxWrapSizer::CalcMin() returns the expected
results.

Closes #12464.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-08 13:36:13 +00:00
Vadim Zeitlin
57c7447463 Link console programs with PNG library in monolithic build.
PNG images are used by the main wxWidgets library itself now and so linking
with the monolithic wx library introduces dependencies on PNG as well, even
for the console applications. Link them with linpng to avoid linker errors.

Closes #12889.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-05 20:25:09 +00:00
Vadim Zeitlin
00eef16d51 Rebake everything using bakefile 0.2.9.
Update configure and bakefile.m4 for the new version too.

Also add the missing makefiles and projects for the XTI sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-03 15:02:45 +00:00
Vadim Zeitlin
a54cf37118 Add wxIntegerValidator and wxFloatingPointValidator classes.
Add validators for integer and floating point numbers.

Add an example of their use to the validate sample as well as a new unit test
and documentation for them.

Use the new classes instead of wxTextValidator in wxGrid code.

Closes #12166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-19 10:48:28 +00:00
Vadim Zeitlin
6686fbad16 Add wxNumberFormatter class helping to deal with thousands separators.
wxNumberFormatter formats and parses numbers with thousands separators.

Add the class itself as well as documentation and the unit test for it.

See #12166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-19 10:47:40 +00:00
Vadim Zeitlin
3625820490 Fixes for parsing invalid HTML without tag ends.
The code in wxHtmlParser supposed in many places that a '<' character must be
always followed by a '>' one and could create (and sometimes dereference)
invalid iterators if this wasn't the case resulting in asserts from MSVC debug
CRT and possibly crashes.

Fix this by ensuring that only valid iterators are used and add a trivial unit
test for wxHtmlParser which checks that it can parse invalid HTML without
crashing.

Closes #12869.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-13 14:49:55 +00:00
Jaakko Salli
997ddb2ced Added OwnerDrawnComboBoxTestCase (currently only has copies of wxComboBox tests)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-20 13:55:40 +00:00
Vadim Zeitlin
944f641cf9 Don't require leading TAB in wxAcceleratorEntry::FromString().
FromString() should parse string returned by ToString() successfully but this
wasn't the case because the accelerator parsing functions always insisted on
having a TAB in the string.

Fix this, document the string format and add a unit test checking for the
correct behaviour.

Closes #12745.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-03 12:39:57 +00:00
Vadim Zeitlin
68ebe2620f Add wx(Simple)HtmlListBox unit test.
For now just test the wxItemContainer methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-27 11:34:34 +00:00
Vadim Zeitlin
681694bca9 Add a unit test checking selection updating in virtual wxListCtrl.
Verify that the selection is updated correctly after the number of items in
the control is decreased.

See #12378.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-13 15:03:20 +00:00
Vadim Zeitlin
65571ec7bf Add a beginning of wxMenu unit test.
Test wxMenu and wxMenuBar item search and counting functions.

See #12672.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-13 15:03:02 +00:00
Vadim Zeitlin
0526c8cc07 Add support for id ranges to XRC.
Allow to declare ranges of consecutive IDs in XRC by using the "id[n]" syntax.
Show this functionality in the xrc sample and test it in the new unit test.

Also show and test the "object reference" XRC functionality.

Closes #11431.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-07 14:00:59 +00:00
Vadim Zeitlin
042ddf5def Add a simple test for keyboard events generation.
Check that the events generated by wxUIActionSimulator result in the same
wxKeyEvents being generated under all platforms. This is not the same as
checking the event generation for the actual keys pressed by the user as there
are some small differences between the two but better than nothing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:31 +00:00
Vadim Zeitlin
232fdc630c Merge the new GUI tests from SOC2010_GUI_TEST branch.
Add a lot of tests for many wx GUI classes.

Add tests using the new wxUIActionSimulator class but disable them under OS X
as too many of them currently fail there.

Refactor the test suite to make organizing the existing tests and adding the
new ones easier.

Improve documentation using the information gathered while testing the
classes. Also update the documentation of the testing system itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-22 22:16:05 +00:00