]> git.saurik.com Git - wxWidgets.git/log
wxWidgets.git
14 years agoCorrect bounding box calculation in wxGTK wxDC::DrawText().
Vadim Zeitlin [Wed, 3 Feb 2010 21:07:32 +0000 (21:07 +0000)] 
Correct bounding box calculation in wxGTK wxDC::DrawText().

Physical coordinates were incorrectly used to update the bounding box instead
of the logical ones.

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

14 years agoDon't select all if there is nothing to select.
Julian Smart [Wed, 3 Feb 2010 11:43:08 +0000 (11:43 +0000)] 
Don't select all if there is nothing to select.

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

14 years agoDon't delete previous character when pressing Del at end of buffer.
Julian Smart [Wed, 3 Feb 2010 09:51:53 +0000 (09:51 +0000)] 
Don't delete previous character when pressing Del at end of buffer.

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

14 years agosafe degradation
Stefan Csomor [Wed, 3 Feb 2010 08:32:42 +0000 (08:32 +0000)] 
safe degradation

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

14 years agoRebake after DND changes.
Kevin Ollivier [Wed, 3 Feb 2010 06:08:31 +0000 (06:08 +0000)] 
Rebake after DND changes.

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

14 years agoRefactor DND code into Carbon and Cocoa parts, and provide a basic OS X Cocoa impleme...
Kevin Ollivier [Wed, 3 Feb 2010 05:31:31 +0000 (05:31 +0000)] 
Refactor DND code into Carbon and Cocoa parts, and provide a basic OS X Cocoa implementation for wxDropSource::DoDragDrop.

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

14 years agoAdd sanity check on the item number.
Kevin Ollivier [Wed, 3 Feb 2010 05:22:13 +0000 (05:22 +0000)] 
Add sanity check on the item number.

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

14 years agoFixes for incorrect selection, extra newline insertion when undoing deletion of selec...
Julian Smart [Tue, 2 Feb 2010 22:19:33 +0000 (22:19 +0000)] 
Fixes for incorrect selection, extra newline insertion when undoing deletion of selection,
incorrect SetScrollbar optimization, insufficient refresh for operations on last line,
HasCharacter/ParagraphAttributes bug.

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

14 years agoDo not clear property selection when adding new properties, but instead correct posit...
Jaakko Salli [Tue, 2 Feb 2010 15:19:41 +0000 (15:19 +0000)] 
Do not clear property selection when adding new properties, but instead correct positions of any open editor controls.

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

14 years agoDon't crash if there's no top window.
Julian Smart [Tue, 2 Feb 2010 11:23:31 +0000 (11:23 +0000)] 
Don't crash if there's no top window.

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

14 years agoSimplify SetSelectionRange and make consistent with SetSelection.
Julian Smart [Mon, 1 Feb 2010 10:45:51 +0000 (10:45 +0000)] 
Simplify SetSelectionRange and make consistent with SetSelection.
Fix a bug that returns true for character and paragraph style tests if no characters or paragraphs were found.
Fix SetSelection to position caret at end.

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

14 years agoadapting to new API variant
Stefan Csomor [Mon, 1 Feb 2010 08:23:59 +0000 (08:23 +0000)] 
adapting to new API variant

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

14 years agonschars is never used for the wxEVT_CHAR case, so don't assign it a different value...
Kevin Ollivier [Mon, 1 Feb 2010 01:20:15 +0000 (01:20 +0000)] 
nschars is never used for the wxEVT_CHAR case, so don't assign it a different value for this case.

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

14 years agoUse the correct type to fix Tiger compilation.
Kevin Ollivier [Mon, 1 Feb 2010 00:48:23 +0000 (00:48 +0000)] 
Use the correct type to fix Tiger compilation.

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

14 years agoAdded nominal wxPG_PROP_READONLY support for editor controls other than wxTextCtrl...
Jaakko Salli [Sun, 31 Jan 2010 18:15:17 +0000 (18:15 +0000)] 
Added nominal wxPG_PROP_READONLY support for editor controls other than wxTextCtrl-based ones

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

14 years agoAdded command to set wxPG_PROP_READONLY in the propgrid sample
Jaakko Salli [Sun, 31 Jan 2010 18:14:24 +0000 (18:14 +0000)] 
Added command to set wxPG_PROP_READONLY in the propgrid sample

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

