Commit Graph

57904 Commits

Author SHA1 Message Date
Vadim Zeitlin
7b7f3b0132 Revert "Don't intercept accelerators in wxTextValidator in wxGTK."
Testing for absence of Alt modifier is wrong as it could be specified for the
events generated by AltGr-letter key combinations (AltGr is Alt+Ctrl), so this
commit broke the validation of any such symbols entered from non-US keyboard.

This is worse than the problem it was trying to fix, so revert this for now.
The real fix will need to ensure that the mnemonics are checked first, i.e.
before generating EVT_CHAR, in wxGTK, just as it already happens in wxMSW.

This reverts r75453.

See #15777.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:34:05 +00:00
Vadim Zeitlin
2ff7b588ae Move UNICODE section of wx/platform.h before wx/compiler.h inclusion.
This fixes the build with some versions of MinGW which depend on UNICODE being
defined correctly in _mingw.h which is included from wx/compiler.h, so that
before this change the build was broken as inconsistent definitions of UNICODE
were used there and in windows.h included later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:18:47 +00:00
Vadim Zeitlin
29483c2e15 Define HAVE_VARIADIC_MACROS as 1, not nothing, in wx/cpp.h.
This avoids g++ warning about HAVE_VARIADIC_MACROS redefinition in setup.h if
wx/cpp.h happens to be included before it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:12:58 +00:00
Vadim Zeitlin
c407f6e2bd Don't keep using the old wxBitmap data after modifying it directly in wxGTK.
Drawing on a wxBitmap via wxMemoryDC modified its pixmap representation in
wxGTK and even if its pixbuf representation was later changed using direct
access to the bitmap pixels, the out of date pixmap continued to be used,
creating the illusion of direct access being completely ignored.

Fix this by purging the old pixmap representation when locking the bitmap for
raw access.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:06:45 +00:00
Robin Dunn
6f25e45af1 Turn off wxUSE_COMPILER_TLS for wxPython builds to avoid crashes on XP.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-02 00:24:32 +00:00
Vadim Zeitlin
97836da5e8 Mention horizontal scrolling in wxScrollBar documentation too.
Up/down can also mean left/right.

Closes #15791.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 14:03:47 +00:00
Vadim Zeitlin
b498554460 No real changes, just fix some typos in the comments.
Fix spelling in a couple of comments.

Closes #15790.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 14:03:43 +00:00
Vadim Zeitlin
0a76afbe9c Use wxScopedArray instead of raw new[]/delete[] and fix memory leak.
Don't leak memory in case of error when reading from the stream in BMP loading
code.

Closes #15789.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 14:03:37 +00:00
Vadim Zeitlin
5cd81ca598 Allow initializing wxScopedArray more conveniently.
Typical wxScopedArray initialization uses "new T[n]" expression, allow to omit
most of it and specify just n, the number of elements to allocate.

Use the new shorter form in the places where wxScopedArray(new ...) was used
(which is in almost all of them)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 14:03:34 +00:00
Paul Cornett
dd4291f962 fix memory leak, closes #15785
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 19:14:24 +00:00
Stefan Csomor
87eb540094 moving special characters handling for EVT_CHAR into SetupKeyEvent, fixes #15784
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 11:49:40 +00:00
Stefan Csomor
45bb71b485 routing to common code, see #15784
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 10:39:12 +00:00
Stefan Csomor
26f22d609f copy over all modifiers for single char events, fixes shift-tabs for single line controls, see #15784
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 09:04:13 +00:00
Robin Dunn
7d00c5c477 Add missing wxMenuItem methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:23:01 +00:00
Robin Dunn
da4efa3fe3 Slight tweaks for the wxWebKitCtrl doc.
Remove inline function bodies.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:22:52 +00:00
Robin Dunn
69cfa7ca5c Add wxWebKitCtrl header.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:22:43 +00:00
Robin Dunn
d8ba2748b6 Document ctors and dtor for wxListView
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:22:33 +00:00
Robin Dunn
a768c33557 Add the ability to show a CallTip in the stc sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:22:24 +00:00
Robin Dunn
37df5cf045 Guard against trying to use extend() with None
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:22:15 +00:00
Vadim Zeitlin
b72899d142 Don't intercept accelerators in wxTextValidator in wxGTK.
Key events with modifiers shouldn't be filtered by the validator as they are
used as accelerators and not for the text entry at all.

