Commit Graph

3210 Commits

Author SHA1 Message Date
Vadim Zeitlin
e5b12b5bc8 Merge branch 'dvc-persist' from iwbnwif
See https://github.com/wxWidgets/wxWidgets/pull/541
2017-12-15 14:10:01 +01:00
Iwbnwif Yiw
c6de521959 Remove wxTreeListCtrl special first column resizing logic
Trying to give all the remaining space after allocating enough to the
other columns to the first one doesn't work well with wxDataViewCtrl,
which tries to do the same thing, but with the last column, so we
actually get some strange mix of behaviours, with both the first and
last columns changing size after the control itself is resized.

Stop fighting with wxDataViewCtrl and just let it to its own thing.

Closes #17476.
2017-12-10 23:21:24 +01:00
pavelxdd
504c22a512 Fix wxURLDataObject comment and documentation for wxGTK
Fix a copy-and-pasto in the header and also mention that wxURLDataObject
derives from wxDataObjectComposite, and not wxTextDataObject, in wxGTK
too.

Also add a note about the exact base class being an implementation
detail.

Closes https://github.com/wxWidgets/wxWidgets/pull/624
2017-12-08 13:14:19 +01:00
Vadim Zeitlin
3e0adbf541 Merge branch 'gesture-events'
Integrate GSoC 2017 work by Prashant Kumar implementing support for
gesture events.

Closes https://github.com/wxWidgets/wxWidgets/pull/551

Closes https://github.com/wxWidgets/wxWidgets/pull/565
2017-12-02 18:46:53 +01:00
Vadim Zeitlin
d49784b0a2 Disable wxDateTime tests failing due to TZ offset changes
wxDateTime timezone-related methods always use the current timezone
offset, while other methods, using CRT, use correct value for the given
date, which may be different.

This discrepancy accounted for test failures in Europe/Minsk time zone
as Belarus has switched from UTC+2 to UTC+3 since 1999 date used in the
test.

It is impossible to really fix the problem easily, so just skip the test
in this case and also mention this bug in the documentation.

See #15370.
2017-11-30 17:44:41 +01:00
Vadim Zeitlin
c7c30504c8 Do nothing when converting wxDateTime to/from local time zone
In particular, do not (unexpectedly) adjust time by the DST.

Closes #16585.

See #10445.
2017-11-29 23:18:57 +01:00
Vadim Zeitlin
543c522cb8 Explicitly disambiguate local time zone from UTC
Don't rely on time zone offset to check whether it is local as this
doesn't, and can't, work for the local time zone in Great Britain which
uses the same offset as UTC, but does use DST, unlike the latter.

Add a unit test (albeit disabled by default) checking that the code that
previously didn't work correctly in BST does work now (run the tests
using "TZ=Europe/London ./test wxDateTime-BST-bugs" under Unix to test).

Closes #14317, #17220.

See #10445.
2017-11-29 23:02:22 +01:00
Vadim Zeitlin
310c45a5e2 Merge branch 'deprecated' of https://github.com/MaartenBent/wxWidgets
Fixes for deprecation and other warnings in samples and demos.

See https://github.com/wxWidgets/wxWidgets/pull/617
2017-11-26 17:30:49 +01:00
Paul Cornett
23e3323655 Add non-const overload for GetToolByPos()
See #16763
2017-11-25 10:57:23 -08:00
Maarten Bent
2156d29801 Add FindOrCreateFont overload accepting wxFontInfo 2017-11-25 17:52:03 +01:00
Vadim Zeitlin
838a687d94 Document wxComboBox::SetValue() better in wxCB_READONLY case
Make it clear that the control doesn't send wxEVT_TEXT event in this
case.
2017-11-25 10:47:50 +01:00
Vadim Zeitlin
19c4172671 Correct example of using wxDataObjectComposite in the docs
Don't call base class pure virtual method, but do call GetData() before
using the data object. Also fix a typo in a variable name.
2017-11-24 23:10:47 +01:00
Vadim Zeitlin
778340a286 Merge branch 'private-fonts'
Add support for using application-private fonts.

Closes #13568.

Closes https://github.com/wxWidgets/wxWidgets/pull/591
2017-11-24 22:58:09 +01:00
Vadim Zeitlin
b040dab0ca Add wxUSE_PRIVATE_FONTS and drop wxHAS_PRIVATE_FONTS
Handle this feature as all the other ones and provide a configure switch
and a setup.h option to disable it if necessary, as it may be desirable
to do it, especially under Linux, to avoid extra dependency on pangoft2
if this functionality is unnecessary.
2017-11-24 22:56:17 +01:00
Vadim Zeitlin
a8dfaa569b Allow enabling individual touch gesture events
Implement support for enabling just some gesture events instead of
having to choose between getting none or all of them.

Also make wxTOUCH_NONE really disable the gestures events generation
instead of just doing nothing as before.
2017-11-22 03:05:02 +01:00
Vadim Zeitlin
842dd1cfd9 Add wxWindow::EnableTouchEvents()
Don't request touch event generation for all windows by default, this
has an inherent overhead and is not needed for 99% of the application
windows, so require calling EnableTouchEvents() explicitly to do it
instead.

