Commit Graph

51707 Commits

Author SHA1 Message Date
Vadim Zeitlin
05f68f2f84 Add benchmarks for various ways to compare strings.
Benchmark the abstraction overhead of wxString methods compared to plain
functions and also benchmark native functions for string comparison under MSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-20 12:52:21 +00:00
Vadim Zeitlin
ad1ca29690 Flush output after every benchmark.
This purely cosmetic change simply allows to see the output of the benchmarks
sooner which is more user-friendly when running several long benchmarks.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-20 12:52:15 +00:00
Steve Lamerton
89416032c2 Increase the number of expected events in TreeCtrlTestCase::KeyDown and ListBaseTestCase::KeyDown from four to six as this is the number of events seen when testing using their samples. This also stops the tests failing after the recent keyboard event improvements.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-19 10:02:57 +00:00
Vadim Zeitlin
179c657bc7 Really fix setting fonts in RichEdit 4.1 controls.
The fix applied in r64394 wasn't enough and the control could still decide to
overwrite the font used by default when non-ASCII characters were inserted
into it. To really force it to use the font we want we apparently must send it
EM_SETCHARFORMAT with SCF_ALL flag (MSDN also documents SCF_DEFAULT but it's
not clear if we should use it instead or together with SCF_ALL, for now it
doesn't seem to be necessary).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-18 16:26:35 +00:00
Vadim Zeitlin
a8abba41bc No changes, just refactor wxTextCtrl::SetStyle() in wxMSW.
Split this overly long function into MSWSetCharFormat() and MSWSetParaFormat().

No real changes otherwise except for the use of PARAFORMAT instead of
PARAFORMAT2 if wxUSE_RICHEDIT2 is not set as it was certainly intended (but
the fact that nobody complained about this problem means that nobody must be
compiling without wxUSE_RICHEDIT2 by now so arguably we should just remove it
completely).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-18 16:26:30 +00:00
Vadim Zeitlin
4f7c00f237 Set wxTextCtrl::m_verRichEdit to 4 for RichEdit 4.1.
Set m_verRichEdit to a different value for the version 4.1 of the control as
it behaves subtly differently from the previous versions.

Also clarify that value of 2 is used for both 2.0 and 3.0 versions of the
control.

No real changes yet.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-18 16:26:22 +00:00
Robert Roebling
3f53dd3a2f Postpone EnsureVisible() to idle as this sometimes seems to be required, fixes #12480: wxDataViewCtrl::EnsureVisible does not make item visible in some
circumstances on GTK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-17 19:07:02 +00:00
Dimitri Schoolwerth
b5b208a179 Set svn properties on .cpp files.
Add missing svn:eol-style property to all .cpp files. Also set svn:keywords for .cpp files which don't have that property yet to Id, including src/osx/core/glgrab.cpp for consistency (it doesn't make use of the property).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-17 11:17:55 +00:00
Vadim Zeitlin
4f1b95ea52 Allow setting Mac-specific menu item ids to wxID_NONE to suppress them.
If s_macAboutMenuItemId or s_macPreferencesMenuItemId was explicitly set to
wxID_NONE by the application, don't add them to the standard menu at all,
otherwise they would be present there but be always disabled and useless.

