]> git.saurik.com Git - wxWidgets.git/log
wxWidgets.git
13 years agoAdd wxDocManager::GetPageSetupDialogData() accessor.
Vadim Zeitlin [Tue, 3 May 2011 10:40:23 +0000 (10:40 +0000)] 
Add wxDocManager::GetPageSetupDialogData() accessor.

Allow accessing the print data stored in wxDocManager from outside the class.

Closes #13190.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoIncrease the number of index items shown by default in wxHTML.
Vadim Zeitlin [Tue, 3 May 2011 10:40:17 +0000 (10:40 +0000)] 
Increase the number of index items shown by default in wxHTML.

Consider that small index is up to 1000 items, not up to 100 which is really
too small.

See #10573.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoadd src/common/affinematrix2d.cpp to OpenVMS makefiles
Jouk Jansen [Mon, 2 May 2011 07:25:26 +0000 (07:25 +0000)] 
add src/common/affinematrix2d.cpp to OpenVMS makefiles

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFixed reading multiple images from ANI and ICO image files.
Dimitri Schoolwerth [Sun, 1 May 2011 23:35:46 +0000 (23:35 +0000)] 
Fixed reading multiple images from ANI and ICO image files.

In r60852 various 'unneeded' SeekI(0) calls were removed. Examined the changes in that revision and restored all SeekI(0) calls after finding out their removal caused problems with reading more than one image from ICO and ANI files. The image handling code for these formats expects to read from the start of a stream for reading its images (as well as for DoCanRead and DoGetImageCount), regardless of the index of the requested image.

Closes #12861.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agosupport multiline strings using the same workaround as msw, fixes #13019
Stefan Csomor [Sun, 1 May 2011 19:07:16 +0000 (19:07 +0000)] 
support multiline strings using the same workaround as msw, fixes #13019

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoMake wxSpinCtrlGeneric usable as wxDVC editor control.
Václav Slavík [Sun, 1 May 2011 18:44:35 +0000 (18:44 +0000)] 
Make wxSpinCtrlGeneric usable as wxDVC editor control.

wxDVC installs temporary event handler that watches for focus changes
and some key events. Make wxSpinCtrlGeneric look like a native
wxControl in this respect even though it's actually a composite control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoTranslate various user-visible strings in rich text print code.
Vadim Zeitlin [Sun, 1 May 2011 15:58:36 +0000 (15:58 +0000)] 
Translate various user-visible strings in rich text print code.

Make default wxRichTextPrintout title and the name of wxRichTextPrinting
object translatable.

Closes #13187.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoVerify the validity of the buffer size in wxBufferedDC.
Vadim Zeitlin [Sun, 1 May 2011 15:47:46 +0000 (15:47 +0000)] 
Verify the validity of the buffer size in wxBufferedDC.

Passing invalid (e.g. negative) buffer size to wxBufferedDC resulted in many
problems later on so refuse it immediately.

Closes #13175.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd a section about STL containers-related incompatible changes.
Vadim Zeitlin [Sun, 1 May 2011 15:47:44 +0000 (15:47 +0000)] 
Add a section about STL containers-related incompatible changes.

Document the main incompatibilities between the STL and non-STL containers
builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRebaked test GUI projects with toplevel.cpp included.
Dimitri Schoolwerth [Sun, 1 May 2011 14:58:58 +0000 (14:58 +0000)] 
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

13 years agoNo code changes, fixed some typos.
Dimitri Schoolwerth [Sat, 30 Apr 2011 10:57:04 +0000 (10:57 +0000)] 
No code changes, fixed some typos.

Changed several occurrences of "it's" where "its" is meant, as well as a few other minor typos.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix popen2 deprecation warning.
Robin Dunn [Fri, 29 Apr 2011 20:03:45 +0000 (20:03 +0000)] 
Fix popen2 deprecation warning.
Fix binary name inside the framework to be the same as the framework name.
Inject a bit of info about the framework into wx-config, so it can output framework flags/names instead of lib flags/names.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemove fixed size of gs_encodingNames array in font mapper code.
Vadim Zeitlin [Thu, 28 Apr 2011 16:57:21 +0000 (16:57 +0000)] 
Remove fixed size of gs_encodingNames array in font mapper code.

Specifying the size explicitly made wxCOMPILE_TIME_ASSERT() checking that the
array sizes were synchronized useless as the array always had the correct
size, independently of the real number of elements in it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoCorrect wxFontMapper tables for Big-5, Shift-JIS and GB2312 encodings.
Vadim Zeitlin [Thu, 28 Apr 2011 16:57:15 +0000 (16:57 +0000)] 
Correct wxFontMapper tables for Big-5, Shift-JIS and GB2312 encodings.

As wxFONTENCODING_{BIG5,SHIFT_JIS,GB2312} are only synonyms for the other
encoding constants, we must append the corresponding names to the array of
names for the real encoding value instead of having the (never used) separate
entries for them in the names array.

