Commit Graph

61653 Commits

Author SHA1 Message Date
Lauri Nurmi
e45a9543d6 Fix unit test when char is unsigned by default
Skip test relying on char being signed if it isn't by default, as is the case
with gcc on some ARM platforms, for example.

Closes https://github.com/wxWidgets/wxWidgets/pull/299
2016-06-17 14:49:21 +02:00
Artur Wieczorek
2ea41cca8d Updated documentation for several wxPG components.
Updated documentation and removed doxygen-style comments from property.h header file.

wxPGPaintData
wxPGProperty
wxPGCell
wxPGAttributeStorage
wxPGChoices
wxPGChoiceEntry
wxPGRootProperty
wxPropertyCategory
2016-06-16 23:55:37 +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
857a8a1ba1 Don't assert in wxRenderer::GetHeaderButtonMargin()
Even if we don't have any way to determine the real margin, don't assert in
this method implementation in wxGTK and wxOSX, but just return 0 instead.

This fixes asserts when trying to fit a column of wxDataViewCtrl, by double
clicking a separator after it, to its contents.

See #13685.
2016-06-16 17:26:38 +02:00
Paul Cornett
e9fdda8638 Avoid clearing selection for mouse button up event which is not over an item, see #17547 2016-06-16 07:23:34 -07: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
Vadim Zeitlin
b6a75ff0b2 Don't pass nor use wxCONTROL_FOCUSED in wxRenderer::DrawItemText()
It doesn't make much sense to always use wxCONTROL_FOCUSED in wxDataViewCtrl
code whenever wxDATAVIEW_CELL_SELECTED state bit is set, wxCONTROL_SELECTED
seems to be enough and is with the native MSW wxRenderer implementation which
doesn't even test for wxCONTROL_FOCUSED anyhow, while the generic one did and
didn't use the correct colour unless it was set.

No real changes, but this will make upcoming commits more straightforward and
already simplifies the code a little bit.
2016-06-16 00:02:09 +02:00
Vadim Zeitlin
acd77439f9 Add wxMarkupText::RenderItemText()
Add new method allowing to use wxRendererNative::DrawItemText() for actually
rendering the text instead of wxDC::DrawLabel().

This will be used for markup support in (generic) wxDataViewCtrl.
2016-06-16 00:02:02 +02:00
Dimitri Schoolwerth
3c4e29e0da Fix accidental changes made to menu sample
Only German translations were supposed to be updated according to
8437c6a443 but it also made test changes
to samples/menu/menu.cpp, revert those.
2016-06-15 02:38:10 +02:00
Vadim Zeitlin
42fe8f889e Return more attributes from wxGTK wxTextCtrl::GetStyle()
Set "underlined" and "strikethrough" style attributes to correspond to the
ones really used too.

See #17523.
2016-06-14 21:43:38 +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
Jouk
ce4070fc16 Enabling wxUSE_GRAPHICS_CONTEXT on OpenVMS 2016-06-14 14:11:38 +02:00
Artur Wieczorek
1f696b6110 Updated wxPGDefaultRenderer and wxPGCellRenderer documentation.
Removed doxygen-style comments from the header file, too.