Closes #15777.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:19:17 +00:00
Vadim Zeitlin
cb20b3453e Simplify wxTextValidator EVT_CHAR handler.
Ignore the event by default to reduce the number of event.Skip() calls.

No changes in the code behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:19:15 +00:00
Vadim Zeitlin
aff918ab1d Handle Unicode keys correctly in wxTextValidator.
Don't allow entering arbitrary Unicode keys in wxTextValidator limited to
digits only, for example.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:19:12 +00:00
Vadim Zeitlin
a425e9f70d Make wxTextValidator validation error messages more informative.
Saying that "something is invalid" really doesn't help much at all, so try to
be at least a bit more informative.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:47 +00:00
Vadim Zeitlin
39edfa27a2 Make wxFILTER_INCLUDE_LIST in wxTextValidator actually usable.
Only check for its violation once the full text is entered as otherwise
nothing could ever be entered when it was used.

Closes #15778.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:43 +00:00
Vadim Zeitlin
2d3a1aab74 Fix handling of menu items checked before being attached in wxMSW.
Calling wxMenuItem::Check() before appending the item to a menu didn't have
any effect, fix this by checking the item state when actually attaching it.

Closes #15748.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:38 +00:00
Vadim Zeitlin
32dc4cc8db Avoid crashes when deleting owned top level windows.
Don't delay the TLW destruction if it has a parent and its parent is already
being deleted: we can't delay the inevitable in this case and only succeed in
making the program crash if we try.

Closes #15743.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:33 +00:00
Vadim Zeitlin
9955f6fd86 Prevent wxGrid rows/columns from becoming too small on double click.
The minimal size wasn't respected when auto-sizing rows/columns in
Set{Row,Col}Size() which was called in response to double clicking the
separator line, which resulted in clearly wrong behaviour as the user was
prevented from resizing the row/column to a smaller size by dragging them but
not by double clicking, so fix this to respect the minimal size as well.

Closes #15627.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:28 +00:00
Vadim Zeitlin
c3d1d22f66 Fix harmless MSVC warning.
Avoid "converting value to bool" warning introduced by r75310.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:25 +00:00
Vadim Zeitlin
c0984e8382 Update the generated file after gen_iface.py change.
Regenerate the file to use the symbolic constants instead of the raw values.

See #15783.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 22:20:30 +00:00
Vadim Zeitlin
3d5f3bcac7 Use symbolic constants names in the generated wxSTC files.
Update the script generating stc.cpp to put the symbolic constants names and
not their raw numeric values into the generated code. This makes it much
easier to read and understand.

Closes #15783.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 22:20:25 +00:00
Vadim Zeitlin
03c0dc0235 Mention that raw pixel access is efficient only with DIBs under MSW.
While accessing DDBs (now) works too, it's inefficient and should be avoided.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 15:11:36 +00:00
Vadim Zeitlin
11d0e0f943 Make raw pixel access work even with DDBs under MSW.
This is inefficient, because we need to copy pixels to and from them, but
better than silently doing nothing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 15:11:34 +00:00
Vadim Zeitlin
7ce66e3c43 Use wxPENSTYLE_{SOLID,TRANSPARENT} instead of deprecated versions in the docs.
Don't push people to use the deprecated wxSOLID and wxTRANSPARENT.