14 years agoFixed value column rendering for properties which do not create editor control when...
Jaakko Salli [Sun, 31 Jan 2010 18:13:13 +0000 (18:13 +0000)] 
Fixed value column rendering for properties which do not create editor control when selected

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

14 years agoavoiding catching incorrect shortcuts, see #11676
Stefan Csomor [Sun, 31 Jan 2010 14:42:51 +0000 (14:42 +0000)] 
avoiding catching incorrect shortcuts, see #11676

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

14 years agosupporting clipboard command shortcuts on osx_cocoa as well, simplifying code
Stefan Csomor [Sun, 31 Jan 2010 11:01:53 +0000 (11:01 +0000)] 
supporting clipboard command shortcuts on osx_cocoa as well, simplifying code

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

14 years agoDisable wxUSE_FSWATCHER under Unix if neither inotify nor kqueue is available.
Vadim Zeitlin [Fri, 29 Jan 2010 13:07:26 +0000 (13:07 +0000)] 
Disable wxUSE_FSWATCHER under Unix if neither inotify nor kqueue is available.

Don't define wxUSE_FSWATCHER as 1 in configure if we can't implement it.

Also add a check to wx/unix/chkconf.h to verify that we didn't end up with an
inconsistent configuration somehow.

Closes #11670.

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

14 years agoFix for file length fixup.
Michael Wetherell [Thu, 28 Jan 2010 21:46:18 +0000 (21:46 +0000)] 
Fix for file length fixup.

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

14 years agostoring modal returncode correctly for carbon
Stefan Csomor [Thu, 28 Jan 2010 13:49:16 +0000 (13:49 +0000)] 
storing modal returncode correctly for carbon

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

14 years agomake sure modality is reflected correctly when rerouted from window-modal to app...
Stefan Csomor [Thu, 28 Jan 2010 13:48:35 +0000 (13:48 +0000)] 
make sure modality is reflected correctly when rerouted from window-modal to app-modal

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

14 years agoDisable wxUSE_OWNER_DRAWN for wxUniv to fix the build.
Vadim Zeitlin [Thu, 28 Jan 2010 12:07:16 +0000 (12:07 +0000)] 
Disable wxUSE_OWNER_DRAWN for wxUniv to fix the build.

wxMenuItem in wxUniv doesn't even use wxOwnerDrawn but linking in
ownerdrwcmn.cpp is enough to break the DLL build of wxUniv at least under MSW
as it references symbols normally defined in msw/ownerdrw.cpp which is not
part of wxUniv.

Fix this by simply disabling wxUSE_OWNER_DRAWN under wxUniv for now as it's
unused anyhow.

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

14 years agoadding window-modal message box sample
Stefan Csomor [Thu, 28 Jan 2010 09:54:51 +0000 (09:54 +0000)] 
adding window-modal message box sample

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

14 years agosetting correct alertType
Stefan Csomor [Thu, 28 Jan 2010 08:28:52 +0000 (08:28 +0000)] 
setting correct alertType

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

14 years agoGet ShowWindowModal behavior working under OS X Cocoa for file, dir and message dialogs.
Kevin Ollivier [Thu, 28 Jan 2010 04:06:23 +0000 (04:06 +0000)] 
Get ShowWindowModal behavior working under OS X Cocoa for file, dir and message dialogs.

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

14 years agoNever block in wxSocket::Peek().
Vadim Zeitlin [Tue, 26 Jan 2010 23:04:26 +0000 (23:04 +0000)] 
Never block in wxSocket::Peek().

Peek() is not expected to block so ensure that it doesn't, independently of
the currently used socket flags, by using wxSOCKET_NOWAIT.

See #11528.

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

14 years agowxPGProperty::GetHintText() function body was missing 'inline' keyword
Jaakko Salli [Tue, 26 Jan 2010 21:09:41 +0000 (21:09 +0000)] 
wxPGProperty::GetHintText() function body was missing 'inline' keyword

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

14 years agoFixed wxPGGlobalVars export declaration
Jaakko Salli [Tue, 26 Jan 2010 17:44:51 +0000 (17:44 +0000)] 
Fixed wxPGGlobalVars export declaration

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