Closes #14788
2016-06-13 18:40:42 +02:00
Jouk
98284d8f35 Update of OpenVMS makefiles 2016-06-13 16:44:49 +02:00
Jouk
7b1fbff128 re-insert != operator that disappeared during last update 2016-06-13 16:39:38 +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
Vadim Zeitlin
6c7b8c5368 Don't document obsolete wxHelpController::Initialize() overload
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.
2016-06-13 15:16:22 +02:00
Vadim Zeitlin
8760e4fb70 Clarify that wxTextCtrl style apply to user-entered text too
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.
2016-06-12 19:20:53 +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
Maarten Bent
97c7ac4289 Code cleanup in wxSVGFileDC.
Consistent white-space usage.
Use wxS macros for strings.
Check if output stream is OK when writing.
Removed unnecessary Borland pragmas.
2016-06-12 18:40:12 +02:00
Maarten Bent
1e0719ad81 Fixed drawing elliptic arcs in wxSVGFileDC.
For some combinations of start and end angles, the wrong large-arc-flag was calculated. Fixed by correctly converting the wxDC angles to SVG angles (shift -90 degrees, and invert to clockwise direction).
Arcs with the same start and end point (circles) where not drawn because the angle becomes 0 degrees. Fixed by drawing two half circles.
Elliptic arcs with a non-transparent brush had an extra line from the center to the start point of the arc. Fixed by first drawing the arc without border, then only the border.
Arcs with small angles would become invisible because the start and end point map to the same (integer) coordinate. Very large arcs would be distorted because the start and end point coordinates did not line up. Using floating point values resolves this.
See issue #17557.
2016-06-12 18:40:12 +02:00
Maarten Bent
2dcaa43f0b Fixed drawing ellipses and arcs in wxSVGFileDC.
Ellipses with the same start and end point (circles) where not drawn because the angle becomes 0 degrees. Fixed by drawing two half circles.
Do not close ellipses if a transparent brush is used (to match wxDC behavior).
See issue #17557.
2016-06-12 18:40:12 +02:00
Maarten Bent
9e07ba8fae Support SetDeviceOrigin and SetAxisOrientation in wxSVGFileDC.
Override SetDeviceOrigin, SetLogicalOrigin and SetAxisOrientation from wxDC and mark the graphics as changed, so the correct transform translations are applied.
2016-06-12 18:40:11 +02:00
Maarten Bent
1717db0373 Improved memory management in wxSVGFileDC. 2016-06-12 18:40:11 +02:00
Maarten Bent
c7e4b301d0 Add saving as SVG to drawing sample.
Changed the colour of the third star-polygon to test brush pattern with different colours.
Use the width and height of the scroll panel as image size.
2016-06-12 18:40:11 +02:00
Maarten Bent
b55a18f6b8 Generate valid XML in wxSVGFileDC and updated wxSVGVersion.
Use the correct doc-type and specify the encoding. 'title' is not a valid attribute of <image> so remove it.
Removed superfluous white-space and improved indenting in generated XML.
2016-06-12 18:40:10 +02:00
Maarten Bent
045265a7bb Allow to set the SVG title when creating a wxSVGFileDC. 2016-06-12 15:59:28 +02:00
Maarten Bent
2171d407e1 Support more brush styles in wxSVGFileDC. 2016-06-12 15:59:27 +02:00
Maarten Bent
4641710217 Support more pen styles in wxSVGFileDC. 2016-06-12 15:59:27 +02:00
Maarten Bent
3cc4d51c9b Implemented Clear in wxSVGFileDC.
Draw a rectangle with the background colour and a transparent pen.
Closes #15788.
2016-06-12 15:59:27 +02:00
Maarten Bent
b424445078 Improvements to printing text in wxSVGFileDC.
Support underlined and strike-through text.
Set the text length (see http://trac.wxwidgets.org/ticket/17271).
Preserve leading and trailing white-space.
Use wxS macro consistently.
Closes #17271.
2016-06-12 15:59:27 +02:00
Maarten Bent
b4c9927892 Support multi-line text in wxSVGFileDC. 2016-06-12 15:59:26 +02:00
Maarten Bent
5084c6d423 Draw lines in wxSVGFileDC as one connected line.
Do not draw each line separately because the lines will not be connected. E.g. when editing a SVG, moving a point should also move the connecting lines.
2016-06-12 15:59:26 +02:00
Maarten Bent
444c5fd630 Correctly draw poly-polygons in wxSVGFileDC.
Each polygon in the poly-polygon needs to end with the start-point. The implementation is similar to the wxDCImpl implementation, except for the extra end points that are inserted.
2016-06-12 15:59:26 +02:00
Maarten Bent
ebab640578 Enable usage of clipping regions in wxSVGFileDC.
It was implemented 3 and half years ago in 614e38d.
Close remaining clipping regions when closing the SVG file.
2016-06-12 15:59:26 +02:00
Artur Wieczorek
9d137f494a Updated changelog. 2016-06-11 23:24:13 +02:00
Artur Wieczorek
f06bfe37ae Fixed creating wxGraphicContext from native DC with Cairo renderer (MSW).
When x- or y-coordinate of DC origin > 0 then surface created with cairo_win32_surface_create() is not fully operational (for some Cairo operations memory access violation errors occur - see Cairo bug 96482) so in this case we would need to apply a workaround and pass non-transformed DC to Cairo and next apply original DC transformation to the Cairo context operations on our own.

Closes #17564
2016-06-11 23:20:12 +02:00
Artur Wieczorek
a735371b0e Fixed creating wxGraphicsContext with Direct2D renderer.
When render target to draw to a DC (created with ID2D1Factory::CreateDCRenderTarget method) is bound to the device context with ID2D1DCRenderTarget::BindDC method then not only the logical size of a DC needs to be taken into account but also the origin of this DC.
To get proper drawing output the coordinates of all drawing operations should be internally adjusted by this initial origin.
This corrective translation should be used only internally by wxGraphicsContext object and shouldn't be exposed through e.g. GetTransform() function and therefore it is stored separately (in a dedicated variable) and "subtracted" from actual transformation settings for reporting purposes.

See #17564
2016-06-11 23:18:09 +02:00
Vadim Zeitlin
3eae97d2d7 Improve documentation of pickers MUST_EXIST styles
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.
2016-06-09 17:03:51 +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
dd562649f0 Fix recently broken wxPickerBase::SetPickerCtrlGrowable()
Resetting growable flag didn't work correctly after the changes of
0d86c01b8b, fix this and reuse the same code for
both this function and SetTextCtrlGrowable().

See https://github.com/wxWidgets/wxWidgets/pull/296
2016-06-09 15:24:44 +02:00
Jouk
2e67381548 re-adding files that disappeared 2016-06-09 13:57:41 +02:00
Paul Cornett
acc824adc4 Fix building/running with GTK+ < 2.14
See https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-08 22:14:50 -07:00
Paul Cornett
c3a224690e Also fix crash with GTK+ < 3.8 in wxMimeTypesManager code
GtkIconInfo is not a GObject prior to 3.8, not just in GTK+ 2.
See https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-08 21:15:41 -07:00
Vadim Zeitlin
c4d06e8117 Merge branch 'pickers-appearance'
Miscellaneous picker control related fixes, notably fix background and improve
small button size under MSW.

Also make wxSIZE_FORCE_EVENT really work in wxMSW and remove the now unneeded
src/msw/panel.cpp.

See https://github.com/wxWidgets/wxWidgets/pull/296
2016-06-08 20:29:26 +02:00
Vadim Zeitlin
3c4f51df70 Fix crash with GTK+ 2 in wxMimeTypesManager code
Fix the crash introduced by 4dfde501df: we can't
use g_object_unref() to free GtkIconInfo with GTK+ 2.

See https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-08 15:35:58 +02:00
Vadim Zeitlin
bd388e9827 Make wxBU_EXACTFIT buttons less tall in wxMSW
The ellipsis buttons of wxFilePickerCtrl (and similar controls) with
wxFLP_SMALL style looked too big because their min height was greater than
that of the accompanying text control.

Fix this by making the buttons as tall as text controls and not as tall as
standard buttons, this seems to be more aesthetically pleasing.
2016-06-08 03:41:26 +02:00
Vadim Zeitlin
0d86c01b8b Deprecate wxPickerBase::GetDefaultXXXFlag() methods
They just seem completely useless, not documented and only used by wxPickerBase
itself internally. Replace the code using them with wxSizerFlags which is more
clear and also doesn't hard code the border sizes (especially in the case of
the picker control which doesn't even have borders in the first place) and
prepare for removing them later.
2016-06-08 02:51:53 +02:00
Vadim Zeitlin
c5825827fb Ensure that picker controls are laid out
A picker control could have a completely broken appearance if its size was
never changed from the initial size under MSW. For the picker controls inside
a sizer this was indirectly fixed by the previous commit ("Make
wxSIZE_FORCE_EVENT work if only position changed in wxMSW"), but the controls
not managed by a sizer still didn't come up correctly, so add an explicit
Layout() call to ensure they do.
2016-06-08 02:40:18 +02:00
Vadim Zeitlin
9e27a1ca3a Make wxSIZE_FORCE_EVENT work if only position changed in wxMSW
If the position changed but the size didn't, we just call Win32 API for
updating the window geometry but it didn't generate WM_SIZE in this case, so
even when wxSIZE_FORCE_EVENT was used, no wxSizeEvent was sent.
2016-06-08 02:31:19 +02:00