Commit Graph

60766 Commits

Author SHA1 Message Date
Artur Wieczorek
537519a8ed Fixed initialization of Direct2D path geometry in wxD2DPathData ctor.
To properly initialize path geometry there is also necessary to open at least once its geometry sink.

Closes #16970.
2015-12-26 16:24:26 +01:00
Artur Wieczorek
358e42a829 Fix drawing bitmap in the selection field of wxBitmapComboBox
When drop-down list is open for wxBitmapComboBox with wxCB_READONLY style and
keyboard is used to select the item on the list then the contents of the
selection field should remain unchanged. (Especially, the bitmap bitmap drawn
in the selection field should be the bitmap associated with text value
displayed in this field.)

Closes #17299.
2015-12-23 18:44:18 +01:00
Troels Knakkergaard
50435ef678 Use the appropriate parent for the choice dialogs
Fall back to the main application window if no parent was explicitly specified
using the standard GetParentForModalDialog() method.

See #17295
2015-12-22 18:29:59 +01:00
TMTisFree
3e3d2ff096 French translations update from TMTisFree
Closes #17287.
2015-12-21 12:56:59 +01:00
Troels Knakkergaard
4ebb8d9837 Use document window as parent for "Save changes?" dialog
This ensures that the message box is centered on its parent window and not the
screen.

Closes #17295.
2015-12-21 12:44:17 +01:00
Paul Cornett
5524cec193 implement Flush() for wxImage wxGraphicsContext under Cairo and GDI+, see #16694 2015-12-20 10:20:30 -08:00
Paul Cornett
cd27b73237 flush Cairo surface before converting to wxImage 2015-12-20 10:10:04 -08:00
Phil Rosenberg
ec824f7e8d Avoid asserts when drawing zero-size wxStaticBox in wxMSW
If a wxStaticBox is rendered, but has zero size in either dimension we
generate assert failures when creating the bitmap. Check for these conditions
and just do not render if this is the case.

Closes #17288.
2015-12-19 16:23:44 +01:00
Artur Wieczorek
231c9c7168 Really parse the extra field seeking for ZIP64 extended data
Extended ZIP64 data are stored in the field with Header ID = 1 and we need to
iterate over all fields to find it because it is not stated in the
documentation the it must be the first record in the collection. wxZipHeader
is designed to process standard 64-byte headers and it is safe to use it to
process data in the field with Header ID = 1 which can have up to 28 bytes.

Closes #17170.
2015-12-19 16:19:37 +01:00
Vadim Zeitlin
4e00229b6e Mention C++11 lambdas and std::function<> in event handling docs
When using a C++11 compiler, it is very convenient to use lambdas directly as
event handlers, so explicitly give an example of doing this in the
documentation.

Closes #17294.
2015-12-19 16:14:27 +01:00
Bryan Petty
a775d57f97 Update apt sources in Travis CI builds. 2015-12-17 08:58:10 -07:00
Vadim Zeitlin
2c2b9051d8 Merge branch 'toolbar_change_placing' of https://github.com/a-wi/wxWidgets
Fix several problems related to SetToolPacking() in wxMSW.
2015-12-17 02:09:21 +01:00
Artur Wieczorek
2dd87a93df Take into account tool placing value in contructing tools with controls.
Tool padding value should be taken into account also in sizing custom made tools (with controls) to get the same visual appearance and behaviour for all tools (buttons).
2015-12-16 21:41:12 +01:00
Vadim Zeitlin
f8f69118cd Restore wxPython build scripts
These scripts were removed in c9220befc7 but are
still referenced in wxPython build instructions, so restore them.

