Commit Graph

60814 Commits

Author SHA1 Message Date
Maarten Bent
9166500f30 Documentation for wxListCtrl checkboxes. 2016-01-15 20:55:32 +01:00
Maarten Bent
418a96d44c Support native MSW check-boxes in wxListCtrl. 2016-01-15 20:55:32 +01:00
Artur Wieczorek
46953a1426 Enable "Alpha screen" in drawing sample also if wxDC supports alpha transparency.
For some systems (like OS X, GTK+ 3) drawing with transparency is supporting by native wxDC and in this case "Alpha screen" sample can be shown even if wxGraphicsContext is not used/enabled. For such wxDC's all drawing operations can be done directly without using wxGraphicsContext.
2016-01-14 23:07:45 +01:00
Tim Kosse
8eef0f9ce2 Don't assert if Ctrl+Tab is pressed inside a wxGTK window
Ignore the WinChange flag in DoNavigateIn() to fix an assertion that happened
when pressing Ctrl+Tab with the generic wxListCtrl having focus.

This seems to be consistent with pressing Ctrl+Tab elsewhere, e.g. when
cycling between buttons in a dialog.
2016-01-14 15:50:54 +01:00
Paul Cornett
e72133371e fix cursor unref for GTK2, broken by 3e75b23 2016-01-12 23:58:34 -08:00
Paul Cornett
bf56c34ad2 remove incorrect cursor unref added in 3e75b23, see #17330 2016-01-12 23:53:01 -08:00
Vadim Zeitlin
b4143a605c Fix typo in the change log introduced in the previous commit
See https://github.com/wxWidgets/wxWidgets/pull/157#issuecomment-170154327
2016-01-09 00:38:17 +01:00
Vadim Zeitlin
7d63a316af Mention the multimedia keys constants addition
This should have been part of the previous commit.

See https://github.com/wxWidgets/wxWidgets/pull/157
2016-01-08 23:25:15 +01:00
Jens Göpfert
abd46cb99a Add support for multimedia keys to wxMSW and wxGTK
Add WXK_XXX constants for the standard multimedia keys and generate events
corresponding to them under wxGTK and wxMSW.

Closes https://github.com/wxWidgets/wxWidgets/pull/157
2016-01-08 23:22:24 +01:00
Vadim Zeitlin
777b7537c1 Change WXK_SPECIALx constants to follow the other WXK_XXX values
These constants were defined in the middle of the wxKeyCode enum, value-wise,
which made it difficult to end new elements to the enum as they could clash
with the existing ones if they were simply added at the end.
2016-01-08 23:13:25 +01:00
Paul Cornett
2585d73204 In FindOrCreateFont(), avoid using family if facenames are specified.
GetFamily() is not reliable in wxGTK. See #17313
2016-01-08 09:56:28 -08:00
David Vanderson
c5659b19b4 Implement wxToolTip::SetDelay() for wxOSX
Set the "NSInitialToolTipDelay" object in NSUserDefaults.

Closes #17322.
2016-01-08 17:02:19 +01:00
Artur Wieczorek
13783d8733 Fixed regression in wxMenuItem::Check introduced by dbd98a10.
Internal check flag (via wxMenuItemBase::Check) has to be set as a first to avoid generating a spurious wxEVT_MENU when menu item is checked.
2016-01-07 21:45:17 +01:00
Artur Wieczorek
9aa5a4de0c Modify drawing on "Alpha Screen" in drawing sample to make transparency effect more visible.
Use transparent colours in drawing operations to show more clearly transparency effects.
2016-01-07 21:32:22 +01:00
Vadim Zeitlin
525296aec5 Preserve the button attributes when setting its bitmap in wxGTK
The button label font and colour could be lost when its bitmap was set because
this could result in the recreation of the GtkLabel, internally.

Fix this by reapplying the styles to the possibly recreated label when
changing the bitmap or its position in the button.
2016-01-07 18:43:01 +01:00
Artur Wieczorek
41e94974a0 Fixed positioning controls on the toolbar after removing a tool.
When a tool is removed from the toolbar then all tools with controls on the right hand side have to be repositioned (shifted left) manually.
2016-01-06 23:06:40 +01:00
Artur Wieczorek
dbd98a1078 Don't attempt to uncheck menu radio item in wxGTK
Unchecking radio item makes no sense and wxMSW does nothing in this case, so
don't do anything in wxGTK neither, in particular don't generate a spurious
wxEVT_MENU.

