The cursor was previously reverted to the default one only when a next mouse
event was received. Do it immediately now to e.g. avoid showing the busy
cursor when the program is not busy any more.
Closes#12961.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The best size calculation was wrong as the min/max labels height was
unnecessarily added to the slier total height even if though these labels are
positioned alongside the slider itself in horizontal layout case.
The slider also managed to position its value label completely outside the
space allocated to it (and the bug in DoGetBestSize() might have been an
attempt to work around this), don't do this any more. This also fixes the
wrongly centered vertical position of the min/max labels.
Closes#13291.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use the maximal device space extent supported by Win32 GDI and only decrease
it if the scale is so small that keeping the device space extent maximal would
result in overflowing the int range for the logical space.
This makes coordinate translations exact even for huge coordinates, while they
could be significantly wrong before due to the integer rounding errors.
Closes#13284.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no reason for this accessor to not be const and it prevents other
methods using it from being const too, so change this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We finally didn't switch to using the standard containers by default so don't
leave misleading information in the change log (this should have been part of
r67735).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxRound() instead of implicit casts to convert double to int. This not
only avoids warnings (e.g. when using g++ with -Wconversion) but also should
be (marginally) more precise.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Work around g++ -Wconversion warning by writing out the casts explicitly.
A better solution would be to have wxLongLong::FromDouble() static function
but it would have to be done after 2.9.2.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We don't support creating VT_R4 VARIANTs as wxVariant can only contain double,
not float, but we can still at least accept them on input.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We can't use the column pointer in wxDataViewProgressRenderer ctor as it's not
set yet, so postpone setting the renderer label until later in non-Unicode
build which needs the font used by this column to do the conversion to UTF-8.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxCompositionMode enum had a trailing comma not allowed by C++ 98 (and which
would result in warnings or errors with g++ pedantic switch).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Having an invalid element in wxCompositionMode enum allows to directly return
it from TranslateRasterOp() function instead of needing a separate bool
parameter to indicate that a ROP couldn't be translated.
This also incidentally fixes warnings about possibly uninitialized variables
in optimized g++ builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The standard TreeView_GetItemRect() macro resulted in warnings about breaking
strict aliasing rules as it passed a variable of one type via a pointer to
another one. Fix this by using a union and our own custom macro instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In optimized build g++ warned about the second element of two-element array
passed to encode_utf16() being possibly uninitialized. This wasn't really the
case but change the code just to avoid the warnings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
OS X g++ warned that "control may reach end of non-void function" in
wxRichTextHelpInfo::ShowHelp(). This wasn't really the case but change the
function logic slightly to (hopefully) suppress the warning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The virtual ColourToString() method was hidden and not overridden in the
sample because it didn't use the last argument of the base class method.
Fix this in the most straightforward (albeit not necessarily the most correct)
way to at least ensure that the function is really overridden.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This resulted in (useful) g++ warning and didn't make any sense in any case.
Check for the loop variable value being 0 at the end of the loop instead now.
If the old code was correct it shouldn't change its behaviour and if not, this
might fix a bug.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Leaving m_hgdiobj uninitialized probably didn't result in any problems
considering how this class is currently used but it did result in g++ warnings
about uninitialized member with aggressive warning flags and also could easily
become a problem in the future so just ensure that we always initialize it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Hopefully this means it won't be forgotten the next time.
Also mentioned that the new docs.wxwidgets.org link should be now already
created when the release is being done.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Revert the changes of r67280 which fixed several typos in these files as they
were getting modified each time gen_iface.py was rerun and we don't want to
touch the original Scintilla files to fix these typos.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Modify the script generating this file itself to produce IsOk() instead of
Ok(). This replaces the changes of r67681 which only modified the generated
file.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For this, it cannot derive from wxCommandEvent. Extracted the bits
from wxCommandEvent useful for passing data between threads into
wxEventBasicPayloadMixin helper class shared by both.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Child documents are virtual documents corresponding to parts of their parent
document which can't be saved nor loaded independently of their parent and are
closed when the parent is closed.
This finally makes some use of wxDocument::m_documentParent field which was
always present in the docview code but never used before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The bug fix of r67990 relied on DateTime_SetSystemtime() returning FALSE if
setting the date failed but, unfortunately, this function doesn't behave
correctly under XP (and presumably earlier systems) and returns TRUE even if
it didn't actually change the date because it was out of range.
Implement an alternative solution not relying on this function return value
but simply checking the range ourselves.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775