Commit Graph

62321 Commits

Author SHA1 Message Date
Lauri Nurmi
a9a980a71b Set proper level for modal dialogs of float-on-parent frames on wxOSX
This prevents the dialog from getting hidden behind its parent after
task switching the application into background and back to front.

Related to #4355, but not a fix.
2017-02-12 00:44:47 +02:00
Cătălin Răceanu
05b980aba1 Fix wxMSW wxSpinCtrl appearance: show arrows inside the control
As recommended in the "Spin Controls" MSDN documentation (see
https://msdn.microsoft.com/en-us/library/windows/desktop/dn742439.aspx), put
the spin control inside the associated "buddy" edit control and not near it.

Closes #12297.

Closes https://github.com/wxWidgets/wxWidgets/pull/410
2017-02-11 23:39:31 +01:00
Artur Wieczorek
8e47b3ca97 Support multiline strings in wxPostScriptDC::DrawText() and DrawRotatedText()
'show' operator in PostScript doesn't support printing newlines, so we need to split the string into lines manually and print each line separately.

Closes #17798.
2017-02-11 23:05:37 +01:00
Artur Wieczorek
506b51cae5 Add drawing a multi-line text to the printing sample
This can be helpful in testing API to draw multi-line texts.

See #17798.
2017-02-11 21:52:51 +01:00
Artur Wieczorek
7ebc60b1fe Show the version of Scintilla used in the about dialog of the stc sample
Call wxStyledTextCtrl::GetLibraryVersionInfo() to see what version of Scintilla is being used.
2017-02-09 22:27:47 +01:00
Václav Slavík
02276c6ebb Fix wxMSW toolbar if using mix of alpha and masks
If the user mixes bitmaps with alpha channel and without it, wxMSW
toolbar rendered the masked bitmap with black background due to changes
in 195df9af7f

In such case, convert bitmaps that don't have an alpha channel into ones
that do so that they are all consistent and can use the same rendering
method.

Fixes #17795.
2017-02-08 14:50:10 +01:00
mirh
f920ea8705 Ignore files created by MSVS 2017 too
Added newest VC.db and made more coherent exclusions for pre-vs15 update2 cache files.
2017-02-07 19:12:27 +01:00
Václav Slavík
b68853ae62 Fix wxIconBundle::GetIcon(wxDefaultSize) in wxOSX
GetIcon() relies on wxSYS_ICON_X/Y to determine the size to return if it
isn't specified and FALLBACK_SYSTEM is used. But wxSYS_ICON_X/Y is not
implemented in many ports and this code fails.

If wxSYS_ICON_X is -1, usea reasonable default that is the same as other
platforms use (32) and also add FALLBACK_NEAREST_LARGER to allow picking
some other size if 32x32 isn't available.

Doing this fixes an assert in wxLogDialog on macOS if a non-native art
provider (such as Tango) isn't available.
2017-02-06 12:57:58 +01:00
Vadim Zeitlin
2675579371 Upgrade bundled expat to the latest 2.2.0 release
Closes https://github.com/wxWidgets/wxWidgets/pull/404
2017-02-05 02:55:07 +01:00
Vadim Zeitlin
80d15dc87b Document Expat 2.2.0 upgrade in the change log 2017-02-05 02:54:38 +01:00
Scott Talbert
b1fd65a903 Document missing wxGrid methods
Add documentation for the previously undocumented
IsCellEditControlShown(), Deselect{Col,Row,Cell}() and SetAttr().
2017-02-05 02:50:53 +01:00
Artur Wieczorek
f7e88c0db6 Check if printer native data object is of type wxPostScriptPrintNativeData prior to call its methods
Under wxGTK (for instance), wxPrintData::GetNativeData() returns pointer to wxGtkPrintNativeData so calling wxPostScriptPrintNativeData methods on it crashes.

Closes #13536
2017-02-04 00:24:51 +01:00
Václav Slavík
6aff1c8c64 Compilation and warnings fixes for wxUSE_HELP=0 2017-02-02 18:22:10 +01:00
Václav Slavík
f28bdb9a92 Fix use of wrong type for firstResponder return value 2017-02-02 18:22:10 +01:00
Catalin
35b4c82f18 Add libexpat upgrade example for MSW. 2017-02-02 02:18:02 +02:00
Catalin
4f1e9017cf Define XML_STATIC in Expat header rather than Expat projects.
This defines XML_STATIC unconditionally in Expat sources themselves as the built-in Expat is always used as a static library, so this solution is simpler and more portable.
2017-02-02 02:02:57 +02:00
Catalin
881e252d90 Update the version of Expat used to 2.2.0 2017-02-02 00:56:09 +02:00
ousnius
8b6a5c88ab Translate wxCollapsiblePane text when loading from XRC
Use the correct GetText() instead of GetParamValue() for getting the user-readable
"text" string from XRC.
2017-02-01 19:13:03 +01:00
Václav Slavík
288a301b97 Don't corrupt pasted UTF-16 text in wxOSX
Fix breakage introduced by 587067bc68:
pasting text could mangle some Unicode characters if it was in UTF-16.
The code in that commit converted newlines all right, but it also
converted _any_ occurrence of 0x0d to 0x0a, which wasn't very Unicode
friendly.

Fixed by partially reverting the change and adding a dedicated UTF-16
variant of wxMacConvertNewlines13To10() instead.
2017-01-29 13:55:56 +01:00
Artur Wieczorek
5520702674 Typeface name of the font must not exceed LF_FACESIZE characters 2017-01-28 21:47:49 +01:00
Artur Wieczorek
f0bf5b6fd7 Add more status checks in Direct2D renderer
See #17790.
2017-01-28 21:46:42 +01:00
Martin Srebotnjak
6927c49311 Update Slovenian translations
Now at 96%.
2017-01-28 18:33:23 +01:00
Artur Wieczorek
7eadda902f Use wxSwap() function to swap values of variables 2017-01-27 23:02:58 +01:00
Artur Wieczorek
cd676d1663 Clean up DrawText() and DrawRotatedText() (wxPostScriptDC)
Move shared code to the separate method DrawAnyText() instead of duplicating it.
2017-01-27 23:02:58 +01:00
Artur Wieczorek
ba5d07f4b4 Fix underline length for underlined text (wxPostScriptDC)
Draw underline relatively to the baseline and obtain line parameters using 'stringwidth' operator instead of calculating them manually based on the parameters returned by DoGetTextExtent(), which are not always accurate (e.g. if no AFM files are available).

Closes #17788.
2017-01-27 23:02:43 +01:00
Robin Dunn
84c1e48957 Merge pull request #344 from RobinD42/master-cherrypick-wxPy
Docs and other updates for wxPython
2017-01-23 20:05:45 -08:00
Robin Dunn
ae288823c9 wxSystemSettings does not inherit from wxObject 2017-01-23 15:05:04 -08:00
Artur Wieczorek
e3c3a0f188 Fix calculating position of rotated text (wxPostScriptDC)
Given top-left position of the drawn text should be converted to the bottom-left position, taking into account rotation angle.

Closes #10940
2017-01-22 13:19:37 +01:00
Vadim Zeitlin
26c3094932 Add declarations to fix the build with MinGW 5.3.0 in C++11 mode
Fix the build with -std=c++11 (instead of -std=gnu++11) by providing even
more declarations for the functions wrongly excluded from MinGW headers in
"strict ANSI" mode ourselves.
2017-01-20 21:24:40 +01:00
Vadim Zeitlin
7da7d85977 Fix typo in wxRect::{x,y} documentation
Use "top-left" instead of "top-level".

Closes #17778.
2017-01-20 14:32:12 +01:00
Vadim Zeitlin
cfc733d16c Add a simple EditorConfig coding style file
EditorConfig seems to be supported by more and more editors/IDEs, including
even the upcoming MSVS 2017, so it seems useful to provide its config file.
2017-01-20 14:32:12 +01:00
Tobias Taschner
b026674913 Update documentation to mention Visual Studio 2017 support
Extend the list of MSVS version to include the latest 2017 one.
2017-01-16 22:28:40 +01:00
Tobias Taschner
3206df50c4 Add Microsoft Visual Studio 2017 solution file for building wxMSW
Allow building with VS15 out of the box.

Closes https://github.com/wxWidgets/wxWidgets/pull/353
2017-01-16 17:02:10 +01:00
Vadim Zeitlin
79773dec34 Fix harmless unused parameter warning in wxGTK3
Artificially use "objectName" with GTK+ < 3.20.
2017-01-16 03:38:19 +01:00
Manuel Martin
b28dd88994 Improve new wxGLCanvas compatibility with old hardware and code
Combined patch with the following changes:
- Don't add wxGLAttributes::Defaults() when the attributes-list is NULL.
- Add display default attributes used in wx versions before 3.1 when the
  attributes-list is NULL. These attributes are different for each platform.
- Fix wxMSW PixelFormatDescriptor initialization.
- Don't set color buffers when RGBA() is used.
- Fix setting colour sizes in OS X and a few other fixes.
- Make documentation more clear about these subjects.

Closes #17425.
2017-01-16 03:25:49 +01:00
Vadim Zeitlin
fad33800dc Don't crash if the model is badly defined in wxGTK wxDVC
Asserting before dereferencing a null pointer (in BuildBranch(), called
immediately after the asserts in question) is useless, as usual. Use wxCHECK
to complain and avoid crashing instead.

Closes #17776.
2017-01-15 17:16:04 +01:00
Vadim Zeitlin
5ae9694506 Don't use DLL export declarations on wxDoc{Child,Parent}FrameAny
These classes only have inline methods and so don't need to be exported in the
first place and, moreover, doing it results in link problems where these
templates are instantiated for a type not used inside the library itself.

Closes #17777.
2017-01-15 17:07:43 +01:00
Vadim Zeitlin
0b6319b506 Merge branch 'mingw32-5.3-fixes'
Work around several problems in the latest MinGW (not w64) 5.3 release.
2017-01-15 17:00:14 +01:00
Vadim Zeitlin
6c827301d1 Fix regex library compilation after MinGW _stricmp() fixes
Don't use extern "C" in C code.
2017-01-14 01:16:51 +01:00
Vadim Zeitlin
da36cbff06 Don't over promise in wxItemContainer documentation
It only accepts std::vector<wxString>, not std::vector<T> for any type
convertible to wxString as both the documentation and the code misleadingly
claimed.
2017-01-14 00:25:35 +01:00
Vadim Zeitlin
22406c7d86 Fix configure build with MinGW 5.3.0
Provide our own wcsnlen() declaration as the function is detected by configure
but is not declared in MinGW headers.

Closes #17762.
2017-01-14 00:07:44 +01:00
Vadim Zeitlin
7c22e4257b Fix build with MinGW 5.3 in debug mode
Due to a bug in MinGW (see https://sourceforge.net/p/mingw/bugs/2322/),
_stricmp() and _strnicmp() declarations are not visible when compiling without
optimizations. Work around this by declaring them ourselves.

See #17762.
2017-01-13 23:52:13 +01:00
Vadim Zeitlin
7477e94b2d Fix build problems due to "missing" newer MSW APIs with MinGW 5.3.0
Set WINVER/_WIN32_WINNT ourselves before letting MinGW to set them to very low
values corresponding to Windows 2000 on its own and preventing our code from
seeing any later additions to the Windows API, such as AttachConsole()
function used in src/msw/app.cpp.

Closes #17677.
2017-01-13 23:40:37 +01:00
Vadim Zeitlin
572db9c0a1 Extract setting WINVER/_WIN32_WINNT to a separate file
This will allow reusing it from other places.
2017-01-13 23:39:52 +01:00
Václav Slavík
1f56389e8b Fix generic wxDVC::EnsureVisible() to show full row
Generic wxDataViewCtrl's EnsureVisible() previously only ensured that at
least some part of the item (even if just 1px of it) was visible,
instead of being fully shown.
2017-01-12 17:46:29 +01:00
Václav Slavík
195df9af7f Fix incorrect alpha rendering in wxToolBar (MSW)
wxToolBar::Realize() code for handling bitmaps with alpha channel was
incorrectly blending them with the toolbar’s background color, resulting
in much lighter appearance and broken antialiasing.

Fix it by clearing the composite bitmap to be initially transparent if
bitmaps with alpha channel are used. Doing so uncovered another bug in
how the composite RGBA bitmap was passed to native toolbar control, so
fix that as well.
2017-01-12 17:39:08 +01:00
Artur Wieczorek
0649b0d028 Use wxGraphicsContext::CreateFromUnknownDC in the printing sample
Creating graphics context for the various flavors of wxDC can be simplified by using this newly introduced API.
2017-01-11 20:32:43 +01:00
Artur Wieczorek
e5b5049cc3 Make wxGraphicsContext::CreateFromUnknownDC() operational also when C++ RTTI is not used
Use wxDynamicCast() to cast to the various wxDC types if wxNO_RTTI is defined.
2017-01-11 20:31:11 +01:00
Václav Slavík
587067bc68 Fix pasting multiline text in wxOSX to not use \r
Use wxMacConvertNewlines13To10(), not wxMacConvertNewlines10To13() when
copying content from native pasteboard. Perform this conversion not only
for 8bit text, but for UTF-16 one (which is the one actually used on
modern OS X versions) as well.
2017-01-11 16:48:19 +01:00
Václav Slavík
eecf084d4d Implement wxClipboardTextEvent support in wxOSX
Emit wxEVT_TEXT_{COPY,CUT,PASTE} from NSTextView methods, calling native
implementation if not handled. NSTextField-based wxTextCtrl is not
supported, because it doesn't have the copy:/cut:/paste: methods.
2017-01-11 16:46:32 +01:00