Closes #17289.
2015-12-15 14:53:12 +01:00
JulianSmart
e27027a1dd Selected images now differentiated in wxOSX/Cocoa 2015-12-15 12:37:06 +00:00
Artur Wieczorek
8fdf4221dc Fix setting tool spacing.
Don't set orthogonal padding value to zero but preserve its current value (using MSWSetPadding method).
This way vertical padding is not zeroed when horizontal padding is set and horizontal padding is not zeroed when vertical padding is set.
2015-12-15 08:19:00 +01:00
JulianSmart
24580198b8 Fixed includes for generic image list 2015-12-14 23:17:01 +00:00
Artur Wieczorek
38f6cf13d5 Refresh the toolbar after changing tool placing value.
After changing padding for toolbar in SetToolPacking() there is necessary to refresh/recalculate the toolbar to reflect new padding.
2015-12-14 22:19:35 +01:00
Artur Wieczorek
0a917b86b7 Initialize padding while creating a toolbar.
If padding value (stored in m_toolPacking) has been assigned prior to creating the toolbar (with SetToolPacking) then apply this padding to just created toolbar.
Otherwise initialize this variable with current padding retrieved from the toolbar to let GetToolPacking return proper padding value.
Implemented new method MSWSetPadding() to set padding for native toolbar.
2015-12-14 22:19:32 +01:00
Artur Wieczorek
dd29ecf840 Implemented features to modify tool spacing in the toolbar sample.
There were added two menu items (under 'Tools' menu) to modify current tool spacing.
This way is possible to test SetToolPacking/GetToolPacking methods.
2015-12-14 22:13:04 +01:00
JulianSmart
16d8d6c4a4 wxFileIconsTable::SetSize allows an application to set a different icon size in its initialisation, to adapt directory and file controls for HiDPI. 2015-12-13 20:22:02 +00:00
JulianSmart
0484975fed Added wxImageList::GetSize to retrieve the size originally passed 2015-12-13 19:17:40 +00:00
Artur Wieczorek
57793cb6f1 Reset opacity check box value when control settings are reset in ColourPicker demo.
All settings should be reset to default values when 'Reset' operation is invoked.
2015-12-13 19:18:57 +01:00
JulianSmart
b2e35d25c1 Implemented wxToolBar::SetToolPacking on Windows 2015-12-13 17:49:35 +00:00
Cătălin Răceanu
4eb13a6041 Cross-link wxToolTip and wxTipWindow in the documentation
Closes https://github.com/wxWidgets/wxWidgets/pull/150
2015-12-13 16:08:42 +01:00
Vadim Zeitlin
d4e4f9b088 Merge branch 'vert_toolbar_buttons' of https://github.com/a-wi/wxWidgets
Don't use TBSTYLE_AUTOSIZE with vertical toolbars.

Closes #17263.
2015-12-13 16:07:09 +01:00
Artur Wieczorek
9e657d82f9 Fixed creating menu item which is disabled before being attached to the menu.
Menu item should be created in disabled state if wxMenuItem is flagged as disabled.

Closes #17282.
2015-12-12 21:27:12 +01:00
Vadim Zeitlin
af05905454 Spanish translations update from Miguel Gimenez 2015-12-10 14:03:48 +01:00
Artur Wieczorek
9b56c41c6a Size toolbar buttons automatically only for horizontal toolbars.
Buttons with fixed width look better for vertical toolbars so apply TBSTYLE_AUTOSIZE style to the buttons only for horizontal toolbars.
2015-12-09 21:06:05 +01:00
Artur Wieczorek
757117ab2a Use wxSwap() function to swap values. 2015-12-09 21:05:28 +01:00
Artur Wieczorek
d8ff3189e2 Adding wxFALLTHROUGH instead of comment.
For code-analysis support.
2015-12-09 21:04:43 +01:00
Cătălin Răceanu
0fd677e31b Added 'since' tag to wxNotificationMessage documentation
This class was added during 2.9 development, see
e36a173933

Closes https://github.com/wxWidgets/wxWidgets/pull/148
2015-12-09 16:45:40 +01:00
Vadim Zeitlin
10daded3e9 Fix UnbindFromHandler() test compilation with C++98
Can't declare classes inside the function as they must have external linkage
to be usable with Bind().

Fixes the build after 99d9a81e28, see #17229.
2015-12-08 15:22:01 +01:00
Vadim Zeitlin
60c2b96aef Add support for "forceupper" attribute to wxTextCtrl in XRC
Call ForceUpper() if this attribute is specified.

Currently this is done only for wxTextCtrl but could be extended to wxComboBox
later too if necessary.
2015-12-08 03:02:49 +01:00
Vadim Zeitlin
69b66e9e2e Add wxTextEntry::ForceUpper()
Allow automatically converting lower-case letters entered into wxTextCtrl to
upper-case equivalents. Provide generic fallback and implement the method
natively for all the major platforms.

