Commit Graph

57065 Commits

Author SHA1 Message Date
Vadim Zeitlin
7b363ab621 Add benchmarks for wxImage methods.
Build a GUI version of the benchmark program too and use it to benchmark
wxImage loading methods for now (more will be added later).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-01 14:47:38 +00:00
Vadim Zeitlin
d9a4a0d022 Add a unit test for wxImage::Scale() method.
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.

See #15281.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-01 14:47:12 +00:00
Paul Cornett
8e125ff114 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().


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-01 05:10:22 +00:00
Vadim Zeitlin
d642db66a5 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.

Simply document them separately to fix this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-01 00:49:46 +00:00
Paul Cornett
2abf710786 fix assertion failure when string transform is requested before entry is set
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 17:16:49 +00:00
Vadim Zeitlin
6f65a5e1aa 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.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:53:44 +00:00
Vadim Zeitlin
5d98e603bc Fix VC6 compilation of wxRichTextTable code.
In addition to breaking VC6 build, the code also rather strangely declared
"row" inside a for loop first and then declared it in the function scope.

Leave just the second declaration.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:53:21 +00:00
Vadim Zeitlin
1d84348c5a 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.

Closes #15266.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:52:58 +00:00
Vadim Zeitlin
dc2f83c4f1 Use more readable wxListCtrl::AppendColumn() in the samples.
Call this function instead of InsertColumn() with incrementing indices.

See #15265.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:52:34 +00:00
Vadim Zeitlin
0280c08726 Use wxListColumnFormat for wxListCtrl::AppendColumn() format argument.
This is safer than using just an untyped int.

Closes #15265.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:52:11 +00:00
Vadim Zeitlin
b712cc040f 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.

See #12845, #15281.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:51:47 +00:00
Vadim Zeitlin
9e8125a1a8 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.

Closes #15258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:51:24 +00:00
Vadim Zeitlin
42ed9de292 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.

Closes #15285.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:51:01 +00:00
Vadim Zeitlin
88343ddae9 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.

Closes #15287.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:50:37 +00:00
Vadim Zeitlin
f03884e322 Italian translations update from Roberto Boriotti.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 11:00:13 +00:00
Julian Smart
a640295faa Applied patch #15286: documentation and col/rowspan demo by dghart
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 10:06:15 +00:00
Stefan Csomor
bc7a3ceeba support getting device resolution on all osx ports
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-28 13:24:27 +00:00
Stefan Csomor
e788ceb8fa new method for contentScaleFactor on main screen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-28 10:41:20 +00:00
Stefan Csomor
9c4672b0f8 new method for contentScaleFactor on main screen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-27 12:48:46 +00:00
Stefan Csomor
c944835aaa native bitmap scaling codes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-27 07:24:15 +00:00
Stefan Csomor
ec2df34e27 use correct scale when drawing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-27 05:54:51 +00:00
Stefan Csomor
cf0a184480 adding impls to wxBitmap on msw as this doesn't inherit from base - Thanks Vaclav!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 17:37:17 +00:00
Stefan Csomor
7f74897f7f adding default for Create with dc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 17:15:10 +00:00
Stefan Csomor
b5ec0c78b5 incomplete paste error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 16:28:25 +00:00
Stefan Csomor
a066916baa adding default impl for CreateScaled
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 16:25:32 +00:00
Stefan Csomor
cfcab929d4 virtual method hiding in GTK, so add direct implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 15:41:23 +00:00
Julian Smart
8e77fd8bca Applied rowspan patch #15276 (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 15:38:46 +00:00
Julian Smart
8a28cd66a6 Applied colspan corrections, #15274 and #15275 (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 15:30:55 +00:00
Stefan Csomor
a4f6fe43c3 support retina display
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 15:11:18 +00:00
Stefan Csomor
ead8d60c3d using dc Create for bitmap, for retina support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 14:57:14 +00:00
Julian Smart
659d10cafe Allow for older GTK+ versions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 14:55:48 +00:00
Stefan Csomor
7e0fda87a9 support for scaled bitmaps in wxMemoryDC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 14:19:41 +00:00
Stefan Csomor
f8bfebfcb8 native scaling support for bitmap
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 14:02:11 +00:00
Stefan Csomor
a85ccd79fd fixing naming to GetScaleFactor, adding default Create with a dc parameter
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 13:54:15 +00:00
Stefan Csomor
9afa58e3b9 default implementation for scaled bitmaps properties
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 13:21:20 +00:00
Stefan Csomor
a6808851eb supporting native content scaling on OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 12:43:44 +00:00
Stefan Csomor
d2bb4c8653 formatting
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 12:26:11 +00:00
Stefan Csomor
538a2cfaf2 adding ContentScaleFactor support to dc - defaulting to 1.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 12:24:34 +00:00
Julian Smart
c901a24c2a Removed 3D style for splitter on Mac since it looks bad
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 07:23:48 +00:00
Vadim Zeitlin
4f9ccec517 Add wxBookCtrlBase::DoSetSelectionAfterRemoval() and use it in wxSimplebook.
This fixes the wrong handling of the selection in wxSimplebook when the
currently selected page was deleted.

Also extend the unit tests to check for this bug.

Closes #15188.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 16:39:39 +00:00
Vadim Zeitlin
6f71e06242 No real changes, just simplify wxBookCtrlBase unit test a little.
Add Realize() virtual function that can be overridden in ToolbookTestCase
instead of using explicit wxDynamicCasts.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 16:39:15 +00:00
Vadim Zeitlin
10e6908dd3 Add a minimal unit test for wxSimplebook.
This is just a test running the common wxBookCtrlBase tests for wxSimplebook.

See #15188.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 16:38:51 +00:00
Vadim Zeitlin
015a04705d 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.

See #14314.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 13:08:41 +00:00
Vadim Zeitlin
57b708aebd 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.

See #14314.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 13:08:18 +00:00
Vadim Zeitlin
dcb16c298b 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.

This reverts r73927.

See #14314.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 13:07:55 +00:00
Vadim Zeitlin
1d3fe8f83e Add --without-libjbig and --without-liblzma configure switches.
They can be used to disable the use of the corresponding libraries by the
built-in libtiff.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 11:10:03 +00:00
Vadim Zeitlin
540dacb643 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.

Closes #15137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 00:53:15 +00:00
Vadim Zeitlin
cb50bdc075 Fix Unix build with libSDL 2 in debug mode.
SDL_AudioDriverName() was replaced with SDL_GetCurrentAudioDriver() in SDL v2.

Closes #15271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-21 09:21:58 +00:00
Steve Lamerton
be2878d8c9 Not not pass debug messages on from wxLogWindow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-20 14:40:57 +00:00
Stefan Csomor
6b34995cc6 partial revert, as we still need Xcode 3.1 for 10.5, Xcode 3.2 is 10.6+ only
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-20 07:22:00 +00:00