wxWidgets.git
12 years agoremove unneeded gdk_window_get_pointer() call
Paul Cornett [Fri, 12 Aug 2011 05:45:59 +0000 (05:45 +0000)] 
remove unneeded gdk_window_get_pointer() call

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

12 years agopass proper window to gdk_window_get_pointer(), NULL does not work with GTK3
Paul Cornett [Fri, 12 Aug 2011 05:33:59 +0000 (05:33 +0000)] 
pass proper window to gdk_window_get_pointer(), NULL does not work with GTK3

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

12 years agoUse separate strings for stock labels with and without mnemonics.
Vadim Zeitlin [Thu, 11 Aug 2011 10:56:05 +0000 (10:56 +0000)] 
Use separate strings for stock labels with and without mnemonics.

Obtaining the string without mnemonics by simply removing "&" characters from
the string containing mnemonics doesn't work for some languages, notably
Chinese where the convention is to use "Chinese Text (&M)" for the labels with
"M" being the ASCII mnemonic and just "Chinese Text" and not "Chinese Text (M)"
should be used if wxSTOCK_WITH_MNEMONIC flag is not specified.

Fix the fundamental problem by using separate strings for the two cases.
Translations still need to be updated to really correct the labels appearance.

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

12 years agoFixed wxOSX build.
Dimitri Schoolwerth [Thu, 11 Aug 2011 00:39:18 +0000 (00:39 +0000)] 
Fixed wxOSX build.

Since r68621 dataview.cpp didn't compile anymore (at least with wxOSX-Carbon). Fixed by explicitly using wxDataViewItem's void * constructor in a few cases.

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

12 years agoBasque translations update from Xabier Aramendi.
Vadim Zeitlin [Wed, 10 Aug 2011 21:57:05 +0000 (21:57 +0000)] 
Basque translations update from Xabier Aramendi.

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

12 years agoAdd some basic tests for wxDataViewCtrl selection handling.
Václav Slavík [Wed, 10 Aug 2011 15:24:25 +0000 (15:24 +0000)] 
Add some basic tests for wxDataViewCtrl selection handling.

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

12 years agoFix selection handling wxDataViewMainWindow::ItemDeleted().
Václav Slavík [Wed, 10 Aug 2011 15:24:19 +0000 (15:24 +0000)] 
Fix selection handling wxDataViewMainWindow::ItemDeleted().

The code to update m_selection was too aggressive in the virtual list
case, when it simply cleared it, and broken for single-item selection in
the general case.
Fixed to recompute selection properly.

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

12 years agoMake the wxDataViewItem(void*) constructor explicit.
Václav Slavík [Wed, 10 Aug 2011 15:21:22 +0000 (15:21 +0000)] 
Make the wxDataViewItem(void*) constructor explicit.

Not having this as an implicit one made it possible to create
wxDataViewItem from any pointer without realizing it, leading to hard to
debug crashes later.

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

12 years agoAdded the ability to deselect attributes in the font dialog
Julian Smart [Wed, 10 Aug 2011 14:06:28 +0000 (14:06 +0000)] 
Added the ability to deselect attributes in the font dialog

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

12 years agoAdded NSApplicationDelegate's openFiles for wxOSX-Cocoa.
Dimitri Schoolwerth [Tue, 9 Aug 2011 22:17:12 +0000 (22:17 +0000)] 
Added NSApplicationDelegate's openFiles for wxOSX-Cocoa.

openFiles (available since OS X 10.3) replaces using the openFile method. It allows for more convenient handling of multiple drops and knowing in advance how much files/folders are dropped instead of openFile with which you only get to respond to a single file/folder drop at a time. By default openFiles calls the newly added MacOpenFiles which calls MacOpenFile multiple times, so ordinarily the behaviour is backwards compatible (both on wxOSX Cocoa and Carbon).

The openFile instance method has been removed because it doesn't seem to be called anymore: neither when dropping a single file on the application in the dock or Finder nor when passed as a command-line argument.

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

12 years agoDon't reset wxTLW::m_iconized when hiding the window in wxMSW.
Vadim Zeitlin [Tue, 9 Aug 2011 15:46:28 +0000 (15:46 +0000)] 
Don't reset wxTLW::m_iconized when hiding the window in wxMSW.

Calling Hide() on an iconized window wrongly reset its m_iconized flag but
hiding the window shouldn't affect it.

Closes #13373.

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

12 years agoDon't use iterators with wxDataViewSelection.
Václav Slavík [Tue, 9 Aug 2011 11:35:32 +0000 (11:35 +0000)] 
Don't use iterators with wxDataViewSelection.

They aren't implemented when using wx's homegrown sorted containers
and adding support is probably more trouble than it's worth.

Fixes #13388.

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

12 years agoNo changes, just correct the helpview sample name in comment.
Vadim Zeitlin [Tue, 9 Aug 2011 11:25:09 +0000 (11:25 +0000)] 
No changes, just correct the helpview sample name in comment.

"printing.cpp" was used for whatever reason.

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

12 years agoDon't manually centre dialogs created with default position in wxMSW.
Vadim Zeitlin [Mon, 8 Aug 2011 15:15:50 +0000 (15:15 +0000)] 
Don't manually centre dialogs created with default position in wxMSW.

We always centered the dialogs on the main display which was wrong if the
parent window was on another one. Instead of fixing it, simply don't centre
them at all and let Windows position them, there is no reason to change the
default behaviour.

Closes #13387.

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

12 years agoCheck for invalid items in generic wxDataViewCtrl::GetSelections().
Václav Slavík [Mon, 8 Aug 2011 10:23:19 +0000 (10:23 +0000)] 
Check for invalid items in generic wxDataViewCtrl::GetSelections().

