Commit Graph

2114 Commits

Author SHA1 Message Date
Vadim Zeitlin
06458cb89f Fix handling of strings in wxPrintf() when using recent MinGW
MinGW-w64 (and apparently TDM too) defaults to using ANSI stdio functions
nowadays, which interpret format specifiers such as "%s" and "%c" in wide
string functions in the standard-conforming way, i.e. still expecting the
arguments of "char*" type, and not "wchar_t*" as MSVC and older MinGW did.
2016-02-10 15:22:51 +01:00
Vadim Zeitlin
d50abc2d3e Make wxWS_EX_VALIDATE_RECURSIVELY default (and only) behaviour
In practice, almost everybody using validators also seems to use this style,
so make it the default (this hadn't been done when it was originally
introduced because of compatibility concerns, but now, 15+ years later, it's
probably safe enough to change this).
2016-02-09 23:38:23 +01:00
wxBen
526a627fa8 Allow customizing wxRibbon highlight colours
Add wxRIBBON_ART_BUTTON_BAR_LABEL_XXX settings.

Closes #16784.
2016-02-08 02:28:00 +01:00
Vadim Zeitlin
57fa59b81c Merge branch 'listctrl-checkboxes-generic' of https://github.com/MaartenBent/wxWidgets
Implement checkboxes support for the generic version of wxListCtrl too so it's
not available under all platforms.
2016-02-06 19:18:58 +01:00
Andreas Falkenhahn
6a01623a80 Add wxListBox::GetTopItem() and GetCountPerPage()
Implement these methods for all the major ports, add them to the widgets
sample and documentation.

Closes #17189.
2016-02-06 19:13:35 +01:00
Vadim Zeitlin
73f2603917 Fix spurious selection events generation in generic wxDataViewCtrl
Don't send a wxEVT_DATAVIEW_SELECTION_CHANGED event if an already selected
item is clicked, this is unexpected and inconsistent with the other platforms.

Split SelectAllRows(bool) method in a (trivial) SelectAllRows() and a more
useful UnselectAllRows() which now can check if a particular row is selected
and leave it selected in this case, helping implementing the correct logic and
also avoiding an extra unnecessary refresh due to deselecting the item first
and then selecting it again.
2016-02-06 02:04:00 +01:00
Vadim Zeitlin
3631a2d142 Merge branch listctrl-with-checkboxes
Add support for native checkboxes to wxMSW wxListCtrl.

Closes https://github.com/wxWidgets/wxWidgets/pull/153
2016-02-06 01:20:01 +01:00
Maarten Bent
90386df305 Notify Windows shell about file associations changes
This is documented as being required in the MSDN and, in practice, is
necessary for Windows to update the icon cache and show the new icon.

Closes https://github.com/wxWidgets/wxWidgets/pull/195
2016-02-06 00:56:46 +01:00
Vadim Zeitlin
4379f599e8 Implement wxDataViewCtrl::SetIndent() for wxGTK
Use gtk_tree_view_set_level_indentation().
2016-02-05 17:00:57 +01:00
Vadim Zeitlin
73747c457c Document wxOSX/Carbon removal
Mention that requesting it from configure is now silently ignored.
2016-02-03 18:19:14 +01:00
Igor Korot
f5187859cc Add support for wxTE_AUTO_URL to wxOSX
Recognize URLs by using native support for this available since OS X 10.5.

Closes #17137.
2016-02-01 02:16:51 +01:00
John Roberts
33d8d4e57c Correct positioning of popup menus relative to mouse pointer
Also simplify the code by using the native method available since OS X 10.6
instead of emulating it.

Closes #15385.
2016-02-01 01:58:17 +01:00
Vadim Zeitlin
a016e6b896 Allow suppressing warnings from wxImage::LoadFile()
Add wxImage::SetLoadFlags() and static SetDefaultLoadFlags() to allow
suppressing the warning messages that can be logged when loading some files,
notably PNG ones with invalid sRGB profiles which, unfortunately, seem to be
rather common and result in annoying warnings about them with libpng 1.6+.