Note that this requires properly initializing gesture recognizers in
wxOSX now that they're not always allocated, otherwise releasing them
when destroying the window would crash.
2017-11-22 02:24:24 +01:00
Vadim Zeitlin
bb2887930f Use wxPoint instead of (x,y) pair in wxPanGestureEvent
Using higher level objects makes the code generating and using this
event shorter and more clear.
2017-11-21 17:45:34 +01:00
Vadim Zeitlin
c3dee8b0bc Merge branch 'vector-enhancements'
Make wxVector<> more compatible with std::vector<>.
2017-11-21 13:50:26 +01:00
Lauri Nurmi
f2a5fd303b Declare wxInvalidSize also in wx/dir.h
wxInvalidSize is a documented return value for wxDir::GetTotalSize(),
yet it was not available by including just wx/dir.h as it was declared
in wx/filename.h only.

Fix this by declaring it in wx/dir.h too.

Closes https://github.com/wxWidgets/wxWidgets/pull/609
2017-11-21 13:49:21 +01:00
Vadim Zeitlin
3590273503 Document that osspd requirement for using OSS under Linux
Without SDL, wxSound doesn't work out of the box on most (all?)
contemporary Linux systems, so at least document this.

See #14899.
2017-11-19 22:51:51 +01:00
Vadim Zeitlin
53443b5370 Add wxVector::shrink_to_fit() for C++11 compatibility
Also use this for wxArray::Shrink() implementation as it's more
efficient than the old swap-based implementation which requires an extra
memory allocation instead of really shrinking the existing one.
2017-11-19 22:09:37 +01:00
Vadim Zeitlin
8246c922af Add wxVector::insert() overload taking count of items to insert
Generalize the existing insert() to be more compatible with std::vector.
2017-11-19 22:08:54 +01:00
Vadim Zeitlin
5669e8dbe9 Add wxVector::operator==() and !=()
Make this class more consistent with std::vector<>.
2017-11-19 22:08:54 +01:00
prashantkn94
261b04b5a3 Merge multi-touch gestures event branch
This is a squashed commit of the SOC2017_GESTURES branch from
https://github.com/prashantkn94/wxWidgets.git

Closes https://github.com/wxWidgets/wxWidgets/pull/551
2017-11-17 18:06:06 +01:00
Vadim Zeitlin
dc751d3f33 Add a hint about making wxProgressDialog initially wide enough
Using unbreakable spaces to achieve this looks like a hack, but seems to
be the only thing working well in practice.
2017-11-16 23:52:36 +01:00
Vadim Zeitlin
3d98129b51 Further improve wxProgressDialog resizing behaviour documentation
Unfortunately it doesn't seem possible to prevent the native MSW dialog
from changing its size in both upper and lower direction vertically, so
at least mention this in the documentation and mention a possible
workaround of manually adjusting the text to always have the same number
of lines.
2017-11-16 23:52:25 +01:00
Arrigo Marchiori
23b7973c24 Mention possible problem with wxProgressDialog created in OnInit()
Such dialogs must be destroyed before the main event loop starts running
to avoid problems with the temporary event loop created by the dialog
internally.

See #17983.
2017-11-16 23:52:22 +01:00
Vadim Zeitlin
80ca6661d4 Explain that wxProgressDialog should be created on the stack
Creating it on the heap is unnecessary and can be actually harmful, so
document explicitly that it shouldn't be done.

See #17983.
2017-11-16 01:35:53 +01:00
Vadim Zeitlin
ec82ae1302 Document new wxProgressDialog auto-resizing behaviour
The dialog now grows automatically as needed and Fit() can be called to
shrink it back if desired and this behaviour is consistent under all
platforms.
2017-11-16 01:35:49 +01:00
Vadim Zeitlin
0473d14ef1 Make wxProgressDialog::Fit() work in native MSW version
This method is supposed to adjust the dialog size to its contents and
while the dialog increases automatically when using native
implementation under MSW, it doesn't shrink back on its own and so it's
still useful to allow Fit() to do it.

