Commit Graph

60832 Commits

Author SHA1 Message Date
mgimenez
78b19e6811 Add wxTextEntryDialog::ForceUpper()
Just forward it to wxTextCtrll::ForceUpper().

Closes #17291.
2016-01-22 14:41:06 +01:00
Vadim Zeitlin
0fa1ddb368 Check that the dialog had been created in wxTextEntryDialog
Don't crash if setter functions are called before Create() which could happen
for the default-constructed dialogs.

See #17291.
2016-01-21 22:49:42 +01:00
Maarten Bent
3b98570f57 Miscellaneous improvements to the multimedia keys support
Simplified mapping keys on Windows.

Handle multimedia keys in the keyboard, text and treetest samples.

Ignore multimedia keys in wxRichTextCtrl.
2016-01-20 18:56:03 +01:00
Tobias Taschner
58c7e6d54f Add wxStaticBitmap::SetScaleMode() to control bitmap display size
This allows a bitmap to scale with the size of the wxStaticBitmap control.
Scaling can be controlled to fill the control with or without changing the
bitmaps aspect ratio.
2016-01-20 18:55:14 +01:00
bogiord
9c95b398c8 Fix docs for wxGrid and friends
Add a couple of missing @name commands; the corresponding comments were
appearing in the wrong place without them.

Avoid unintended effects of JAVADOC_AUTOBRIEF by using Qt-style comments
instead of Javadoc.

A couple of minor wording corrections.
2016-01-20 18:53:38 +01:00
bogiord
e7fa9b0c10 Add nullptr checks to wxGridTableBase::Set(Row|Col)Attr
wxGridTableBase::SetAttr (for cells) does check its attr parameter for
nullptr, but the check was missing from the row and column functions.
Adding it makes it possible to use a nullptr argument to reset the
attributes.
2016-01-20 18:48:02 +01:00
Artur Wieczorek
183a88062a Refactor procedure to highlight selected colours in generic colour dialog.
Simplify procedure to draw frame around (un-)selected colour item by using dedicated wxRect/wxPoint methods and by removing duplicated code.
2016-01-18 20:44:16 +01:00
Artur Wieczorek
3a971a6063 Use dialog background colour to draw rectangle when removing highlight from colour item.
Use neutral dialog background colour to overpaint rectangle used to highlight colour item in generic colour dialog.
2016-01-18 20:40:40 +01:00
Maarten Bent
600bfed6c5 Use correct order in wxD2DPathData ctor initializer list
Resolve (harmless) -Wreorder warning introduced in 602fe6cb.

Closes https://github.com/wxWidgets/wxWidgets/pull/172
2016-01-18 14:44:09 +01:00
Tobias Taschner
1f0a82b6a7 Update outdated year references to 2016.
Use 2016 instead of 2015, mostly in version info files.
2016-01-18 14:30:54 +01:00
Artur Wieczorek
390091cc24 Don't set alpha flag for wxBitmaps with depth < 32 bpp (wxMSW).
Flag indicating that bitmap contains alpha channel can be set only for 32 bpp bitmap.
2016-01-17 16:19:52 +01:00
Vadim Zeitlin
884f3c623d Fix wxMSW wxMimeTypesManager compilation in UTF-8 build
Use wxStringCharType with wxS(), not wxChar (which should be used with wxT())
to fix UTF-8 build after 0ed580f451.

Closes #17335.
2016-01-17 14:09:04 +01:00
Andrius Balsevičius
1d0cd95c8e Update Lithuanian translations 2016-01-17 14:04:36 +01:00
Paul Cornett
b74923eb29 add missing wxOVERRIDE 2016-01-16 11:08:25 -08:00
Paul Cornett
03aae8254f remove unused private member variables 2016-01-16 11:04:27 -08:00
Paul Cornett
6245e2d996 remove const from pass-by-value parameters 2016-01-16 11:03:50 -08:00
Paul Cornett
e5e3f6fffa remove useless wxMax(), an unsigned value is never less than 0 2016-01-16 10:59:02 -08:00
Paul Cornett
56701052eb remove const from pass-by-value parameters 2016-01-16 10:55:01 -08:00
Paul Cornett
c557f66eaf Fix SetWindowStyleFlag() override
Base class SetWindowStyle() is not virtual
2016-01-16 10:40:23 -08:00
Artur Wieczorek
976e3115b7 Always use DIBs in wxMSW wxGCDC.
Ensure that 32bpp bitmaps selected in wxMemoryDC use DIB for their internal
representation as GDI+ functions don't seem to work correctly with DDBs.

Note: Code responsible for converting and fixing the bitmap has been moved
from wxGCDCImpl::wxGCDCImpl to wxGDIPlusRenderer::CreateContext because this
is the common entry point for creating context for GDI+.

Closes #17324.
2016-01-16 13:20:06 +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