Closes #15331.
2016-01-31 02:22:55 +01:00
Paul Kulchenko
987235da53 Update the bundled libpng to 1.6.21
This fixes several security and other important bugs present in the previously
used 1.6.2.

Closes #17232.
2016-01-31 01:53:01 +01:00
Igor Korot
aa4aa74154 Don't generate wxEVT_LIST_ITEM_RIGHT_CLICK outside of item area
Make wxGenericListCtrl used under wxGTK and wxOSX behave the same as the
native wxMSW wxListCtrl and wxTreeCtrl under all platforms and only generate
ITEM_RIGHT_CLICK events when an item was actually clicked, i.e. don't generate
them for the clicks completely outside of the client area.

Closes #4711.
2016-01-30 18:54:09 +01:00
Zane U. Ji
71dfb3b414 Fix invisible captions in high contrast mode
Don't use black text on dark background.

Closes #16186.
2016-01-30 18:27:10 +01:00
Vadim Zeitlin
a7d31701ab Work around a crash in wxD2DContext when using gcc
Don't call GetSize() method as gcc can't handle aggregates returned by value
from D2D libraries currently and the code just crashes if this method is
called.

See #17171.
2016-01-30 04:43:46 +01:00
Vadim Zeitlin
0dc57e9e23 Avoid 1px gaps between consecutive underlined words in wxHTML
At least when using standard fonts under MSW, the underlines under the
consecutive words didn't overlap, resulting in ugly gaps between them when
using more than one word as the link text, for example.

Work around this by drawing an extra, slightly offset, underlined space when
the previous cell was drawn underlined.
2016-01-29 17:19:29 +01:00
Vadim Zeitlin
b67ca545cc Add --enable-cxx11 configure option
Make it simpler to enable C++11 support when building wxWidgets, in particular
take care of using the correct standard library under OS X in this case.

Notice that currently we still build the library using C++98 if no C++11
compiler is available, even with this option. We may want to change this to
give an error in such case later instead.

Also skip the check for <type_traits> in configure when C++11 is used, we know
that it's available in this case, so don't waste time checking for it (there
are probably several more checks that could be skipped in C++11 mode too...).
2016-01-24 21:22:15 +01:00
mgimenez
78b19e6811 Add wxTextEntryDialog::ForceUpper()
Just forward it to wxTextCtrll::ForceUpper().

Closes #17291.
2016-01-22 14:41:06 +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
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
David Vanderson
c5659b19b4 Implement wxToolTip::SetDelay() for wxOSX
Set the "NSInitialToolTipDelay" object in NSUserDefaults.

Closes #17322.
2016-01-08 17:02:19 +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
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
Kinaou Hervé
d3931ea660 Add support for CSS "color", "size" and "font" to wxHTML <font>
Simply map them to the existing HTML parameters, just as we already do for a
few other styles.

Closes #16773.
2015-12-02 23:53:00 +01:00
Vadim Zeitlin
fbf59742a4 Don't always turn on wxTE_PROCESS_ENTER in wxOSX
This style was unconditionally used for all multiline controls for some
reason, meaning that wxEVT_TEXT_ENTER could be received even for the controls
not using wxTE_PROCESS_ENTER explicitly, which was unexpected.

Don't do this any more to conform to the expected behaviour.

Also do use wxTE_PROCESS_ENTER for the text control supposed to allow handling
"Enter" in the text sample: surprisingly, it didn't have this style before,
although it was clearly supposed to.

Closes #1913.
2015-11-09 03:51:18 +01:00
Vadim Zeitlin
98176fd7ac Really fix OS version detection for Windows 8.1 and later
Fix several problems in d61b52a60e.

See #15321.

Closes https://github.com/wxWidgets/wxWidgets/pull/114
2015-10-31 18:08:47 +01:00
Vadim Zeitlin
d61b52a60e Use RtlGetVersion() to retrieve the real OS version in wxMSW
Unlike GetVersionEx(), this function still returns the real version and not
the fiction concocted by the OS for each program depending on its manifest.

