Commit Graph

7144 Commits

Author SHA1 Message Date
Vadim Zeitlin
3d6334f0f1 Mention wxGetOsDescription() removal in the change log
Even though this function was private and not available in the default build
(in which wxUSE_OLE==1, while this function was only defined with
wxUSE_OLE==0), still mention its removal for completeness.
2017-06-01 00:40:49 +02:00
Vadim Zeitlin
de47af2f0f Merge branch 'configure-enhance'
Miscellaneous enhancements to configure
2017-05-28 16:21:21 +02:00
tm
7ce3693956 Add support for bitmaps to wxToggleButton XRC handler
Handle "bitmap" and "bitmapposition" attributes in wxToggleButton XRC handler,
just as it's already done for wxBitmap and wxBitmapToggleButton.

Closes #17850.
2017-05-28 16:05:38 +02:00
tm
0a3720beff Handle wxST_ELLIPSIZE_XXX styles in wxStaticText XRC handler
Add forgotten/missing styles.

See #17850.
2017-05-28 16:05:31 +02:00
Vadim Zeitlin
2f8a343b22 Add an option for reproducible library builds
This can be useful to the library packagers, notably under Debian.

Closes #17000.
2017-05-27 19:03:32 +02:00
Vadim Zeitlin
1c4071a3cb Remove obsolete and useless --enable_no_deps configure option
This option didn't do anything for the last 14 years, ever since the switch to
bakefile-generated makefiles in fe0895cf82, so
remove it from configure and stop mentioning it in documentation.

Use --disable-dependency-tracking to do what this option used to be doing 15
years ago.
2017-05-27 19:03:31 +02:00
Vadim Zeitlin
66865ed714 Merge branch 'icon-bundle-from-msw-res'
Add support for using icons from MSW resources in wxIconBundle.

Closes https://github.com/wxWidgets/wxWidgets/pull/482
2017-05-20 17:03:50 +02:00
Vadim Zeitlin
f5a0893ee9 Update comment and change log after MSW wxIconBundle improvements
It is now possible to load icons from a bundle too.
2017-05-20 17:01:59 +02:00
Vadim Zeitlin
f0c5f35dc3 Remove the obsolete wxPython overview
This was really old and better and more up-to-date documentation is included
in wxPython itself.
2017-05-20 16:50:59 +02:00
Vadim Zeitlin
2ed5d9f716 Mention workaround for a bug with parallel build with mingw32-make
When using -jN, setup_h needs to be created first to avoid a bug due to
missing dependencies in the current makefiles which breaks the build
otherwise.
2017-05-07 00:16:55 +02:00
Vadim Zeitlin
d0aaea5143 Merge branch 'staging' of https://github.com/stahta01/wxWidgets
Allow building wxGTK for MSW using MSys2 and configure.

Close https://github.com/wxWidgets/wxWidgets/pull/428
2017-05-04 02:51:52 +02:00
Artur Wieczorek
b375d81499 Use wxDataObject methods to retrieve data from clipboard when wxUSE_OLE==0
Dedicated wxDataObject::SetData() function can be used to import raw
clipboard data to the corresponding instances of wxDataObject and hence
there is no need to duplicate data retrieval code.
2017-05-03 22:48:04 +02:00
Artur Wieczorek
15e2dcc38d Fix adding bitmap to clipboard when wxUSE_OLE == 0 (wxMSW)
When CF_DIB object is placed to the clipboard, a handle to the memory
object containing a BITMAPINFO structure followed by the bitmap bits should
be passed to SetClipboardData(), not a handle to a DIB section.
Also, wxClipboard is the owner of the wxDataObject being added, so it
should release passed object.
2017-04-30 21:39:50 +02:00
Artur Wieczorek
b1fad4da44 Convert 0RGB wxBitmaps to RGB when copying them to clipboard
Not all applications recognize properly 0RGB bitmap format so for the sake
of interoperability bitmaps in such format should be converted to plain
24 bpp RGB format prior to being copied to the clipboard.

Closes #17640.
2017-04-30 21:35:01 +02:00
Artur Wieczorek
d5c46e87a6 Fix inserting multiple items to wxRearrangeList
In wxRearrangeList implementations (like wxMSW) where DoInsertItemsInLoop()
and DoInsertOneItem() are not used to insert multiple items, DoInsertItems()
has to be overriden to do this insertion.

See #17836.
2017-04-28 23:57:36 +02:00
Artur Wieczorek
37ecd7b760 Fix displaying labels of wxRadioBox items
Labels containing mnemonic prefixes (&) and literal underscore characters
have to be converted to the proper GTK labels where underscore
characters act as mnemonic markers. If label contains mnemonic then
dedicated function gtk_radio_button_new_with_mnemonic() should be used
to create radio button item.

Closes #17419.
2017-04-25 18:15:34 +02:00
Vadim Zeitlin
d10c600773 Add instructions for checking ABI compatibility to release HOWTO
Explain how to use abi-compliance-checker.
2017-04-22 15:58:13 +02:00
Vadim Zeitlin
dd134b9534 Fix wrong example using printf() in wxDateTime overview
Use wxPrintf() and remove the c_str() call which is redundant with it instead
of using printf() which can't be used with non-POD objects like wxCStrData
returned by c_str() in wx 3.0+.
2017-04-19 17:07:44 +02:00
Artur Wieczorek
003cb8a9ce Document recent wxMemoryDC::Blit() fix in changelog
Document changes introduced in 0ac0f4b259.
2017-04-14 18:31:26 +02:00
Vadim Zeitlin
e9ce55e000 Fix wxRmdir() with non-ASCII paths
Don't apply at best unnecessary, and actually harmful, as it uses a wrong
conversion, fn_str() when calling wxRmDir() which takes wxString.

Update unit tests to check that wxRmdir() now works with non-ASCII filenames
too.

