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.
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).
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.
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.
In wxGCDCImpl::ComputeScaleAndOrigin() current affine transformation matrix (applied with SetTransformMatrix, ResetTransformMatrix) has to be concatenated with current basic transformations (applied with SetDeviceOrigin, SetLogicalScale, etc.).
Closes#17674.
1. Elements of resulting matrix are modified directly (in-place) in Matrix3x2F::SetProduct() so none of the multiplied matrices can be the instance of the resulting matrix.
2. The parameter matrix in wxGraphicsMatrixData::Concat() should be a multiplicand, not a multiplier.
See #17670.
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.
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.
wxGetKeyState() does not currently work on non-X11 GTK backends, and in some
cases it has been reported to crash. It seems that the most likely use case
for wxGetKeyState() is to query the modifier keys, so on non-X11 backends, use
GTK+ calls to retrieve the modifier key state.
Non-modifier keys are not currently implemented, update the documentation to
mention this.
Closes https://github.com/wxWidgets/wxWidgets/pull/320
Native ID2D1RenderTarget::SaveDrawingState method stores in ID2D1DrawingStateBlock only transform, antialiasing mode, text-rendering options and tags but not currently set ID2D1Layers (which are used in wxD2DContext for clipping purposes). Therefore current stack of layers has to be stored "manually" alongside ID2D1DrawingStateBlock in a dedicated data structure (LayerData) in PushState() and restored also "manually" in PopState().
Closes#17626.
This wasn't documented anywhere until now, so copy the contents of the table
in src/common/accelcmn.cpp to the documentation to have them all in one place.
This skeleton of documentation was replaced by (minimal but still more
valuable) real documentation in fcd5284aed but
the old classes were accidentally left in.
Added section to group similar functions in the documentation of wxGraphicsContext.
Fixed references to the section describing wxPGProperty attributes.
When wxPGProperty's text or background colours are modified with dedicated wxPropertyGridInterface utility functions (SetPropertyBackgroundColour, SetPropertyTextColour, SetPropertyColoursToDefault) then it is enough to redraw the property with new colours because its internal state remains unmodified and full refreshing is not necessary.
Closes#17588
ID2D1RenderTarget::PushAxisAlignedClip/PopAxisAlignedClip used to clip the region (with wxGraphicsRenderer::Clip) and ID2D1RenderTarget::PushLayer/PopLayer used to rendering to the transparent layer (with wxGraphicsRenderer::BeginLayer) are non independent but have to be used in the controlled sequences: "A PushAxisAlignedClip and PopAxisAlignedClip pair can occur around or within a PushLayer and PopLayer, but cannot overlap" (and of course finally each Push* call must have a matching Pop* call).
To control the sequence of access to the AxisAlignedClips and Layers there is implemented a wxStack data member holding Clips/Layers parameters which reflects a physical stack of respective Clips/Layers in ID2D1RenderTarget. This way we know in which order to pop and what to pop from ID2D1RenderTarget stack if there is a need to do so.
Closes#17590
When there is no clipping region currently set then current effective clipping region is identical with entire DC surface and therefore DC size should be returned as a region size.
Closes#17013
While setting a clipping box 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.
Note: Effective clipping box can be an empty region.
See #17013
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.
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
There are no help controllers using the TCP port number passed to this
Initialize() overload anyhow, so don't document it neither.
It would be even better to get rid of it entirely, but this would require
slightly more effort.
See #17566.
The wording was unclear and seemed to imply that the style was only taken into
account for the text added programmatically, which wasn't the intention.
See #17523.
Mention that it's still possible to enter a non-existent file or directory
into a control with wxFLP_FILE_MUST_EXIST/wxDIRP_DIR_MUST_EXIST style if it
has a text control.
Also update SetPath() documentation to mention that non-existent paths are
allowed when text control is used.
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
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).
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
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.
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
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
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
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