Also use OSVERSIONINFOEXW instead of OSVERSIONINFOEX as RtlGetVersion() only
exists in the Unicode version.

Closes #15321.
2015-10-30 23:20:47 +01:00
Vadim Zeitlin
04a784dfd3 Hide wxSlider labels too when it's hidden in wxOSX
Derive wxSlider from wxCompositeWindow to ensure that Show() (and other
methods) affect the slider labels as well.

Closes #2388.
2015-10-25 18:47:29 +01:00
Andreas Falkenhahn
d45ba8ce62 Add wxTE_{RIGHT,CENTER} support for multiline wxTextCtrl in wxOSX
Just use -[NSTextView setAlignment].

Closes #13702.
2015-10-22 00:06:45 +02:00
Vadim Zeitlin
5cce48186c Link with shlwapi.lib and version.lib under MSW
These libraries are required now that we don't load the functions from them
dynamically (see e78be14ac1)

Closes #17180
2015-10-07 18:56:33 +02:00
Tobias Taschner
0938141f3e Add Cocoa implementation of wxStandardPaths
Previously wxStandardPathsCF was used for all Mac builds and it used
FSFindFolder() (CoreFoundation) calls in Carbon builds, but many hard coded
values in Cocoa builds. The Cocoa implementation uses NSFileManager and
NSBundle to retrieve the folder locations from the system.

Closes https://github.com/wxWidgets/wxWidgets/pull/89
2015-10-04 01:05:57 +02:00
Tobias Taschner
a0fb808087 Add wxStandardPaths::GetUserDir() to get Desktop, Download etc
All major supported platforms have well defined per-user directories to store
Downloads, Music, Pictures, Videos and the Desktop files. The new method
wxStandardPaths::GetUserDir() allows for a unified way to access these on MSW,
OS X and Unix (if XDG user dirs specification is implemented for the latter).

See https://github.com/wxWidgets/wxWidgets/pull/89
2015-10-04 01:05:23 +02:00
Vadim Zeitlin
de96b0dae7 Implement native wxAuiTabArt for MSW
This wxAuiTabArt implementation uses Windows uxtheme API to draw AUI tabs. A
fallback to generic tab art is implemented for the bottom tabs or if uxtheme
is not available (disabled by user or no manifest file).

Closes https://github.com/wxWidgets/wxWidgets/pull/105
2015-10-04 00:28:00 +02:00
Bogdan Iordanescu
b2c3ad614f Add support for hiding sizer items in XRC
Handle the `<hideitems>` property for sizers and document it.

Also group `minsize` together with `hideitems` in `stdSizerProperties`, which
is used by all sizer classes except `wxStdDialogButtonSizer` in the XRC
schema.
2015-09-24 14:48:11 +02:00
Tobias Taschner
2fff3cd29f Add wxSystemThemedControl and use it in wxMSW
wxSystemThemedControl allows to use the "system theme" (i.e. the theme used by
the system applications such as file manager and which can, surprisingly, be
different from the default one). Currently it is only implemented for wxMSW
and does nothing under the other platforms.

Use wxSystemThemedControl for wxDataViewCtrl, wxListCtrl and, optionally, if
wxTR_TWIST_BUTTONS style is specified, wxTreeCtrl to give them more native
appearance under MSW.

Closes #16414.
2015-09-17 14:49:13 +02:00
Tobias Taschner
b7a89f8746 Add wxRendererNative::DrawItemText() for list-like controls
Add a new method that should be used for drawing the elements of list-like
controls (i.e. wx{List,Tree,DataView}Ctrl and similar).

Implement it for wxMSW natively and provide a straightforward generic fallback
for the other ports.

See #16414.
2015-09-17 14:49:13 +02:00
Artur Wieczorek
865c8565af Fixed setting colours of wxSlider and wxRadioBox in wxMSW.
Sibling windows (like labels and radio buttons) need to be explicitly
refreshed when foreground or background colour is changed. This is implemented
by invoking newly implemented method wxSubwindows::Refresh every time the
colour of the control is changed.

