Commit Graph

2937 Commits

Author SHA1 Message Date
Artur Wieczorek
edabb01032 Add initial line segment when adding arc to wxGraphicsPath with GDI+
For the sake of compatibility with Cairo (and Direct2D) an initial line segment should be added to the path from the current point (if set) to the beginning of the arc.

Closes #17557
2016-06-05 19:00:13 +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
b8a7a9809b Add a note about wxSecretValue size limit under MSW
Mention that passwords are limited to 2560 bytes under Windows 7.
2016-06-04 19:21:16 +02:00
Vadim Zeitlin
4154fbb8a3 Add conversions between wxSecretValue and wxString
This is less secure, but more convenient, than using raw pointers and in most
cases the password will already be stored in a wxString anyhow.
2016-06-04 19:19:15 +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
Artur Wieczorek
9f9d593019 Fixed adding arc to wxGraphicsPath with Direct2D renderer.
To handle properly all combinations of the start and end angles and to ensure consistency with Cairo renderer behaviour there is necessary
1. To normalize angle values the same way as it is done in Cairo.
and
2. When difference between end angle and start angle >= 2*pi then in addition to the arc itself also one or more full circles have to be added to the path.

See #17558
See #17557
2016-06-04 11:12:55 +02:00
Artur Wieczorek
9de3f8395c Updated wxPGEditor interface documentation
Editor controls are no longer bound to the fixed ID's wxPG_SUBID1 and wxPG_SUBID2.
2016-06-01 18:52:06 +02:00
Paul Kulchenko
36c5b5f9ca Updated Scintilla to add GetTargetTextRaw (closes #17426). 2016-05-31 23:06:51 -07:00
Paul Kulchenko
c03ce59b86 Upgrade Scintilla component to 3.6.6. 2016-05-31 22:19:10 -07:00
Artur Wieczorek
2b13dc7473 Modified wxGraphicsPath concatenation (with AddPath) for Direct2D renderer.
Because wxGraphicsPath comprises current ID2D1PathGeometry object and the collection of transformed (sub-)geometries (ID2D1TransformedGeometry objects) so to concatenate two paths we need to concatenate their current geometries as well as to combine the collections of transformed geometries.
2016-05-26 17:54:45 +02:00
Artur Wieczorek
fa01392788 Fixed transformation of wxGraphicsPath for Direct2D renderer.
Unfortunately, it seems that this is not a straightforward method to apply transformation to the current underlying path geometry (ID2D1PathGeometry object) "in-place" (ie. transform it and use for further graphics operations). Some simple methods offered by Direct2D are not useful for these purposes:
1. ID2D1Factory::CreateTransformedGeometry() converts ID2D1PathGeometry object to ID2D1TransformedGeometry object and ID2D1TransformedGeometry inherits from ID2D1Geometry (not from ID2D1PathGeometry) and cannot be used for path operations.
2. ID2D1Geometry::CombineWithGeometry() which could be used to get final geometry by combining empty geometry with transformed geometry doesn't offer any combine mode which would produce a "sum" of geometries (D2D1_COMBINE_MODE_UNION gives kind of outline). Moreover the result is stored in ID2D1SimplifiedGeometrySink not in ID2DGeometrySink.

So, it seems that ability to transform the wxGraphicsPath (even several times) and still use it after this operation(s) can be achieved by using a geometry group object (ID2D1GeometryGroup) this way:
1. After applying transformation to the current path geometry with ID2D1Factory::CreateTransformedGeometry() the result is stored in the collection of transformed geometries (an auxiliary array) and after that a new (empty) geometry is open (in the same state as just closed one) and this geometry is used as a current one for further graphics operations.
2. Above steps are done at every transformation so our effective geometry will be a superposition of all previously transformed geometries stored in the collection (array) and the current operational geometry.
3. If there is necessary to use this combined effective geometry in any operation then ID2D1GeometryGroup created with ID2D1Factory::CreateGeometryGroup() from the collection of stored geometries will act as a proxy geometry.

Closes #17549
2016-05-26 17:51:53 +02:00
Vadim Zeitlin
9c30da08c0 Document that wxLongLong is obsolete nowadays
People should just use "long long" or "int64_t" instead.
2016-05-20 02:43:28 +02:00
Vadim Zeitlin
7d95278021 Document wxULongLong separately from wxLongLong
These classes don't have exactly the same API, e.g. the former provides
ToULong() while the latter has ToLong().

Closes #17533.
2016-05-20 02:43:28 +02:00
Lauri Nurmi
d51ce354c1 Document that wxFileSystemWatcher requires a running event loop
On Gtk and OS X, but unfortunately not MSW, an assert fails if a
wxFileSystemWatcher is created too early. Therefore give a hint about
where and when one should be created.

Closes https://github.com/wxWidgets/wxWidgets/pull/287
2016-05-18 14:51:31 +02:00
Artur Wieczorek
08cb54c4c1 Fixed wxGraphicsPath concatenation with GDI+ renderer.
Since resulting wxGraphicPath should have the same state as appended path so we have to grab in wxGraphicsPath::AddPath also auxiliary data from appended wxGraphicsPath.

See #17532
2016-05-12 21:15:19 +02:00
Vadim Zeitlin
4eababc004 Don't document non-public wxEvtHandler::SearchEventTable()
This method is not part of public wxWidgets API, so don't document it.
2016-05-09 18:58:39 +02:00
Artur Wieczorek
22c520e3e8 Fixed adding a Bezier curve to wxGraphicsPath with GDI+ renderer.
When current point is not set before the call to wxGraphicsPath::AddCurveToPoint() then it should be set at first control point prior to adding a curve (function should behave as if preceded by MoveToPoint).

See #17526
2016-05-09 18:40:10 +02:00
Artur Wieczorek
17e24fec73 Fixed adding a line to wxGraphicsPath with GDI+ renderer.
When current point is not yet set then wxGraphicsPath::AddLineToPoint() should behave as MoveToPoint().

See #17525
2016-05-08 21:51:01 +02:00
Artur Wieczorek
a6d97acc31 Update documentation regarding wxGraphicsPath::AddRoundedRectangle(). 2016-05-06 18:50:04 +02:00
Artur Wieczorek
329aee5660 Fixed closing sub-path of wxGraphicsPath with Direct2D renderer.
When sub-path is closed with CloseSubpath() then current point should be moved to the joined endpoint of the sub-path (what is equivalent of moving it to the starting point of the sub-path). To implement this behaviour we need to store on our own the starting point of the figure in a dedicate data member because native D2D renderer apparently doesn't offer any support for retrieving it.

See #17520
2016-05-05 13:51:27 +02:00
Artur Wieczorek
008a162241 Fixed appending circle/ellipse to wxGraphicsPath with Direct2D renderer.
Circle/ellipse should be appended as a closed sub-path and the current point after the operation should be moved to "the rightmost point" of the figure ((x+r,y) and (x+w,y+h/2) respectively).

See #17520
2016-05-05 13:49:36 +02:00
Paul Kulchenko
25520cbb80 Don't use wxWindowBase in the interface headers
This class is an implementation detail, only wxWindow is public and there are
never objects of wxWindowBase (but not wxWindow) class in wxWidgets programs.

Closes https://github.com/wxWidgets/wxWidgets/pull/279
2016-05-05 02:59:43 +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
Kolya Kosenko
bb2b48f2ba Handle negative width size in GDI+ DrawRectangle() and document it
Apparently it's a common convention to allow width and/or height of a
rectangle to be negative as both GDI and Cairo handle this natively, so also
allow this for GDI+ and document this as the expected behaviour.

Closes #17495.
2016-04-23 18:31:01 +02:00
Vadim Zeitlin
983f5f29a2 Merge branch 'owner-draw-headers'
Implement support for changing fonts and colours in wxMSW header control.
2016-04-23 17:52: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
Lauri Nurmi
858e50daaa Document wxDynamicLibrary::GetDllExt() method
Make this method part of the public API.

Closes https://github.com/wxWidgets/wxWidgets/pull/273
2016-04-18 00:15:47 +02: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
dfb993274c Add equality operators to wxItemAttr
It can be necessary to compare two item attributes for equality, e.g. to check
if the attributes have changed, so provide a straightforward implementation of
equality and inequality operator for it.
2016-04-17 17:36:20 +02:00
Vadim Zeitlin
c17f1d7888 Consistently use British "colour" spelling in wxItemAttr documentation
The methods of this class use "Colour", not "Color", so use "colour" and not
"color" when documenting them too.
2016-04-17 17:21:30 +02:00
Vadim Zeitlin
e84053ed64 Add wxItemAttr::HasColours() and IsDefault() accessors
They are trivial but useful to have as testing for HasBackgroundColour() ||
HasTextColour() || HasFont() is too verbose.
2016-04-17 17:19:20 +02:00
Vadim Zeitlin
246ae58c19 Replace wxTreeItemAttr and wxListItemAttr with wxItemAttr
The two existing structs were completely identical, just replace them with a
single wxItemAttr.

Notice that wxDataViewItemAttr is not quite the same, although pretty similar,
so it remains separate for now. It would be nice to combine it with this one
too in the future, e.g. to make it simpler to make items bold in a wxListCtrl.
2016-04-16 19:04:52 +02:00
Vadim Zeitlin
ba5a0a3878 Fix more typos in comments and wxFAIL messages
Closes https://github.com/wxWidgets/wxWidgets/pull/270
2016-04-14 16:08:28 +02:00
Vadim Zeitlin
5e5d872150 Document wxDateTime comparison operators behaviour
Mention that they intentionally can't be used with invalid objects except for
the exact comparison.
2016-04-12 20:51:09 +02:00
orbitcowboy
e3f1423632 Fix typos in comments in C++ code
No real changes.

Closes https://github.com/wxWidgets/wxWidgets/pull/268
2016-04-12 17:15:23 +02:00
Vadim Zeitlin
d8b92580bc Remove @since annotations for new Scintilla GetDirectXXX() methods
This partially undoes 0a3057b83c which wrongly
modified the generated interface/wx/stc/stc.h file, as these changes were lost
after regenerating it again.

Unfortunately it doesn't seem possible to have @since annotations for the
Scintilla methods currently, ideally the generator script should be modified
to allow this, somehow.

See #17481.
2016-04-03 17:44:54 +02:00
New Pagodi
0a3057b83c Add GetDirect{Function,Pointer}() methods to wxStyledTextCtrl
These methods can be useful when working with dynamic lexers.

Closes #17481.
2016-04-03 15:50:21 +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
Iwbnwif Yiw
8006c4fed1 Improve wxDataViewModel::Compare() documentation
Document the function parameters and return value.

Closes #17477.
2016-04-03 15:27:28 +02:00
Iwbnwif Yiw
1765794015 Fix wxRegEx example in the documentation
Fix typos and make the code actually compile.

Closes #17475.
2016-04-02 18:52:23 +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
Vadim Zeitlin
d3cb252c96 Document that wxScreenDC corresponds to the entire virtual screen
And not just the primary monitor.

See #13279.
2016-03-28 21:41:10 +02:00
Vadim Zeitlin
2567f4222d Don't characterize GTK+ 2.18 as being "recent" in the documentation
2009 was quite some a long time ago.

See #17464.
2016-03-28 21:30:57 +02:00
pb101
e806647e7f Document that wxInfoBar close button is not used with custom ones
Don't say that wxInfoBar always has a close button because this is not the
case if any custom buttons are present.

Closes #17464.
2016-03-28 21:29:09 +02:00
Iwbnwif Yiw
5e4aacd3b7 Don't document wxDropFilesEvent as being MSW-only
This is not the case any more since 2.8.10.

Closes #17463.
2016-03-28 21:25:56 +02:00
Lauri Nurmi
55d77f271e Don't call different variants of wxString methods overloads
The function such as fn_str(), wc_str(), and ToAscii() have
configuration-dependent return types, yet different variants were claimed to
be member function overloads. This is incorrect, as a member function cannot
be overloaded only by its return type and, for any given platform/build
variant only one of them is available.

Closes https://github.com/wxWidgets/wxWidgets/pull/260
2016-03-28 21:25:56 +02:00
ARATA Mizuki
70ddab243e Add wxMBConv parameter to wxString::ToStdString
See #17461.
2016-03-25 16:23:47 +09:00