This is still not documented because we really need a better API for this but
it at least provides a temporary workaround for having useless menu items
under OS X.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-16 19:36:37 +00:00
Vadim Zeitlin
0dc44daa33 Allow use of report mode non-native wxListCtrl in wxListBook under Mac.
The use of wxListBook in report mode was disabled for wxOSX in r54001 and
r54318 (see #9484) because it created problems with the native wxListCtrl
implementation but the report mode can be used if we're using the generic
wxListCtrl version so do allow to use it if the system option governing the
choice of the version to use is set to "generic".

Of course, the real fix would be to correct the bugs in the native wxListCtrl
version and use report mode always but for now this at least restores correct
behaviour with the generic version.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65559 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-16 19:36:29 +00:00
Vadim Zeitlin
75595b9750 Only use wxFORCE_LINK_MODULE() in mediaplayer sample in static build.
The linking optimization this macro protects against can't happen when using
DLL and so using it is at best useless and actually harmful (because it
doesn't contain the correct DLL export declarations) in the latter case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-16 11:05:51 +00:00
Vadim Zeitlin
473ca5f34a Compilation fixes for non-MSVC 9 compilers after r65555.
Somehow MSVC 9 compiled invalid wxT(__FUNCTION__) expressions but both MinGW
and MSVC 6 (correctly) failed. Don't use this construct at all but instead
call wxLogLastError() with the real function name.

Also refactor the code slightly to avoid having to repeat this fix thrice.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-16 11:05:46 +00:00
Václav Slavík
685ed4d1f8 Fix wxMSW rendering artifacts with modal dialogs.
When a modal dialog showed another modal dialog, parts of the parent
window weren't refreshed correctly. This demonstrated itself as
rendering artifacts when moving the child dialog to another position:
parts of the dialog were shown as disabled, parts as enabled.

Fixed by explicitly refreshing the window.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-16 09:05:48 +00:00
Vadim Zeitlin
d5947fad64 Remove display information caching from MSW wxDisplay implementation.
Don't cache display rectangle and client rectangle as they can both change
during the program lifetime (especially the latter which changes whenever
taskbar is moved or shown/hidden) and retrieving them every time they're
needed doesn't seem to be a problem performance-wise anyhow.

We still cache the list of all the monitors, ideally we'd refresh it when we
receive a notification about a display being [dis]connected.

Closes #4582.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-15 23:04:02 +00:00
Dimitri Schoolwerth
09a8cab77b Fix possible errors introduced while generating Xcode project.
Under some unknown circumstances two added source files are concatenated into one faulty entry in an Xcode project (this probably occurs either at the Xcode or XMLTools2 level). Try to detect these errors in the Python script and fix them by patching up the project.pbxproj file.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-15 22:13:40 +00:00
Vadim Zeitlin
7d4cb1eff5 Document limitations of the generic wxTextEntry hints.
Calling methods other than SetValue() or ChangeValue() doesn't update the
display correctly currently, see #12475.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-15 22:10:26 +00:00
Vadim Zeitlin
7bfc104bba Update the text hint display correctly when ChangeValue() is called.
wxTextEntry::ChangeValue() doesn't generate any events so we need to
explicitly update the text stored by wxTextEntryHintData when it is called to
ensure that it corresponds to the real controls value.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-15 22:10:20 +00:00
Vadim Zeitlin
a7aeddacf9 Fix several bugs in generic text entry hints implementation.
The text controls contents and colour was not updated correctly in several
situations (see #12475).

The old code was completely wrong as it didn't store the actual value of the
control at all and so could never work. Do store and update it now and show
the hint if and only if the real contents is empty.

Also handle "text updated" event to correctly update the hint when the control
becomes [non-]empty.

Closes #12475.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-15 22:10:14 +00:00
Vadim Zeitlin
6eb6062821 Fix wxTextEntry::SelectAll() in presence of hints in wxGTK.
Translation of wx (-1, -1) selection to (0, GetValue().length()) in
wxTextCtrl::SetSelection() was unnecessary as it ended up calling the base
class wxTextEntry::SetSelection() version which didn't need it. Moreover, this
translation was actually harmful when the text control happened to show a hint
string as its official value was empty in this case and so SetSelection(0, 0)
was called which didn't do anything and broke clearing/changing the controls
text when it was showing a hint.

Simply don't translate the indices when using a single line control to fix
this.

See #12475.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-15 22:10:07 +00:00
Dimitri Schoolwerth
a99dbd9eba Use a unique namespace for generating identifiers.
Instead of using uuid.NAMESPACE_DNS as namespace use a newly generated UUID. Also minor cleanup of import uuid statement.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-15 11:45:32 +00:00
Dimitri Schoolwerth
7f71d431ee Make Xcode identifier consecutive when there is a collision.
Making them consecutive groups source files that are repeated next to each other in the project file like Xcode does, instead of creating a complete new random identifier which resulted in creating a distance between the source files after they were sorted.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-15 11:29:07 +00:00
Václav Slavík
dc2b49b3d1 Click on wxOwnerDrawnComboBox's animating popup should close it.
Previously, it behaved differently from native combo box: clicking the
popup while its opening animation was running had no effect. This was
different from the native control, which would close the popup in this
case (just like when it's fully opened).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-14 18:35:50 +00:00
Peter Cawley
6f7e96d843 Fix incorrect behaviour of wxRibbonGallery::EnsureVisible when the ribbon is vertical rather than horizontal.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-14 17:35:26 +00:00
Vadim Zeitlin
ed84dc74d9 Fix drawing of items with custom background in wxGenericListCtrl.
This was broken by the changes of r64879 which erroneously used
wxRendererNative::DrawItemSelectionRect() even for the non-selected items.

Now only use DrawItemSelectionRect() for the selected items to make them
appear natively while drawing the non-selected items with custom background
colour ourselves.

Also refactor the code to avoid (the not quite and hence especially
pernicious) duplication between wxListLineData::Draw() and DrawInReportMode():
rename SetAttributes() to ApplyAttributes() and draw the item background in
this function now instead of doing it in both Draw() and DrawInReportMode().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-14 13:18:48 +00:00
Vadim Zeitlin
4be95bef8c Fix hang on termination of wxProgressDialog with wxPD_AUTO_HIDE style.
We don't need to run a modal event loop waiting for the wxProgressDialog to be
closed when it has wxPD_AUTO_HIDE style because it does it on its own.

Closes #12472.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-14 10:24:35 +00:00
Robert Roebling
b955766e88 Document wxDataViewListModel as common abstract base class for
wxDataViewIndexListModel and wxDataViewVirtualListModel.

Add wxDataViewListModel::GetCount() as both have it.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-13 20:12:57 +00:00
Robert Roebling
d8090b5e2c Further work on wxDataViewListModel::Reset()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-13 20:02:01 +00:00
Vadim Zeitlin
b95d405138 Update wxRibbonPanel documentation to mention use of sizers.
This documents the changes of r65436.

Closes #12418.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-12 22:58:58 +00:00
Vadim Zeitlin
c67f815120 Delete wxListCtrl item data after handling its deletion event in wxMSW.
We deleted the data associated with the item too soon as we did it before the
handler for the item deletion event was run and this handler could still
access this data.

Only free the data after the handler returns now.

Closes #12449.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-12 22:58:53 +00:00
Vadim Zeitlin
ba97f6f8a3 Fix compilation of EnumerateLoadedModules() call for MinGW64 4.5.
Our logic for detection of whether the first argument of
PENUMLOADED_MODULES_CALLBACK is const or not didn't work for MinGW64 4.5.

Replace it with a less error-prone (even if more ugly) version which simply
casts the callback to the type expected by the function.

Closes #12465.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-12 22:58:48 +00:00
Vadim Zeitlin
7095bd60e2 Define MAPVK_VK_TO_CHAR to fix wxMSW compilation with old SDK headers.
At least MinGW headers don't define this constant.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-12 22:05:51 +00:00
Robert Roebling
673810eeb8 Moved more code from wxDataViewCtrl to wxDataViewCtrlInternal.
Add new special API for wxDataViewVirtualIndexModel::Reset() as
wxDataViewModel::Clear is something different and needs a different, two
step API under GTK+, one for destroying the current view and one for
rereading the new contents.
Added ::BeforeReset() and ::AfterReset() notifications for that purpose.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-12 20:07:28 +00:00
Julian Smart
5249673498 Fix for % symbols going missing from style parameter
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-12 16:16:48 +00:00
Vadim Zeitlin
03bec791dd Compilation fix for wxOSX.
Remove stray closing brace.

Also fix a warning about unused parameter.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 11:20:40 +00:00
Vadim Zeitlin
d0fb62a656 Generate the same flags for modifier key events in wxGTK as in wxMSW.
Resolve the discrepancy between modifier flags of the key events corresponding
to the modifier key itself between wxMSW and wxGTK by changing the latter to
follow wxMSW behaviour.

Clearly document the now officially correct behaviour of the modifiers for the
key events corresponding to the modifiers keys themselves in the manual.

This fix also makes it unnecessary to work around this bug in the keyboard
unit test so remove it from there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:19:14 +00:00
Vadim Zeitlin
7333c0ef82 Generate unshifted Unicode key codes in wxEVT_KEY_XXX events in wxGTK.
wxGTK generated wxEVT_KEY_XXX with key codes corresponding to the unshifted
state of the key (except for the letters) but Unicode key codes corresponding
to the current shift state. This was inconsistent with wxMSW and also with the
idea that key events, unlike char ones, don't depend on the modifiers states.

Change wxGTK to behave as wxMSW and use unshifted values for Unicode key codes
as well.

Remove the now unnecessary workaround for different key event Unicode codes
from test.

Also try to explain the difference between normal and Unicode keys and key and
char events even better and mention that the Unicode key codes for the key
events are also untranslated in the documentation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:19:07 +00:00
Vadim Zeitlin
5844ad30dd Fix generation of key events for non-alphabetic keys under Windows.
Don't hardcode the values of VK_OEM_XXX keys which are completely nonsensical
on keyboards with non-US layouts. Use the real unshifted value of the key as
its key code instead -- at least if it's a Latin-1 character. Otherwise, use
WXK_NONE as the key code and pass the character generated by the key as
Unicode character code.

Also generate WXK_NONE events for dead keys to avoid confusing them with the
corresponding normal key events.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:19:02 +00:00
Vadim Zeitlin
e7b12eece0 Improve printing out of pressed keys in the keyboard sample.
Add missing elements of wxKeyCode enum ("Windows" and "Command" keys) to the
GetVirtualKeyCodeName() function in the sample.

Also output "unknown" and not blank for WXK_NONE.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:57 +00:00
Vadim Zeitlin
0c03f52d02 Rename wxCharCode{MSWToWX,WXToMSW}() and move them to a separate header.
These functions were confusingly named as they work with MSW (virtual) key
codes and not character codes, rename them to better indicate what they do.
They also don't need to be in wx/msw/window.h included by all wx code when
they are only really needed in a couple of files, so move them to a private
header.

No changes in behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:53 +00:00
Vadim Zeitlin
b6885972ee Fixes to key codes in keyboard events generated by wxMSW.
Only set Unicode key code if the event corresponds to a character key and set
it to (newly added) WXK_NONE for the other ones to avoid nonsensical values in
it for e.g. "Home" key presses.

Also set non-Unicode key to WXK_NONE for the characters that can't be
represented in the current locale. This is consistent with wxGTK and avoids
conflicts between special key values and Unicode keys.

Clearly document the above behaviour.

Notice that implementing the correct behaviour in wxMSW involved untangling
previously interwoven WM_KEY{DOWN,UP} and WM_CHAR messages handlers. Clearly
separate them now as they get different input (key codes for the former,
characters for the latter) and especially don't try to convert from both kinds
of input using a single wxCharCodeMSWToWX() function. As this function doesn't
need to distinguish between keys and characters any more it can simply return
the converted value in all cases instead of returning 0 sometimes to indicate
a character value instead of a key. Simplify the code using this function
accordingly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:47 +00:00
Vadim Zeitlin
86408a0374 Add WXK_NONE symbolic constant indicating absence of a key.
wxKeyEvent::GetKeyCode() and GetUnicodeKey() return 0 to indicate that the key
code or Unicode character is not available, give symbolic name to this 0 to
make the code using these methods more clear.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:41 +00:00
Vadim Zeitlin
e6cef55ae1 No real changes, just use KF_EXTENDED instead of hard-coded bit mask.
KF_EXTENDED is defined in Windows headers as the mask for extracting the
"extended" bit from LPARAM of the keyboard messages. Use it instead of
explicitly writing less clear "1 << 24".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:35 +00:00
Vadim Zeitlin
042ddf5def Add a simple test for keyboard events generation.
Check that the events generated by wxUIActionSimulator result in the same
wxKeyEvents being generated under all platforms. This is not the same as
checking the event generation for the actual keys pressed by the user as there
are some small differences between the two but better than nothing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:31 +00:00
Vadim Zeitlin
2dcbc4615b Generate correct events for extended keys in wxMSW wxUIActionSimulator.
Simulating keys such as WXK_END resulted in WXK_NUMPAD_END event being
generated instead of the expected WXK_END one.

Fix this by returning from wxCharCodeWXToMSW() whether the key code is a
normal or extended one and use this to set KEYEVENTF_EXTENDEDKEY in
wxUIActionSimulator::DoKey().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:25 +00:00
Vadim Zeitlin
9cbe96d093 Remember the last key event in wxGTK before passing it over to IM.
Save the last key event before calling IM filter to be able to get the correct
modifiers, timestamp, position &c to use for the CHAR event generated from IM
commit callback.

This restores the changes of r34504 which were reverted for unknown (or at
least unmentioned) reason in r34521.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:19 +00:00
Vadim Zeitlin
371412145f Explicitly send events for modifier keys in wxUIActionSimulator.
Key down/up events for the modifiers were already explicitly sent under wxMSW
and wxOSX but not under wxGTK where, as the result, the corresponding events
were not generated at all.

Do send these events explicitly to make the events generation consistent under
all platforms now. This means that wxUIActionSimulator::DoKey() now generates
exactly one event everywhere.

Notice that the modifiers for the key events generated by the modifier keys
are also the same under all platforms now which is not the case for the events
actually generated by the user (wxMSW sets the corresponding bit for the
modifier key down event but not the key up one while wxGTK does exactly the
contrary). This should be fixed in the future so that wxUIActionSimulator
generates the same sequence of events as the user would and that it's still
the same for all platforms.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:15 +00:00
Vadim Zeitlin
c3f62b348f Remove assert checking for wxMOD_CONTROL from wxUIActionSimulator.
It doesn't make sense to fail if modifiers parameter includes wxMOD_CONTROL
telling the caller to use wxMOD_CMD instead as the latter is exactly the same
as the former under non-Mac platforms.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:10 +00:00
Vadim Zeitlin
8cdd00f29f Add a convenient wxREGISTER_UNIT_TEST() macro.
This macro can be used to easily register a test following a standard naming
convention in both the global test suite and the test suite with the same name
as this test instead of having to use 2 different cppunit macros to do the
same thing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:05 +00:00
Vadim Zeitlin
daf9622e38 No real changes, just some small cleanup in wxMSW keyboard code.
No changes, just use more clear variable name ("keycode" instead of "id") and
anonymous namespace instead of static keyword.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:17:57 +00:00
Stefan Csomor
5d57348ef5 fixing 'main screen'
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 09:20:28 +00:00