Note: Setting foreground colour of wxRadioBox still doesn't work correctly
when themes are enabled.

Closes #17142.
2015-09-12 03:01:30 +02:00
John Roberts
fe9a5f47f4 Add wxTopLevelWindow::Enable{Maximize,Minimize}Button()
Allow to disable maximize and minimize buttons dynamically just as we already
allow to disable the "Close" button using EnableCloseButton().

Currently implemented for MSW and OSX only.

Closes #17133.
2015-09-06 14:17:46 +02:00
John Roberts
6055d8d0a5 Implement wxTopLevelWindow::EnableCloseButton() for wxOSX
Just forward this wx method to Cocoa standardWindowButton:NSWindowCloseButton.

See #17133
2015-09-06 14:16:39 +02:00
Vadim Zeitlin
8d6a2b3921 Don't send wxActivateEvent for minimized windows in wxMSW
Unexpectedly, minimizing the window by clicking on its taskbar icon resulted
in a wxActivateEvent. This broke the focus handling in wxTLW and resulted in
debug messages about ::SetFocus() failure whenever the window was minimized in
this way.

It also seems that other existing code doesn't take into account the
possibility of getting an "active" activation event when the window is
minimized and this doesn't happen in the other ports, so don't send this event
in wxMSW neither.

Closes #17128.
2015-09-04 16:23:13 +02:00
Tobias Taschner
b9d46f0719 Add ZIP64 support to wxZipInputStream and wxZipOutputStream.
Zip archives with sizes larger 4GB or containing files larger than 4GB or more
than 65k files are saved in ZIP64 format which adds a few additional footers
and extra fields to allow to exceed these limits.

This implements the PKWARE specification available at:
https://www.pkware.com/support/zip-app-note

It has been tested for compatibility with Windows internal ZIP folders, OSX
Archive Utility and 7-zip.

Closes https://github.com/wxWidgets/wxWidgets/pull/72
2015-08-14 15:39:45 +02:00
Tobias Taschner
0f39ea0963 Add support for UTF8 filenames in wxZipInputstream.
Zip files may mark filenames and comments via bit 11 in the general purpose
flags. If this flag is set use wxConvUTF8 instead of the default wxConv.
2015-08-14 15:38:50 +02:00
Artur Wieczorek
c774494009 Use standard wxArtProvider icons for wxEditableListBox buttons.
This make wxEditableListBox appearance more native under the platforms where
the stock icons are used, e.g. GTK.

Closes #16885.
2015-08-09 01:39:41 +02:00
Tobias Taschner
c87c432033 Fix wxGetOsDescription() for Windows 10.
Check for Windows 10 was implemented as check for version 6.4 but the final
version of Windows 10 actually returns 10.0.
2015-08-04 14:42:46 +02:00
Vadim Zeitlin
9bc3ab1ea7 Add wxNativeWindow allowing to easily embed native widgets in wx.
Implement the class for wxMSW, wxGTK and wxOSX/Cocoa, show it in the widgets
sample and add documentation for it.
2015-08-03 17:57:42 +02:00
Suzumizaki-Kimitaka
28587c97d8 Add support for Unicode to wxStackWalker.
Use wide-char versions of debug help functions if available, falling back to
the narrow char ones otherwise.

Also improve 64 bit support by using 64 bit versions of the functions if
available as well.

Closes #15138.
2015-07-27 02:44:36 +02:00
Vadim Zeitlin
39ad820bee Check for Win32 exceptions inside our WindowProc().
Don't let unhandled Win32 (i.e. structured) exceptions escape from wxWndProc()
as they can just disappear into thin air when running under WOW64 as 32 bit
exceptions can't propagate through 64 bit kernel. So catch them immediately
and pass them to the global handler while we have the chance to do it, as
we're never going to get it in the outer __try/__catch block in wxEntry() in
src/msw/main.cpp.

In particular, this allows to catch crashes in wxEVT_PAINT handlers, such as
the one in debughlp sample, again.

Closes #16656.
2015-07-27 02:30:40 +02:00