Closes #17644.
2017-04-01 19:12:27 +02:00
jprotopopov
9b1afaa7a6 Don't crash in wxFFile::Eof() and Error() if file is closed
Assert and return false instead, this is more developer-friendly.

Add unit tests to check that these functions really work as expected when
called on a closed file.

Closes #17828.
2017-04-01 18:43:13 +02:00
orbitcowboy
f8ea4d61bc wxEnumProperty: Fixed wrong variable name in Doxygen documentation. 2017-03-22 18:03:24 +01:00
Vadim Zeitlin
3eda902331 Merge branch 'more-xdg-dirs'
Add possibility to use wxStandardPaths and, hence, wxFileConfig, in
XDG-compliant (but backwards-incompatible) mode.

Closes #17727.
2017-03-15 00:49:11 +01:00
New Pagodi
91a2869b0e Extend FindText() to return end position of matched text in wxSTC
New 5th parameter of FindText() can be used to receive the end position of matched text returned by SCI_FINDTEXT API.

Closes #17305.
Closes https://github.com/wxWidgets/wxWidgets/pull/23
2017-03-13 20:21:41 +01:00
Vadim Zeitlin
f6b91ad143 Mention wxStandardPaths::SetFileLayout() in the change log 2017-03-09 18:08:23 +01:00
New Pagodi
1bcb30f6d7 Add wxStyledTextCtrl::AutoCompGetCurrentText()
Added support for SCI_AUTOCGETCURRENTTEXT API.

Closes #16263.
2017-03-07 19:15:46 +01:00
Tim S
d88e110256 Added samples to test to wxGTK MSys2 directions.
Also, added option "--disable-precomp-headers".
And, changed MSys2 packages to install.
2017-03-07 12:47:35 -05:00
Tim S
ee0525386a Added MSys2 wxMSW configure build directions. 2017-03-07 12:47:34 -05:00
Tim S
cb67b07629 Added directions to build wxGTK/Win32 using MSys2. 2017-03-03 13:37:16 -05:00
Artur Wieczorek
b308ff3746 Document bounding box fix in changelog
Document changes introduced in ae57d89df8.
2017-03-02 23:46:54 +01:00
Artur Wieczorek
74ab36c125 Simplify PostScript code generated by wxPostScriptDC to draw elliptic arc
Optimize procedure 'ellipticarc' by doing all operations on the operand stack instead of creating local dictionary and temporary variables.
2017-02-22 21:23:44 +01:00
Artur Wieczorek
f49528cc2f Fix DrawArc() implementation in wxPostScriptDC
Draw pie, not arc, if current brush is not transparent.
Also simplify the code by invoking PostScript 'arc' operator only once if pie is drawn.

Closes #17805.
2017-02-22 21:09:17 +01:00
Artur Wieczorek
b37884b2cb Optimize PostScript code generated by wxPostScriptDC
PostScript code to register (and re-encode) given font should be emitted only once. Once registered, the font is available in the entire document and there is no need to register it again.
2017-02-20 21:56:34 +01:00
Vadim Zeitlin
ef3c0c83af Merge branch 'osx-fix-dialog-level-on-floating-frames-master' of https://github.com/lanurmi/wxWidgets
Closes #4355.
2017-02-20 17:56:50 +01:00
Lauri Nurmi
b8192cb8e1 Allow hiding command line arguments from Usage()
Add wxCMD_LINE_HIDDEN wxCmdLineParser flag allowing to hide options and/or
parameters.

A hidden/unlisted argument is processed as usual, but not shown in the output
given by Usage(). A use case for such could be diagnostics switches that
should exist but are not useful to the end user.

Closes https://github.com/wxWidgets/wxWidgets/pull/390
2017-02-20 17:53:04 +01:00
New Pagodi
e68cafaf94 Remove references to never generated wxSTC events
EVT_STC_KEY and EVT_STC_URIDROPPED events are never generated so there is no need to reference them in the code and documentation. For backwards compatibility reasons their declarations are not entirely removed but marked as deprecated.

Closes #17688.
2017-02-16 18:18:13 +01:00
New Pagodi
68888ca0a2 Upgrade Scintilla component to 3.7.2
Closes #17705.

Closes https://github.com/wxWidgets/wxWidgets/pull/409
2017-02-12 19:56:21 +01:00
Artur Wieczorek
25b0c48e0c Update changelog
To reflect changes introduced in 8e47b3ca97.
2017-02-12 09:32:21 +01:00
Vadim Zeitlin
e125c3b657 Allow disabling unsafe implicit conversions in wxString
While we have to keep these conversions enabled by default, they are very
dangerous as they can result in silent data loss on any system not using a
locale with UTF-8 encoding, i.e. always under MSW.

Allow mitigating this by defining wxNO_UNSAFE_WXSTRING_CONV when compiling the
application code using the library, which makes these conversions invisible to
the user code, and so can be used without recompiling the library.

Also add wxUSE_UNSAFE_WXSTRING_CONV which can be set to 0 when compiling the
library to disable these conversions globally for all applications using it.