Update the sample to test Fit() too.
2017-11-16 01:35:49 +01:00
Vadim Zeitlin
0736bdfb28 Prevent constant size changes in native MSW wxProgressDialog
MSW implementation of wxProgressDialog adjusted the dialog size to the
size of the message shown in it on each update, resulting in visually
unpleasant constant jumping around (this is the same problem that we
used to have in wxGenericProgressDialog long time ago, see #10624).

Minimize this by using TDM_UPDATE_ELEMENT_TEXT instead of
TDM_SET_ELEMENT_TEXT for changing the element text. This still increases
the dialog size if the new element text is longer than the old value,
but at least doesn't shrink it back if it is shorter, which is already
quite an improvement.

Notice that this change requires using TDF_EXPAND_FOOTER_AREA style, as
otherwise the expanded information can't be updated without a re-layout.
But this doesn't seem to be a big loss and it's not really clear why did
we explicitly clear this flag before anyhow.

Update the dialogs sample to make it easy to test for this behaviour and
the documentation to mention MSW version peculiarities.
2017-11-16 01:35:48 +01:00
Vadim Zeitlin
283f5a4d56 Remove useless wxFont::ActivatePrivateFonts()
Just "activate" the font immediately when adding it using
AddPrivateFont(), nothing seems to be gained from having two functions
and it just makes things more complicated both when implementing and
when using the API.
2017-11-13 22:29:30 +01:00
Vadim Zeitlin
ed655bfcde Add wxFontEnumerator::InvalidateCache()
This is necessary to recognize new fonts, for example those added using
AddPrivateFont(), as being valid: otherwise they were not found in the
cache and couldn't be used in wxGTK.
2017-11-13 22:29:29 +01:00
Vadim Zeitlin
a7a59a263d Update the version when private font support was added
It will be 3.1.1 and not 2.9.5 as originally planned.
2017-11-13 22:29:28 +01:00
Arthur Norman
547e40b114 Add support for loading fonts from files.
wxFont::AddPrivateFont() can now be used to load a font from a file for the
applications private use. Update the font sample to show this.

Closes #13568.
2017-11-13 22:29:28 +01:00
Paul Cornett
7592595252 fix SetPosition() parameter in documentation 2017-11-12 09:36:33 -08:00
PB
022a725bf9 Fix few minor issues in wxAutomationObject documentation
Remove redundant consts, document GetDispatchPtr() return type.
2017-11-09 22:18:57 +01:00
Vadim Zeitlin
6d55a533a3 Add overview of wxTextCtrl positions and coordinates
Explain the various coordinates that can be used and which positions are
considered valid and which are not.
2017-11-07 03:46:50 +01:00
hwiesmann
f9429b7db4 Make wxAuiManager::SavePaneInfo() parameter const
The pane is not modified by saving its details.
2017-11-05 23:45:21 +01:00
Hartwig
d36d251e8d Improve documentation for loading and saving AUI layout
Give more details about LoadPerspective() and Save/LoadPaneInfo().

See https://github.com/wxWidgets/wxWidgets/pull/584
2017-11-05 16:51:53 +01:00
Vadim Zeitlin
56323b5aba Merge branch 'log-encoding'
See https://github.com/wxWidgets/wxWidgets/pull/552

Closes #17385.
2017-11-04 18:20:24 +01:00
Vadim Zeitlin
7e0b6d4d81 Merge branch 'webview-js-retval'
Integrate GSoC 2017 work by Jose Lorenzo on allowing returning values
from JavaScript code via wxWebView::RunScript().
2017-11-04 16:07:51 +01:00
Lauri Nurmi
6b73bd9136 Allow specifying character set for wxLogStderr and wxLogStream.
Until now, a mixture of non-UTF-8 and UTF-8 could be written in some circumstances.
2017-11-04 15:47:18 +02:00
Vadim Zeitlin
266152b459 Merge branch 'mbconv-len-fix'
Return buffers of correct length from wxMBConv::cWC2MB() and cMB2WC().
2017-11-04 14:20:15 +01:00
Vadim Zeitlin
8e7fef5f08 Make wxStringOutputStream ctor explicit
Avoid accidentally creating wxStringOutputStream from a wxString
pointer, this seems unlikely, but why take the risk of it happening at
all.
2017-11-03 00:36:48 +01:00
mgimenez
16888e9883 Fix copy-paste typo in wxGrid::DeleteRows() documentation
Just use the correct verb.

Closes #17987.
2017-11-02 20:51:34 +01:00
Vadim Zeitlin
f200015b3c Fix wxFileDialog::SetExtraControlCreator() supported platforms
Just remove them, actually, as this functionality is supported by all 3
major platforms.
2017-11-02 14:55:54 +01:00
Vadim Zeitlin
b3fe07942f Remove top level "const" from wxMBConv methods return values
This "const" is useless and doesn't actually do anything, remove it to
avoid confusion.
2017-11-02 01:57:22 +01:00
Vadim Zeitlin
bb949e9847 Slightly improve wxMBConv::IsUTF8() documentation
Mention that this method is supposed to be used only as an optimization
and also mention that it hadn't been universally available until 3.1.1.

See https://github.com/wxWidgets/wxWidgets/pull/570
2017-10-28 01:10:51 +02:00
Tobias Taschner
fe77b2d593
Add support for UTF8 filenames in wxZipOutputStream
Zip filenames containing non ASCII characters will be marked with
bit 11 in the general purpose flags and will use UTF-8 encoding.

By only setting the flag when non ASCII characters are used the
created archives should be binary identical to previous versions.

The old behavior can be achieved by explicitly using wxConvLocal
with the constructor. This should also ensure that
existing code using a custom wxMBConv should work as before.
2017-10-27 20:27:44 +02:00