Closes #13164.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix wxULongLongNative::ToDouble() compilation with VC6.
Vadim Zeitlin [Thu, 28 Apr 2011 16:16:16 +0000 (16:16 +0000)] 
Fix wxULongLongNative::ToDouble() compilation with VC6.

The problem alluded to by the commit message of r40658 arose only in the DLL
build using VC6 so reintroduce the workaround for it removed by r67634 but
make it VC6-specific and, arguably even more importantly, also make it work
correctly for wxULongLongNative values greater than LONGLONG_MAX.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUse correct GTK macro in wx_gtk_widget_get_sensitive().
Vadim Zeitlin [Thu, 28 Apr 2011 14:29:56 +0000 (14:29 +0000)] 
Use correct GTK macro in wx_gtk_widget_get_sensitive().

Using GTK_WIDGET_VISIBLE() to test for sensitivity was not going to work (and,
in fact, it didn't and broke the unit tests).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix check in assert in wxULongLong::ToULong().
Vadim Zeitlin [Thu, 28 Apr 2011 14:20:32 +0000 (14:20 +0000)] 
Fix check in assert in wxULongLong::ToULong().

We can convert values up to ULONG_MAX to unsigned long losslessly, not up to
LONG_MAX.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't specialize std::numeric_limits<> for wxLongLong when using VC6.
Vadim Zeitlin [Thu, 28 Apr 2011 14:20:29 +0000 (14:20 +0000)] 
Don't specialize std::numeric_limits<> for wxLongLong when using VC6.

This doesn't work with VC6 anyhow as it doesn't provide numeric_limits<>
specialization for __int64 and results in many warnings C4663 as the standard
header itself uses obsolete template specialization syntax.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoChange --j to --jobs, add --mac_framework_prefix, add some helper functions to be...
Robin Dunn [Thu, 28 Apr 2011 06:08:47 +0000 (06:08 +0000)] 
Change --j to --jobs, add --mac_framework_prefix, add some helper functions to be used from build-wxpython.py and fix a bunch of other little stuff.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix wxULongLong::ToDouble() for MSVC.
Vadim Zeitlin [Wed, 27 Apr 2011 18:51:00 +0000 (18:51 +0000)] 
Fix wxULongLong::ToDouble() for MSVC.

The conversion of wxULongLong to double was broken for MSVC by r40658 which
was supposed to correct some unspecified compilation problem but this code
seems to compile fine with at least recent versions of MSVC and, in any case,
correcting compilation only for the code to work incorrectly during run-time
doesn't look like a good idea.

This fixes current unit test failures in wxMSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDisable numeric_limits<wxLongLong> test for VC6.
Vadim Zeitlin [Wed, 27 Apr 2011 18:44:11 +0000 (18:44 +0000)] 
Disable numeric_limits<wxLongLong> test for VC6.

VC6 doesn't specialize numeric_limits<> for its __int64 so it's not
specialized for wxLongLong neither when using this compiler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoGet rid of useless temporaries in wxAffineMatrix2D unit test.
Vadim Zeitlin [Wed, 27 Apr 2011 18:44:07 +0000 (18:44 +0000)] 
Get rid of useless temporaries in wxAffineMatrix2D unit test.

See #13092.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd wxUSE_DC_TRANSFORM_MATRIX checks to the unit test.
Vadim Zeitlin [Wed, 27 Apr 2011 18:43:58 +0000 (18:43 +0000)] 
Add wxUSE_DC_TRANSFORM_MATRIX checks to the unit test.

Allow the unit test to compile even when wxUSE_DC_TRANSFORM_MATRIX is 0.

See #13092.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd wxUSE_DC_TRANSFORM_MATRIX to setup for OpenVMS
Jouk Jansen [Wed, 27 Apr 2011 10:26:08 +0000 (10:26 +0000)] 
Add wxUSE_DC_TRANSFORM_MATRIX to setup for OpenVMS

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoChange VIEWPORT_EXTENT constant in wxMSW wxDC code to be a power of two.
Vadim Zeitlin [Tue, 26 Apr 2011 22:57:45 +0000 (22:57 +0000)] 
Change VIEWPORT_EXTENT constant in wxMSW wxDC code to be a power of two.

Notice that this commit doesn't really change anything, in particular it
doesn't correct zooming for zoom factors that are power of 2 (which was broken
before as ticket #11669 showed), this was already done by the previous commit.
This one simply makes multiplying by VIEWPORT_EXTENT a tiny bit more efficient.

See #9554.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAvoid rounding errors in wxMSW wxDC scaling code.
Vadim Zeitlin [Tue, 26 Apr 2011 22:57:42 +0000 (22:57 +0000)] 
Avoid rounding errors in wxMSW wxDC scaling code.

Multiply by scale factor when it's > 1 and divide by it when it's < 1 to avoid
rounding errors. By choosing whether to increase the viewport or window
extents we increase precisions without any apparent negative effects (at least
under Windows NT where the coordinates in 2^27 range are supported, but even
under Windows 9x it's not clear if the old code was better as while we never
overflowed the viewport extents, we could overflow the window ones easily for
small zoom factors).

Closes #9554.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemove apparently erroneous -1 from DrawBitmap() in wxMSW wxGC code.
Vadim Zeitlin [Tue, 26 Apr 2011 22:57:39 +0000 (22:57 +0000)] 
Remove apparently erroneous -1 from DrawBitmap() in wxMSW wxGC code.

We didn't draw the last line and row of the image for some reason, simply
remove the -1 which prevented us from doing this.

Closes #12476.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoMake wxSMALL_FONT larger under MSW as it was unreadable otherwise.
Vadim Zeitlin [Tue, 26 Apr 2011 22:57:33 +0000 (22:57 +0000)] 
Make wxSMALL_FONT larger under MSW as it was unreadable otherwise.

The default size of the normal font is 9pt under MSW and 7pt is too small for
wxSMALL_FONT, use 8pt for it instead.

Closes #13104.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoEnsure that message boxes with only "OK" can be closed with Escape in wxMSW.
Vadim Zeitlin [Tue, 26 Apr 2011 22:57:30 +0000 (22:57 +0000)] 
Ensure that message boxes with only "OK" can be closed with Escape in wxMSW.

The native task dialog doesn't allow using Escape (nor Alt-F4 but this is less
annoying) to close it unless it has a Cancel button, so by default the dialogs
with only "OK" couldn't be closed with Escape.