Closes #11830.
2017-02-12 02:29:30 +01:00
Vadim Zeitlin
dbc4e4dc52 Add a section with compatibility-related macros to the documentation
Although WXWIN_COMPATIBILITY_x_y macros were mentioned in the backwards
compatibility overview, it seems appropriate to also document them with all
the other macros on the page dedicated to them.
2017-02-12 00:27:26 +01: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
Vadim Zeitlin
80d15dc87b Document Expat 2.2.0 upgrade in the change log 2017-02-05 02:54:38 +01:00
Catalin
35b4c82f18 Add libexpat upgrade example for MSW. 2017-02-02 02:18:02 +02: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
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
Artur Wieczorek
e811c0640a Optimize creating wxCairoContext from wxMemoryDC associated with ARGB wxBitmap (MSW)
Legacy API cairo_win32_surface_create() can create only 24 bpp RGB surfaces but new API cairo_win32_surface_create_with_format() introduced in 1.15.4 supports creating also 32 bpp ARGB surfaces.
So, this new API can be used to create ARGB surface directly from ARGB bitmap (HDC), superseding current implementation based on the access to the bitmap data with cairo_image_surface_create_for_data().
Unfortunately, 0RGB bitmaps are not supported by cairo_win32_surface_create_with_format() and for such bitmaps surface has to be still created from bitmap data.
2017-01-10 21:34:51 +01:00
Artur Wieczorek
6cef4eaa11 Refactor code in wxQuantize() for MSVC to avoid crash
VC++ compilers (at least up to VS 2015) seem to generate incorrect code for the dithering code taken from libjpeg (pass2_fs_dither() function), where it is known to create problems too.
Refactor the code to avoid invalid optimization in this function and turn optimization on.

Closes #17764.
2017-01-10 21:31:59 +01:00
Vadim Zeitlin
fad9c688e6 Merge branch 'libpng-1.6.28' of https://github.com/catalinr/wxWidgets
This brings in several bug fixes and optimizations (notably the use of SSE),
see src/png/CHANGES for full details.

Closes https://github.com/wxWidgets/wxWidgets/pull/384
2017-01-07 23:20:57 +01:00
Catalin
7f54eba05c Define PNG_ZLIB_VERNUM as 0. 2017-01-07 01:12:11 +02:00
Catalin
72971d3329 Add libpng upgrade example for MSW. 2017-01-06 18:16:00 +02:00
Tobias Taschner
e0a2e09031 Update year in copyright notices to 2017
Use 2017 instead of 2016, mostly in version info files.

Closes https://github.com/wxWidgets/wxWidgets/pull/379
2017-01-04 11:25:00 +01:00
Tobias Taschner
e885de58eb
Add documentation on using CMake with wxWidgets 2017-01-03 20:53:11 +01:00
Laurent Poujoulat
632997e449 Fix parsing RGBA string in wxColour::FromString()
Using "%20c" in scanf() doesn't work unless we really have exactly 20
characters, so use "%20[^)]" to take up to 20 characters until the closing
parenthesis instead.

Closes #17739.
2016-12-19 19:42:54 +01:00
VZ
5551932c25 Allow using Bind() with non-public inheritance in C++11 code
Using Bind() with a method of the class deriving from wxEvtHandler
non-publicly used to result in a compile-time error, but at least with C++11
we can detect this case and allow the code to compile.

Closes #17623.
2016-11-29 19:32:40 +01:00
Jens Göpfert
c43b59616f Make Ctrl+A not work in multiline wxTextCtrl in MSW
The native EDIT control doesn't handle this key combination, but RICHEDIT does
and people just expect it to work, so handle it at wxMSW level.

Closes https://github.com/wxWidgets/wxWidgets/pull/300
2016-11-24 02:10:39 +01:00
Paul Cornett
0ef695ef9b Revert d30673e5, it's completely broken. See #17089 2016-11-23 09:28:28 -08:00
Vadim Zeitlin
fe685bc4c6 Allow pasting using Cmd+V in wxTextCtrl with wxTE_PASSWORD style
For some reason known only to Apple, NSSecureTextField allows pasting text
into it using its standard context menu, but not using the standard Cmd+V
keyboard shortcut. Moreover, apparently the control does something special to
disable it because pressing Cmd+V does result in a call to
-[NSSecureTextField control:textView:doCommandBySelector:], but with a dummy
"noop:" selector.

Detect this specific situation and check if we're called while handling Cmd+V
event and, if this is indeed the case, do paste the text into the control.

While it could be argued that this changes the platform behaviour, it seems
very hard, if not impossible, to imagine a situation in which this would be a
problem while not being able to easily paste into password fields is
definitely a real usability bug.
2016-11-22 15:01:19 +01:00
Andreas Falkenhahn
d5c008da03 Fix setting alignment for wxOSX wxTextCtrl with wxTE_DONTWRAP
Don't make the controls with wxTE_DONTWRAP (a.k.a. wxHSCROLL) style
"infinitely" wide, but just "very" wide to allow alignment still work in it.

See #17529.
2016-11-22 02:29:13 +01:00
Vadim Zeitlin
dcb1229f41 Don't send mouse events to disabled windows in wxOSX
Disabled controls are not supposed to accept any input, so don't send any
mouse events to them.

This fixes the behaviour of wxSlider which could be moved (and generated the
corresponding events) even when it was disabled.

Closes #17194.
2016-11-22 02:10:40 +01:00
Tim Kosse
b99ad85b6f Weight pixels by their respective alpha value in wxImage::ResampleBox
Without this weighting, even the color value of invisible pixels with a zero
alpha would influence the result.

Closes #17724.
2016-11-21 18:09:07 +01:00
Václav Slavík
7dab555f71 Don't create wxWindowAccessible by default
Don't unconditionally use wxWidgets' implementation of IAccessible for
all windows when wxUSE_ACCESSIBILITY is 1, because it is inferior to the
system provided one: it often lacks appropriate labels, doesn't fully
support navigation and wxIAccessible isn't fully implemented.

The approach, when using MSAA, recommended by Microsoft documentation is
to customize accessibility for custom controls only, by proxying to the
standard and overriding what is necessary. By making this change, user
code is still allowed to customize accessibility if needed, without
negatively impacting standard controls that don't need any custom code.

See also https://github.com/wxWidgets/wxWidgets/pull/340
2016-11-20 17:35:32 +01:00
Vadim Zeitlin
3404d55be0 Merge branch 'helloworld-doc'
Modernize "Hello world" page: Bind(), C++11 etc.