Also update the text sample to show it in action.
2015-12-08 03:02:46 +01:00
Vadim Zeitlin
99d9a81e28 Fix crash when unbinding event handlers from other handlers
Calling Unbind() on another handler from the currently executing handler which
had been bound after (and hence executed before) the handler being unbound
resulted in a crash previously as the iterators used in the loop over all
dynamic event handlers became invalid.

Fix this by storing the dynamic event table entries in a vector instead of a
list (which is also more memory and speed efficient anyhow) and null the
deleted entries instead of removing them to avoid invalidating the iterators
and only really remove them once we finish iterating.

Closes #17229.
2015-12-08 03:02:37 +01:00
Vadim Zeitlin
929b077894 Remove comments and declarations copy-pasted from wxMSW
Mentioning MSW-specific styles in wxOSX or wxQt code doesn't make sense.

Closes https://github.com/wxWidgets/wxWidgets/pull/146
2015-12-07 14:37:34 +01:00
Paul Cornett
cc48c42e17 remove no-longer-needed OnInternalIdle() override 2015-12-06 20:24:59 -08:00
Paul Cornett
84a77c0c32 remove unused global variable 2015-12-06 20:20:27 -08:00
Paul Cornett
d4d209dd39 Fix generation of wxEVT_ACTIVATE_APP
Avoid spurious events when showing most native dialogs
See #17260
2015-12-06 20:10:32 -08:00
Vadim Zeitlin
d77f7f0fe3 Merge improvements to wxGenericCalendarCtrl mouse handling
Closes https://github.com/wxWidgets/wxWidgets/pull/143
2015-12-06 19:46:29 +01:00
Vadim Zeitlin
84e2492ea4 Handle all wxCalendarHitTestResult elements in a switch
This ensures that the compiler will warn us if a new wxCAL_HITTEST_XXX is
added but forgotten to be handled here.
2015-12-06 19:46:16 +01:00
Vadim Zeitlin
f417248434 Don't call event handler from another handler
We advise people to not call the event handlers directly, so don't show bad
example in our own code and just handle double clicks directly instead of
forwarding them to the single click handler. Alternatively, we could just
handle both events in the same handler.
2015-12-06 19:46:15 +01:00
Vadim Zeitlin
b4b6975bad Fix jagged indentation in wxGenericCalendarCtrl mouse code
No real changes.
2015-12-06 19:46:14 +01:00
Lauri Nurmi
773690203e Handle all consecutive clicks on generic calendar month buttons
Without handling the double click event, some (or all, on OS X) of the
following clicks in a rapid series of clicks are ignored. This makes changing
the month unnecessarily slow.
2015-12-06 19:46:08 +01:00
Artur Wieczorek
c239160d33 Optimize AlphaBlt() to reset the minimal amount of pixels
Modify the loop fixing alpha channel value in order to increase speed when
ARGB bitmap is drawn on 0RGB DIB bitmap or 32-bit DDB bitmap.

Closes #16766.
2015-12-06 17:32:50 +01:00
Vadim Zeitlin
530276ec6a Fix crash in graphics benchmark
Set the GL context pointer deleted in the frame dtor to NULL to ensure we
don't crash on exit when not using OpenGL.
2015-12-06 17:31:24 +01:00
Artur Wieczorek
7ddb522ec2 Extend benchmarks of drawing bitmaps on wxMemoryDC
Extended tests to determine speed of drawing RGB/ARGB bitmaps on target
bitmaps with different colour depths (RGB/0RGB/ARGB/system default).

See #16766.
2015-12-06 17:24:37 +01:00
Vadim Zeitlin
3fa5d92bc2 Build graphics benchmark too
Added the graphics benchmark to the bakefile, which didn't build it before,
for some reason.
2015-12-06 17:24:35 +01:00
Vadim Zeitlin
332dc81167 Fix case of <shlwapi.h> includes
Don't use upper-case file names, while MSW itself is case-insensitive, wxMSW
can be also cross-compiled and then the wrong case results in compilation
errors.

Closes #17279.
2015-12-06 03:43:28 +01:00