Closes #15775.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-23 16:43:51 +00:00
Vadim Zeitlin
d75c0a8cc7 Add wxNumberEntryDialog default ctor and Create().
Allow creating wxNumberEntryDialog in 2 steps, as most of the other classes.

Closes #15769.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-21 22:26:38 +00:00
Stefan Csomor
b0a5f5ac18 - one single method for sending char events from a NSString
- adding insertText override for multiline fields as char events went missing after r74945

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-21 14:59:50 +00:00
Vadim Zeitlin
b69da09293 Add wxPasswordEntryDialog default ctor and Create().
Allow creating wxPasswordEntryDialog in 2 steps, as most of the other classes.

Closes #15770.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-21 12:23:59 +00:00
Vadim Zeitlin
2e4dcc645d Don't link with -lm if the check using it failed.
It is useless and can, apparently, result in problems, see #15746.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-20 17:55:30 +00:00
Vadim Zeitlin
5c1f95bc71 Document wxEVT_MEDIA_XXX event types.
Closes #15768.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-20 17:50:27 +00:00
Stefan Csomor
947a8734ac reverting r74098, applying John's version, see #15008, #15765, #13841 will be backported if no regressions are discovered
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-20 16:03:13 +00:00
Vadim Zeitlin
0cf0dfae6b Don't crash in wxAuiToolBar::GetToolBarFits().
The code could crash if m_overflowVisible was true but m_overflowSizerItem was
NULL. Ideally this shouldn't happen in the first place, but it did, so at
least fix the crash for now -- and hopefully this code will be refactored to
make it more clear later.

Closes #15747.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:18:57 +00:00
Vadim Zeitlin
fba8b37345 Add wxHtmlWindow::SetDefaultHTMLCursor().
This allows to change the cursors used by any HTML windows, before creating
them.

Closes #15324.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:43 +00:00
Vadim Zeitlin
3150676c08 Document wxMediaState enum.
Closes #15760.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:38 +00:00
Vadim Zeitlin
19df537ca1 Treat empty variants as null ones in wxMSW OLE code.
Simply ignoring VT_EMPTY variants doesn't make any sense and can result in
completely unexpected results, so don't do it.

Closes #15757.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:33 +00:00
Vadim Zeitlin
8bb6427f10 Remove wx/generic/colrdlgg.h from common GUI headers.
This header is not used in all ports, notably not in wxMSW nor wxGTK.

See #15753.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:27 +00:00
Vadim Zeitlin
8f305123db Add default ctor and Create() to wxContextHelpButton.
Allow two step creation of wxContextHelpButton.

Closes #14848.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:21 +00:00
Václav Slavík
e8c5400118 wxTextFile: don't loose data with CRCRLF line endings.
Previously, when reading files with completely nonstandard - but
occurring in the wild thanks to broken Notepad - files with CRCRLF, all
content would be replaced with empty lines.

Fix the code to do what many editors do with such files: treat this as
data line followed by an empty one. This is not ideal, but it is better
than discarding data - and arguably, silently cleaning up the endings
wouldn't be great either (and would add extra complications for what is
an obscure and broken case).

See http://stackoverflow.com/questions/6998506/text-file-with-0d-0d-0a-line-breaks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-16 18:54:42 +00:00
Václav Slavík
15fe4acb3e Support keyboard navigation with Tab in generic wxDataViewCtrl.
Move keyboard focus between columns with Tab and Shift-Tab. Works
similarly to left and right arrows, but wraps around to go to the next
or previous line and doesn't collapse tree nodes.

If focus reaches the last or first cell, the key event is skipped,
allowing normal Tab handling for moving to another control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-16 16:36:05 +00:00
Jouk Jansen
132a0aaacd Update OpenVMS compile support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-16 11:12:41 +00:00
Jouk Jansen
6b60a2575e Add OpenVMS to the systems that support the Bind-Event
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-16 10:51:27 +00:00
Paul Cornett
f88b7c1b8f fix inconsistent line endings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-15 02:07:14 +00:00