Commit Graph

61860 Commits

Author SHA1 Message Date
Artur Wieczorek
9bee5e1e2b Updated documentation for several wxPG components.
Updated wxPropertyGrid, wxPropertyGridEvent, wxPropertyGridPopulator documentation and removed doxygen-style comments from propgrid.h header file.
2016-06-23 22:23:03 +02:00
Vadim Zeitlin
093a955fcc Don't make wxBU_EXACTFIT buttons too tall in wxMSW
Fix regression introduced by bd388e9827: bitmap
buttons could now be made significantly taller than the text control height if
their bitmap was big enough. Only make buttons taller if they wouldn't be tall
enough on their own, instead of always increasing their height, even if it's
already big enough.

Closes #17576.
2016-06-23 22:16:26 +02:00
Vadim Zeitlin
ff5981230a Fix crash when resetting wxGrid table with editor control shown
This resulted in a crash in GetDefaultEditorForCell() later when GetEditor()
was called from HideCellEditControl() which is itself always called from
wxGrid dtor because GetDefaultEditorForCell() dereferenced m_table without
checking if it was not null any more.

Add the missing check to this function and GetDefaultRendererForCell() too,
for consistency.

In addition, dismiss the cell editor immediately when changing table instead
of doing it at some later time, as it just doesn't make sense to continue
showing it any more as the data it was started to edit doesn't belong to us
any longer.
2016-06-22 01:11:20 +02:00
Vadim Zeitlin
4b98cd4012 Fix compilation with libsecret 0.16 from Ubuntu 14.04 LTS
This version of the library requires predefining a special symbol to obtain
API declarations we need.

See https://github.com/wxWidgets/wxWidgets/pull/290
2016-06-18 18:36:13 +02:00
jonkraber
96ef6ea293 Fix preserving selection when changing selection mode in wxGrid
The loop over the existing selection was buggy and took into account only one
corner of the block instead of the entire block and also skipped some blocks
entirely.

Closes #17572.
2016-06-18 18:12:52 +02:00
Artur Wieczorek
9c2076b79f Implemented wxToolBarTool::SetLabel (GTK)
Labels can be changed only for button tools because control tools with labels are not implemented under wxGTK.

Closes #17567
2016-06-17 23:18:10 +02:00
Artur Wieczorek
1373241f21 Fixed implementation of wxToolBarTool::SetLabel (MSW).
Because label is implemented in the control tool as a separate wxStaticText object which exists only if label is non-empty so we need to handle appropriately also the cases when non-empty label is set to empty and vice versa.
Setting a new label for the button tool with TB_SETBUTTONINFO would require to do some additional actions for other items in the toolbar (manual re-positioning items in the control tools, updating stretchable spacers) so it is easier just to re-create the toolbar with Realize().

See #17567
2016-06-17 23:17:40 +02:00
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