Closes https://github.com/wxWidgets/wxWidgets/pull/317
2016-11-16 18:02:28 +01:00
Vadim Zeitlin
8072481f86 Show using C++11 lambda in the "Hello world" example
This is so useful, that it should be mentioned even on this introductory page.
2016-11-16 18:01:47 +01:00
Vadim Zeitlin
2d56fb5298 Use Bind() instead of event tables on the "Hello World" page
Let the new users know that Bind() is the preferred way to handle events in
modern wxWidgets.
2016-11-16 18:01:46 +01:00
Artur Wieczorek
d9fbde805b Implement wxDataViewRenderer::GetAccessibleDescription() method
The purpose of this method is to provide a textual description of the renderer's content to the class implementing accessibility framework in wxDVC (wxDataViewCtrlAccessible).
It is exposed if wxUSE_ACCESSIBILITY is set to 1.
2016-10-24 21:52:22 +02:00
Vadim Zeitlin
0afb95d2f4 Escape double dashes in Doxygen input to preserve them
By default double dashes are converted to en-dashes in the output (and triple
ones -- to em-dashes), but this is undesirable when double dashes are used not
as a punctuation mark but in command line options or as C++ decrement
operator, so escape them to avoid such conversion in this case.
2016-10-20 21:47:37 +02:00
Václav Slavík
90e1769569 Add API to control OS X wxTextCtrl’s smart behavior
Allow the user to customize smart quotes and dashes substutions on OS X
and also provide the OSXDisableAllSmartSubstitutions() method for
disabling them all at once.
2016-10-16 16:49:18 +02:00
Václav Slavík
3028fd40a0 Re-enable automatic substitutions in wxTextCtrl on OS X
This reverts ill-advised commits
c07523734f and
8d42890df4 that disabled native OS X
behavior of substituting dashes and quotes with typographically correct
characters if the user has this feature enabled.

This was a bad idea for two reasons:

1. It made wx applications behave non-natively, and thus be worse, in a
   highly noticeable area.

2. It made it impossible for applications that want to behave correctly
   to restore the native behavior, because once
   setAutomaticDashSubstitutionEnabled or
   setAutomaticQuoteSubstitutionEnabled is called (as wxTextCtrl
   constructor does), it's no longer possible to obtain its original,
   default setting.

It's not better to disable native functionality by default, it's better to
be native and make customizations possible. wxWindow API exposes access
to the native control and if an application desires to disable
substitution behavior, it can easily do so from user code.

See also #186 and #241.
2016-10-16 16:49:18 +02:00
Václav Slavík
8a6a20b1e3 Implement wxDataViewCtrl::SetRowHeight() on OS X 2016-10-09 16:10:30 +02:00
Artur Wieczorek
8980abacad Return null BSTR from wxIAccessible if string returned from wxAccessible method is empty
wxIAccessible should return a NULL BSTR to the accessibility framework if strings returned from wxIAccessible::get_accName() and get_accValue() are empty because this convention is already applied to the other methods returning string values, like get_accHelp(), get_accDescription().
2016-10-06 20:48:59 +02:00
Artur Wieczorek
e2a5b19fac Return DISP_E_MEMBERNOTFOUND error to the accessibility framework, if necessary
In response to wxACC_NOT_SUPPORTED returned by wxAccessible methods, wxIAccessible should return DISP_E_MEMBERNOTFOUND to the framework.
2016-10-06 20:31:49 +02:00
Metallicow
60eefe0bc3 Reduce size of the PNGs used in Doxygen documentation
PNGs optimized with FileOptimizer.
249 files processed. 296,293 bytes saved (64%)

Closes https://github.com/wxWidgets/wxWidgets/pull/333
2016-10-05 22:19:26 +02:00
Artur Wieczorek
25ac053adb Adjust rectangle coordinates returned by wxDataViewCtrl::GetItemRect()
Because query for item rectangle is executed in the context of wxDataViewCtrl so coordinates of retrieved rectangle should be specified in wxDataViewCtrl client coordinates (not in wxDataViewMainWindow coordinates).
To return correct coordinates it is necessary to convert rectangle coordinates retrieved by wxDataViewMainWindow::GetItemRect() from wxDataViewMainWindow client coordinates to wxDataViewCtrl client coordinates (they can different due to the presence of the header in wxDataViewCtrl client area).
2016-10-04 23:39:38 +02:00
Artur Wieczorek
2ec1bad4d6 Adjust point coordinates in wxDataViewCtrl::HitTest
Point coordinates passed from wxDataViewCtrl::HitTest() to wxDataViewMainWindow::HitTest()
should be converted from wxDataViewCtrl client coordinates to wxDataViewMainWindow client coordinates because they can different due to the presence of the header in wxDataViewCtrl client area.
2016-10-04 23:20:06 +02:00
Artur Wieczorek
fb5f6c4720 Add wxACC_INVALID_ARG error code to wxAccStatus enum
Since accessibility framework supports signaling E_INVALIDARG error, it would be good to have a corresponding flag indicating this error in wxAccessible functions.
In response to wxACC_INVALID_ARG returned by wxAccessible functions, wxIAccessible should return E_INVALIDARG to the framework.
2016-10-03 20:43:00 +02:00
Artur Wieczorek
ad684a814a Fix changelog
Move the entry related to wxIAccessible to the MSW section.
2016-09-29 23:57:29 +02:00
Artur Wieczorek
ac96d3949b Return proper value from wxIAccessible::get_accSelection() if no children are selected
VT_EMPTY VARIANT should be returned if wxAccessible::GetSelections() returns empty list of selected children.
2016-09-29 23:44:31 +02:00
Tim Roberts
607b800444 Fix wxMemoryDC::Blit() with itself as source in wxMSW
Don't use StretchDIBits() native function as it doesn't seem to handle the
case when its source and destination are the same correctly.