This shouldn't normally happen, but if some bug causes it, detect it.

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

12 years agoRemove selection methods taking int from generic wxDataViewCtrl.
Václav Slavík [Mon, 8 Aug 2011 10:11:04 +0000 (10:11 +0000)] 
Remove selection methods taking int from generic wxDataViewCtrl.

Current public API uses wxDataViewItem, this code dated back to 2.8.
They were now protected instead of public, the code wasn't used
anywhere and wasn't portable, it existed only in the generic version.

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

12 years agoAdded wxTopLevelWindow::MSWGetSystemMenu() method.
Vadim Zeitlin [Mon, 8 Aug 2011 09:32:42 +0000 (09:32 +0000)] 
Added wxTopLevelWindow::MSWGetSystemMenu() method.

Also generate events corresponding to WM_SYSCOMMAND messages for the custom
items of the system menu.

Add a small snippet to test the new functionality to the dialogs sample.

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

12 years agoAdded private wxMenu::MSWNewFromHMENU() method.
Vadim Zeitlin [Mon, 8 Aug 2011 09:32:39 +0000 (09:32 +0000)] 
Added private wxMenu::MSWNewFromHMENU() method.

Add a method allowing creation of a wxMenu object from a native menu handle.
This will be used to implement access to the system menu in an upcoming commit
but could also be useful for other purposes.

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

12 years agoFix compilation with g++ 4.7 (prerelease).
Vadim Zeitlin [Mon, 8 Aug 2011 08:33:19 +0000 (08:33 +0000)] 
Fix compilation with g++ 4.7 (prerelease).

The workaround for a bug in g++ 3.5 breaks compilation with 4.7 which
implements two-phase lookup correctly, so disable this workaround for 4.7 and
later. We could probably even only enable it for 3.x but this doesn't really
matter as previous 4.x releases don't have problems with this anyhow.

Closes #13385.

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

12 years agoUse 0 instead of NULL to avoid g++ warning.
Vadim Zeitlin [Sun, 7 Aug 2011 19:31:52 +0000 (19:31 +0000)] 
Use 0 instead of NULL to avoid g++ warning.

g++ (usefully) warns when assigning NULL to a non-pointer in wxGDIPlusRenderer.

Just use 0 instead of NULL to avoid the warning.

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

12 years agoUse ChangeCurrentRow() in wxDataViewMainWindow::ItemDeleted().
Václav Slavík [Sun, 7 Aug 2011 17:29:50 +0000 (17:29 +0000)] 
Use ChangeCurrentRow() in wxDataViewMainWindow::ItemDeleted().

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

12 years agoClean up wxDataViewMainWindow::ItemDeleted() a bit.
Václav Slavík [Sun, 7 Aug 2011 17:29:47 +0000 (17:29 +0000)] 
Clean up wxDataViewMainWindow::ItemDeleted() a bit.

Reuse shared code instead of duplicating it. No real changes.

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

12 years agowxDataViewSelection private type doesn't need to be exported.
Václav Slavík [Sun, 7 Aug 2011 17:29:44 +0000 (17:29 +0000)] 
wxDataViewSelection private type doesn't need to be exported.

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

12 years agoRemove unused ItemList type from datavgen.cpp.
Václav Slavík [Sun, 7 Aug 2011 17:29:41 +0000 (17:29 +0000)] 
Remove unused ItemList type from datavgen.cpp.

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

12 years agoImplement wxFileType::GetOpenCommand() in wxOSX.
Vadim Zeitlin [Fri, 5 Aug 2011 19:02:26 +0000 (19:02 +0000)] 
Implement wxFileType::GetOpenCommand() in wxOSX.

This method used to work in 2.8 but was unimplemented in 2.9.

Restore more or less the old implementation using the data that we already
have in wxMimeTypesManager anyhow.

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

12 years agoAdd support for wxHELP button to wxMessageDialog.
Vadim Zeitlin [Thu, 4 Aug 2011 22:53:42 +0000 (22:53 +0000)] 
Add support for wxHELP button to wxMessageDialog.

Implement support for wxHELP for wxMSW, wxGTK and wxOSX/Cocoa (at least when
showing the message box from the main thread, there doesn't seem to be any way
to show more than three buttons with CFUserNotificationDisplayAlert() so
"Help" button is not supported when using it).

This is useful not only on its own, i.e. to allow the user to ask for help,
but also because it brings the total number of buttons supported by the
message dialog to 4, meaning that more choices can be offered to the user
(which is rarely, but not quite never, useful).

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

12 years agoAdd missing header for minimalistic builds not using PCH.
Vadim Zeitlin [Thu, 4 Aug 2011 16:12:41 +0000 (16:12 +0000)] 
Add missing header for minimalistic builds not using PCH.

wxWindow might not be fully declared in dcbase.cpp but we need its full
declaration for wxDCImpl::InheritAttributes() so explicitly include
wx/window.h -- while this is usually already included from somewhere else it
might not be in minimal builds with a lot of features disabled.

Closes #13380.

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

12 years agoCompilation fixes for wxUSE_GEOMETRY==0 build.
Vadim Zeitlin [Thu, 4 Aug 2011 16:12:36 +0000 (16:12 +0000)] 
Compilation fixes for wxUSE_GEOMETRY==0 build.

Add missing wxUSE_GEOMETRY checks to wxAffineMatrix2D-related code.

Closes #13379.

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

12 years agoUse wxWindowMSW instead of wxWindow to fix wxUniv/MSW compilation.
Vadim Zeitlin [Thu, 4 Aug 2011 16:12:31 +0000 (16:12 +0000)] 
Use wxWindowMSW instead of wxWindow to fix wxUniv/MSW compilation.

