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
Correct a lot of problems with the initial implementation, notably make the
API consistent across all platforms, e.g. all keyboard-related methods now
take just a wxKeyCode.
Add some useful higher-level helpers such as Text() and MouseDragDrop().
Improve documentation.
wxUIActionSimulator now works under MSW, GTK and OS X and is enabled by
default.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If available, the task dialog is now used for the wxProgressDialog under
Windows. This provides a much more native looking dialog which doesn't look
out of place under modern Windows versions, unlike the generic implementation.
The internals of the code had to be significantly changed as the task dialog
can only be shown modally so, to emulate wxProgressDialog modeless nature, a
separate thread is used for the progress dialog management.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is a generalization of wxMessageDialog based on the native task dialog
under recent (Vista and later) Windows versions and implemented generically
for the other ports for now.
It provides the possibility to use additional controls in the message boxes
(checkbox useful for the "Don't ask me again" kind of dialogs and collapsible
detailed explanations field) and better look and feel under Windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use the "syslink" native control to implement wxHyperlinkCtrl under (recent
enough, i.e. XP or later) versions of Windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
A command link button wraps a native MSW control under recent Windows versions
and is implemented generically as a simple bitmap button elsewhere.
In the future, GTK implementation should allow using a different font for the
button label and its note.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This was broken during wxButton/wxBitmapButton merge and wxBitmapButton was
not created with the correct initial size if the default size was specified
when creating it any longer. Fix this by calling SetInitialSize() once again
after setting the bitmap.
See #12323.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Current item is the same as the selected item in single selection mode but in
multiple selection mode there was no way to neither get this item nor change
it before so add the new functions to allow doing this now.
The new methods are implemented for the generic, GTK and OS X/Cocoa versions
but only stubs are provided for OS X/Carbon.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This event is sent whenever an item is clicked, even if it's already selected,
unlike the existing EVT_RIBBONGALLERY_SELECTED.
Closes#12128.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While wxHtmlWindow doesn't support mixing LTR and RTL contents we can indeed
try to make it render pure RTL stuff correctly by setting up the wxDC used for
drawing accordingly.
Closes#1988.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow wxAUI to change the toolbar orientation depending on where is it docked.
It is also now possible to specify wxAUI_TB_VERTICAL or HORIZONTAL to force
the toolbar to be always oriented in the given sense and to prevent it from
being docked at the sides incompatible with it.
Closes#11712.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Native wxMSW wxDC::DrawText() implementation doesn't support multi-line
strings so use the generic wxDC::DrawLabel() code instead. Drawing multi-line
strings now works at least in wxGTK and wxMSW, to be tested for the other
platforms.
Closes#12239.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Avoid using Cygwin sockets as our code assumes that we use WinSock API under
Windows currently (this might change in the future) by defining
__USE_W32_SOCKETS.
Use new, safer and more efficient cygwin_conv_path() function.
Use t_str() instead of fn_str() with Windows API taking file names, under
Cygwin they are different and using fn_str() is incorrect.
A few other minor fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use mbc_str() which can fail to convert contents of the string created
using wxString::From8BitData(). Use To8BitData() instead.
This fixes posting of binary data via HTTP using binary content transfer
encoding.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Using the current locale decimal point in config files results in problems
when moving the files to another machine or even using a different locale on
the same one, so don't do it.
Always write the numbers using C locale and try to read them in C locale too
first, but also try the current locale if we failed for backwards
compatibility and to be tolerant with users who edit their config files by
hand.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Parse "style" attributes of the HTML tags and honour those of them that can be
mapped to the HTML 3 attributes.
Also add a handler for <span> tag.
Closes#10631.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Printing of documents from wxDocManager always used default page setup data,
allow the user to configure it now.
Add wxDocManager::m_pageSetupDialogData and add a handler for wxID_PRINT_SETUP
command to it.
Closes#11394.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow retrieving the text from columns other than the first one directly.
Add implementations for MSW and generic versions, documentation and a unit
test.
Closes#11597.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxTranslations is for handling gettext translations. wxLocale manages
locale and provides compatiblity API for translations. Separating these
two loosely related tasks makes it possible to use translations into
languages not known by Windows or using localized GUI without all the
locales compilations.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Although the information about "Cancel" and "Skip" buttons presses is returned
from Update(), sometimes it may be more convenient to ask the dialog about
whether it was cancelled or skipped instead of storing it in the program
itself.
Add the methods which allow to check for this.
Closes#10903.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is a trivial accessor which somehow was never added before even though we
had GetToolsCount() and even DeleteToolByPos().
Closes#11120.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This doesn't affect Unicode builds, only the legacy ANSI one.
PO files are now always converted to the appropriate charset according
to current locale. This was the default behavior for long time; not
doing the conversion was always a fragile hack that didn't work well.
Removing this flag simplifies wxLocale code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These trivial helper functions are available in all builds (provided that
wxUSE_STD_STRING is not explicitly set to non-default 0 value) unlike implicit
conversions to std::[w]string which are only available when wxUSE_STL==1.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow choosing the multiplier to use (1000 or 1024) and the names of the units
(SI or IEC). By default, still use traditional convention, i.e. multiplier of
1024 but SI unit names. This will probably need to be changed to use IEC units
in the future.
Also added unit test for this function.
Closes#10673.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow specifying a set of gradient stops instead of just the beginning and
ending colours. Add the new wxGraphicsGradientStop(s) classes and new
wxGraphicsContext::Create{Linear,Radial}GradientBrush() overloads. Also change
the same methods of wxGraphicsRenderer to take wxGraphicsGradientStops instead
of a pair of colours.
Implement the new API for MSW and Cairo. OS X still uses just the two colours
for now.
Closes#11897.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When the code was compiled using a new SDK, creating wxTaskBarIcon failed
under older Windows systems because of a too big NOTIFYICONDATA size specified
by the program.
Fix this by using the fixed NOTIFYICONDATA_V2_SIZE to get old version of the
struct which nevertheless contains everything we need and even fall back to
NOTIFYICONDATA_V1_SIZE for Win9x if needed.
Closes#11886.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775