Closes #17318.
2016-01-06 03:45:00 +01:00
Vadim Zeitlin
6c897a28fd Merge branch 'osx_close_btn' of https://github.com/TcT2k/wxWidgets
Improve appearance of the close button on high DPI displays under OS X.
2016-01-05 23:08:19 +01:00
Jouk
ad03629fea Add wxUSE_NATIVE_PROGRESSDLG to OpenVMS setup 2016-01-05 16:33:57 +01:00
Tobias Taschner
08dc9405cb Document wxBitmap::CreateScaled() and wxBitmap::Create() overload.
The two methods were previously undocumented but might be of interest
to user code for high DPI display compatibility.
2016-01-05 15:13:26 +01:00
Tobias Taschner
d4a2f1578a Handle high resolution displays in wxBitmapButtonBase::NewCloseButton().
Bitmap for the close button is scaled based on GetContentScaleFactor(). On OS X the resulting bitmap has to use the correct scaling factor in order to be displayed correctly on the button when using a high resolution display.
2016-01-05 15:13:18 +01:00
Tobias Taschner
e0cb697991 Replace images in wxRendererMac::DrawTitleBarBitmap() with drawing code.
The low resolution (14x14) bitmaps scaled badly on high resolution displays. A close button suitable for usage inside a window (like wxInfoBar) is not available via HI theme drawing methods. This drawing code tries to emulate a close button, as close as possible to the one found in the Xcode 6+ welcome window.
2016-01-05 14:51:04 +01:00
Pete Stieber
5948602f4f Make wx/dirdlg.h safe to include as first wx header
Include wx/defs.h to get wxUSE_DIRDLG value from it, otherwise it could be
undefined, and hence evaluate to 0 (unfortunately without even a warning with
some compilers), if this header was the first wx header to be included.
2016-01-05 01:29:19 +01:00
Andreas Falkenhahn
27c8601646 Avoid unnecessary selection changes in wxMSW wxTextCtrl::GetStyle()
We don't need to change the selection if we're interested in the attribute of
its starting position, as is typically the case because this is also the
cursor position, because EM_GETCHARFORMAT returns the attribute of the first
character of the selection and not, as was apparently believed when this code
was written, only the attributes which are the same for the whole selection.

This avoids flicker when constantly using GetStyle() to check for the format
at the cursor position as the selection is not changed all the time any more.
2016-01-05 01:21:45 +01:00
Artur Wieczorek
527c25b898 Store alpha channel in the output wxImage only if internal GDI+ bitmap contains it.
When converting internal bitmap to wxImage in wxGDIPlusBitmapData::ConvertToImage set up output alpha channel buffer only if source bitmap contains alpha channel values.
2016-01-04 22:59:44 +01:00
Artur Wieczorek
ca52d09a03 Optimize converting internal Direct2D renderer bitmap to wxImage.
Get access to bitmap bits with IWICBitmap::Lock instead of IWICBitmapSource::CopyPixels because in-place processing is more effective in terms of speed and memory consumption (see IWICBitmap interface description in MSDN).

See #17311.
2016-01-04 22:35:57 +01:00
Artur Wieczorek
6498776b52 Initialize internal bitmap when creating D2D graphics context from wxImage.
Internal D2D WIC bitmap should be initialized with source wxImage contents in wxD2DRenderer::CreateContextFromImage.

Closes #17314.
2016-01-04 18:30:39 +01:00
Artur Wieczorek
4a3f3f4ed7 Store alpha channel values when converting internal D2D bitmap to wxImage.
Save alpha channel retrieved from internal bitmap if target wxImage is capable to store it. Also undo premultiplication of RGB values if bitmap contains alpha channel values.

Closes #17311.
2016-01-03 21:48:29 +01:00
htalbot
c0e75f27d1 Allow predefining wxHAS_MODE_T to avoid mode_t conflicts
This symbol can now be predefined to avoid conflicts with mode_t definition in
wx/filefn.h when wxWidgets is used in applications also using another library
which also defines mode_t.

Closes https://github.com/wxWidgets/wxWidgets/pull/165
2016-01-03 17:25:05 +01:00
Artur Wieczorek
ca8f5eae93 Optimize converting internal GDI+ bitmap to wxImage
Write retrieved pixel data directly to the internal buffers of destination wxImage.
2016-01-03 15:13:39 +01:00
Vadim Zeitlin
3195bc14d0 Merge branch 'high-dpi-checkboxes-fix' of https://github.com/MaartenBent/wxWidgets
Correct calculation of the checkboxes size when using themes and other minor
renderer fixes.
2016-01-03 01:02:14 +01:00
Stefano D. Mtangoo
28bc1bdac0 Allow specifying the replacement character in wxString::ToAscii()
Don't hardcode "_" as the replacement character but accept the one specified
by the user.