14 years agooptimizing creation of glcontexts, less flicker
Stefan Csomor [Tue, 26 Jan 2010 14:36:39 +0000 (14:36 +0000)] 
optimizing creation of glcontexts, less flicker

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

14 years agoFixes for compilation on OpenVMS platforms
Jouk Jansen [Tue, 26 Jan 2010 14:24:06 +0000 (14:24 +0000)] 
Fixes for compilation on OpenVMS platforms

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

14 years agoAdd wxTreeCtrl::SelectChildren() method.
Vadim Zeitlin [Tue, 26 Jan 2010 12:43:39 +0000 (12:43 +0000)] 
Add wxTreeCtrl::SelectChildren() method.

Add MSW and generic implementation, documentation and change to the sample
showing it.

Closes #11620.

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

14 years agoTry to prevent users from forgetting to include wx.rc from their resources.
Vadim Zeitlin [Tue, 26 Jan 2010 12:39:41 +0000 (12:39 +0000)] 
Try to prevent users from forgetting to include wx.rc from their resources.

Document that some of the standard cursors are defined in this file.

Also add a (hopefully) helpful assert if loading one of such cursors failed.

Closes #11424.

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

14 years agoDon't pass logs at unknown levels to wxLog::DoLogRecord() from wxLogGui.
Vadim Zeitlin [Tue, 26 Jan 2010 12:33:34 +0000 (12:33 +0000)] 
Don't pass logs at unknown levels to wxLog::DoLogRecord() from wxLogGui.

This results in an assert in DoLogText() which is not implemented in the base
class but ends up being called as DoLogTextAtLevel() doesn't know how to
handle non-standard log levels otherwise. This assert happened if you simply
called wxLogMessage(wxLOG_User, ...) in the program.

Just ignore messages at unknown log levels instead in wxLogGui, by definition
it can't handle them anyhow.

See also r63167.

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

14 years agoAnother compilation fix for wxMSW without PCH.
Vadim Zeitlin [Tue, 26 Jan 2010 12:33:01 +0000 (12:33 +0000)] 
Another compilation fix for wxMSW without PCH.

Need to include <commctrl.h> as we use HIMAGELIST and related functions now.

See #11595.

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

14 years agoImplement RequestUserAttention() for wxOSX/Cocoa.
Vadim Zeitlin [Tue, 26 Jan 2010 12:16:44 +0000 (12:16 +0000)] 
Implement RequestUserAttention() for wxOSX/Cocoa.

Simply use NSApplication:requestUserAttention to do it.

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

14 years agoCompilation fixes for PCH-less build after ownerdraw-refactor branch merge.
Vadim Zeitlin [Tue, 26 Jan 2010 09:01:13 +0000 (09:01 +0000)] 
Compilation fixes for PCH-less build after ownerdraw-refactor branch merge.

Forward declare more classes, in particular use tagRECT which can be forward
declared, instead of RECT typedef in public headers.

Also include more header in #ifndef WX_PRECOMP case.

See #11595.

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

14 years agoAvoid g++ warning about unhandled wxFONTFAMILY_XXX value in a switch.
Vadim Zeitlin [Tue, 26 Jan 2010 09:01:08 +0000 (09:01 +0000)] 
Avoid g++ warning about unhandled wxFONTFAMILY_XXX value in a switch.

Add wxFONTFAMILY_UNKNOWN case to the switch as it will allow us to be warned
if we add a new family in the future and forget to update this code to take it
into account.

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

14 years agoNo real changes, just don't initialize extern variable to avoid g++ warning.
Vadim Zeitlin [Tue, 26 Jan 2010 09:01:02 +0000 (09:01 +0000)] 
No real changes, just don't initialize extern variable to avoid g++ warning.

g++ warns about initialized extern variables so separate the declaration from
the initialization to avoid this warning.

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

14 years agoMake wxWindow::MSWGetThemeColour() const.
Vadim Zeitlin [Tue, 26 Jan 2010 09:00:55 +0000 (09:00 +0000)] 
Make wxWindow::MSWGetThemeColour() const.

There doesn't seem to be any reason for this method to not be const.

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

14 years agoCompilation fix for wxUniv.
Vadim Zeitlin [Tue, 26 Jan 2010 09:00:48 +0000 (09:00 +0000)] 
Compilation fix for wxUniv.

