Commit Graph

4819 Commits

Author SHA1 Message Date
Francesco Montorsi
1fe1aecb87 Move a couple of wxFileName tests from the console sample to the existing FileNameTestCase.
Fix FileNameTestCase::TestGetHumanReadable to check the result against expected strings using the correct decimal point for the locale used on the test machine.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-06 15:41:09 +00:00
Francesco Montorsi
49e323a5b5 remove some tests from the console sample:
- wxLog already has a better cppunit test class
- wxLocale test in the console sample didn't work on Windows and wasn't very useful

move some tests from the console sample to CppUnit tests:
- wxPathList => PathListTestCase
- wxModule => ModuleTestCase

remove some tests about removed functions of wxMimeTypesManager

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-06 14:21:27 +00:00
Jaakko Salli
0dbe4363e4 To make it clear in the sample that a custom animation is used, use wxSHOW_EFFECT_BLEND instead of SLIDE_TO_BOTTOM, and add a text '(custom animaton)'
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-06 12:35:03 +00:00
Jaakko Salli
e9cc157957 Use ShowWithEffect() in the sample wxComboCtrlWithCustomPopupAnim instead of manual window manipulation in timer event
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-06 09:15:20 +00:00
Francesco Montorsi
a05e050bd4 remove wxFileConfig tests: FileConfigTestCase already tests features tested by console sample and is much more complete.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 14:51:45 +00:00
Francesco Montorsi
3634064463 Move some wxPrintf() tests (taken from glibc) to VsnprintfTestCase. Other tests are more difficult to convert in CppUnit style and not worth the effort (since now we don't use wx's own vsnprintf implementation anymore typically).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 14:42:26 +00:00
Francesco Montorsi
7b8ccf3321 Move wxRegConfig tests from console sample to a new wxRegConfigTestCase class.
Remove wxRegKey tests from console sample: on newer Windows they only work when run with admin privileges; also we can expect wx[Reg]ConfigTestCase to already check a good number of wxRegKey features.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 14:12:07 +00:00
Vadim Zeitlin
ce6b1014bf Fix drawing of scaled bitmaps in wxCairoContext.
We must offset the coordinate system before scaling it, otherwise incorrect
offset is used.

Add a test for drawing translated/scaled bitmaps to the drawing sample.

See #11097.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 11:58:25 +00:00
Vadim Zeitlin
5db56cd2e7 Don't hard code position of the drawing sample window and increase its size.
Hardcoding position to 50,50 is inconvenient, let the window manager position
the window as configured by user. Also, the vertical size of the sample was
too small to see the contents of most pages, increase it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 11:58:21 +00:00
Vadim Zeitlin
f68e16c5fc Add <span> tag and limited support for CSS styles to wxHTML.
Parse "style" attributes of the HTML tags and honour those of them that can be
mapped to the HTML 3 attributes.

Also add a handler for <span> tag.

Closes #10631.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 23:12:25 +00:00
Vadim Zeitlin
6305f044a1 Add "filter changed" event to wxFileCtrl.
Generate an event when the selection in the filter combobox of wxFileCtrl
changes.