Closes https://github.com/wxWidgets/wxWidgets/pull/116
2016-01-03 00:40:11 +01:00
Peter Tissen
cfd4da8fdb Copy wx/msw/setup0.h to setup.h if none already exists
Automatically create setup.h when using a git checkout with MSVS.

Closes https://github.com/wxWidgets/wxWidgets/pull/52
2016-01-02 17:26:17 +01:00
Artur Wieczorek
b65a3f5520 Don't lose alpha when converting GDI+ bitmap to wxImage
wxGDIPlusBitmapData::ConvertToImage() lost the alpha channel of the image as
it used the bitmap handle returned Gdiplus::Bitmap::GetHBITMAP() which is a
DDB and doesn't contain real alpha channel values.

In order to retrieve actual alpha channel data there is necessary to get
direct access to Gdiplus::Bitmap bits with Bitmap::LockBits and transfer pixel
data to wxImage pixel by pixel.

Closes #17174.
2016-01-02 17:13:36 +01:00
Artur Wieczorek
450019dc21 Ensure COM is still active when Direct2D renderer is in use
Some internal D2D operations need active COM library so ensure it is properly
initialized and released in wxDirect2DModule.

Closes #17308.
2016-01-02 17:09:30 +01:00
Vadim Zeitlin
72c47669ab Add wx/generic/collheaderctrl.h to the list of GUI headers
This file is used by the public wx/collheaderctrl.h but wasn't previously
installed, breaking the build of any code including that header under Unix.

Closes #17309.
2016-01-02 13:26:26 +01:00
Vadim Zeitlin
017bbdf516 Define ToDIP() in wxHAVE_DPI_INDEPENDENT_PIXELS case too
Previously any code using this function wouldn't link under GTK+ 3 or OS X
where wxHAVE_DPI_INDEPENDENT_PIXELS are defined.

Closes #17310.
2015-12-31 00:26:04 +01:00
Vadim Zeitlin
52a4fac626 Add proper support for wxUSE_NATIVE_PROGRESSDLG
This symbol was wrongly added to include/wx/msw/setup0.h directly in
075ef6551e, so it didn't work when
cross-compiling from Unix (which doesn't use this file) and would have been
lost after any future modification of include/wx/setup_inc.h where it should
have been added in the first place.

Do this now and also make the check for this symbol in wx/progdlg.h a bit more
readable.
2015-12-30 18:54:35 +01:00
Vadim Zeitlin
ed0b899fe5 Fix the build when using mismatching strict ANSI modes with MinGW
Don't use __STRICT_ANSI__ to determine whether a function is available or not
as its value can be different when building the library and the application,
resulting in mysterious link errors.

Instead use the same approach as in aa30a2f97ade6fe019f2f288917296b009bf4221
and just declare the functions that are available but just not declared in
strict ANSI mode manually.

Closes #15793.
2015-12-28 01:27:49 +01:00
Artur Wieczorek
602fe6cb83 Set initial point of the path in wxD2DPathData::wxD2DPathData ctor.
Set initial point to (0,0) for newly created Direct2D wxGraphicsPath path.
2015-12-28 00:08:24 +01:00
Artur Wieczorek
846dde3b36 Fixed drawing ellipse/circle in Direct2D wxGraphicsPath.
Instead of drawing an ellipse as a filled figure draw it as a curve (concatenation of two elliptical arcs).

Closes #17306.
2015-12-28 00:07:00 +01:00
Vadim Zeitlin
bad2538697 Revert "Fix warnings about pointer/int casts in Win32 part of libtiff too."
This reverts commit 6caa5e92c1 because it fixed
a warning during compilation but broke the behaviour of TIFFFdOpen() during
run-time: initializing the union via its int component didn't clear the high
DWORD of the 64 bit thandle_t value, resulting in a wrong value being used.

Closes #17286.
2015-12-26 19:34:06 +01:00
Artur Wieczorek
537fcac633 Disable "Use wxDC" menu item if displayed screen requires wxGraphicContext (drawing sample).
To display "show alpha" and "show graphics" screens there is necessary to use wxGraphicContext and switching to wxDC should blocked in this case.
2015-12-26 17:44:28 +01:00
Artur Wieczorek
3fb70061ae Synchronize menu state in drawing sample with actually selected graphics renderer.
Because graphics renderer is not only selected via menu but also directly in the application (in MyFrame::OnShow) there is necessary to update menu items responsible for selecting graphics context to represent current state of the application.
This is done in EVT_UPDATE_UI handlers where there is checked what graphics renderer is currently in use and state of the menu items is updated accordingly.

Closes #16971.
2015-12-26 17:43:50 +01:00
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