This is a simple wrapper for wxTimer::Start(timeout, wxTIMER_ONE_SHOT) but is
often more readable and is definitely better than Start(timeout, true) which
many people still use in spite of wxTIMER_ONE_SHOT existence.
Better fix for duplicate wxContextMenuEvent generation under MSW.
Fix the bug with multiple wxContextMenuEvent being generated for a single
WM_CONTEXTMENU without breaking context menus for wxTextCtrl (and all the
other native controls). Do this by ensuring that WM_CONTEXTMENU is still
passed to DefWindowProc() if we don't process it instead of just being eaten
completely in any case.
Also add a unit test checking for this bug to ensure it stays fixed.
Avoid forcing wxYield() after wxUIActionSimulator::MouseMove() in wxGTK.
Yield (for input events only) inside this function itself instead of forcing
all the code using this function to call wxYield() after it as otherwise the
mouse position change is not taken into account by the subsequent simulated
events.
Optimize wxImage::Scale() by pre-calculating the values used.
Precompute the values used by various resampling algorithms once instead of
doing it for each pixel. This dramatically speeds them up: more than 3 times
faster in wxImage benchmark with the small images and up to 5 times faster
with larger images.
Check that resizing the test horse image produces the same results in the
future as it does now, by saving the current results in files and verifying
that images resized directly and loaded from these files are the same.
Paul Cornett [Mon, 1 Jul 2013 05:10:22 +0000 (05:10 +0000)]
Use gtk_list_store_insert_with_values() to set entry at same time item is inserted.
This should ensure that the entry is always valid, removing the need for r74315.
Also simplify DoInsertItems() by using DoInsertItemsInLoop().
Fix missing documentation for several GDI functions.
The documentation for wxGetClientDisplayRect(), wxGetDisplayPPI(),
wxGetDisplaySize() and wxGetDisplaySizeMM() didn't appear in the output
because they were documented as "overloads" of the corresponding functions
without "Get" prefix inside an @addtogroup Doxygen macro and apparently this
is not supported.
Vadim Zeitlin [Sat, 29 Jun 2013 12:53:44 +0000 (12:53 +0000)]
Forward events to active child in wxMDIParentFrameBase, not only wxMSW.
Menu, toolbar and update UI events should be forwarded to the active child
under all platforms in MDI applications and not only MSW, so move TryBefore()
overload from wxMSW wxMDIParentFrame to wxMDIParentFrameBase.
This should make things more consistent in general and notably fixes the lack
of toolbar events in wxDocChildFrame since the changes of r73928.
Vadim Zeitlin [Sat, 29 Jun 2013 12:52:58 +0000 (12:52 +0000)]
Add support for horizontal mouse wheel scrolling in wxSTC.
Handle horizontal mouse wheel scrolling events in a similar (but simpler, as
they always scroll and never change the font size) way to the vertical ones in
wxStyledTextCtrl.
Vadim Zeitlin [Sat, 29 Jun 2013 12:51:47 +0000 (12:51 +0000)]
Fix wxIMAGE_QUALITY_HIGH definition.
Embarrassingly, wxIMAGE_QUALITY_HIGH was never used as it had the same value
as wxIMAGE_QUALITY_BILINEAR due to the changes to these constants in r67203.
After fixing its value in the enum, also change the switch on this enum
elements to avoid g++ warnings about unhandled enum values.
Vadim Zeitlin [Sat, 29 Jun 2013 12:51:24 +0000 (12:51 +0000)]
Fix dnd events in generic wxDataViewCtrl when moving out of the window.
The wxEVT_DATAVIEW_ITEM_BEGIN_DRAG event wasn't triggered if the mouse moved
below the last item or beyond the last column of a control or left the window
completely.
Fix this by checking for the beginning of the drag before checking for the
mouse being out of items area and also force the drag to start if the mouse is
leaving the window as we would never do it otherwise.
Vadim Zeitlin [Sat, 29 Jun 2013 12:51:01 +0000 (12:51 +0000)]
Don't append just a dot in wxGTK wxFileDialog if no default extension.
We always appended the default extension (for the currently selected pattern)
to the file name but this was the wrong thing to do if there was no extension
at all as this resulted in appending just a dot to the filename. So only do it
if there is an extension to append.
Vadim Zeitlin [Sat, 29 Jun 2013 12:50:37 +0000 (12:50 +0000)]
Allow resetting background colour of wxHtmlContainerCell.
Don't use m_UseBkColour flag which remained always set once
SetBackgroundColour() had been called, but just rely on m_BkColour itself
being valid to determine whether we should use it. This allows to reset the
background colour after setting it.
Vadim Zeitlin [Sun, 23 Jun 2013 13:08:41 +0000 (13:08 +0000)]
Also propagate wxEVT_UPDATE_UI to the child MDI frame.
It seems to make sense to handle wxEVT_UPDATE_UI in the same way as wxEVT_MENU
as they are often used together. This allows to handle e.g. toolbar buttons
entirely in the child MDI frame, without any involvement from the parent.
Vadim Zeitlin [Sun, 23 Jun 2013 13:08:18 +0000 (13:08 +0000)]
Use child MDI frame menu items in preference to the parent frame ones.
Look for the item with the given ID in the child frame menu bar first, before
looking in the parent frame menu bar. This ensures that if an item is disabled
by the parent frame but then reenabled by the child one, it still generates
commands as expected instead of being completely ignored.
Vadim Zeitlin [Sun, 23 Jun 2013 13:07:55 +0000 (13:07 +0000)]
Undo "Forward events to active child at MSW, not wx, level in wxMDIParentFrame."
Unfortunately, forwarding MSW messages only takes care of the menu events but
not the toolbar ones -- which should be handled in the same way but were not.
So restore the old behaviour, the problem with menu items disabled in the
parent frame but enabled in the child one will be fixed differently.
Vadim Zeitlin [Sun, 23 Jun 2013 00:53:15 +0000 (00:53 +0000)]
Add WX_ATTRIBUTE_UNUSED and use it for typedefs to avoid g++ 4.8 warnings.
g++ 4.8 warns about unused typedef's in local scope resulting in hundreds of
warnings when building wx, suppress them by using WX_ATTRIBUTE_UNUSED for
these typedefs.
Václav Slavík [Sun, 16 Jun 2013 11:51:38 +0000 (11:51 +0000)]
Remove superfluous call in wxTranslations::LoadCatalog().
This call to GetAvailableTranslations() did nothing, it's value was
ignored, and it was done before m_loader was checked for != NULL.
Probably some leftover debugging code.
Vadim Zeitlin [Sat, 15 Jun 2013 21:49:29 +0000 (21:49 +0000)]
Restore case-insensitivity for file name matching under Windows.
This was broken by the changes of r73790, see #3432. Fix this by converting
both the file name and the wildcard mask to the upper case before checking
whether the former matches the latter.
Vadim Zeitlin [Thu, 13 Jun 2013 13:57:51 +0000 (13:57 +0000)]
Check wxListCtrl::GetItemRect() origin in the unit tests.
Verify that the top item is _not_ at (0, 0) when the header is present in the
control, as the control client coordinates should not take the header into
account.
This test passes when using wxGenericListCtrl since r74197, add it to ensure
that it doesn't get broken again later.
Vadim Zeitlin [Thu, 13 Jun 2013 13:57:28 +0000 (13:57 +0000)]
Use two step creation of wxListHeaderWindow to avoid reentrancy under OSX.
This improves the solution of the problem already solved in r74197 by
separating setting of m_headerWin variable from the window creation instead of
using an explicit recursion check.