Commit Graph

61668 Commits

Author SHA1 Message Date
David Hart
13068d3603 Strip mnemonics from CJK translations of menu items too
Chinese, Japanese etc translations use a special style for the menu mnemonics
and append them to the translated menu label in brackets, e.g. the menu label
could have the form of "<translation-of-file> (&F)".

Check for this style of mnemonics in wxStripMenuCodes() too and strip them as
well.
2016-06-26 18:36:11 +02:00
Vadim Zeitlin
423ad59b00 Replace AddCatalog() overload with defaulted argument
There is no need to have 2 overloads of this function when we could have just
a single one with a default parameter value.
2016-06-26 18:30:32 +02:00
Artur Wieczorek
8d87ebfe47 Updated wxGraphicsContext and wxGraphicsRenderer documentation.
Added some notes regarding Direct2D and Cairo renderers to reflect latest changes.

Closes #17575
2016-06-25 18:20:24 +02:00
Artur Wieczorek
2ea7ff3160 Updated documentation for wxPropertyGridInterface.
Updated documentation and removed doxygen-style comments from propgridiface.h header file.
2016-06-25 18:17:57 +02:00
Vadim Zeitlin
bbe0ba46e2 Fix heading of transformation matrix section in wxDC docs
The first word of the section title was misinterpreted as an anchor, add a
real anchor to prevent this from happening.
2016-06-24 23:10:56 +02:00
Vadim Zeitlin
fe1e8e46c3 Fix the documented type of wxSecretValue ctor from string
It should be wxString, not wxSecretValue.
2016-06-24 14:21:46 +02:00
Vadim Zeitlin
aa84e6379a Document wxDateTime::GetValue()
It was referred to in GetTicks() description but not documented itself, add it
now.
2016-06-24 14:20:34 +02:00
Artur Wieczorek
47791737db Revert code commented out by mistake in f06bfe37.
We need to restore HDC after Cairo operations.
2016-06-23 22:23:05 +02:00
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