We need explicit casts to wxWindow in wxWindowMSW code.

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

14 years agosimplifying code, removing outdated API
Stefan Csomor [Mon, 25 Jan 2010 22:27:42 +0000 (22:27 +0000)] 
simplifying code, removing outdated API

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

14 years agoadding note for correct wheel params
Stefan Csomor [Mon, 25 Jan 2010 22:24:49 +0000 (22:24 +0000)] 
adding note for correct wheel params

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

14 years agoAdded EVT_WIZARD_PAGE_SHOWN event for wxWizard, to give apps
Julian Smart [Mon, 25 Jan 2010 18:48:21 +0000 (18:48 +0000)] 
Added EVT_WIZARD_PAGE_SHOWN event for wxWizard, to give apps
a chance to initiate processing after a page is presented.

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

14 years agobetter wheel support
Stefan Csomor [Mon, 25 Jan 2010 17:12:53 +0000 (17:12 +0000)] 
better wheel support

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

14 years agomake sure we can override GetModality
Stefan Csomor [Mon, 25 Jan 2010 17:12:07 +0000 (17:12 +0000)] 
make sure we can override GetModality

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

14 years agoadding wxWindow::Show in order to make the sheet showing its children as well
Stefan Csomor [Mon, 25 Jan 2010 13:27:59 +0000 (13:27 +0000)] 
adding wxWindow::Show in order to make the sheet showing its children as well

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

14 years agofixing building on iphone
Stefan Csomor [Mon, 25 Jan 2010 13:26:36 +0000 (13:26 +0000)] 
fixing building on iphone

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

14 years agoUpdate compile support for OpenVMS
Jouk Jansen [Mon, 25 Jan 2010 11:32:19 +0000 (11:32 +0000)] 
Update compile support for OpenVMS

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

14 years agoFix mistake, though this assert is unfortunate since now FindString("whatever") will...
Kevin Ollivier [Sun, 24 Jan 2010 23:28:32 +0000 (23:28 +0000)] 
Fix mistake, though this assert is unfortunate since now FindString("whatever") will always assert under OS X Cocoa, even when it would find and return the position correctly.

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

14 years agosupporting auto-rotate for translucent statusbar
Stefan Csomor [Sun, 24 Jan 2010 19:09:20 +0000 (19:09 +0000)] 
supporting auto-rotate for translucent statusbar

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

14 years agoCompilation fix after ownerdraw-refactor branch merge.
Vadim Zeitlin [Sun, 24 Jan 2010 14:15:12 +0000 (14:15 +0000)] 
Compilation fix after ownerdraw-refactor branch merge.

Don't use HDC in public headers, it may not be declared there. Use WXHDC
instead even if this means having ugly casts.

