The documentation for setting image lists on controls was a complete
fabrication. It pretended that image lists were created as child
<object>s, while in reality they are properties just as e.g. fonts are.
Fix this and also better document the related 'image' property.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
'dir' is not very descriptive (of course it's a direction!), it's better
to include 'default' in the name to indicate this is the default value
to use in absence of a specific one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Always move the dates invalid due to DST (i.e. falling into the "missing" hour
on the DST start date) forward, as GNU libc does, even when using a different
CRT implementation, such as MSVC one which moves the invalid dates backwards.
This seems more expected and also fixes an especially bad problem which
happened due to moving the date backwards in Brazilian time zone where DST
starts at midnight as doing this changed the day and totally broke ParseDate()
assumption that setting wxDateTime to 00:00:00 at the given date really did
set it to this date.
Closes#15419.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMessageDialog's native code didn't call SetReturnCode() as it should.
As a result, it didn't work with ShowWindowModal().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a convenience ShowWindowModalThenDo() variant of ShowWindowModal()
that takes a functor argument and calls it when the dialog is closed.
This is, of course, particularly useful when the argument is a C++11
lambda, especially when having more than one window-modal dialog invoked
from the same window, which can get messy quickly with all the
wxEVT_WINDOW_MODAL_DIALOG_CLOSED handlers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add Wait() overload that takes a functor argument and doesn't return
until the condition is signaled _and_ the predicate returns true. This
is useful for dealing with spurious wakeups and is modeled after C++11
std::condition_variable's corresponding method.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code in OnChildFocusNotebook() handler only worked correctly if the page
itself was focused but not if the focus was given to one of its children --
which should still make the page itself current.
Closes#15471.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This class is referenced from outside the library, see e.g. this build log:
http://buildbot.tt-solutions.com/wx/builders/Linux x86 wxGTK trunk/builds/2961/steps/compile utils/logs/stdio
and so must be exported, otherwise the build fails under Linux (and under
Windows when using DLL).
Perhaps it would be better to make it completely private to the library if it
is not meant to be public, but this would require more changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The old solution worked fine for that compiler and the new one fails when
wxLogXXX() is used inside a switch statement to the wrong rules used by VC6
for the scope of the variables defined inside the for loop.
Simply revert back to using the old version for it, this will be easy to
re-revert after 3.0 by simply removing the check for it.
See #11829.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This undoes the changes of r72205 and r72249 (see #14517) as using relative
paths for wx-config symlink didn't work correctly if non-default values for
$bindir and/or $libdir were used (i.e. if they were not siblings).
Instead, fix the original problem of lack of symlinks when using MinGW
directly: just use "cp -p" if "ln -s" fails. This should work everywhere and
do the right thing.
Closes#15463.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We need to handle WM_PRINTCLIENT in wxToolBar itself as the default handler
for this message forwards to WM_ERASEBKGND of the parent window and our
handler for that message only erases the client part of the window, in wx
sense, i.e. including a relatively big vertical offset accounting for the
toolbar. This means that when we get WM_PRINTCLIENT from the embedded control
drawing code, we don't erase anything at all as the control rectangle height
is smaller than the offset.
This fix is not perfect as ideally the existing MSWGetBgBrushForChild() should
be taken into account automatically by the default MSWPrintChild()
implementation but at least it fixes the ugly visual artefacts.
Closes#12307.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
r70321 added html library to the notebook sample, apparently accidentally as
the commit message only mentioned aui one. Remove html and rebake.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also create the controls as children of the static box, not its siblings, to
make the tooltip work under wxGTK and because this is how we recommend doing
things now.
See #9859.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This macro should be used instead of wxDEPRECATED() for the new deprecations
as it allows to give a helpful explanatory message (if supported by the
compiler) and also is simpler to use as it doesn't require wrapping the entire
declaration in it but can be simply used before it.
Also add wxDEPRECATED() support for clang as a side effect.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This code recaptured the mouse in the window which had already had it, thus
triggering the (recently added, see r74677) asserts in CaptureMouse(). It also
didn't preserve the invariant of m_winCapture always having the capture. And
it was apparently completely unnecessary too.
So simply remove it to fix the asserts while drag-resizing wxGrid rows/columns.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code there was pretty wild, making clearly wrong assumptions (column size
doesn't, and AFAICS never did, include 20 pixel margin) and also was clearly
uncertain about what it was doing by trying to limit the number of iterations
to some arbitrary cutoff when it is pretty clear that the loop increasing the
width and decreasing the height on each iteration will reach the condition of
"width >= height*1.68" sooner or later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Window styles are documented globally, no need for control-specific
content for wxStatusBar. Also, it was outdated and incorrect.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was assumed that all callers were going to unref the cairo_t, but that is not
true, so callers that are going to unref it should ref it themselves.
See #15455
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use a dummy for loop instead of an if statement to avoid all problems with the
dangling else clauses: both the need for an artificially inversed "if" to make
the code like
if ( something )
wxLogError("...");
else
something-else;
to work as expected and to avoid warnings given by some versions of g++ and
clang for the code above advising to add explicit braces.
Closes#11829.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No idea how could this work before but the presence of this code in the
non-GUI benchmark project prevented it from building. As it's not used anyhow,
just remove it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We didn't ensure that the parent of a (native) control with WS_EX_CONTROLPARENT
had this style as well, unlike for our own windows. Fix this now to make
certain that we never call ::IsDialogMessage() on a window whose parent
doesn't have WS_EX_CONTROLPARENT as it simply hangs in this case, entering an
infinite loop searching for the default button.
Also try to reduce the possibility of such bugs in the future by checking for
WS_EX_CONTROLPARENT and not wxTAB_TRAVERSAL before calling ::IsDialogMessage()
even if this doesn't totally prevent them (it wasn't sufficient to fix even
this particular bug).
Closes#15458.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The mnemonics conversion was not done correctly when the menu title contained
them but the menu hadn't been appended to the menu bar yet.
Closes#15461.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxWindowGTK::GTKGetScrollEventType() tries to map GtkAdjustment's delta
to either step or page increment by comparing it with the respective
GtkAdjustment steps. Both of them can be 0, but this code is not
expected to be called in such case.
Yet, in practice, it occasionally is, see e.g.
http://devel.aegisub.org/ticket/979GTKGetScrollEventType (wxWebView is
prone to it as well).
Check for >= 0 instead, to be more robust when faced with unexpected
input from GTK+.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775