Maximum positive coordinate Cairo can handle is 2^23 - 1.
Also convert coordinates to logical so it works right with modified origin or scale.
See #14529
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Most of CreateTempFileName() documentation was commented out in r57994 for
some reason, uncomment it back and also improve it.
Closes#14545.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Comparisons didn't work correctly in the other direction as they were not
reversed as needed. Fix this by adding wxDEFINE_COMPARISON_REV() macro which
defines comparisons in terms of the reverse operations and use it for both
wxUniChar and wxUniCharRef.
Closes#14547.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was mistakenly set to the same value as in EVT_KEY_DOWN event but, just as
m_keyCode, it may be different for EVT_CHAR.
Use gdk_keyval_to_unicode() to set it correctly instead of inheriting
EVT_KEY_DOWN value.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Keyboard handling is subtly different in wxGTK for native controls and generic
wxWindows so add a way to test both of them in the sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Default user-locale-dependent LCID may be inappropriate for some situations,
notably Microsoft Excel uses localized formula names for non-English LCIDs.
So add a way to change the LCID to use at wxAutomationObject level while
preserving the old behaviour by default.
Closes#14540.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't define wxDynamicCastVariantData if RTTI is disabled and don't use it in
wxConvertVariantToOle() code as we don't really need it there anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This corrects fatal bug introduced in r72259: we must not multiply the string
length by sizeof(wxChar) as wxTmemcpy() does this internally.
See #14444.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The text data should use CR LF EOLs under Windows but the data inside the
program typically has only LF EOLs, so translate between them automatically in
wxTextDataObject.
Closes#14444.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use {Set,Get}Text() instead of using m_text directly in wxTextDataObject as
these virtual methods overridable and should be called in case the class
doesn't actually use m_text for its storage at all.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add missing wxStandardID enum elements to AddStdXRCID_Records().
Also add blank lines to make the code in this function align with the enum
declaration to make side-by-side comparison easier.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't include the possible leading sign in the span of digits to be grouped as
this gave nonsensical strings such as "-,123" when adding thousands separators
to "123".
Closes#14526.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We don't need to drop mouse wheel events coming too fast after the previous
commit as now scrolling in wxStyledTextCtrl works quickly enough.
Closes#9057.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Calling Update() every time ScrollText() dramatically slowed down scrolling
and doesn't seem to be necessary, so remove it.
See #9057.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Warn if key presses occur when the input window doesn't have focus as the
usual key events are not generated then which could be understood as a bug in
the sample instead of the correct result.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These events were only generated for wxTextCtrl but should be sent for
non-readonly wxComboBox too, so refactor the code to allow its reuse from
wxComboBox.
Also add EVT_TEXT_PASTE handlers for both controls to the widgets sample for
testing.
Closes#14520.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In 2.8 wxKeyEvent::HasModifiers() returned false if (only) Shift was pressed
as it tested for Control and Alt only but when it was moved to wxKeyboardState
in r55745 it started checking for all modifiers as this made more sense now
that it was used by wxMouseEvent. However it broke existing code using it,
including in wxWidgets itself (in wxTreeCtrl), so revert it now and add
HasAnyModifiers() that does check for all modifiers, including Shift.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It's trivial to use a stock icon with the given name in wxGTK with libnotify,
so provide a way to do it. However this is not as simple as that in other
implementations (notably Windows), so make it private to this port for now.
In the future we should try to support arbitrary wxIcons as well as extend
wxIconLocation to support FreeDesktop stock icon names.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In an attempt to fix DESTDIR support on platforms without symbolic
links, this commit completely broke the wx-config symlink created by
"make install" everywhere (unless you were insane enough to use
"--prefix=/", that is): $(libdir) is absolute path and so using
../$(libdir) has no chance of working.
Fixed by using `basename $(libdir)`. This is still unsatisfactory,
because it assumes that $(libdir) and $(bindir) are at the same level in
the filesystem -- which, while usually true, is by no means guaranteed.
But at least this works most of the time.
See #14517.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use libnotify -- if detected by configure -- to provide native notifications
in wxGTK. Our API maps to libnotify one in rather straightforward way, we
might consider extending it to cover more of libnotify functionality
(categories, user-defined icons and, especially, actions) later.
Also update the dialogs sample to show another kind of notification and the
documentation to clarify the behaviour of various methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Some libraries (e.g. Pango) were added to GUI_TK_LIBRARY already while others
(e.g. Hildon) had their own EXTRALIBS_HILDON variables that were then added to
EXTRALIBS_GUI separately. Finally, some others were simply broken because
neither EXTRALIBS_GNOMEVFS nor EXTRALIBS_GTKPRINT were set anywhere.
Standardize on using GUI_TK_LIBRARY for everything.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Without this style, all buttons share the same width and look ugly when
their labels differ even a little in their lengths. With
TBSTYLE_AUTOSIZE, toolbar buttons use the size of their image plus
label's width and look better, even though their sizes differ.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This results in a noticeable delay when using wxGTK via a remote X11
connection for every key event as a round trip to server is needed to get the
mouse pointer position every time a key is pressed or released.
Only provide the position on demand. And explain that it's actually not very
useful as it's simply the same as the current mouse position.
Closes#14361.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes "make DESTDIR=..." Broken by r71050 but still allows "make
DESTDIR=... install" to work even under MinGW where "ln -s" is mapped to "cp"
and so doesn't work with non-existing first argument.
Closes#14517.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows Scroll{Lines,Pages}() methods inherited from wxWindow to work with
it.
Add a test of using them to the sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just make it possible to reuse the scrolled window and
scrollbars creation code from derived classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead, have two public non-virtual SetPage() methods forwarding to a private
DoSetPage(), as usual.
This avoids the need for "using wxWebView::SetPage" which is needed to avoid
warnings about hiding the other base class virtual when implementing one of
them and which was forgotten in wxMSW version resulting in warnings when using
g++ to compile it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775