Closes #17666.
2016-09-21 23:00:03 +02:00
Artur Wieczorek
6bd6c94511 Update changelog
Add missing entry related to commits 4d6d73eab3, b6d44d5329.
2016-09-20 21:32:48 +02:00
Artur Wieczorek
277f9c58a1 Fix retrieving bounding box coordinates
Bounding box coordinates have to be calculated and stored internally in device units to be independent on changes of logical coordinates between calls to wxDC::CalcBoundingBox.
These stored coordinates are converted to the logical units on demand when they are retrieved with call to wxDC::MinX, MinY, MaxX or MaxY.

Closes #17667.
2016-09-16 22:04:54 +02:00
Vadim Zeitlin
4f0701c82c Merge branch 'clean-up-pre-c++98-compatibility-macro' of https://github.com/minoki/wxWidgets
Don't bother with checking for some really obsolete compilers and just assume
that C++98 keywords "explicit", "{static,const,dynamic}_cast" and support for
partial template specialization is always available.

Closes #17655.
2016-09-16 01:41:19 +02:00
New Pagodi
b06e63dbd2 Add new wxStyledTextCtrl wxEVT_STC_AUTOCOMP_COMPLETED event
This is the translation of Scintilla SCN_AUTOCCOMPLETED notification.

Closes #17664.
2016-09-16 01:38:27 +02:00
ARATA Mizuki
1e6251d592 Replace wx_static_cast/wx_const_cast/wx_reinterpret_cast with the function-style casts
See #17655.
2016-09-14 18:45:12 +09:00
New Pagodi
b99d28bb46 Add wxStyledTextEvent::GetListCompletionMethod()
Provide access to Scintilla "listCompletionMethod" field of SCR_AUTOCSELECTION
event.

Closes #17648.
2016-09-13 13:05:25 +02:00
Kolya Kosenko
b05ea5f8f4 Improve build instructions for wxGTK/MSW
Extract the patch that needs to be applied from the documentation and move it
to a separate file.

Closes #17659.
2016-09-13 12:59:46 +02:00
Artur Wieczorek
f68dad69cc Implement Flush() method for Cairo graphics context
wxCairoContext implementation for wxMSW and wxQT use internally helper surface so there is a need to flush it on demand.
2016-09-08 19:34:46 +02:00
Artur Wieczorek
49000defcf Add support for affine transformation matrix in wxGCDC
Graphics renderers (exposed through wxGraphicsContext) support arbitrary affine transformations so it is possible to add support for affine transformations in wxGCDC by implementing all wxGCDC::*TransformMatrix() functions with calls to respective wxGraphicsContext functions.
Additionally, this implementation adds support for affine transformations in wxDC under wxGTK3 because in this port wxDC is equivalent to wxGCDC.
2016-09-08 19:34:43 +02:00
Artur Wieczorek
ba4b8d5670 Fix retrieving clipping box after changing wxDC coordinates (GTK)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when wxDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale(), SetLogicalScale(), SetTransformMatrix() or ResetTransformMatrix().
When any of these functions is called then clipping box data are marked as invalid and updated by recalculating extents of the clipping region in new coordinates at nearest call to GetClippingBox().

Closes #17646.
2016-09-01 21:42:13 +02:00
Artur Wieczorek
98714ea452 Fix retrieving clipping box after changing wxGCDC coordinates (MSW, GTK)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when existing wxGraphicsContext is associated with wxGCDC using SetGraphicsContext() or when wxGCDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale() or SetLogicalScale().
When any of these functions is called then clipping box data are marked as invalid and retrieved from underlying graphics context using wxGraphicsContext::GetClipBox() at nearest call to GetClippingBox().

See #17646.
2016-09-01 21:41:18 +02:00
Artur Wieczorek
dfc966bf1e Fix retrieving clipping box after changing wxDC coordinates (MSW)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when existing HDC is associated with wxDC using SetHDC() or when wxDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale(), SetLogicalScale(), SetTransformMatrix() or ResetTransformMatrix().
When any of these functions is called then clipping box data are marked as invalid and updated using GetClipBox() Win API at nearest call to GetClippingBox().

See #17646.
2016-09-01 21:39:48 +02:00
Vadim Zeitlin
7f26deb13e Don't hard-code position and size for "Hello World" frame
This is not good practice and we shouldn't encourage people to do this.
2016-08-27 18:40:48 +02:00
Vadim Zeitlin
f259565123 Improve description of wxIMPLEMENT_APP() on the "Hello world" page
Also add the missing semicolon after it, so that if anybody copies and pastes
this line from the documentation, it actually would compile.
2016-08-27 18:32:54 +02:00
Lauri Nurmi
394ce5f631 Add C++11-style cbegin, cend, etc. to wxString's iterator interface
These c-prefixed functions always return a const_iterator.
The full list of functions added: cbegin(), cend(), crbegin(), crend().

Closes https://github.com/wxWidgets/wxWidgets/pull/314
2016-08-25 18:54:05 +02:00
Artur Wieczorek
acc57fccc7 Fix wxDC::Clear
When complex transformation (including e.g. rotation) is applied to DC then coordinates of the clip box return by GetClipBox() API can be inaccurate due to the rounding errors.
To compensate these errors we need to fill rectangle which is slightly larger then just retrieved clip box.

Closes #17636.
2016-08-21 21:22:05 +02:00
Artur Wieczorek
12eaa61930 Fix wxGCDC::Clear
If underlying graphics context is rotated then drawing a rectangle with origin at (0,0) doesn't cover all the drawing area. To draw over entire area we need to get extents of the actual clipping region (with applied all transformations) and use it as coordinates of the drawn rectangle.