Work around this by creating a Cancel button with "OK" label instead. This is
not ideal but there doesn't seem to be any other way to make this work.

See #12501.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAllow showing the print preview frame non modally.
Vadim Zeitlin [Tue, 26 Apr 2011 22:57:27 +0000 (22:57 +0000)] 
Allow showing the print preview frame non modally.

Still show the print preview app modally by default, i.e. disabling all the
other windows, but also allow disabling only the preview parent or nothing at
all.

Closes #13108.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoNo changes, just replace #defines with enums in printing sample.
Vadim Zeitlin [Tue, 26 Apr 2011 22:57:23 +0000 (22:57 +0000)] 
No changes, just replace #defines with enums in printing sample.

This makes it more convenient to define menu ids with consecutive values as
will be done in the next commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd a unit test for wxAffineMatrix2D class and its support in wxDC.
Vadim Zeitlin [Tue, 26 Apr 2011 22:57:20 +0000 (22:57 +0000)] 
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

13 years agoMake it easier to compare wxImages in the unit tests.
Vadim Zeitlin [Tue, 26 Apr 2011 22:57:16 +0000 (22:57 +0000)] 
Make it easier to compare wxImages in the unit tests.

Instead of forcing the tests to manually use memcmp(), specialize
CppUnit::assertion_traits<> for wxImage. This allows to simply use
CPPUNIT_ASSERT_EQUAL() and related macros with wxImage objects.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUpdate line height in generic wxListCtrl to match images height.
Vadim Zeitlin [Tue, 26 Apr 2011 22:57:12 +0000 (22:57 +0000)] 
Update line height in generic wxListCtrl to match images height.

The height of the items of the generic wxListCtrl remained too small if an
image of a greater than standard size was used.

Fix this by forcing the line height recalculation when adding an item using an
image higher than the current line height.

Closes #12806.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoNo changes, just simplify the mask checks in wxImage::Paste().
Vadim Zeitlin [Tue, 26 Apr 2011 22:57:08 +0000 (22:57 +0000)] 
No changes, just simplify the mask checks in wxImage::Paste().

Replace the test of the form "(!a && b) || (a && b)" with a simple test for
"b" and then also replace the test for "b || (c && !b)" with just "b || c".
The end result is much easier to read and understand.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoOptimize alpha handling in wxImage::Rotate90() too.
Vadim Zeitlin [Tue, 26 Apr 2011 22:57:05 +0000 (22:57 +0000)] 
Optimize alpha handling in wxImage::Rotate90() too.

The changes of r66309 optimized the rotation of the pixel data by doing it in
entire strips instead of pixel by pixel, apply the same technique now to the
rotation of alpha data as well.

Closes #12739.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix assert when destroying wxDataViewCtrl being edited in wxGTK.
Vadim Zeitlin [Tue, 26 Apr 2011 22:57:01 +0000 (22:57 +0000)] 
Fix assert when destroying wxDataViewCtrl being edited in wxGTK.

If wxDataViewCtrl was destroyed while showing a generic editor, an assert
occurred in wxWindowBase dtor as the event handler pushed on it by the editor.

Fix this by calling CancelEditing() when the control is destroyed and also fix
the crash in CancelEditing() in wxGTK due to recursive calls to FinishEditing().

Closes #12683.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoNo changes, just get rid of wxDataViewColumn::GetConstGtkHandle().
Vadim Zeitlin [Tue, 26 Apr 2011 22:56:56 +0000 (22:56 +0000)] 
No changes, just get rid of wxDataViewColumn::GetConstGtkHandle().