wxFindWindowAtPoint() only returns wxWindowMSW, not the derived wxWindow, in
wxUniv build so assign its return value to wxWindowMSW to avoid compilation
problems in it.

Closes #12534.

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

12 years agoAvoid unwanted line break in wxDataViewListModel::GetCount() docs.
Vadim Zeitlin [Thu, 4 Aug 2011 13:19:57 +0000 (13:19 +0000)] 
Avoid unwanted line break in wxDataViewListModel::GetCount() docs.

Using "i.e." in the brief Doxygen comment makes it end it after the second
period and results in truncated brief description and an unwanted line break
in the full description.

Just avoid using periods for now inside the brief description. Maybe a better
solution could be found in the future.

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

12 years agoAdded Page Break control to spacing page
Julian Smart [Thu, 4 Aug 2011 12:31:44 +0000 (12:31 +0000)] 
Added Page Break control to spacing page

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

12 years agoReturn sensible major and minor version numbers for Mac OS X
Julian Smart [Wed, 3 Aug 2011 15:46:43 +0000 (15:46 +0000)] 
Return sensible major and minor version numbers for Mac OS X

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

12 years agoOutline and line spacing can now be reset via the UI; format dialog layout improvements
Julian Smart [Wed, 3 Aug 2011 11:41:17 +0000 (11:41 +0000)] 
Outline and line spacing can now be reset via the UI; format dialog layout improvements

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

12 years agoFix bug with TAB being able to switch focus between MDI frames.
Vadim Zeitlin [Wed, 3 Aug 2011 00:45:42 +0000 (00:45 +0000)] 
Fix bug with TAB being able to switch focus between MDI frames.

The keyboard navigation code correctly checked that TAB was not propagated
above the TLW containing the window in which the key was pressed to avoid
switching focus between different TLWs by pressing TAB.

However wxMDIChildFrame is not a TLW and so it was possible to switch focus
between two different MDI child frames by pressing TAB. This was unexpected
and counterintuitive, especially because the frame receiving focus was not
even activated (which might be another bug).

Fix this by adding a new wxWindow::IsTopNavigationDomain() virtual method that
can be overridden to indicate that a window is a self-contained "keyboard
navigation domain" and that keyboard events shouldn't propagate outside of it
and override it in both wxTopLevelWindow and wxMDIChildFrame to ensure that it
behaves correctly.

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

12 years agoNo real changes, just rename a variable.
Vadim Zeitlin [Wed, 3 Aug 2011 00:45:38 +0000 (00:45 +0000)] 
No real changes, just rename a variable.

"focussed" spelling is unusual and inconsistent with "focused" used in many
other places in the same file, so renamed "focussed_child_of_parent" and also
use standard camelCase naming convention for it.

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

12 years agoIf -1 is passed to InsertItem for the imageIndex then don't set wxLIST_MASK_IMAGE
Robin Dunn [Tue, 2 Aug 2011 20:23:42 +0000 (20:23 +0000)] 
If -1 is passed to InsertItem for the imageIndex then don't set wxLIST_MASK_IMAGE

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

12 years agoInitialize the native printer info for ConvertFromNative if it hasn't been done already.
Robin Dunn [Tue, 2 Aug 2011 19:49:02 +0000 (19:49 +0000)] 
Initialize the native printer info for ConvertFromNative if it hasn't been done already.

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

12 years agoDon't un-maximize the window when Iconize(false) is called in wxMSW.
Vadim Zeitlin [Tue, 2 Aug 2011 19:46:44 +0000 (19:46 +0000)] 
Don't un-maximize the window when Iconize(false) is called in wxMSW.

Calling Iconize(false) on a maximized window restored it to its normal state
instead of doing nothing as expected.

Return immediately from Iconize() if the requested state is already the
current one to avoid it.

Closes #13373.

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

12 years agoFix wxSocket::WaitForAccept() in blocking mode.
Vadim Zeitlin [Tue, 2 Aug 2011 19:46:40 +0000 (19:46 +0000)] 
Fix wxSocket::WaitForAccept() in blocking mode.

When wxSocket::WaitForAccept() was called from another thread or on a socket
with wxSOCKET_BLOCK flag it didn't work because it called
wxSocketImpl::Select() with wxSOCKET_CONNECTION_FLAG which was only handled
for the client sockets in this function.

Handle it now for the server ones too, this should allow blocking server
sockets to work again.

Closes #12836.

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

12 years agoRemove documentation of non-existent wxTextAttr::CreateFont().
Vadim Zeitlin [Tue, 2 Aug 2011 19:46:35 +0000 (19:46 +0000)] 
Remove documentation of non-existent wxTextAttr::CreateFont().

This method doesn't exist (only GetFont() does), so don't document it.

Closes #13372.

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

12 years agoSilence Clang warning about numeric_limits<> specialization.
Václav Slavík [Sun, 31 Jul 2011 13:25:33 +0000 (13:25 +0000)] 
Silence Clang warning about numeric_limits<> specialization.

libstdc++ (which is used by Clang) defines numeric_limits<> as a struct
and Clang issues a warning about our specialization that uses 'class'.
As libstdc++ developers have no intention of fixing this, silence the
Clang warning by using 'struct' for it.

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

12 years agoDisable symbols visibility support for the Clang compiler.
Václav Slavík [Sun, 31 Jul 2011 13:25:30 +0000 (13:25 +0000)] 
Disable symbols visibility support for the Clang compiler.

Even Clang++ shipped with Xcode 4.1 still can't handle visibility
of non-inline methods in exported template classes if the default
visibility is 'hidden'.

Disable visibility support for Clang for now, we'll revisit it in the future.

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

12 years agoCorrect typo in wxArray::insert() fix of r68468.
Vadim Zeitlin [Sun, 31 Jul 2011 12:19:51 +0000 (12:19 +0000)] 
Correct typo in wxArray::insert() fix of r68468.