See #17636.
2016-08-21 21:03:17 +02:00
Artur Wieczorek
78f00da98a Fix wxGraphicsMatrix::TransformDistance for Direct2D implementation
Current transformation matrix without translation component should be used in calculations.
2016-08-21 21:01:52 +02:00
Artur Wieczorek
480a003c00 Add wxGraphicsContext::GetClipBox() function
This method returns bounding box of the current clipping region.
Added declaration, documentation and implemented for GDI+, Direct2D, Cairo renderers.
2016-08-21 20:57:40 +02:00
Vadim Zeitlin
f9740e8180 Fix wxBitmap ctor from XBM in wxGTK
Width and height were exchanged in the loops, so the conversion code didn't
work correctly and overflowed the pixel buffer (due to extra padding in the
row stride) for non-square bitmaps. It also resulted in a completely wrong
bitmap appearance, but somehow this managed to go unnoticed, unlike the memory
errors.

Closes #17633.
2016-08-21 14:46:16 +02:00
David Hart
34d39c9dfb Fix use of dangling reference in wxFileSystemWatcher Unix code
Don't reference the "watch" object after possibly destroying it when handling
IN_DELETE_SELF inotify notification.

Closes #17122.
2016-08-19 23:19:14 +02:00
Jeff Hostetler
534899baa2 Work around unwanted MacOpenFiles() calls in wxOSX applications
Don't try to open any command line arguments as files by using the workaround
from Colin Barrett (see https://bugzilla.mozilla.org/show_bug.cgi?id=366009).
2016-08-19 23:03:47 +02:00
brawer
7f10d1fa8a Add wxSYS_CARET_{ON,OFF,TIMEOUT}_MSEC system settings
Provide a way to retrieve the caret blink times from wxSystemSe and implement
it for wxOSX and wxGTK.

Closes #17629.
2016-08-19 22:55:20 +02:00
David Vanderson
e2a846e182 Fix correct screen DPI and not hard-coded 72 in wxOSX
Don't hard-code screen DPI as 72, use the real number instead (which is now
returned correctly, after the last commit).

Closes #17615.
2016-08-08 14:03:12 +02:00
David Vanderson
49801e57f1 Implement wxGetDisplaySizeMM() correctly in wxOSX
Return the real screen size instead of hard-coding 72 DPI.

Closes #17614.
2016-08-08 14:00:07 +02:00
Artur Wieczorek
b3d4c870da Update changelog
Mention of recent wxPG-related fixes 6e97a2cb i c3fa684a.
2016-07-22 23:12:35 +02:00
Artur Wieczorek
097625de52 Fixed rescaling of wxImage
When wxImage is rescaled with wxIMAGE_QUALITY_BILINEAR, wxIMAGE_QUALITY_BICUBIC or wxIMAGE_QUALITY_BOX_AVERAGE algorithm then for proper interpolation there is necessary to uniformly (linearly) map entire pixel range in the new image to the entire pixel range in the current image, i.e. pixels positions (integer values) in range [0..newDim-1] has to be mapped to "virtual" pixel positions (not necessary integer values) exactly in the range [0..oldDim-1].
[0..oldDim-1] range of target mapping is required because for proper interpolation every "virtual" pixel has to be located between two physical pixels in the current image.
Thus scaling ratio used to find corresponding pixels in the current image should be (oldDim-1)/(newDim-1) and not oldDim/newDim (which is used now).
When image is e.g. upsampled oldDim/newDim ratio then some new rightmost/botommost pixels are mapped to old pixels > (oldDim-1) and their values are improperly interpolated (in the current implementation their positions are just truncated to (oldDim-1) to bypass the problem and upsampled image looks like it was shifted left/up). The larger scaling ratio the effect is more visible.

Note:
Because reference images used currently in the unit tests were created with improper scaling there is necessary to upload new reference images created with fixed scaling.

Closes #17594
2016-07-22 23:00:33 +02:00
Artur Wieczorek
902b9a5c56 Fix calculating the extent of clipping box (wxDC, GTK).
While setting a clipping region there is necessary to intersect it either with current clipping region location if such region exists or with wxDC surface extents if no clipping region is set. This way effective clipping box will be always inside the wxDC surface. Effective clipping box can be an empty region.
Clipping box parameters are calculated and stored in logical coordinates.
2016-07-17 17:05:02 +02:00
Damien Ruscoe
fc0108ce71 Hide empty wxCheckBoxes in wxGTK to fix display problem
Focus rectangle was still drawn around the label when it was empty with some
themes, so hide it completely to ensure this doesn't happen.

Closes #17443.
2016-07-09 15:32:34 +02:00
Vadim Zeitlin
f68c67aa85 Use "pair of ints" type for wxGridBagSizer size and position in XRC
Introduce a new type for XRC values imaginatively called just "pair of
integers" which can be used for values not expressed in pixels and hence for
which it doesn't make sense to use dialog units nor to scale them by the DPI.

Use this new type for wxGridBagSizer position and span elements to prevent
them from being changed when using higher than normal DPI.

Closes #17592.
2016-07-06 18:44:07 +02:00
Vadim Zeitlin
c4d2ba1335 Fix a typo in wxRadioBox XRC format documentation
s/ratio/radio/
2016-07-06 18:26:54 +02:00
Vadim Zeitlin
94d93bc53c Describe "d" suffix in XRC more clearly
Document that it has to be specified only at the end, not after each
component.
2016-07-03 14:40:21 +02:00
Vadim Zeitlin
2543c336b0 Revert "Fix invisible captions in high contrast mode"
This reverts commit 71dfb3b414 which fixed
appearance of the captions in high contrast mode but broke them for wxGTK.

Ideal would be to make this code work in wxGTK too or, in the worst, case only
use this code for wxMSW, but for now at least avoid breaking wxGTK appearance
by default.