If both const and non-const accessors are needed, it's custom to use the same
name for both but in this case we don't even need them as the const version
can always be used, so simply remove the weird and badly named (because the
returned handle is not const at all) GetConstGtkHandle().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoSpecialize std::numeric_limits<> for wxLongLong and wxULongLong.
Vadim Zeitlin [Tue, 26 Apr 2011 22:56:50 +0000 (22:56 +0000)] 
Specialize std::numeric_limits<> for wxLongLong and wxULongLong.

numeric_limits<> should be specialized for number-like types to allow using
them in a similar way to the built-in types.

Closes #13162.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't change CC and CXX for the SDK options until after the compiler version has...
Robin Dunn [Tue, 26 Apr 2011 19:02:14 +0000 (19:02 +0000)] 
Don't change CC and CXX for the SDK options until after the compiler version has been chosen so it doesn't mess up the version tests.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemove lipo options, that hack is no longer needed since we are not supporting OSX...
Robin Dunn [Tue, 26 Apr 2011 17:39:53 +0000 (17:39 +0000)] 
Remove lipo options, that hack is no longer needed since we are not supporting OSX 10.3 any more.  Also some work to get framework builds working properly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUse DESTDIR properly and fix change-install-names script. Closes #12461
Robin Dunn [Tue, 26 Apr 2011 17:35:35 +0000 (17:35 +0000)] 
Use DESTDIR properly and fix change-install-names script.  Closes #12461

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agofixes #12220
Stefan Csomor [Tue, 26 Apr 2011 17:14:50 +0000 (17:14 +0000)] 
fixes #12220

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix the size of the tree's text editing box on Cocoa
Robin Dunn [Mon, 25 Apr 2011 23:18:19 +0000 (23:18 +0000)] 
Fix the size of the tree's text editing box on Cocoa

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFixed filename in wxOSX-Cocoa's file dialog using extension of wrong file type.
Dimitri Schoolwerth [Mon, 25 Apr 2011 13:18:45 +0000 (13:18 +0000)] 
Fixed filename in wxOSX-Cocoa's file dialog using extension of wrong file type.

When using SetFilterIndex to indicate a different initial file type the dialog would still use the extension of the first file type (if the filename had no extension then unchecking "Hide extension" would append the first file type's extension). Fixed this by calling code, that formerly got called only from OnFilterSelected, to notify OS X of the file type change.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't rely on RVO in wxON_BLOCK_EXIT_SET().
Václav Slavík [Sun, 24 Apr 2011 13:14:47 +0000 (13:14 +0000)] 
Don't rely on RVO in wxON_BLOCK_EXIT_SET().

MakeVarSetter() relies on the compiler always using RVO, as
VariableSetterImpl<> doesn't have correct copy ctor; worse yet, its use
wasn't detected at compile time.  With some compilers (e.g. VC++ 2008
with non-trivial variable types), this resulted in the variable being
reset too soon, immediately in the place where the macro was used.
Fixed by using the same technique already used in wxScopeGuardImpl. In
fact, VariableSetterImpl is just another special case of
wxScopeGuardImpl, so just derive from the latter.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't generate wxEVT_COMMAND_DATAVIEW_CACHE_HINT for empty control.
Vadim Zeitlin [Sat, 23 Apr 2011 18:01:36 +0000 (18:01 +0000)] 
Don't generate wxEVT_COMMAND_DATAVIEW_CACHE_HINT for empty control.

Don't send any cache hint events for empty wxDataViewCtrl. Sending them was
unnecessary, inconsistent with wxListCtrl (which doesn't send them when it's
empty) and the events also had incorrect range. Just don't create them at all
to avoid all these problems at once.

Closes #13132.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't close arcs drawn in wxPostScriptDC.
Vadim Zeitlin [Sat, 23 Apr 2011 17:36:11 +0000 (17:36 +0000)] 
Don't close arcs drawn in wxPostScriptDC.

Draw arcs, not pies, in DoDrawArc(): simply remove the apparently unnecessary
last lineto and closepath PostScript statements.

Closes #13141.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoChange wxNotebook selection before sending page changed event in wxMSW.
Vadim Zeitlin [Sat, 23 Apr 2011 16:19:15 +0000 (16:19 +0000)] 
Change wxNotebook selection before sending page changed event in wxMSW.

wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED handler should see the new page selected
in the control, not the old one as was the case if the page was changed using
the mouse in wxMSW.

This should have been done together with the other changes of r66224, see its
commit message for more details.

Closes 13145.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd wxDC::SetTransformMatrix() and related methods and implement them in wxMSW.
Vadim Zeitlin [Sat, 23 Apr 2011 16:03:10 +0000 (16:03 +0000)] 
Add wxDC::SetTransformMatrix() and related methods and implement them in wxMSW.

Add support for world transformations to wxDC too. Currently this is
implemented in wxMSW only but could be easily provided in the ports that use
wxGraphicsContext for wxDC implementation later.

