Commit Graph

3186 Commits

Author SHA1 Message Date
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
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
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
Tobias Taschner
73a22766ee
Always enable wxMBConv::IsUTF8()
These where previously guarded by wxUSE_UNICODE_UTF8 but
may be useful in other configurations too.
2017-10-27 20:13:04 +02:00
Vadim Zeitlin
b82af43361 Improve RunScript() and MSWSetModernEmulationLevel() documentation
Try to explain things better and add a couple of examples.
2017-10-22 23:38:08 +02:00
Vadim Zeitlin
ee9615b9ac Consistently capitalize "JavaScript"
This is the proper name of the language, not "Javascript".
2017-10-22 00:26:33 +02:00
Jose Lorenzo
af8f7f33c3 Merge wxWebView JavaScript improvements branch
This is a squashed commit of the SOC2017_WEBVIEW_JS branch from
https://github.com/joseeloren/wxWidgets.git

Closes https://github.com/wxWidgets/wxWidgets/pull/538
2017-10-21 22:42:30 +02:00
Artur Wieczorek
afdfc02a49 Allow changing wxPropertyGridManager wxPG_EX_NO_TOOLBAR_DIVIDER style
Currently this style can be set only at toolbar creation and cannot
be changed afterwards.
2017-10-21 22:17:54 +02:00
Andreas Falkenhahn
eb035485d7 Add wxDataViewCtrl::GetTopItem() and GetCountPerPage()
Add methods doing the same thing for wxDataViewCtrl as the existing wxListBox
methods.

Closes #17498.
2017-10-21 22:10:35 +02:00
Andreas Falkenhahn
e77cb6f31f Improve wxListBox::GetCountPerPage() in wxGTK and wxOSX
Provide native implementation of this function instead of using the ad hoc one
in common code, which didn't really work -- so remove it completely now.

Closes #17189.
2017-10-21 22:10:35 +02:00
Andreas Falkenhahn
accf7ab117 Add wxFontPickerCtrl::SetMinPointSize()
Allow setting the minimal, as well as maximal, point size.

Closes #17126.
2017-10-21 22:10:35 +02:00
Vadim Zeitlin
60c93971b3 Merge branch 'dvc-compare-values'
Fix comparing items with checkboxes in wxTreeListCtrl and make it
simpler to correctly implement item comparison in other
wxDataViewCtrl-derived classes.

See https://github.com/wxWidgets/wxWidgets/pull/558
2017-10-21 19:59:12 +02:00
Robin Dunn
8fca138d29 Add missing wxGetLocale 2017-10-18 18:14:43 -07:00
Takeshi Abe
0fea881f12 Fix recurrent "applicable" typo in wxPropertyGrid documentation
It was misspelt as "applicapple" in several places.

Closes https://github.com/wxWidgets/wxWidgets/pull/564
2017-10-06 15:28:58 +02:00
Vadim Zeitlin
f0de65fb98 Make wxDataViewCheckIconTextRenderer class public
Export this class, which was only used internally by wxTreeListCtrl
before, so that user code can use it for its own columns with custom
wxDataViewCtrl models.
2017-10-02 22:28:28 +02:00
Andreas Falkenhahn
ccc513bca9 Allow changing alignment styles after wxTextCtrl creation (wxOSX)
Update NSTextView/NSTextField alignment mode when wxTextCtrl alignment styles are changed with SetWindowStyleFlag().

Closes #17952.
2017-09-25 15:38:24 +02:00
Vadim Zeitlin
10e7725246 Add wxDataViewModel::DoCompareValues() useful virtual hook
This new method, called from the default Compare() implementation, is
simpler to override in the derived classes than Compare() itself.
2017-09-25 14:44:24 +02:00
Artur Wieczorek
a9843a7492 Send EVT_SPIN_UP/DOWN events also when wxSpinButton value wraps around (wxOSX)
EVT_SPIN events should be sent at every value change, not only if it's changed by +/- 1.

See #17957.
2017-09-22 15:28:12 +02:00
Vadim Zeitlin
40f8403f5d Merge branch 'peninfo'
Add wxPenInfo and wxGraphicsPenInfo which allows to specify fractional
pen widths when using wxGraphicsContext.

Closes #17087.

Closes https://github.com/wxWidgets/wxWidgets/pull/472
2017-09-10 21:45:47 +02:00
Vadim Zeitlin
f19012c62c Merge branch 'firstweekday' of https://github.com/lanurmi/wxWidgets
Add API for determining the first day of the week and use it in
wxCalendarCtrl.

Closes https://github.com/wxWidgets/wxWidgets/pull/522
2017-09-10 21:41:36 +02:00
Vadim Zeitlin
76fd05b147 Leave only wxGraphicsRenderer::CreatePen(wxGraphicsPenInfo) overload
It doesn't make much sense to require all the graphics backends to
create wxGraphicsPen from either wxPen or wxGraphicsPenInfo when the
former can be handled just once in the common code.

So do just this, leaving CreatePen() overload taking wxGraphicsPenInfo
where the real pen construction takes place and implementing
wxGraphicsPen creation from wxPen in the common wxGraphicsContext code.

This is not 100% backwards-compatible as any code inheriting from
wxGraphicsRenderer and overriding its CreatePen() will now be broken,
however this should be extremely rare (there is no good reason to
inherit from this class in the user code) and result in compile errors
if it does happen.
2017-09-10 01:48:30 +02:00
Vadim Zeitlin
af3581758b Don't mention wxPenInfoBase in the documentation
This is an implementation detail, don't confuse the user with this
template class which isn't supposed to be used in the user code.

Also improve the example in the documentation, the old one (using pen of
width 0 but with a colour) didn't make much sense.
2017-09-10 01:29:39 +02:00
Adrien Tétar
999c750ca7 Review feedback 2017-09-10 01:02:21 +02:00
Adrien Tétar
2305604565 Introduce wxGraphicsPenInfo class 2017-09-10 01:02:20 +02:00
Adrien Tétar
bc562289c6 Introduce wxPenInfo class 2017-09-10 01:02:06 +02:00