See #16186.
2016-07-03 14:38:36 +02:00
Danny Scott
059704edc1 Update instructions for producing official MSW binaries
Simplify the officialbuild.bat script by only checking for "vcXX" instead of
accepting both them and "vsYYYY".

Also add instructions for using it in the corresponding HOWTO.

Closes #17514.
2016-07-02 14:54:16 +02:00
Vadim Zeitlin
ebb3a791b9 Revert using an event object for waking up event loop in wxMSW
This reverts 6c40531fb7 ("Make main thread wake
up code more efficient and less error-prone in wxMSW") as, while being more
efficient, the new code doesn't work at all when we're not running the message
loop ourselves as it happens when the user opens a menu or starts resizing a
window because in both cases Windows runs a local message loop dispatching the
messages itself and this message loop doesn't react to our event object being
signalled.

So this approach can't work and needs to be reverted, even if it reintroduces
the danger of overflowing the message queue (see #9053).

Closes #17579.
2016-07-02 14:49:15 +02:00
Vadim Zeitlin
3dc54df247 Ignore hints on wxTE_PASSWORD controls when not supported natively
There is no way to show the hint without native support in a control with
wxTE_PASSWORD style, so simply ignore them completely in this case.

Closes #17078.
2016-06-28 14:40:52 +02:00
Vadim Zeitlin
967bdbf994 Use equally-sized buttons in wxMSW horizontal toolbars
Only use TBSTYLE_AUTOSIZE, adjusting each button to the size it really needs,
for the toolbars with wxTB_HORZ_LAYOUT style as they don't have any uniform
button size anyhow.
2016-06-26 18:51:50 +02:00
jonkraber
96ef6ea293 Fix preserving selection when changing selection mode in wxGrid
The loop over the existing selection was buggy and took into account only one
corner of the block instead of the entire block and also skipped some blocks
entirely.

Closes #17572.
2016-06-18 18:12:52 +02:00
Vadim Zeitlin
f792ba45f6 Merge branch 'dvc-markup'
Add support for using markup in wxDataViewCtrl items.
2016-06-16 17:49:54 +02:00
Vadim Zeitlin
74c0462c84 Add wxDataViewTextRenderer::EnableMarkup()
Implement the new method to all the implementations (generic, GTK, OS X), show
it in the sample and update the documentation.
2016-06-16 00:06:23 +02:00
Tobias Taschner
ac5a362d8d Include OSX 10.12 name and branding in wxGetOsDescription()
Starting with 10.12 OSX will be renamed to macOS. The name for version 10.12
is Sierra.

Closes https://github.com/wxWidgets/wxWidgets/pull/297
2016-06-14 16:09:47 +02:00
Vadim Zeitlin
2297578cb4 Merge branch 'wxsvgfiledc-improvements' of https://github.com/MaartenBent/wxWidgets
Many improvements in wxSVGFileDC to improve its support of wxDC API including:

- Enabled usage of clipping regions.
- Correctly draw polypolygons.
- Draw lines as one long line instead of many short lines.
- Drawing text improvements (position, multi-line, underlined, strike-through).
- Support more brush and pen styles.
- Add Saving as SVG to drawing sample.
- Implemented Clear().
- Set the SVG title.
- Produce valid svg/xml.
- Correctly draw ellipses and arcs.

See https://github.com/wxWidgets/wxWidgets/pull/215
2016-06-13 15:25:30 +02:00
Andreas Falkenhahn
e4473fa193 Apply wxTextCtrl::SetDefaultStyle() to user-entered text in wxGTK
Apply the appropriate style to any text being inserted, not just the text
added by the program. This not only fixes the bug with default style not being
used for the text entered by user, but also makes the code simpler.

Closes #17523.
2016-06-12 19:18:27 +02:00
Artur Wieczorek
9d137f494a Updated changelog. 2016-06-11 23:24:13 +02:00
Vadim Zeitlin
023ee99ea7 Don't crash in wxTextFile::GetLastLine() if the file is empty
Just return a reference to an empty wxString, as GetFirstLine() already does
(although this is actually questionable -- what if this string is modified?).

See #17283.
2016-06-09 16:48:01 +02:00
Vadim Zeitlin
4dfde501df Add support for returning item location to wxGTK wxMimeTypesManager.
This is a squash merge of gtk_mimetype branch from
https://github.com/Hanmac/wxWidgets.git with some extra minor cleanup.

Closes https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-07 14:29:52 +02:00
Mike Capone
4a3203bbe5 Use backslashes in MSW installation instructions
Also use %WXWIN% in the paths for clarity.

Closes https://github.com/wxWidgets/wxWidgets/pull/295
2016-06-07 14:29:52 +02:00
Dimitri Schoolwerth
392a2f17a9 Add some notes to how-to-release.md 2016-06-06 03:17:23 +04:00
Dimitri Schoolwerth
89dad67b3c Doc updates for 3.1.1 release
Update old version references, remove 3.1.0 release errata, and reset
sha1sums to zeroes.
2016-06-06 03:17:23 +04:00
Vadim Zeitlin
ed73e4f624 Merge branch 'uisim-xtest'
Make wxUIActionSimulator work with GTK+3, including when using DPI scaling.
2016-06-04 22:44:25 +02:00
yenwu
beaca78962 Fix vertical scrollbar visibility in wxStyledTextCtrl
Vertical scrollbar didn't appear even when the number of lines in the control
became one greater than the maximal fitting number of lines, but only when one
more line was added.

This seems to have been a simple off-by-one error in SetScrollbar() calls, so
fix this by adding 1 to the upper end of the range.

Closes #17548.
2016-06-04 22:27:00 +02:00
Vadim Zeitlin
d68eb10e3d Handle strings with embedded NULs in wxDataStream
Read/write the entire string and not just the part until the first NUL in it.

Closes #17556.
2016-06-04 21:47:12 +02:00
Vadim Zeitlin
690ca5a1b4 Merge branch 'scintilla366' of https://github.com/pkulchenko/wxWidgets
Update bundled Scintilla version to 3.6.6.
2016-06-04 19:47:49 +02:00
Vadim Zeitlin
3536e37092 Merge branch 'secret-store'
Add support for storing passwords using the OS-provided facilities.

Closes https://github.com/wxWidgets/wxWidgets/pull/290
2016-06-04 19:33:59 +02:00
Vadim Zeitlin
675d9d779d Add wxSecretStore
Add a new class allowing to store passwords and other sensitive information
using the OS-provided facilities.

Add implementations for all the main platforms, documentation and a new sample
(which contains an ad hoc unit test as the real unit test for this class would
probably be a bad idea as it wouldn't run in non-interactive contexts and
could show OS level dialog boxes if it did).
2016-06-04 18:29:15 +02:00
Dimitri Schoolwerth
90b9bcbcf3 Remove docs mentioning which MSVC projects include x64 configurations
Since 202f62b4c4 x64 configurations exist
for MSVC 8 and 9 projects. Because MSVC 7 is the minimal supported
version, and doesn't support 64-bit builds, remove the section in
install.txt about x64 configurations being available only in MSVC 10
project files and later.
2016-06-03 03:10:28 +02:00
Dimitri Schoolwerth
d3ca0c777b Mention MSVC 14 solution file in install.txt 2016-06-03 02:47:32 +02:00
Scott Talbert
a4716916b7 Add support for using the XTest extension in wxUIActionSimulator
Fixes wxUIActionSimulator under wxGTK3, see #17530.
2016-05-23 03:00:48 +02:00
Eric Jensen
e7a526604c Implement auto complete in generic wxSearchCtrl
Just forward the relevant methods to the embedded wxTextCtrl.

Closes #17519.
2016-05-07 01:49:22 +02:00
Vadim Zeitlin
e2b13a7b8e Fix background colour returned by wxTextCtrl::GetStyle() in wxMSW
Don't return the background colour unless it's really set, otherwise we
returned black background even if it was never changed.
2016-05-05 03:05:45 +02:00
Vadim Zeitlin
70b64b8c53 Merge branch 'rename-listctrl-checkbox-methods' of https://github.com/discnl/wxWidgets
Use consistent case for wxListCtrl::{Has,Enable}CheckBoxes() methods.

Closes https://github.com/wxWidgets/wxWidgets/pull/275
2016-04-23 18:53:41 +02:00
Vadim Zeitlin
b1fcf100ff Fix user-visible with AUI tab selection after dragging
Selection at wxAuiNotebook level was not updated, resulting in all attempts to
select the tab at the same index as the tab that was dragged elsewhere being
ignored, e.g. after dragging the first tab to the second position in the AUI
sample, the first tab couldn't be selected again.

Fix this by always changing the selection in OnTabEndDrag(). This might not be
the best thing to do as the selection is also changed later in the code and
the fact that the code returns without sending the event is probably a bug
too, but for now at least fix the user-visible problem.

Closes #15071.
2016-04-23 18:51:49 +02:00
Vadim Zeitlin
bed7d9fe74 Add wxDataViewCtrl::SetHeaderAttr() too
This is currently only implemented in the generic version but could be
implemented at least for GTK+ native one as well in the future.
2016-04-22 00:58:38 +02:00
Dimitri Schoolwerth
602111f2b3 Rename wxListCtrl::HasCheckboxes() and EnableCheckboxes()
Rename them to HasCheckBoxes and EnableCheckBoxes for consistency with
wxCheckBox naming.

See also PR https://github.com/wxWidgets/wxWidgets/pull/153
2016-04-21 15:25:10 +00:00
Vadim Zeitlin
5388c7a72e Add wxListCtrl::SetHeaderAttr()
This method can be used to change the list view header appearance.

Add the method declaration, documentation, show it in the sample and implement
it for wxMSW (only, for now).
2016-04-17 18:26:13 +02:00
Vadim Zeitlin
7465237353 Improve wxSpinCtrl best size computation in wxGTK
Don't hardcode completely arbitrary width of 95px for the text part, but
compute it from the values this control is actually used for.
2016-04-03 18:04:26 +02:00
New Pagodi
a6e249ea1a Add support for loading external lexers to wxStyledTextCtrl
Implement Scintilla DynamicLibraryImpl and generate LoadLexerLibrary() and
GetLexerLanguage().

Closes #17480.
2016-04-03 15:47:48 +02:00
Vadim Zeitlin
8baaa652ef Merge branch 'dvc': miscellaneous wxDataViewCtrl-related fixes 2016-04-02 01:09:06 +02:00
Vadim Zeitlin
4e4286f0e2 Merge branch 'utf8-stdstring-interop' of https://github.com/minoki/wxWidgets
Make it easier to interoperate with the code using UTF-8-encoded std::strings.

Closes #17461.
2016-03-28 21:44:54 +02:00
Iwbnwif Yiw
00526cefb6 Return full virtual screen size from wxScreenDC::GetSize() in wxMSW
Return the size of the entire virtual screen, possibly composed from multiple
monitors, rather than just the size of the primary monitor.

This makes this method consistent with wxScreenDC actually representing the
entire virtual screen and not just the primary monitor and also with wxGTK.

Closes #13279.
2016-03-28 21:37:55 +02:00
ARATA Mizuki
cf000e7e02 Fix GetPartialTextExtents() to handle non-BMP chars under OS X
On OS X, wxString operates on UTF-32 code units, but CoreText API use UTF-16
code units. So we need to take care of surrogate pairs.

Closes https://github.com/wxWidgets/wxWidgets/pull/261
2016-03-28 21:25:56 +02:00