Closes #13092.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix compilation error in recent change to wxSizeEvent generation.
Vadim Zeitlin [Sat, 23 Apr 2011 15:12:59 +0000 (15:12 +0000)] 
Fix compilation error in recent change to wxSizeEvent generation.

Wrong variable name was used in r67583, fix it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoCorrect names of parameters in wxAffineMatrix2D documentation.
Vadim Zeitlin [Sat, 23 Apr 2011 14:53:42 +0000 (14:53 +0000)] 
Correct names of parameters in wxAffineMatrix2D documentation.

Some parameters were misnamed in @param paragraphs, fix this.

Closes #13143.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd a simple unit test for wxParseCommonDialogsFilter().
Vadim Zeitlin [Sat, 23 Apr 2011 14:53:38 +0000 (14:53 +0000)] 
Add a simple unit test for wxParseCommonDialogsFilter().

Verify that this function (which is used for parsing the wildcard strings used
with file-related dialogs) works as expected and also asserts when given
invalid input.

See #4489.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDocument that wxTreeCtrl::SelectItem() generates events.
Vadim Zeitlin [Sat, 23 Apr 2011 11:17:43 +0000 (11:17 +0000)] 
Document that wxTreeCtrl::SelectItem() generates events.

This is another exception to the general rule that program actions don't
generate any events so document it explicitly.

See #13153.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoSet event object correctly for the generated wxSizeEvents.
Vadim Zeitlin [Sat, 23 Apr 2011 11:17:40 +0000 (11:17 +0000)] 
Set event object correctly for the generated wxSizeEvents.

wxSizeEvent event object was not set correctly in at least a couple of places.
Do set it now.

Closes #13156.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemove duplicate negated option indicator in wxCmdLineParser help.
Vadim Zeitlin [Sat, 23 Apr 2011 11:17:36 +0000 (11:17 +0000)] 
Remove duplicate negated option indicator in wxCmdLineParser help.

The indicator of a negatable option (one with wxCMD_LINE_SWITCH_NEGATABLE
flag) appeared twice in the usage message, don't add it the second time.

Closes #13157.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix file paths in wxFileSystemWatcherEvent under OS X.
Vadim Zeitlin [Sat, 23 Apr 2011 11:17:33 +0000 (11:17 +0000)] 
Fix file paths in wxFileSystemWatcherEvent under OS X.

The separator between the watched directory and the name of the file in the
generated event was missing, add it now.

Closes #13161.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoSet page range in the print preview correctly.
Vadim Zeitlin [Sat, 23 Apr 2011 10:49:48 +0000 (10:49 +0000)] 
Set page range in the print preview correctly.

The valid pages range was set too early before, we need to postpone it until
after the OnPreparePrinting() call of the user-defined wxPrintout object as
only it can determine the number of pages (after running the pagination
algorithm) in general.

Set the pages range during the first call to RenderPageIntoDC() to fix this.

Also add wxPrintPageMaxCtrl class for symmetry with the existing
wxPrintPageTextCtrl and use a shared constant MAX_PAGE_NUMBER instead of hard
coded 99999. Slightly improve the layout of wxPrintPageMaxCtrl too.

Closes #12965.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoMake the source files non-executable again.
Vadim Zeitlin [Sat, 23 Apr 2011 10:41:29 +0000 (10:41 +0000)] 
Make the source files non-executable again.

Revert the (probably accidental) mode change of r67576.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUse a relative link for wx-config so it will also work even when not located at the...
Robin Dunn [Fri, 22 Apr 2011 19:20:31 +0000 (19:20 +0000)] 
Use a relative link for wx-config so it will also work even when not located at the install prefix.  Ported from the wxPy-2.9.1.1 tag/branch.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoExplicitly specify the Mac SDK for wxPython builds
Robin Dunn [Fri, 22 Apr 2011 19:18:47 +0000 (19:18 +0000)] 
Explicitly specify the Mac SDK for wxPython builds

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoReturn wxWindow* from wxDataViewCustomRenderer::CreateEditorCtrl().
Václav Slavík [Fri, 22 Apr 2011 18:25:32 +0000 (18:25 +0000)] 
Return wxWindow* from wxDataViewCustomRenderer::CreateEditorCtrl().

There's no reason to limit custom editor controls to wxControl, which
would rule out e.g. composite controls or any custom widgets.
Make appropriate changes to related functions and code too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoosx 64 bit multilib build needs an explicit export as in this architecture our visibi...
Stefan Csomor [Fri, 22 Apr 2011 15:48:13 +0000 (15:48 +0000)] 
osx 64 bit multilib build needs an explicit export as in this architecture our visibility flags get respected for obj-c classes as well

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoimplementation of HotKey, see #12354
Stefan Csomor [Fri, 22 Apr 2011 15:20:11 +0000 (15:20 +0000)] 
implementation of HotKey, see #12354

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoCompilation fix for DEFINE_GUID uses.
Václav Slavík [Fri, 22 Apr 2011 14:50:20 +0000 (14:50 +0000)] 
Compilation fix for DEFINE_GUID uses.