A wrong variable was mistakenly used.

Closes #13371.

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

12 years agoFix crash in wxArray::insert() overload taking iterator range.
Vadim Zeitlin [Sat, 30 Jul 2011 23:38:43 +0000 (23:38 +0000)] 
Fix crash in wxArray::insert() overload taking iterator range.

The iterator passed as argument could be invalidated by the function itself,
update it before using it.

Closes #13371.

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

12 years agoGenerate events with WXK_NONE Unicode keys for non-characters in wxOSX.
Vadim Zeitlin [Sat, 30 Jul 2011 21:54:21 +0000 (21:54 +0000)] 
Generate events with WXK_NONE Unicode keys for non-characters in wxOSX.

The keyboard keys not corresponding to real characters, such as cursor arrows
or function keys, must generate wxKeyEvents with WXK_NONE as Unicode key code
to make it possible to distinguish them from the printable characters but
wxOSX generated events with valid Unicode key codes for them instead.

Avoid this by excluding Unicode key codes corresponding to code points in the
Unicode private use area: while this doesn't seem to be documented anywhere,
all non-printable characters seem to have their Unicode representation inside
it.

This change brings wxOSX keyboard event generation in line with the other
ports and, as a side effect, also closes #12423.

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

12 years agoAvoid bogus focus loss event when wxTextCtrl is modified in wxOSX.
Vadim Zeitlin [Sat, 30 Jul 2011 21:54:18 +0000 (21:54 +0000)] 
Avoid bogus focus loss event when wxTextCtrl is modified in wxOSX.

A wxEVT_KILL_FOCUS event was generated when wxTextCtrl::WriteText() was called
in wxOSX, even though the control didn't lose focus at all in this case. This
was completely unexpected and thoroughly confused wxGrid code which closed the
in place editor immediately after showing it because of this (this was perhaps
only the case since r68319 but the changes there were correct so they only
masked the real bug).

Avoid this bogus event by remembering the NSView currently being
programmatically modified and not doing anything in textDidEndEditing
notification if it is generated for this view.

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

12 years agoImprove wxTextCtrl::GetNumberOfLines() unit test and documentation.
Vadim Zeitlin [Sat, 30 Jul 2011 21:54:15 +0000 (21:54 +0000)] 
Improve wxTextCtrl::GetNumberOfLines() unit test and documentation.

First, enable execution of the Lines() wxTextCtrl unit test case under wxOSX
as it passes since the fix in the previous commit.

Do add a test for GetNumberOfLines() that currently doesn't work in the same
way under all platforms -- but with this test we at least can be sure how does
it work exactly where.

Also mention the current discrepancy in this function behaviour in the
documentation.

See #12366.

Fix Lines() wxTextCtrl unit test to pass under wxGTK too.

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

12 years agoFix off by one error in wxTextCtrl::GetLineLength() in wxOSX.
Vadim Zeitlin [Sat, 30 Jul 2011 21:54:08 +0000 (21:54 +0000)] 
Fix off by one error in wxTextCtrl::GetLineLength() in wxOSX.

The trailing new line shouldn't be counted in the line length.

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

12 years agoFix stock accelerators handling in wxOSX.
Vadim Zeitlin [Sat, 30 Jul 2011 21:54:05 +0000 (21:54 +0000)] 
Fix stock accelerators handling in wxOSX.

No modifiers were used for stock accelerators, i.e. Append(wxID_NEW) resulted
in an item with the label "New" and plain "N" as accelerator in wxOSX. This
was due to wxACCEL_CMD not being handled in wxAcceleratorEntry::ToString() so
map it to the same prefix as wxACCEL_CTRL there, this is enough to make the
accelerators work even though it's not clear whether this is really the best
thing to do or if we should use a separate "Cmd+" prefix for it (and recognize
it in Parse() too then) as otherwise it's unclear why do we have wxACCEL_CMD
at all, it just seems to be treated identically to wxACCEL_CTRL everywhere.

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

12 years agoEmphasize that wxStandardPaths must not be created directly.
Vadim Zeitlin [Sat, 30 Jul 2011 17:40:00 +0000 (17:40 +0000)] 
Emphasize that wxStandardPaths must not be created directly.

wxStandardPaths::Get() must be used instead as the correct object to use might
have a different type.

See #11239.

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

12 years agoGet rid of ugly wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST macro.
Vadim Zeitlin [Sat, 30 Jul 2011 11:30:08 +0000 (11:30 +0000)] 
Get rid of ugly wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST macro.

Replace it with wxWindowWithItems<> template class which takes care of
disambiguating between the two inherited Get/SetClientXXX() versions and use
it as a base class in all clases that previously used the macro.

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

12 years agoResolve ambiguity between GetClientXXX() methods in wxOSX wxComboBox.
Vadim Zeitlin [Sat, 30 Jul 2011 11:30:03 +0000 (11:30 +0000)] 
Resolve ambiguity between GetClientXXX() methods in wxOSX wxComboBox.

Use wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST for wxOSX/Cocoa too, not
only for wxOSX/Carbon. This macro adds methods to explicitly disambiguate
between the two inherited versions of each GetClientXXX() method, the one from
wxItemContainer and the other one from wxEvtHandler.

Closes #11637.

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

12 years agoAdd wxTextCtrl::PositionToCoords() functions for wxMSW and wxGTK.
Vadim Zeitlin [Fri, 29 Jul 2011 15:11:54 +0000 (15:11 +0000)] 
Add wxTextCtrl::PositionToCoords() functions for wxMSW and wxGTK.

The new method allows to find the coordinates in pixels of the given character
in a text control.