This fixed mingw32 compilation (see #11595).

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

14 years agoFixed dialog units <-> pixels conversion.
Václav Slavík [Sun, 24 Jan 2010 11:51:09 +0000 (11:51 +0000)] 
Fixed dialog units <-> pixels conversion.

The computation is now identical to Windows native one. To achieve this,
MSDN-recommended GetTextExtent() call is used instead of GetCharWidth().
wxMulDivInt32() is used instead of integer arithmetics to achieve
correct rounding.

Use toplevel parent's font instead of window's own. This makes more
sense, as dialog units are defined for TLWs, not individual subcontrols.

Also fixed wxMSW's wxButton::GetDefaultSize() to compute dialog units
correctly.

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

14 years agoDetermine wxButton size correctly in wxMSW.
Václav Slavík [Sun, 24 Jan 2010 11:51:00 +0000 (11:51 +0000)] 
Determine wxButton size correctly in wxMSW.

Instead of using default size for default GUI font, use the default font
for this dialog's current font.

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

14 years agoFix bug in wxStringOutputStream unit test.
Vadim Zeitlin [Sun, 24 Jan 2010 11:33:24 +0000 (11:33 +0000)] 
Fix bug in wxStringOutputStream unit test.

We wrote an extra NUL byte to the stream and, unsurprisingly, contents of its
buffer didn't match the original string resulting in the test failure.

Also get rid of a #if wxUSE_UNICODE.

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

14 years agoOverride IsSeekable() in wxString{Input,Output}Stream to return true.
Vadim Zeitlin [Sun, 24 Jan 2010 11:33:17 +0000 (11:33 +0000)] 
Override IsSeekable() in wxString{Input,Output}Stream to return true.

These streams are seekable but somehow IsSeekable() was never overridden for
them resulting in test failures in Input_SeekI().

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

14 years agoDocument that wxComboBox::Dismiss() and Popup() generate events.
Vadim Zeitlin [Sun, 24 Jan 2010 11:33:11 +0000 (11:33 +0000)] 
Document that wxComboBox::Dismiss() and Popup() generate events.

Currently these functions generate events in both of the existing
implementations (GTK and MSW) so it is simpler to let them to continue to do
it but this must at least be documented as this is probably unexpected by
users.

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

14 years agoCorrect UTF-32BE BOM detection in wxConvAuto.
Vadim Zeitlin [Sun, 24 Jan 2010 10:13:45 +0000 (10:13 +0000)] 
Correct UTF-32BE BOM detection in wxConvAuto.

On the fly detection of the BOM was wrongly implemented for UTF-32BE in
r63064 and returned BOM_None for it if we tried to read exactly 2 bytes.

Fix this by returning BOM_Unknown if the first 2 bytes are NUL.

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

14 years agoCorrect bug with returning 0 for non-empty input from wxConvAuto::ToWChar().
Vadim Zeitlin [Sun, 24 Jan 2010 10:13:40 +0000 (10:13 +0000)] 
Correct bug with returning 0 for non-empty input from wxConvAuto::ToWChar().

Since the changes of r63064 we could return 0 when asked to convert a
non-empty buffer containing only a BOM. This confused the logic in
wxTextInputStream::NextChar() and was generally unexpected so now return
wxCONV_FAILED in this case.

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

14 years agoCheck the result of ToWChar() call in wxTextInputStream::NextChar() better.
Vadim Zeitlin [Sun, 24 Jan 2010 10:13:33 +0000 (10:13 +0000)] 
Check the result of ToWChar() call in wxTextInputStream::NextChar() better.

The logic in this function depends on ToWChar() working correctly so check
that it doesn't return obviously wrong results, e.g. 0 output length for
non-empty input. This was mostly done to detect the problem in wxConvAuto
currently but it could also be useful with user-defined conversions and
shouldn't have a big performance effect on wxTextInputStream so leave these
checks in to facilitate debugging in the future.

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

14 years agoReplace wxLogWarning()s in wxOSX wxComboBox code with asserts.
Vadim Zeitlin [Sun, 24 Jan 2010 09:13:40 +0000 (09:13 +0000)] 
Replace wxLogWarning()s in wxOSX wxComboBox code with asserts.

This incidentally fixes compilation when not using PCH as wx/log.h was not
included but is also more correct as the messages meant for the programmer,
and not the user, should be given using asserts and not wxLog.

Also correct some asserts messages. In particular, don't mention the function
name in the message itself as it's already shown by the assert and using it in
the string itself isn't useful and simply introduces the risk of forgetting to
update it after refactoring, as happened here in r63105.

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

14 years agoAdd wxComboBox::Popup() and Dismiss() to manually show or hide its popup.
Vadim Zeitlin [Sun, 24 Jan 2010 01:00:45 +0000 (01:00 +0000)] 
Add wxComboBox::Popup() and Dismiss() to manually show or hide its popup.

Add implementations for wxMSW and wxGTK.

Closes #11506.

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

14 years agoNo changes, just remove the strange "#if 1".
Vadim Zeitlin [Sun, 24 Jan 2010 01:00:33 +0000 (01:00 +0000)] 
No changes, just remove the strange "#if 1".

This was apparently unintentionally added in r15050 to all files of the
widgets sample and somehow survived in this one only until now.

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

14 years agoFix sending of wxEVT_COMMAND_LIST_COL_DRAGGING events in wxMSW wxListCtrl.
Vadim Zeitlin [Sun, 24 Jan 2010 01:00:27 +0000 (01:00 +0000)] 
Fix sending of wxEVT_COMMAND_LIST_COL_DRAGGING events in wxMSW wxListCtrl.

We were not getting HDN_TRACK from the system because apparently it is not
sent for header controls with HDS_FULLDRAG style which is used by default by
the native list control. A possible solution would be to forcefully unset this
style but this would make the UI look old fashioned and less intuitive so
instead send these DRAGGING events from HDN_ITEMCHANGING.

Closes #9471,

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

14 years agoMove wx/evtloop.h from GUI_CMN_HDR to BASE_CMN_HDR in files.bkl.
Vadim Zeitlin [Sun, 24 Jan 2010 01:00:20 +0000 (01:00 +0000)] 
Move wx/evtloop.h from GUI_CMN_HDR to BASE_CMN_HDR in files.bkl.

And rebake.

Now that wxEventLoop can be used in wxBase as well, we need this file to be
installed as part of wxBase too.

Closes #11617.

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

14 years agoFix wxHTTPStream::Eof() to return true for empty HTTP resources.
Vadim Zeitlin [Sun, 24 Jan 2010 01:00:03 +0000 (01:00 +0000)] 
Fix wxHTTPStream::Eof() to return true for empty HTTP resources.

Eof() never returned true when attempting to read an empty resource before.

Closes #11596.

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

14 years agoUse a helper wxNEEDS_DECL_BEFORE_TEMPLATE symbol in wxStrcoll() workaround.
Vadim Zeitlin [Sun, 24 Jan 2010 00:59:56 +0000 (00:59 +0000)] 
Use a helper wxNEEDS_DECL_BEFORE_TEMPLATE symbol in wxStrcoll() workaround.

The condition for which this workaround is needed has already changed once
(see #11605) and may change again in the future as we test with more compilers
so use a symbolic name for it.

No real changes otherwise.

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

14 years agoApply workaround for wxStrcoll() template for g++ to 3.4 too.
Vadim Zeitlin [Sun, 24 Jan 2010 00:59:49 +0000 (00:59 +0000)] 
Apply workaround for wxStrcoll() template for g++ to 3.4 too.

At least mingw32 version of g++ 3.4.5 needs the same workaround to be able to
compile wx.

Closes #11605.

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

14 years agoFix for generic implementation.
Kevin Ollivier [Sat, 23 Jan 2010 22:45:24 +0000 (22:45 +0000)] 
Fix for generic implementation.

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

14 years agoFix for non-Mac builds.
Kevin Ollivier [Sat, 23 Jan 2010 21:17:19 +0000 (21:17 +0000)] 
Fix for non-Mac builds.

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

14 years agoRemove assert that was used during testing while changing style flags.
Kevin Ollivier [Sat, 23 Jan 2010 20:10:17 +0000 (20:10 +0000)] 
Remove assert that was used during testing while changing style flags.

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

14 years agoStart on ShowWindowModal for OS X Cocoa. Not working properly as children do not...
Kevin Ollivier [Sat, 23 Jan 2010 20:06:48 +0000 (20:06 +0000)] 
Start on ShowWindowModal for OS X Cocoa. Not working properly as children do not display.

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

14 years agoAdd virtual wxSizer::DoInsert() to replace Insert().
Vadim Zeitlin [Sat, 23 Jan 2010 13:44:46 +0000 (13:44 +0000)] 
Add virtual wxSizer::DoInsert() to replace Insert().

This allows to avoid problems with hiding all but the overridden overloads of
Insert() in wxSizer-derived classes, see #11616, without having to explicitly
write any using statements.

Keep Insert(size_t, wxSizerItem) virtual to allow the existing code overriding
it to keep working.

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

14 years agoAllow to not create wxPaintDC in EVT_PAINT handler in wxMSW.
Vadim Zeitlin [Sat, 23 Jan 2010 13:22:25 +0000 (13:22 +0000)] 
Allow to not create wxPaintDC in EVT_PAINT handler in wxMSW.

Failure to create a wxPaintDC in EVT_PAINT handler resulted in many serious
and difficult to debug problems under wxMSW. We used to document that the user
shouldn't do it but this wasn't enough (see #11648). We could also assert if
we detected that a handler didn't create a wxPaintDC but it seems better to
just handle this case gracefully for consistency with the other platforms.

Add wxDidCreatePaintDC global variable which is reset before generating
wxPaintEvent and set to true when ::BeginPaint() is called from wxPaintDC
ctor and validate the update region of the window ourselves if it wasn't set
(meaning that wxPaintDC wasn't created).

Update the documentation to emphasize the link between EVT_PAINT handlers and
wxPaintDC but without saying that wxPaintDC object must always be created in
the handler as this is not true any more.

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

14 years agoDon't crash when input is empty in wxFileConfig(wxInputStream) ctor.
Vadim Zeitlin [Sat, 23 Jan 2010 13:22:14 +0000 (13:22 +0000)] 
Don't crash when input is empty in wxFileConfig(wxInputStream) ctor.

Fix crash due to dereferencing a NULL pointer when the input buffer in
wxFileConfig ctor is empty.

Closes #11636.

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

14 years agoFix off by 1 errors in owner-drawn menu drawing code in wxMSW.
Vadim Zeitlin [Sat, 23 Jan 2010 13:22:07 +0000 (13:22 +0000)] 
Fix off by 1 errors in owner-drawn menu drawing code in wxMSW.

The label was offset by 1 pixel vertically and the check marks were 1 pixel
too wide compared to the native ones under XP, correct this.

Closes #11420 (again).

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

14 years agoImprove wxCheckListBox appearance under Vista/Win7.
Vadim Zeitlin [Sat, 23 Jan 2010 13:22:00 +0000 (13:22 +0000)] 
Improve wxCheckListBox appearance under Vista/Win7.

Fix the items alignment and also code cleanup: fix indentation, remove magic
numbers &c.

Closes #10286.

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

14 years agoCorrect drawing of check marks for owner-drawn items without bitmaps.
Vadim Zeitlin [Sat, 23 Jan 2010 13:21:52 +0000 (13:21 +0000)] 
Correct drawing of check marks for owner-drawn items without bitmaps.

Standard check mark was not drawn correctly for check/radio items without
bitmaps.

Closes #11480.

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

14 years agoCorrect alignment of menu accelerator strings in owner-drawn menus.
Vadim Zeitlin [Sat, 23 Jan 2010 13:21:46 +0000 (13:21 +0000)] 
Correct alignment of menu accelerator strings in owner-drawn menus.

Draw them right-aligned as the native menus do.

Closes #11479.

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

14 years agoUse theme functions for drawing owner-drawn menus.
Vadim Zeitlin [Sat, 23 Jan 2010 13:21:36 +0000 (13:21 +0000)] 
Use theme functions for drawing owner-drawn menus.

This makes the menu items with custom attributes or bitmaps look more native,
especially on post-XP systems.

Closes #11420.

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

14 years agoFix calculation of the margins for owner-drawn menu items.
Vadim Zeitlin [Sat, 23 Jan 2010 13:21:27 +0000 (13:21 +0000)] 
Fix calculation of the margins for owner-drawn menu items.

Take into account the widths of the bitmaps properly.

Closes #11268.

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

14 years agoSet up menu bitmaps correctly for checkable items.
Vadim Zeitlin [Sat, 23 Jan 2010 13:21:20 +0000 (13:21 +0000)] 
Set up menu bitmaps correctly for checkable items.

We must not set MENUITEMINFO::hbmpItem for the checkable items as it would
then be used for both checked and unchecked state.

Closes #11244.

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

14 years agoRefactor owner-drawing code.
Vadim Zeitlin [Sat, 23 Jan 2010 13:21:12 +0000 (13:21 +0000)] 
Refactor owner-drawing code.

Only keep common code in the base class and extract all menu/listbox-specific
stuff into derived classes.

This makes the code cleaner and more maintainable but introduces some problems
in wxCheckListBox appearance which will be fixed by the next patch.

Closes #10635.

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

14 years agoReturn old, not new, selection from wxMSW wxNotebook::ChangeSelection().
Vadim Zeitlin [Sat, 23 Jan 2010 13:20:54 +0000 (13:20 +0000)] 
Return old, not new, selection from wxMSW wxNotebook::ChangeSelection().

The function is documented to return the old selection and not the new one, so
correct it to behave as expected.

Closes #11646.

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

14 years agoCorrection on previous commit: statement order corrected
Jouk Jansen [Fri, 22 Jan 2010 15:52:20 +0000 (15:52 +0000)] 
Correction on previous commit: statement order corrected

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

14 years agoGet wxDC defined when nescessary
Jouk Jansen [Fri, 22 Jan 2010 07:55:26 +0000 (07:55 +0000)] 
Get wxDC defined when nescessary

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

14 years agoHandle the case of NSNotFound result properly.
Kevin Ollivier [Wed, 20 Jan 2010 02:07:22 +0000 (02:07 +0000)] 
Handle the case of NSNotFound result properly.

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

14 years agoDisable size grip for TLW status bar if TLW is not resizeable.
Vadim Zeitlin [Wed, 20 Jan 2010 00:17:08 +0000 (00:17 +0000)] 
Disable size grip for TLW status bar if TLW is not resizeable.

wxSTB_SIZEGRIP is part of default status bar style but it doesn't make sense
for non-resizeable TLWs, so turn it off in this case.

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

14 years agoFix wxMulDivInt32() to round the result like win32 MulDiv() does.
Václav Slavík [Tue, 19 Jan 2010 22:02:59 +0000 (22:02 +0000)] 
Fix wxMulDivInt32() to round the result like win32 MulDiv() does.

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

14 years agoMake ConvertPixelsToDialog() and ConvertDialogToPixels() const.
Václav Slavík [Tue, 19 Jan 2010 17:53:29 +0000 (17:53 +0000)] 
Make ConvertPixelsToDialog() and ConvertDialogToPixels() const.

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

14 years agoDon't query metrics that won't be used.
Václav Slavík [Tue, 19 Jan 2010 16:32:31 +0000 (16:32 +0000)] 
Don't query metrics that won't be used.

If ConvertPixelsToDialog() or ConvertDialogToPixels() was called with
one of the two input values set to -1, the respective font metric was
queried needlessly.

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

14 years agoSupport XHTML &apos; entity.
Václav Slavík [Tue, 19 Jan 2010 14:47:20 +0000 (14:47 +0000)] 
Support XHTML &apos; entity.

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

14 years agoFurther enhancement to the samples overview page.
Vadim Zeitlin [Tue, 19 Jan 2010 13:49:12 +0000 (13:49 +0000)] 
Further enhancement to the samples overview page.

Add links to samples sources in svn to all the individual samples and be even
more explicit about their location on the local disk.

Move the paragraph explaining the samples location further below -- but <hr>
still doesn't work somehow.

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

14 years agoExplain the location of samples better in the samples overview page.
Vadim Zeitlin [Tue, 19 Jan 2010 13:02:21 +0000 (13:02 +0000)] 
Explain the location of samples better in the samples overview page.

Don't mention controls sample, just the widgets one, as the latter is much
richer and easier to understand.

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

14 years agoDon't set initial size as min size for top level windows in wxMSW.
Vadim Zeitlin [Tue, 19 Jan 2010 13:02:14 +0000 (13:02 +0000)] 
Don't set initial size as min size for top level windows in wxMSW.

This was accidentally done because wxWindowBase::CreateBase() didn't recognize
the window as being top level as it was called before the window was appended
to wxTopLevelWindows list.

Fix this by doing the same thing wxGTK already did: just call
wxTopLevelWindows.Append() before CreateBase().

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

14 years agoAdd wxThreadEvent::SetPayload<T>().
Václav Slavík [Tue, 19 Jan 2010 13:01:40 +0000 (13:01 +0000)] 
Add wxThreadEvent::SetPayload<T>().

This makes it possible to easily pass custom data between threads, in
type-safe way (thanks to internal use of wxAny). This adds
sizeof(wxAny)==16+sizeof(void*) overhead to wxThreadEvent, but I think
it's cheaper than doing malloc/free on copying.

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

14 years agoDon't make full copy of string in wxThreadEvent::Clone().
Václav Slavík [Tue, 19 Jan 2010 13:01:33 +0000 (13:01 +0000)] 
Don't make full copy of string in wxThreadEvent::Clone().

It's enough to do it once to ensure thread-safety. Doing it twice (once
in copy ctor called by Clone(), once in Clone() itself) only wastes
time.

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

14 years agomoving GetPageInfo to later stage, closes #11494
Stefan Csomor [Mon, 18 Jan 2010 11:05:27 +0000 (11:05 +0000)] 
moving GetPageInfo to later stage, closes #11494

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

14 years agoswitching to LaunchServices implementation, fixes #11508
Stefan Csomor [Mon, 18 Jan 2010 10:56:17 +0000 (10:56 +0000)] 
switching to LaunchServices implementation, fixes #11508

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