DEFINE_GUID doesn't define the value, only declares an external
variable, unless initguid.h was included. This leads to linker errors.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFixed wxUSE_STD_STRING==0 compilation.
Dimitri Schoolwerth [Fri, 22 Apr 2011 10:43:47 +0000 (10:43 +0000)] 
Fixed wxUSE_STD_STRING==0 compilation.

With at least MSVC9 numformatter.cpp wouldn't compile because of unknown identifiers related to locales. Include <locale.h> in case wxUSE_STD_STRING is set to 0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDefine ACO_AUTOAPPEND for MinGW/Cygwin.
Vadim Zeitlin [Thu, 21 Apr 2011 23:43:27 +0000 (23:43 +0000)] 
Define ACO_AUTOAPPEND for MinGW/Cygwin.

Apparently this symbol is not defined in MinGW headers neither, so do it
ourselves as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUse "wx" prefix for the GUIDs we (re)define in wxMSW code.
Vadim Zeitlin [Thu, 21 Apr 2011 23:43:23 +0000 (23:43 +0000)] 
Use "wx" prefix for the GUIDs we (re)define in wxMSW code.

CLSID_AutoComplete became ambiguous with MinGW because it does define it in
its shlguid.h header (although MSVC/Platform SDK does not define this one) so
use a "wx" prefix for it to avoid ambiguity. Also use the same prefix for the
IID_IAutoCompleteDropDown value we define for consistency.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRedefine IAutoCompleteDropDown in our code as it's not always available.
Vadim Zeitlin [Thu, 21 Apr 2011 15:47:37 +0000 (15:47 +0000)] 
Redefine IAutoCompleteDropDown in our code as it's not always available.

MinGW doesn't have shobjidl.h header file which is normally part of the
Platform SDK and doesn't have IAutoCompleteDropDown interface definition in
any of its headers at all, so define this interface and its IID ourselves to
make the code compile with it.

Notice that MinGW-64 does have the interface declaration but still doesn't
define IID_IAutoCompleteDropDown.

So to be on the safe side just always define everything ourselves, as long as
we need to do it for one of the compilers, it's not more difficult to do it
for all of them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdded ForceDelayedLayout
Julian Smart [Thu, 21 Apr 2011 12:44:26 +0000 (12:44 +0000)] 
Added ForceDelayedLayout

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoMake use of SetFilterIndex in wxOSX-Cocoa's file dialog.
Dimitri Schoolwerth [Wed, 20 Apr 2011 14:54:56 +0000 (14:54 +0000)] 
Make use of SetFilterIndex in wxOSX-Cocoa's file dialog.

Previously the file type would solely be based on the extension of the passed filename. This is still done, but any valid filter index as set by the user will now take precedence.

See also #12429.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFixed saving dialog's filter index always being -1 with wxOSX-Cocoa.
Dimitri Schoolwerth [Wed, 20 Apr 2011 07:53:07 +0000 (07:53 +0000)] 
Fixed saving dialog's filter index always being -1 with wxOSX-Cocoa.

This problem was reproducable using the Save file dialog in the dialogs sample.
The member m_filterIndex was only initialised to -1 and never set at another point. Set it to the filter's selection during ModalFinishedCallback.

Closes #13158.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agofix conversion of gdk_input_add() to g_io_add_watch() from r67326
Paul Cornett [Tue, 19 Apr 2011 05:17:45 +0000 (05:17 +0000)] 
fix conversion of gdk_input_add() to g_io_add_watch() from r67326

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDo send wxEVT_UPDATE_UI events to hidden windows.
Vadim Zeitlin [Mon, 18 Apr 2011 23:50:14 +0000 (23:50 +0000)] 
Do send wxEVT_UPDATE_UI events to hidden windows.

Failing to send wxEVT_UPDATE_UI to hidden windows made it impossible to show
them from their update UI handler which was totally unexpected as the
documented wxUpdateUIEvent::Show() method could never be used.

Do send these events to the hidden windows themselves but avoid sending the
update UI events to the children of hidden windows as this is really useless
because any change of their state wouldn't be seen by the user anyhow (even if
the child is shown, it would still remain hidden until its parent is) and
would just waste time processing a lot of needless events.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't send wxWindowDestroyEvent if we hadn't sent wxWindowCreateEvent.
Vadim Zeitlin [Mon, 18 Apr 2011 23:36:46 +0000 (23:36 +0000)] 
Don't send wxWindowDestroyEvent if we hadn't sent wxWindowCreateEvent.

Don't generate wxWindowDestroyEvent when destroying the windows that had been
never created for symmetry with wxWindowCreateEvent which wasn't sent for this
window neither.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't assert when destroying a never created window in wxGTK.
Vadim Zeitlin [Mon, 18 Apr 2011 23:36:42 +0000 (23:36 +0000)] 
Don't assert when destroying a never created window in wxGTK.