Closes #13221.

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

12 years agoMention wxGTK wxAnimation implementation limitations in the docs.
Vadim Zeitlin [Tue, 26 Jul 2011 21:37:20 +0000 (21:37 +0000)] 
Mention wxGTK wxAnimation implementation limitations in the docs.

The native GTK implementation doesn't provide information about the frames
count nor access to individual frames.

See #13365.

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

12 years agoCompilation fix: include wx/event.h from wx/containr.h.
Vadim Zeitlin [Tue, 26 Jul 2011 11:31:21 +0000 (11:31 +0000)] 
Compilation fix: include wx/event.h from wx/containr.h.

We now need wxEVT_XXX constants declarations in this file (at least when not
wxHAS_NATIVE_TAB_TRAVERSAL) so include wx/event.h to fix PCH-less build of
wxOSX.

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

12 years agoFixed wxOSX-Cocoa compilation.
Dimitri Schoolwerth [Mon, 25 Jul 2011 23:31:01 +0000 (23:31 +0000)] 
Fixed wxOSX-Cocoa compilation.

OS X' wxComboBox::Init does not exist anymore since r68366 but an implementation still was present in combobox_osx.cpp which is used in Cocoa compilation. Removed the function.

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

12 years agoFixed containr.h compilation with gcc.
Dimitri Schoolwerth [Mon, 25 Jul 2011 22:31:17 +0000 (22:31 +0000)] 
Fixed containr.h compilation with gcc.

At least apple-gcc 4.0 and 4.2 gave a compilation error on the three Connect calls in containr.h, insisting (unless using -fpermissive) on a declaration of Connect because there are no arguments to it that depend on a template parameter. Fixed by prepending BaseWindowClass to the Connect calls. Regression since r68363.

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

12 years agoNo changes, just remove unnecessary wxPickerBase::OnSize().
Vadim Zeitlin [Sun, 24 Jul 2011 22:19:41 +0000 (22:19 +0000)] 
No changes, just remove unnecessary wxPickerBase::OnSize().

This method did the same thing as the base wxWindow class event handler.

Also remove wxPickerBase event table which became empty after removing this
method.

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

12 years agoExclude windows not accepting keyboard focus from GTK focus chain.
Vadim Zeitlin [Sun, 24 Jul 2011 22:19:37 +0000 (22:19 +0000)] 
Exclude windows not accepting keyboard focus from GTK focus chain.

For some reason the test for AcceptsFocusFromKeyboard() wasn't done in the
correct place when constructing the GTK focus chain and even windows returning
false from it were still added to it.

Do not do this any more, this prevents the windows which are really not meant
to be focusable from keyboard (such as the pseudo-buttons in the generic
implementation of wxSearchCtrl) from gaining focus unexpectedly.

See #12808.

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

12 years agoReplace wxControlContainer-related macros with wxNavigationEnabled<>.
Vadim Zeitlin [Sun, 24 Jul 2011 22:19:33 +0000 (22:19 +0000)] 
Replace wxControlContainer-related macros with wxNavigationEnabled<>.

Simply inherit classes which need to provide TAB navigation among their
children from wxNavigationEnabled<> and remove the now unnecessary
WX_DECLARE_CONTROL_CONTAINER() macros.

Also remove WX_INIT_CONTROL_CONTAINER(), WX_DELEGATE_TO_CONTROL_CONTAINER()
and WX_EVENT_TABLE_CONTROL_CONTAINER() which are not needed neither any more.

And remove the event tables which became empty after removing the last macro.

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

12 years agoDon't give focus to wxSearchButton when using keyboard navigation.
Vadim Zeitlin [Sun, 24 Jul 2011 22:19:27 +0000 (22:19 +0000)] 
Don't give focus to wxSearchButton when using keyboard navigation.

The search control buttons don't show that they have focus and are not meant
to have it anyhow as they are more control decorations than real buttons and
their functionality can be activated by pressing "Enter" or "Escape" already
from the keyboard. But giving it to them made TAB behave unexpectedly and
wrongly when wxSearchCtrl had focus.

Override AcceptsFocusFromKeyboard() to return false to correct this.

See #12808.

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

12 years agoUse wxNavigationEnabled<> for keyboard navigation in generic wxSearchCtrl.
Vadim Zeitlin [Sun, 24 Jul 2011 22:19:23 +0000 (22:19 +0000)] 
Use wxNavigationEnabled<> for keyboard navigation in generic wxSearchCtrl.

Derive generic wxSearchCtrl implementation from wxNavigationEnabled<> to
ensure that TAB navigation works correctly in it. While it did work before for
search controls without wxTE_PROCESS_ENTER style (because this wasn't handled
by this control itself at all in fact), it stopped working as soon as this
style was used in wxMSW because then the navigation was implemented by
manually calling wxWindow::Navigate() and this requires wxControlContainer
support.

Use wxNavigationEnabled<> to easily add it to wxSearchCtrl.

See #12808.

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

12 years agoAdd wxNavigationEnabled<> helper for implementing TAB navigation.
Vadim Zeitlin [Sun, 24 Jul 2011 22:19:20 +0000 (22:19 +0000)] 
Add wxNavigationEnabled<> helper for implementing TAB navigation.

Provide a clean, public and documented way to implement proper TAB navigation
for subwindows of a composite control: instead of using various ugly and never
documented WX_XXX_CONTROL_CONTAINER macros it is now enough to simply inherit
from wxNavigationEnabled<BaseClass> to do it.

No real changes in the code as the new class is not used anywhere yet.

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

12 years agoIgnore WM_CLOSE generated by wxMSW edit control when Escape is pressed.
Vadim Zeitlin [Sun, 24 Jul 2011 10:50:51 +0000 (10:50 +0000)] 
Ignore WM_CLOSE generated by wxMSW edit control when Escape is pressed.