Closes #12099.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 10:35:47 +00:00
Francesco Montorsi
7a165f2dc6 remove test code for wxScopeGuard (there's already a better ScopeGuardTestCase)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 08:22:34 +00:00
Francesco Montorsi
30ccbb8944 remove wxCmdLineParser tests; there is already a much more complete test suite (CmdLineTestCase).
Refactor single instance checker test.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 08:20:46 +00:00
Francesco Montorsi
61304c6209 get rid of socket tests; there are marked as broken and we already have SocketTestCase in CppUnit test classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 08:00:50 +00:00
Francesco Montorsi
ec0e093913 move all non-interactive FTP tests from the console sample to a new CppUnit FTPTestCase test.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-29 07:56:08 +00:00
Vadim Zeitlin
7bad1010c2 Add missing samples to samples.dsw.
Add all the samples to the workspace file to allow building all of them at
once easily.

Closes #12098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-27 17:07:30 +00:00
Jaakko Salli
443fbbf7ae ComboControl -> ComboCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-26 15:15:28 +00:00
Francesco Montorsi
4090fe84c4 remove streams tests: they're very basic and already-existing CppUnit stream tests are much more complete and extended.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-23 19:07:43 +00:00
Vadim Zeitlin
119629aa5d Correct notebook sample layout.
Use a sizer for the frame to make sure its initial and minimal size correspond
to the best size of the panel inside it. Also add a Layout() call on the panel
which was somehow not done initially. And finally don't centre the frame, this
is unnecessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-22 11:58:50 +00:00
Vadim Zeitlin
ebfee17940 Simplify and correct MSW selection of background brush for children painting.
Check for the transparency of the window background in MSWGetBgBrush() itself
and let MSWGetBgBrushForChild() just return the brush to be used.

This required adding a MSW-specific hack to wxPanel to allow inheriting
background of wxNotebook by its children which is slightly ugly but is exactly
what we need to do in this case and makes the rest of the code much simpler.

Also add a possibility to set the background of the page containing the
control being tested to the widgets sample to test for background inheritance.
This shows problems with wxSlider and wxRadioBox backgrounds but they're not
new with this patch.

Closes #12057.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-21 12:51:20 +00:00
Vadim Zeitlin
d3eb13d2aa Fix focus debugging in the controls sample.
A wrong format string was used in Printf() resulting in useless output.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-21 12:51:14 +00:00
Vadim Zeitlin
747eb0f686 Fix wxListCtrl::EndEditLabel() which simply didn't work.
Also document it (even though it's wxMSW-only for now) and add a test for it
in the sample.

Closes #7663.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-20 22:04:03 +00:00
Francesco Montorsi
45cb70531f remove TestTimer() (adds nothing to existing tests) and move wxStopWatch tests to a new CppUnit test.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-16 15:44:17 +00:00
Francesco Montorsi
210bfffb97 move TestUtf8() and TestEncodingConverter() functions to UnicodeTestCase. Disable some code which does not run clean and mark it with FIXME comments (needs revision).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-16 15:32:41 +00:00
Francesco Montorsi
4e36548428 remove ZIP tests: they seem to have been greatly expanded and enhanced by tests/archive/archive.cpp and tests/archive/ziptest.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-16 14:53:11 +00:00
Francesco Montorsi
91ee2f3520 remove wxDateTime tests which were already extracted as tests/datetime/datetime.cpp (keep only the interactive test)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-16 14:36:16 +00:00
Francesco Montorsi
3dea816bd2 move TestTextInputStream() function in CppUnit's TextStreamTestCase class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-16 14:31:00 +00:00
Vadim Zeitlin
945178c70e Add more tests for wxRendererNative::DrawHeaderButton().
Test using icons and bitmaps in it. Also show the native/default
implementation of this method and not only our overridden version.

See #12047.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-15 10:47:33 +00:00
Vadim Zeitlin
ca288f2afe Use GetWidgets() in the widgets samples instead of GetWidget2().
Add a function which can be overridden to return an arbitrary number of
widgets instead of having just GetWidget() and GetWidget2(): spin control page
already uses 3 widgets (and defines GetWidget3() which is never called) and we
could have even more in the future. Just use a generic solution which will
always work.

The practical consequence of this is that the "Enable/Disable" menu item now
also enables and disables the wxSpinCtrlDouble in the spin page, see #12045.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-13 15:31:30 +00:00
Vadim Zeitlin
2d4a03f8a7 No changes, just cleanup the image part of the docview sample.
Remove unnecessary, never used methods.

Don't use pointers when objects or references can be used more safely.

Don't name classes which are not part of wx with "wx" prefix to avoid
confusing people.

Don't define empty unnecessary event tables.

Prefer wxScrolledWindow::SetVirtualSize() to SetScrollbars().

Stop using "protected" when "private" should be used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-13 14:37:06 +00:00
Jaakko Salli
17c02cc8e6 Make text drawn by wxGraphicsContext slightly less intrusive
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-13 08:36:37 +00:00
Jaakko Salli
8371a35340 Added wxGraphicsContext::Create(const wxEnhMetaFileDC& dc) so that wxPrintPreview can work with wxMSW's wxGraphicsContext (closes #12028)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-13 08:22:36 +00:00
Francesco Montorsi
1f5496a0f5 move code testing wxThread classes from the console sample to a new CppUnit test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 21:48:24 +00:00
Vadim Zeitlin
f6b4a1b98d Don't use wxWindow::ClearBackground() in the image sample and explain why.
Painting on both wxPaintDC and wxClientDC simultaneously doesn't work well,
e.g. under Windows the client DC can be actually erased after we finished
painting the window contents, overwriting it.

Simply use wxDC::Clear() instead of wxWindow::ClearBackground() to avoid this
and document the danger of using ClearBackground() from EVT_PAINT handler.

Closes #10700.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 21:02:30 +00:00
Jaakko Salli
a29df06231 Make text printed by wxGraphicsContext shorter
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 14:16:07 +00:00
Jaakko Salli
a5e40d85a4 Use wxGraphicsContext to draw some text and a rectangle around it (so that GetTextExtent() can be verified to work correctly)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 14:14:35 +00:00
Vadim Zeitlin
396e9eb8e2 Add wxWindow::ProcessWindowEventLocally() and use it in wxMSW MDI code.
Add ProcessWindowEventLocally() which wraps ProcessEventLocally() in the same
way as ProcessWindowEvent() wraps ProcessEvent(). I.e. it allows to process
the event in this window only, without propagating it upwards, but taking into
account any event handlers associated with it.

Use the new method in wxMDIParentFrame code in wxMSW to ensure that event
handlers pushed on MDI children frames are taken into account. Add a test for
this to the MDI sample.

Closes #11225.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-09 14:55:33 +00:00
Vadim Zeitlin
5708ae18f2 Add wxTreeCtrl::{Clear,Set}FocusedItem().
Allow changing just the currently focused (not selected) item and also
removing the focus completely.

Closes #11599.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-02 12:01:30 +00:00
Václav Slavík
cfdcbf660d Check in samples/dll for WXUSINGDLL.
If it is set and DLL build of wx is used, emit an error, as the sample
won't work correctly in that case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-30 16:46:22 +00:00
Václav Slavík
10afaa0b97 Fix typo in internat sample.
Catalog should be added with domain name ("wxstd"), not file name
("wxstd.mo").

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-24 07:06:11 +00:00
Vadim Zeitlin
b5415496c3 No real changes, just fix typos in the ownerdrw sample.
s/Cheked/Checked/g

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-21 14:40:42 +00:00
Stefan Csomor
21e02d56c2 render characters on OSX one by one as fractional widths leads to errors otherwise
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-18 18:49:21 +00:00
Jaakko Salli
a286080b4f Correctly use wxANY_AS() instead of wxAny::As<>(), for VC6 compatibility
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-18 10:19:35 +00:00
Jaakko Salli
4e0bdd562d Adapted wxPropertyGrid documentation, samples, tests, and wxVariantData-macros to the new wxAny<->wxVariant conversions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 14:36:32 +00:00
Václav Slavík
3acf8a8d9b Remove wxLOCALE_CONV_ENCODING flag.
This doesn't affect Unicode builds, only the legacy ANSI one.

PO files are now always converted to the appropriate charset according
to current locale. This was the default behavior for long time; not
doing the conversion was always a fragile hack that didn't work well.
Removing this flag simplifies wxLocale code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 11:29:22 +00:00
Václav Slavík
f30bd8f262 Add wxLOCALE_DONT_LOAD_DEFAULT (=0) for clarity.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 11:29:09 +00:00
Václav Slavík
8d94819c43 Remove wxUSE_WCHAR_T checks.
wxWidgets requires wchar_t for some time now; wx/chartype.h has a check
to fail complation without it. Simplify code by removing now-dead code
for the !wxUSE_WCHAR_T case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 10:43:18 +00:00
Vadim Zeitlin
0e9eb80c39 Fix gcc warnings about testing undefined preprocessor symbol.
Use #ifdef instead of #if to test for __WXPALMOS[56]__.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-12 11:21:45 +00:00
Václav Slavík
b796194b15 Regenerated makefiles after removing USE_GDIPLUS.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-09 14:14:26 +00:00
Stefan Csomor
9b2f7ad513 reverting r57083 for OSX, fixes #11922
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-09 08:10:31 +00:00