The other ports don't assert if a default-constructed wxWindow object for
which Create() had never been called is Destroy()d and wxGTK shouldn't do this
neither.

The new behaviour is more logical but also fixes a problem with an assert in
wxOwnerDrawnComboBox that can currently be seen in wxGTK unit tests.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoCorrect a typo in DoAutoCompleteCustom() stub in wxMSW.
Vadim Zeitlin [Mon, 18 Apr 2011 13:47:51 +0000 (13:47 +0000)] 
Correct a typo in DoAutoCompleteCustom() stub in wxMSW.

Fix a compilation error introduced by r67518.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUse Connect() to bind embedded wxTextCtrl events instead of event table. This seems...
Jaakko Salli [Mon, 18 Apr 2011 10:06:08 +0000 (10:06 +0000)] 
Use Connect() to bind embedded wxTextCtrl events instead of event table. This seems to be more reliable approach here, and fixes a bug with wxPropertyGrid's wxEditEnumProperty.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoIn wxComboCtrlBase::OnTextCtrlEvent(), make sure to call event.StopPropagation()...
Jaakko Salli [Mon, 18 Apr 2011 10:03:16 +0000 (10:03 +0000)] 
In wxComboCtrlBase::OnTextCtrlEvent(), make sure to call event.StopPropagation() only after it has been copied

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAlso show EVT_TEXT_ENTER in the combo sample
Jaakko Salli [Mon, 18 Apr 2011 09:58:27 +0000 (09:58 +0000)] 
Also show EVT_TEXT_ENTER in the combo sample

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoCorrect wrong port-specific note in AutoCompleteFileNames() documentation.
Vadim Zeitlin [Sun, 17 Apr 2011 23:15:04 +0000 (23:15 +0000)] 
Correct wrong port-specific note in AutoCompleteFileNames() documentation.

This function is only implemented in wxMSW, not wxGTK2.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoImplement auto-completion support for wxTextEntry in wxOSX/Cocoa.
Vadim Zeitlin [Sun, 17 Apr 2011 23:14:15 +0000 (23:14 +0000)] 
Implement auto-completion support for wxTextEntry in wxOSX/Cocoa.

Both completing a set of fixed strings and dynamic completion using a custom
completer are supported, although completing the file names remains MSW-only
for now.

Note that, unlike under MSW, auto-completion under Mac is not automatic and
has to be triggered manually by calling complete: method. This is done by
pressing F5 key by default. In the future we should call it automatically on a
timer event to make it more obviously discoverable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRefactor: extract wxTextCompleterFixed from wxMSW to a header.
Vadim Zeitlin [Sun, 17 Apr 2011 23:14:11 +0000 (23:14 +0000)] 
Refactor: extract wxTextCompleterFixed from wxMSW to a header.

This class will be used in other ports too so don't make it private to wxMSW
(although it still remains private to wxWidgets for now as it doesn't make
much sense to use it in user code).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemoved wxOSX conditional code from generic calendar control.
Dimitri Schoolwerth [Sun, 17 Apr 2011 21:47:56 +0000 (21:47 +0000)] 
Removed wxOSX conditional code from generic calendar control.

Tested the calendar sample with Cocoa and Carbon to determine the behaviour and looks are still the same.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoImproved year control of generic calendar being too narrow when using a locale with...
Dimitri Schoolwerth [Sun, 17 Apr 2011 21:46:22 +0000 (21:46 +0000)] 
Improved year control of generic calendar being too narrow when using a locale with long month names.

See #11444.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRemoved invalid use of sizeFlags parameter for SetSize call in generic calendar control.
Dimitri Schoolwerth [Sun, 17 Apr 2011 21:45:36 +0000 (21:45 +0000)] 
Removed invalid use of sizeFlags parameter for SetSize call in generic calendar control.

In r39715 the height parameter of a call to SetSize was changed to -1, however the previous coordinate value remained and became the fifth parameter which represents bit flags. Simply removed the fifth parameter.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd wxAffineMatrix2D and related classes.
Vadim Zeitlin [Sun, 17 Apr 2011 00:09:56 +0000 (00:09 +0000)] 
Add wxAffineMatrix2D and related classes.

This class represents an affine 2D transformation and will be used in wxDC for
now and maybe in wxGC later.

Closes #13143.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoFix wxXmlDocument::SetRoot() broken by recent changes.
Vadim Zeitlin [Sun, 17 Apr 2011 00:09:45 +0000 (00:09 +0000)] 
Fix wxXmlDocument::SetRoot() broken by recent changes.

Support for wxXML_PI_NODE introduced in r67346 broke SetRoot() and, because of
this, saving XML documents.

Correct this and add a unit test for this method.

Closes #13135.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDefine wxTextEntry::DoAutoCompleteStrings() stub in wxMSW code too.
Vadim Zeitlin [Sat, 16 Apr 2011 23:17:44 +0000 (23:17 +0000)] 
Define wxTextEntry::DoAutoCompleteStrings() stub in wxMSW code too.