Multiline edit control posts WM_CLOSE to its parent window when Escape key is
pressed inside it for some reason. This is unwanted as it totally bypasses our
logic for only closing the dialog when Escape is pressed if there is a
Cancel-like button in it, so suppress this behaviour by not letting the edit
control to get Escape at all.

Closes #12501.

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

12 years agoMention that pages can't be added to wxBookCtrl more than once.
Vadim Zeitlin [Sat, 23 Jul 2011 19:36:47 +0000 (19:36 +0000)] 
Mention that pages can't be added to wxBookCtrl more than once.

Apparently some people expect this to work although it's really not meant to.

See #13209.

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

12 years agoDon't try to pop from an empty stack in wxGDIPlusContext::PopState().
Vadim Zeitlin [Sat, 23 Jul 2011 19:36:43 +0000 (19:36 +0000)] 
Don't try to pop from an empty stack in wxGDIPlusContext::PopState().

Using PopState() without a previous PushState() is an error but it shouldn't
result in a crash, so add an assert guarding against it.

Closes #13197.

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

12 years agoRemove mentions of wxCommandEvent from wxThreadEvent documentation.
Vadim Zeitlin [Sat, 23 Jul 2011 12:01:26 +0000 (12:01 +0000)] 
Remove mentions of wxCommandEvent from wxThreadEvent documentation.

wxThreadEvent doesn't derive from wxCommandEvent any more so don't say that it
does.

Also fix some grammar/wording.

Closes #13359.

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

12 years agoDon't create an unnecessary extra button in wxMSW wxProgressDialog.
Vadim Zeitlin [Sat, 23 Jul 2011 11:59:43 +0000 (11:59 +0000)] 
Don't create an unnecessary extra button in wxMSW wxProgressDialog.

MSWCommonTaskDialogInit() now (probably since r67620) always creates a
IDCANCEL button so don't create another one in wxProgressDialog code, just
ensure that the one created by that function has the correct label (either
"Cancel" or "Close").

Closes #13358.

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

12 years agoSet wxDidCreatePaintDC to true even if we reused a cached wxPaintDC.
Vadim Zeitlin [Fri, 22 Jul 2011 16:53:56 +0000 (16:53 +0000)] 
Set wxDidCreatePaintDC to true even if we reused a cached wxPaintDC.

Reusing a cached wxPaintDC should count as painting the window, otherwise we
could call DefWindowProc(WM_PAINT) if WM_PAINT was generated from inside
EVT_PAINT handler (e.g. by calling wxWindow::Update()) and this validated the
entire window and no painting was really done.

In particular this fixes redrawing of wxStyledTextCtrl which does call
Update() (completely unnecessarily AFAICS) from its EVT_PAINT handler when it
wants to fully refresh itself.

Closes #13345.

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

12 years agoIncreased the version to 2.9.3.
Vadim Zeitlin [Fri, 22 Jul 2011 16:32:07 +0000 (16:32 +0000)] 
Increased the version to 2.9.3.

Simply ran misc/scripts/inc_release and changed build/bakefiles/version.bkl
and rebaked everything afterwards.

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

12 years agoUpdate the files changed by the version number increment script.
Vadim Zeitlin [Fri, 22 Jul 2011 16:31:55 +0000 (16:31 +0000)] 
Update the files changed by the version number increment script.

src/wxWindows.xcodeproj doesn't exist any more so remove it but add
build/tools/bld_chm_exe.bat and samples/minimal/Info*.plist files.

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

12 years agoAdded customizable wxDocManager::OnMRUFileNotExist() virtual method.
Vadim Zeitlin [Fri, 22 Jul 2011 16:16:09 +0000 (16:16 +0000)] 
Added customizable wxDocManager::OnMRUFileNotExist() virtual method.

This method can be overridden to customize the previously hard-coded handling
of the case when a file selected from the MRU menu doesn't exist any more: we
used to always remove it from the file history completely. This may, however,
be inappropriate and, in fact, probably never, or very rarely, is the right
thing to do when the file that we failed to open still exists.

So never remove the file from the MRU if we failed to open an existing file
(also don't give an error about it as it should have been already given by
CreateDocument()) and, while we still do it for the non-existent files, allow
to override this behaviour by overriding the new OnMRUFileNotExist() method.

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

12 years agoSeveral corrections to wxDocManager fields documentation.
Vadim Zeitlin [Fri, 22 Jul 2011 16:16:06 +0000 (16:16 +0000)] 
Several corrections to wxDocManager fields documentation.

Remove non-existent wxDocManager::m_flags.

Added correct m_lastDirectory declaration to go with its documentation instead
of the duplicated m_fileHistory documentation.

Better document the default m_maxDocsOpen value.

Put all the documented fields in protected section as they're really protected
and not public.

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

12 years agoSave and restore file history in docview sample.
Vadim Zeitlin [Fri, 22 Jul 2011 16:16:03 +0000 (16:16 +0000)] 
Save and restore file history in docview sample.

Show how the file history can be saved to and restored from wxConfig.

This makes it much easier to test file history related stuff as the history
doesn't need to be recreated during every sample run.

It is also closer to what real applications using docview framework do as the
file history is relatively useless if it's not saved.

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

12 years agoAllow passing the error value to wxStreamBase::Reset().
Vadim Zeitlin [Fri, 22 Jul 2011 16:16:00 +0000 (16:16 +0000)] 
Allow passing the error value to wxStreamBase::Reset().

It can be useful to induce an error on the stream explicitly, e.g. because an
incorrect value was read from it and we want to indicate it to the caller by
setting stream error to wxSTREAM_READ_ERROR.