Forgot to define this function in !HAS_AUTOCOMPLETE case. This fixes linking
problems with old compilers/headers such as VC6 with its original SDK.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoSplit wxTextCompleter into a base class and wxTextCompleterSimple.
Vadim Zeitlin [Sat, 16 Apr 2011 17:27:34 +0000 (17:27 +0000)] 
Split wxTextCompleter into a base class and wxTextCompleterSimple.

Allow overriding either the iterator-like methods of the base class or the
single and possibly more convenient, albeit slightly less efficient, method of
the derived wxTextCompleterSimple class.

This makes it possible to completely delegate to wxTextCompleter from wxMSW
IEnumString implementation and actually makes the code there easier, even if
it it still not quite trivial because of multi-threading concerns.

It also would make it possible to show the completions progressively, as they
are retrieved, in a future generic implementation of auto-completion (MSW
native implementation doesn't do this unfortunately and waits until all of the
completions become available before showing them).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoDon't block the main UI thread while generating completions in wxMSW.
Vadim Zeitlin [Sat, 16 Apr 2011 17:27:30 +0000 (17:27 +0000)] 
Don't block the main UI thread while generating completions in wxMSW.

The native IAutoComplete implementation takes care to retrieve the completions
from a background thread to prevent the UI from freezing while they're being
generated, but we worked against it by always generating all the completions
from the main thread and just enumerating them from the background one.

Change this now and call wxTextCompleter::GetCompletions() method from the
background thread itself to never block the main one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoUse ACO_AUTOAPPEND option for text completion in wxMSW.
Vadim Zeitlin [Sat, 16 Apr 2011 17:27:26 +0000 (17:27 +0000)] 
Use ACO_AUTOAPPEND option for text completion in wxMSW.

This option appends the first candidate completion value to the text control
itself making it more user-friendly as it reduces the amount of typing needed
to enter it.

See #11465.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdded private wxEVT_AFTER_CHAR event for wxMSW implementation needs.
Vadim Zeitlin [Sat, 16 Apr 2011 17:27:21 +0000 (17:27 +0000)] 
Added private wxEVT_AFTER_CHAR event for wxMSW implementation needs.

This event is sent by wxMSW after the default handling of WM_CHAR has taken
place. It can be used to define an event handler triggered by key presses and
having access to the new value of the control, updated to take the last key
press into account.

This event will be used by auto-completion implementation for wxMSW only for
now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoAdd support for dynamic auto-completion in wxTextEntry.
Vadim Zeitlin [Sat, 16 Apr 2011 17:27:16 +0000 (17:27 +0000)] 
Add support for dynamic auto-completion in wxTextEntry.

Add wxTextCompleter class which allows to return the possible completions
dynamically and wxTextCompleter::AutoComplete() overload using it. So far this
is only implemented for wxMSW.

Also fix calling wxTextEntry::AutoComplete(wxArrayString) multiple times under
MSW, this didn't correctly update the list of shown completions before.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoNo changes, just simplify preprocessor checks in wxMSW wxTextEntry.
Vadim Zeitlin [Sat, 16 Apr 2011 17:27:11 +0000 (17:27 +0000)] 
No changes, just simplify preprocessor checks in wxMSW wxTextEntry.

Separate !HAS_AUTOCOMPLETE stub versions from the real one as the code was
too difficult to read otherwise and would become even more so after the
addition of the upcoming custom auto-completer support.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoRefactor wxTextEntry::AutoComplete() to simply call DoAutoCompleteXXX().
Vadim Zeitlin [Sat, 16 Apr 2011 17:27:04 +0000 (17:27 +0000)] 
Refactor wxTextEntry::AutoComplete() to simply call DoAutoCompleteXXX().

No real changes, just make the public AutoComplete() non-virtual and add
virtual DoAutoCompleteXXX() methods to make it easier to add new public
AutoComplete() overloads in the upcoming commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agoadding missing part when using the native paint CGContextRef on osx, see #11853
Stefan Csomor [Sat, 16 Apr 2011 16:59:44 +0000 (16:59 +0000)] 
adding missing part when using the native paint CGContextRef on osx, see #11853

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agosupprting flag for pixel offsetting for msw, see #11853
Stefan Csomor [Sat, 16 Apr 2011 13:07:11 +0000 (13:07 +0000)] 
supprting flag for pixel offsetting for msw, see #11853

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agosupprting flag for pixel offsetting for osx, see #11853
Stefan Csomor [Sat, 16 Apr 2011 13:05:17 +0000 (13:05 +0000)] 
supprting flag for pixel offsetting for osx, see #11853

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 years agosupprting flag for pixel offsetting for cairo, see #11853
Stefan Csomor [Sat, 16 Apr 2011 12:47:22 +0000 (12:47 +0000)] 
supprting flag for pixel offsetting for cairo, see #11853

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775