Allow to do this by passing an optional error value to wxStreamBase::Reset().

Add an example of using the new functionality to the docview sample which
needs it to be able to signal errors while reading the files.

Also document this method that previously wasn't documented at all.

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

12 years agoFixed Replace() to use the passed range instead of current selection
Julian Smart [Fri, 22 Jul 2011 13:07:40 +0000 (13:07 +0000)] 
Fixed Replace() to use the passed range instead of current selection

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

12 years agoDon't pass spin text control messages processed at wx level to Windows.
Vadim Zeitlin [Fri, 22 Jul 2011 12:49:24 +0000 (12:49 +0000)] 
Don't pass spin text control messages processed at wx level to Windows.

Windows messages handled at wx level shouldn't be processed again at Windows
level but we always passed the events forwarded by spin control "buddy" text
window to its default window proc as we had no way to determine whether they
were really handled or not.

Now we do have a way to do, by using the newly added MSWHandleMessage(), so
only pass the messages to default window proc if they hadn't been handled
already.

This notably suppresses the annoying beep which happened if Enter key was
pressed in a wxSpinCtrl with wxTE_PROCESS_ENTER style (as used by the
corresponding wxDataViewCtrl renderer, for example). It probably corrects some
other bugs/discrepancies with the other ports in event handling in wxSpinCtrl
too.

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

12 years agoRefactor wxWindow::MSWHandleMessage() out from MSWWindowProc().
Vadim Zeitlin [Fri, 22 Jul 2011 12:49:22 +0000 (12:49 +0000)] 
Refactor wxWindow::MSWHandleMessage() out from MSWWindowProc().

This commit just refactors the code without changing anything in its
behaviour and will be followed by the real changes in the next one.

The new function just handles the message, without calling MSWDefWindowProc()
if it wasn't handled. This allows to call it and determine whether the message
was really handled and only continue processing it if it wasn't.

Notice that while in theory this shouldn't be necessary because the return
value of MSWWindowProc() should indicate whether the message was handled or
not (0 meaning that it was, for most messages), in practice it doesn't work
because many standard controls window procs return 0 even for message they do
nothing with, e.g. "up down" control always returns 0 for WM_CHAR messages
even it it only really handles the arrow keys.

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

12 years agoFix double deletion bug in wxGTK wxDVC dnd code.
Vadim Zeitlin [Thu, 21 Jul 2011 13:50:26 +0000 (13:50 +0000)] 
Fix double deletion bug in wxGTK wxDVC dnd code.

The row_draggable callback could blithely delete m_dragDataObject twice as it
didn't reset it to NULL after deleting it the first time. Then, if the object
wasn't changed in the meanwhile, e.g. because dragging was not allowed for
this item, it tried to do it again when called the next time resulting in a
crash.

Closes #12538.

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

12 years agoFix the alignment used by custom wxDVC renderers in wxGTK by default.
Vadim Zeitlin [Thu, 21 Jul 2011 13:50:22 +0000 (13:50 +0000)] 
Fix the alignment used by custom wxDVC renderers in wxGTK by default.

Correctly initialize the alignment used by the text renderer used by
wxDataViewCustomRenderer in wxGTK implementation of wxDataViewCtrl.

Closes #12298.

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

12 years agoSend wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED for generic version too.
Vadim Zeitlin [Thu, 21 Jul 2011 13:50:17 +0000 (13:50 +0000)] 
Send wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED for generic version too.

Send this event when the column used for sorting changed in the generic
implementation of wxDataViewCtrl too.

Closes #13005.

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

12 years agoFix drawing of expander columns not at 0 position in generic wxDVC.
Vadim Zeitlin [Thu, 21 Jul 2011 13:50:14 +0000 (13:50 +0000)] 
Fix drawing of expander columns not at 0 position in generic wxDVC.

The drawing code in the generic version of wxDataViewCtrl incorrectly supposed
that the expander column was always at position 0. This resulted in the
expander column not being drawn at all if it was not really the first one.

Fix the test to use wxDataViewCtrl::GetExpanderColumn() to correct this.

Closes #12870.

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

12 years agoCorrect test for maximal row index in generic wxDataViewCtrl.
Vadim Zeitlin [Thu, 21 Jul 2011 13:50:10 +0000 (13:50 +0000)] 
Correct test for maximal row index in generic wxDataViewCtrl.

The comparison in EVT_CHAR handler was incorrect for an empty control without
any rows as it subtracting 1 from 0 resulted in UINT_MAX and not -1 as all the
values were unsigned.

Fix this by checking that the new row is valid instead, this is correct for
both signed and unsigned values.

Closes #13356.

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

12 years agoNever restore focus to hidden child.
Vadim Zeitlin [Thu, 21 Jul 2011 13:50:06 +0000 (13:50 +0000)] 
Never restore focus to hidden child.

Don't set focus to a hidden window in our focus management code, this never
makes sense and results in apparent focus loss.

It also fixes, as a side effect, a crash in wxGrid under wxMSW as the focus is
not restored to the hidden grid editor any longer and so the code in its
wxEVT_KILL_FOCUS handler that resulted in the crash is not executed any
longer, see #13349.

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

12 years agoAllow marking wxTreeBook nodes to expand initially in XRC.
Vadim Zeitlin [Thu, 21 Jul 2011 13:50:03 +0000 (13:50 +0000)] 
Allow marking wxTreeBook nodes to expand initially in XRC.

Add new "expanded" attribute for XRC nodes of treebookpage class.

Also update the sample and the XRC format documentation.

Closes #13355.

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

12 years agoMake wxEnhMetaFileDC ctor from wxDC explicit.
Vadim Zeitlin [Thu, 21 Jul 2011 13:49:59 +0000 (13:49 +0000)] 
Make wxEnhMetaFileDC ctor from wxDC explicit.

This avoids implicit conversion of any kind of wxDC to wxEnhMetaFileDC which
is totally unexpected.

See #13326.

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

12 years agoFix parsing of negated long options in wxCmdLineParser.
Vadim Zeitlin [Thu, 21 Jul 2011 13:49:55 +0000 (13:49 +0000)] 
Fix parsing of negated long options in wxCmdLineParser.

Negated long options were not recognized in wxCmdLineParser::Parse(), do check
for them now.

Also extend the unit test to check for negated options.

Closes #13335.

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

12 years agoReset negatable switches correctly in wxCmdLineParser::Reset().
Vadim Zeitlin [Thu, 21 Jul 2011 13:49:51 +0000 (13:49 +0000)] 
Reset negatable switches correctly in wxCmdLineParser::Reset().

The "negated" flag of wxCmdLineOption struct was not reset by Reset() so
parsing a command line with a negatable option once influenced the result of
parsing it the next time because the old value was kept.

Do clear it now to allow calling Parse() several times without side effects.

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

13 years agoNo longer ignores first-line indent if no left indent specified
Julian Smart [Wed, 20 Jul 2011 16:23:37 +0000 (16:23 +0000)] 
No longer ignores first-line indent if no left indent specified

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

13 years agoDon't use template member function in drawing sample to placate VC6.
Vadim Zeitlin [Wed, 20 Jul 2011 11:41:07 +0000 (11:41 +0000)] 
Don't use template member function in drawing sample to placate VC6.

VC6 can't instantiate member template functions so get rid of it and use ugly
dynamic casts in the non-template function to construct wxGCDC correctly.

See #13327.

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

13 years agofixes redraw problems under OSX, see #13345
Stefan Csomor [Wed, 20 Jul 2011 06:36:06 +0000 (06:36 +0000)] 
fixes redraw problems under OSX, see #13345

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

13 years agoFix harmless gcc warning about uninitialized mask in PNG saving code.
Vadim Zeitlin [Tue, 19 Jul 2011 22:36:00 +0000 (22:36 +0000)] 
Fix harmless gcc warning about uninitialized mask in PNG saving code.

The mask was actually only used when it was initialized (or, conversely, the
mask was always initialized when it was used) but gcc doesn't seem to notice
this and still warns that mask components "may be used uninitialized in this
function".

Suppress the warnings by always initializing the mask, even if we don't use
it.

Closes #13333.

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

13 years agoRefresh the old current row when right clicking in wxDataViewCtrl.
Vadim Zeitlin [Tue, 19 Jul 2011 22:35:57 +0000 (22:35 +0000)] 
Refresh the old current row when right clicking in wxDataViewCtrl.

the generic implementation of wxDataViewCtrl left the old current still
focused after selecting another row as current when it was right clicked.
Fix this by refreshing the previously current row after unfocusing it.

Closes #13330.

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

13 years agoAdd wxDataViewEvent::IsEditCancelled() and support for vetoing edit events.
Vadim Zeitlin [Tue, 19 Jul 2011 22:35:53 +0000 (22:35 +0000)] 
Add wxDataViewEvent::IsEditCancelled() and support for vetoing edit events.

Currently this is only implemented in the generic wxDataViewCtrl, the native
GTK/OSX ports should be modified to support this later.

Closes #13323.

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

13 years agoFix deleting columns in wxGridStringTable with custom column labels.
Vadim Zeitlin [Tue, 19 Jul 2011 22:35:48 +0000 (22:35 +0000)] 
Fix deleting columns in wxGridStringTable with custom column labels.

We erroneously removed too many elements from m_colLabels array (basically we
always removed all the elements remaining after this column, irrespectively of
the actual number of columns to delete), fix this by removing at most the
specified number of columns -- or possibly less if the array isn't entirely
filled.

See #13329.

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

13 years agoAllow saving the drawing sample canvas to a file or clipboard.
Vadim Zeitlin [Tue, 19 Jul 2011 22:35:45 +0000 (22:35 +0000)] 
Allow saving the drawing sample canvas to a file or clipboard.

This allows to test wxMemoryDC and, under MSW, wxMetafileDC and also can be
used to compare the output of different versions of the sample (possibly from
different ports, too).

Closes #13327.

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

13 years agoAdded wxGCDC(wxEnhMetaFileDC) ctor too.
Vadim Zeitlin [Tue, 19 Jul 2011 22:35:41 +0000 (22:35 +0000)] 
Added wxGCDC(wxEnhMetaFileDC) ctor too.

Make it possible to create wxGCDC associated with a metafile DC in wxMSW too.

Closes #13326.

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

13 years agoFix keyboard navigation in wxGrid with hidden columns.
Vadim Zeitlin [Tue, 19 Jul 2011 22:35:37 +0000 (22:35 +0000)] 
Fix keyboard navigation in wxGrid with hidden columns.

The hidden columns (i.e. those whose size was set to 0) should be skipped when
find the previous/next column to select when the user presses Left/Right
cursor arrow keys in wxGrid, otherwise the focus could completely disappear as
it was invisible when it was set to a hidden column.

Closes #13281.

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

13 years agodoing WakeUp in osx_carbon differently for the main event as well
Stefan Csomor [Tue, 19 Jul 2011 17:56:57 +0000 (17:56 +0000)] 
doing WakeUp in osx_carbon differently for the main event as well

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

13 years agomake sure we can issue a WakeUp call that really triggers at the NSRunLoop level...
Stefan Csomor [Tue, 19 Jul 2011 16:17:44 +0000 (16:17 +0000)] 
make sure we can issue a WakeUp call that really triggers at the NSRunLoop level not only only CFRunLoop

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