Commit Graph

2411 Commits

Author SHA1 Message Date
Artur Wieczorek
fb5f6c4720 Add wxACC_INVALID_ARG error code to wxAccStatus enum
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.
2016-10-03 20:43:00 +02:00
Artur Wieczorek
ad684a814a Fix changelog
Move the entry related to wxIAccessible to the MSW section.
2016-09-29 23:57:29 +02:00
Artur Wieczorek
ac96d3949b Return proper value from wxIAccessible::get_accSelection() if no children are selected
VT_EMPTY VARIANT should be returned if wxAccessible::GetSelections() returns empty list of selected children.
2016-09-29 23:44:31 +02:00
Tim Roberts
607b800444 Fix wxMemoryDC::Blit() with itself as source in wxMSW
Don't use StretchDIBits() native function as it doesn't seem to handle the
case when its source and destination are the same correctly.

Closes #17666.
2016-09-21 23:00:03 +02:00
Artur Wieczorek
6bd6c94511 Update changelog
Add missing entry related to commits 4d6d73eab3, b6d44d5329.
2016-09-20 21:32:48 +02:00
Artur Wieczorek
277f9c58a1 Fix retrieving bounding box coordinates
Bounding box coordinates have to be calculated and stored internally in device units to be independent on changes of logical coordinates between calls to wxDC::CalcBoundingBox.
These stored coordinates are converted to the logical units on demand when they are retrieved with call to wxDC::MinX, MinY, MaxX or MaxY.

Closes #17667.
2016-09-16 22:04:54 +02:00
New Pagodi
b06e63dbd2 Add new wxStyledTextCtrl wxEVT_STC_AUTOCOMP_COMPLETED event
This is the translation of Scintilla SCN_AUTOCCOMPLETED notification.

Closes #17664.
2016-09-16 01:38:27 +02:00
New Pagodi
b99d28bb46 Add wxStyledTextEvent::GetListCompletionMethod()
Provide access to Scintilla "listCompletionMethod" field of SCR_AUTOCSELECTION
event.

Closes #17648.
2016-09-13 13:05:25 +02:00
Artur Wieczorek
f68dad69cc Implement Flush() method for Cairo graphics context
wxCairoContext implementation for wxMSW and wxQT use internally helper surface so there is a need to flush it on demand.
2016-09-08 19:34:46 +02:00
Artur Wieczorek
49000defcf Add support for affine transformation matrix in wxGCDC
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.
2016-09-08 19:34:43 +02:00
Artur Wieczorek
ba4b8d5670 Fix retrieving clipping box after changing wxDC coordinates (GTK)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when wxDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale(), SetLogicalScale(), SetTransformMatrix() or ResetTransformMatrix().
When any of these functions is called then clipping box data are marked as invalid and updated by recalculating extents of the clipping region in new coordinates at nearest call to GetClippingBox().

Closes #17646.
2016-09-01 21:42:13 +02:00
Artur Wieczorek
98714ea452 Fix retrieving clipping box after changing wxGCDC coordinates (MSW, GTK)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when existing wxGraphicsContext is associated with wxGCDC using SetGraphicsContext() or when wxGCDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale() or SetLogicalScale().
When any of these functions is called then clipping box data are marked as invalid and retrieved from underlying graphics context using wxGraphicsContext::GetClipBox() at nearest call to GetClippingBox().

See #17646.
2016-09-01 21:41:18 +02:00
Artur Wieczorek
dfc966bf1e Fix retrieving clipping box after changing wxDC coordinates (MSW)
Member data containing clipping box have to be updated not only when the clipping region is explicitly changed by SetClippingRegion()/DestroyClippingRegion() but also when existing HDC is associated with wxDC using SetHDC() or when wxDC coordinates are transformed with SetDeviceOrigin(), SetLogicalOrigin(), SetUserScale(), SetLogicalScale(), SetTransformMatrix() or ResetTransformMatrix().
When any of these functions is called then clipping box data are marked as invalid and updated using GetClipBox() Win API at nearest call to GetClippingBox().

See #17646.
2016-09-01 21:39:48 +02:00
Lauri Nurmi
394ce5f631 Add C++11-style cbegin, cend, etc. to wxString's iterator interface
These c-prefixed functions always return a const_iterator.
The full list of functions added: cbegin(), cend(), crbegin(), crend().

Closes https://github.com/wxWidgets/wxWidgets/pull/314
2016-08-25 18:54:05 +02:00
Artur Wieczorek
acc57fccc7 Fix wxDC::Clear
When complex transformation (including e.g. rotation) is applied to DC then coordinates of the clip box return by GetClipBox() API can be inaccurate due to the rounding errors.
To compensate these errors we need to fill rectangle which is slightly larger then just retrieved clip box.

Closes #17636.
2016-08-21 21:22:05 +02:00
Artur Wieczorek
12eaa61930 Fix wxGCDC::Clear
If underlying graphics context is rotated then drawing a rectangle with origin at (0,0) doesn't cover all the drawing area. To draw over entire area we need to get extents of the actual clipping region (with applied all transformations) and use it as coordinates of the drawn rectangle.

See #17636.
2016-08-21 21:03:17 +02:00
Artur Wieczorek
78f00da98a Fix wxGraphicsMatrix::TransformDistance for Direct2D implementation
Current transformation matrix without translation component should be used in calculations.
2016-08-21 21:01:52 +02:00
Artur Wieczorek
480a003c00 Add wxGraphicsContext::GetClipBox() function
This method returns bounding box of the current clipping region.
Added declaration, documentation and implemented for GDI+, Direct2D, Cairo renderers.
2016-08-21 20:57:40 +02:00
Vadim Zeitlin
f9740e8180 Fix wxBitmap ctor from XBM in wxGTK
Width and height were exchanged in the loops, so the conversion code didn't
work correctly and overflowed the pixel buffer (due to extra padding in the
row stride) for non-square bitmaps. It also resulted in a completely wrong
bitmap appearance, but somehow this managed to go unnoticed, unlike the memory
errors.

Closes #17633.
2016-08-21 14:46:16 +02:00
David Hart
34d39c9dfb Fix use of dangling reference in wxFileSystemWatcher Unix code
Don't reference the "watch" object after possibly destroying it when handling
IN_DELETE_SELF inotify notification.

Closes #17122.
2016-08-19 23:19:14 +02:00
Jeff Hostetler
534899baa2 Work around unwanted MacOpenFiles() calls in wxOSX applications
Don't try to open any command line arguments as files by using the workaround
from Colin Barrett (see https://bugzilla.mozilla.org/show_bug.cgi?id=366009).
2016-08-19 23:03:47 +02:00
brawer
7f10d1fa8a Add wxSYS_CARET_{ON,OFF,TIMEOUT}_MSEC system settings
Provide a way to retrieve the caret blink times from wxSystemSe and implement
it for wxOSX and wxGTK.

Closes #17629.
2016-08-19 22:55:20 +02:00
David Vanderson
e2a846e182 Fix correct screen DPI and not hard-coded 72 in wxOSX
Don't hard-code screen DPI as 72, use the real number instead (which is now
returned correctly, after the last commit).

Closes #17615.
2016-08-08 14:03:12 +02:00
David Vanderson
49801e57f1 Implement wxGetDisplaySizeMM() correctly in wxOSX
Return the real screen size instead of hard-coding 72 DPI.

Closes #17614.
2016-08-08 14:00:07 +02:00
Artur Wieczorek
b3d4c870da Update changelog
Mention of recent wxPG-related fixes 6e97a2cb i c3fa684a.
2016-07-22 23:12:35 +02:00
Artur Wieczorek
097625de52 Fixed rescaling of wxImage
When wxImage is rescaled with wxIMAGE_QUALITY_BILINEAR, wxIMAGE_QUALITY_BICUBIC or wxIMAGE_QUALITY_BOX_AVERAGE algorithm then for proper interpolation there is necessary to uniformly (linearly) map entire pixel range in the new image to the entire pixel range in the current image, i.e. pixels positions (integer values) in range [0..newDim-1] has to be mapped to "virtual" pixel positions (not necessary integer values) exactly in the range [0..oldDim-1].
[0..oldDim-1] range of target mapping is required because for proper interpolation every "virtual" pixel has to be located between two physical pixels in the current image.
Thus scaling ratio used to find corresponding pixels in the current image should be (oldDim-1)/(newDim-1) and not oldDim/newDim (which is used now).
When image is e.g. upsampled oldDim/newDim ratio then some new rightmost/botommost pixels are mapped to old pixels > (oldDim-1) and their values are improperly interpolated (in the current implementation their positions are just truncated to (oldDim-1) to bypass the problem and upsampled image looks like it was shifted left/up). The larger scaling ratio the effect is more visible.

Note:
Because reference images used currently in the unit tests were created with improper scaling there is necessary to upload new reference images created with fixed scaling.

Closes #17594
2016-07-22 23:00:33 +02:00
Artur Wieczorek
902b9a5c56 Fix calculating the extent of clipping box (wxDC, GTK).
While setting a clipping region 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. Effective clipping box can be an empty region.
Clipping box parameters are calculated and stored in logical coordinates.
2016-07-17 17:05:02 +02:00
Damien Ruscoe
fc0108ce71 Hide empty wxCheckBoxes in wxGTK to fix display problem
Focus rectangle was still drawn around the label when it was empty with some
themes, so hide it completely to ensure this doesn't happen.

Closes #17443.
2016-07-09 15:32:34 +02:00
Vadim Zeitlin
2543c336b0 Revert "Fix invisible captions in high contrast mode"
This reverts commit 71dfb3b414 which fixed
appearance of the captions in high contrast mode but broke them for wxGTK.

Ideal would be to make this code work in wxGTK too or, in the worst, case only
use this code for wxMSW, but for now at least avoid breaking wxGTK appearance
by default.

See #16186.
2016-07-03 14:38:36 +02:00
Vadim Zeitlin
ebb3a791b9 Revert using an event object for waking up event loop in wxMSW
This reverts 6c40531fb7 ("Make main thread wake
up code more efficient and less error-prone in wxMSW") as, while being more
efficient, the new code doesn't work at all when we're not running the message
loop ourselves as it happens when the user opens a menu or starts resizing a
window because in both cases Windows runs a local message loop dispatching the
messages itself and this message loop doesn't react to our event object being
signalled.

So this approach can't work and needs to be reverted, even if it reintroduces
the danger of overflowing the message queue (see #9053).

Closes #17579.
2016-07-02 14:49:15 +02:00
Vadim Zeitlin
3dc54df247 Ignore hints on wxTE_PASSWORD controls when not supported natively
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.
2016-06-28 14:40:52 +02:00
Vadim Zeitlin
967bdbf994 Use equally-sized buttons in wxMSW horizontal toolbars
Only use TBSTYLE_AUTOSIZE, adjusting each button to the size it really needs,
for the toolbars with wxTB_HORZ_LAYOUT style as they don't have any uniform
button size anyhow.
2016-06-26 18:51:50 +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
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
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
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
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
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
Artur Wieczorek
9d137f494a Updated changelog. 2016-06-11 23:24:13 +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
4dfde501df Add support for returning item location to wxGTK wxMimeTypesManager.
This is a squash merge of gtk_mimetype branch from
https://github.com/Hanmac/wxWidgets.git with some extra minor cleanup.

Closes https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-07 14:29:52 +02:00
Vadim Zeitlin
ed73e4f624 Merge branch 'uisim-xtest'
Make wxUIActionSimulator work with GTK+3, including when using DPI scaling.
2016-06-04 22:44:25 +02:00
yenwu
beaca78962 Fix vertical scrollbar visibility in wxStyledTextCtrl
Vertical scrollbar didn't appear even when the number of lines in the control
became one greater than the maximal fitting number of lines, but only when one
more line was added.

This seems to have been a simple off-by-one error in SetScrollbar() calls, so
fix this by adding 1 to the upper end of the range.

Closes #17548.
2016-06-04 22:27:00 +02:00
Vadim Zeitlin
d68eb10e3d Handle strings with embedded NULs in wxDataStream
Read/write the entire string and not just the part until the first NUL in it.

Closes #17556.
2016-06-04 21:47:12 +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
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
Scott Talbert
a4716916b7 Add support for using the XTest extension in wxUIActionSimulator
Fixes wxUIActionSimulator under wxGTK3, see #17530.
2016-05-23 03:00:48 +02:00
Eric Jensen
e7a526604c Implement auto complete in generic wxSearchCtrl
Just forward the relevant methods to the embedded wxTextCtrl.

Closes #17519.
2016-05-07 01:49:22 +02:00
Vadim Zeitlin
e2b13a7b8e Fix background colour returned by wxTextCtrl::GetStyle() in wxMSW
Don't return the background colour unless it's really set, otherwise we
returned black background even if it was never changed.
2016-05-05 03:05:45 +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
Vadim Zeitlin
b1fcf100ff Fix user-visible with AUI tab selection after dragging
Selection at wxAuiNotebook level was not updated, resulting in all attempts to
select the tab at the same index as the tab that was dragged elsewhere being
ignored, e.g. after dragging the first tab to the second position in the AUI
sample, the first tab couldn't be selected again.

Fix this by always changing the selection in OnTabEndDrag(). This might not be
the best thing to do as the selection is also changed later in the code and
the fact that the code returns without sending the event is probably a bug
too, but for now at least fix the user-visible problem.

Closes #15071.
2016-04-23 18:51: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
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
7465237353 Improve wxSpinCtrl best size computation in wxGTK
Don't hardcode completely arbitrary width of 95px for the text part, but
compute it from the values this control is actually used for.
2016-04-03 18:04:26 +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
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
Iwbnwif Yiw
00526cefb6 Return full virtual screen size from wxScreenDC::GetSize() in wxMSW
Return the size of the entire virtual screen, possibly composed from multiple
monitors, rather than just the size of the primary monitor.

This makes this method consistent with wxScreenDC actually representing the
entire virtual screen and not just the primary monitor and also with wxGTK.

Closes #13279.
2016-03-28 21:37:55 +02:00
ARATA Mizuki
cf000e7e02 Fix GetPartialTextExtents() to handle non-BMP chars under OS X
On OS X, wxString operates on UTF-32 code units, but CoreText API use UTF-16
code units. So we need to take care of surrogate pairs.

Closes https://github.com/wxWidgets/wxWidgets/pull/261
2016-03-28 21:25:56 +02:00
Vadim Zeitlin
b7e0625b90 Don't indent the expander column in list wxDataViewCtrl in wxOSX
Indenting the column contents to leave enough space for the expanders is
unnecessary in this case, so just don't do it.

Closes #17409.
2016-03-22 21:44:38 +01:00
Vadim Zeitlin
716dace3d6 Make wxDataViewCtrl::Expand() expand ancestors in native ports too
Expand() called ExpandAncestors() in the generic wxDataViewCtrl implementation
but not in the native ones, resulting in observable difference in the
behaviour: for example, the wxDataViewTreeCtrl in the dataview sample appeared
initially expanded under MSW, using the generic version, but collapsed under
GTK and OSX.

Harmonize this among all ports. This also has a nice side effect of making
Expand() less horribly inefficient as it is not recursively called by
ExpandAncestors() which it itself used to call: now ExpandAncestors() only
calls DoExpand() which is a simple function that only expands the item passed
to it and does nothing else.

Closes #14803.
2016-03-22 21:22:36 +01:00
Vadim Zeitlin
1bbc44daff Support background colour in wxDataViewItemAttr in wxGTK
The code handling background colour was commented out for some reason, simply
enable it as it seems to be working just fine -- and update the sample to show
that it does.
2016-03-22 17:49:49 +01:00
wanup
c4e892629f Implement wxDataViewChoiceByIndexRenderer for wxOSX
Add missing class implementation.

Closes #17452.
2016-03-19 00:17:13 +01:00
Vadim Zeitlin
db70be1a7c Merge branch 'stackwalk-mingw'
Support wxStackWalker when using MinGW54 or TDM-GCC.
2016-03-16 02:20:15 +01:00
Vadim Zeitlin
ccac9d0557 Enable wxStackWalker in MinGW64 builds
This class can be used even without SEH, provided debug help API is available,
so just make wxUSE_STACKWALKER dependent on wxUSE_DBGHELP instead of
unconditionally disabling it if SEH support is not available.
2016-03-15 20:11:10 +01:00
ousnius
c3a2994931 Add support for wxSL_MIN_MAX_LABELS and wxSL_VALUE_LABEL to XRC
Recognize these flags in wxSlider XRC handler.

Closes #16949.

Closes https://github.com/wxWidgets/wxWidgets/pull/253
2016-03-14 18:50:13 +01:00
Andrea Zanellato
cf5fa7d5f1 Add support for wxAuiManager and wxAuiPaneInfo to XRC
Add XRC handler for wxAuiManager and include the existing wxAuiNotebook
handler into it (but notice that wxAuiToolBar handler added by a later #15686
in f269f868d7 remains separate).

Also update the AUI dialog in the sample and stop hardcoding its size in
pixels.

See #13520.
2016-03-09 01:11:16 +01:00
Hans Mackowiak
d30673e507 Implement setting link colours in wxHyperlinkCtrl for GTK+3
Use GtkCssProvider to customize the colours used.

Closes #17089.
2016-03-07 15:00:07 +01:00
Vadim Zeitlin
f47d767fdb Merge branch 'scintilla-3.6.3'
Update bundled Scintilla to version 3.6.3.

Closes #17357.
2016-03-05 18:01:01 +01:00
Troels Knakkergaard
bc6eba6043 Reset the parent MDI menu after destroying MDI child in wxMSW
This is necessary to avoid menu corruption in case the child creation fails.

Closes #17315.
2016-03-05 04:04:20 +01:00
Troels Knakkergaard
cda7209101 Add wxFileType::GetExpandedCommand()
This new method allows to get the command expanded with the given file name
for commands other than "Open" and "Print".

Closes #17367.
2016-03-05 03:09:59 +01:00
Sebastian Dröge
6ea8ba1e9c Add GstPlayer 1.7.2.1+ based GStreamer backend
Use new simpler API available in the latest GStreamer if available.

Closes #226.
2016-03-05 02:52:59 +01:00
nick863
e495ff2246 Set up extensions filter correctly in wxFileDialog in wxOSX
We need to call DoOnFilterSelected() to restrict the files that can be
initially selected by the user to the filter.

Closes #17415.
2016-03-04 19:43:53 +01:00
Vadim Zeitlin
da7388c9c8 Make wxLogInfo() work even without wxLog::SetVerbose()
It's confusing that wxLogInfo() and wxLogVerbose() are exactly the same and
the former, and not only the latter, doesn't do anything unless SetVerbose()
had been called, even if the log level is wxLOG_Info or higher.

Fix this by checking for GetVerbose() in wxLogVerbose() only and making
wxLogInfo() check the log level only. This makes it very similar to
wxLogMessage() but this is not such a bad thing.

Also improve wxLogVerbose() documentation.
2016-03-04 15:17:35 +01:00
John Roberts
7c32ef2ba3 Remove extra borders around wxFilePickerCtrl in wxOSX
Don't use extra borders to reserve space for the focus ring, this breaks
alignment of wxFilePickerCtrl with the other controls.

Closes #17416.
2016-03-04 14:56:17 +01:00
Vadim Zeitlin
0be596bde2 Move micro version in the change log under the correct version
It was wrongly merged under 3.1.0 in aa76606287,
move it under 3.1.1 (and reword slightly).
2016-03-04 14:49:40 +01:00
Vadim Zeitlin
aa76606287 Merge support for OS and toolkit micro versions
Closes https://github.com/wxWidgets/wxWidgets/pull/234
2016-03-03 23:32:44 +01:00
Xlord2
c07523734f Disable automatic "smart" quotes substitution in wxOSX wxTextCtrl
Disable ASCII quotes substitution with "more typographically accurate"
symbols, just as we already do it for the dashes substitution.

While disabling this unconditionally might not be perfect, it's better than
unconditionally leaving this enabled (and this is on by default since OS X
10.9).

Closes #15705.

Closes https://github.com/wxWidgets/wxWidgets/pull/241
2016-03-02 22:51:10 +01:00
Xlord2
3532f48d44 Fix crash when using HTML help in 64 bit wxMSW build
HtmlHelp() function takes 64 bit ULONG_PTR, not 32 bit DWORD, in 64 bits, see
https://msdn.microsoft.com/en-us/library/windows/desktop/bb762267.aspx and
passing it a wrongly sized pointer resulted in a crash.

Closes https://github.com/wxWidgets/wxWidgets/pull/239
2016-03-02 21:47:32 +01:00
Dimitri Schoolwerth
066f540f51 Mention micro version changes
Document the change of wxAppTraits::GetToolkitVersion which when
user-overridden in the best case leads to a compile error and worst case
when it already has been overridden (which is more likely) silently
fails as the user-override would not be called.
Also mention the micro version changes in general in changes.txt.
2016-02-29 10:05:51 +01:00
Vadim Zeitlin
cbb799b1ae Updates for 3.1.0 release
Update dates, changes descriptions and release preparation instructions.
2016-02-28 22:33:37 +01:00
Vadim Zeitlin
c2821dcea0 Allow using arbitrary windows as wxDataViewCtrl editors in wxGTK
Previously the editor created by wxDataViewRenderer::CreateEditorCtrl() had to
be a native GTK+ widget implementing GtkCellEditable interface which prevented
using composite windows (e.g. a container for a text control and a button) as
editors.

Create a helper container wrapping them now and implementing GtkCellEditable
now to allow this.
2016-02-28 20:25:07 +01:00
John Roberts
e14b589e8e Add support for right-aligned checkboxes to wxOSX
Honour wxALIGN_RIGHT style.

Closes #17380.
2016-02-27 16:32:37 +01:00
Vadim Zeitlin
1c9a4694ff Merge OpenGL API changes and better modern OpenGL support
Closes https://github.com/wxWidgets/wxWidgets/pull/227
2016-02-24 20:15:35 +01:00
Vadim Zeitlin
92456bb57c Merge branch 'gst-1.x' of https://github.com/sdroege/wxWidgets
Add support for GStreamer 1.0.
2016-02-24 04:00:07 +01:00
Manuel Martin
bdc95f5766 Improve wxGLCanvas to be more type safe and better support modern OpenGL
Add wxGLAttribsBase, wxGLAttributes and wxGLContextAttrs replacing the old
untyped "int attributes[]".

Don't use global object for creating OpenGL > 3.0 contexts.

Closes #16909.
2016-02-23 00:32:54 +01:00
Vadim Zeitlin
f037e1206d Merge wxiOS fixes
Make it build again and add instructions about how to build and use it.

Closes https://github.com/wxWidgets/wxWidgets/pull/213
2016-02-22 23:53:30 +01:00
Daniel Kulp
53a5806372 Create strike-through wxGraphicsFont objects in wxOSX
Honour wxFONTFLAG_UNDERLINED in wxGraphicsFont::CreateFont() overload taking
flags.

See https://github.com/wxWidgets/wxWidgets/pull/187
2016-02-22 22:51:59 +01:00
gafatoa
c20739313a Fix layout of wxSlider with wxSL_VALUE_LABEL only in wxMSW
Correct the slider geometry calculations to work correctly when the label is
used but min/max labels are not.

Closes #17377.
2016-02-21 14:51:25 +01:00
Andreas Falkenhahn
e4fce9089e Use correct parent for more native modal dialogs in wxMSW
Ensure that the correct parent is used when no parent is explicitly specified
by calling GetParentForModalDialog().

This generalizes baff0c942b (see #17384) to the
rest of the modal dialogs (wxMessageDialog already did this).

Closes #17146.
2016-02-21 14:44:23 +01:00
ARATA Mizuki
5a92181ac1 Fix the length returned by UTF-32 conversion for non-BMP input
Don't optimize the required length as this is a tiny gain resulting in big
problems with the strings containing surrogates for which the actual result is
shorter than the length returned, resulting in extra NUL bytes at the end of
the converted buffer.

This is similar to 3410aa372f (see #16298) but
for UTF-32 and not UTF-16.

Closes #17070.
2016-02-21 14:38:17 +01:00
Vadim Zeitlin
80d4993119 Merge wxNotificationMessage for OS X and MSW 8+
Closes https://github.com/wxWidgets/wxWidgets/pull/92
2016-02-18 23:09:05 +01:00
David Vanderson
ccd361c98f Fix strike-through support in wxFont with GDI+
Pass down the strike-through flag to GDI+ (see #9907).

Closes #17372.
2016-02-13 12:49:21 +01:00
Vadim Zeitlin
d7d5bcaae6 Merge fixes for Unicode support in wxFileSystem::FindFirst()
Closes #11404.
2016-02-13 12:32:46 +01:00
Vadim Zeitlin
bfbdd37a1a Merge native MSW appearance for AUI toolbars
Closes https://github.com/wxWidgets/wxWidgets/pull/200
2016-02-13 12:31:49 +01:00
Vadim Zeitlin
314630945a Fix wxURI::Unescape() to work with Unicode strings
Such strings are not really URIs as they should have been encoded if they were
but we can obtain them from e.g. wxFileSystem::FindFirst(), so handle them
correctly here as it's simpler than checking all the places where Unescape()
is called.

Add a unit test checking that decoding an URI containing both Unicode and
percent-encoded Unicode characters works correctly.
2016-02-13 04:01:27 +01:00
Vadim Zeitlin
06458cb89f Fix handling of strings in wxPrintf() when using recent MinGW
MinGW-w64 (and apparently TDM too) defaults to using ANSI stdio functions
nowadays, which interpret format specifiers such as "%s" and "%c" in wide
string functions in the standard-conforming way, i.e. still expecting the
arguments of "char*" type, and not "wchar_t*" as MSVC and older MinGW did.
2016-02-10 15:22:51 +01:00
Vadim Zeitlin
d50abc2d3e Make wxWS_EX_VALIDATE_RECURSIVELY default (and only) behaviour
In practice, almost everybody using validators also seems to use this style,
so make it the default (this hadn't been done when it was originally
introduced because of compatibility concerns, but now, 15+ years later, it's
probably safe enough to change this).
2016-02-09 23:38:23 +01:00
wxBen
526a627fa8 Allow customizing wxRibbon highlight colours
Add wxRIBBON_ART_BUTTON_BAR_LABEL_XXX settings.

Closes #16784.
2016-02-08 02:28:00 +01:00
Vadim Zeitlin
57fa59b81c Merge branch 'listctrl-checkboxes-generic' of https://github.com/MaartenBent/wxWidgets
Implement checkboxes support for the generic version of wxListCtrl too so it's
not available under all platforms.
2016-02-06 19:18:58 +01:00
Andreas Falkenhahn
6a01623a80 Add wxListBox::GetTopItem() and GetCountPerPage()
Implement these methods for all the major ports, add them to the widgets
sample and documentation.

Closes #17189.
2016-02-06 19:13:35 +01:00
Vadim Zeitlin
73f2603917 Fix spurious selection events generation in generic wxDataViewCtrl
Don't send a wxEVT_DATAVIEW_SELECTION_CHANGED event if an already selected
item is clicked, this is unexpected and inconsistent with the other platforms.

Split SelectAllRows(bool) method in a (trivial) SelectAllRows() and a more
useful UnselectAllRows() which now can check if a particular row is selected
and leave it selected in this case, helping implementing the correct logic and
also avoiding an extra unnecessary refresh due to deselecting the item first
and then selecting it again.
2016-02-06 02:04:00 +01:00
Vadim Zeitlin
3631a2d142 Merge branch listctrl-with-checkboxes
Add support for native checkboxes to wxMSW wxListCtrl.

Closes https://github.com/wxWidgets/wxWidgets/pull/153
2016-02-06 01:20:01 +01:00
Maarten Bent
90386df305 Notify Windows shell about file associations changes
This is documented as being required in the MSDN and, in practice, is
necessary for Windows to update the icon cache and show the new icon.

Closes https://github.com/wxWidgets/wxWidgets/pull/195
2016-02-06 00:56:46 +01:00
Vadim Zeitlin
4379f599e8 Implement wxDataViewCtrl::SetIndent() for wxGTK
Use gtk_tree_view_set_level_indentation().
2016-02-05 17:00:57 +01:00
Vadim Zeitlin
73747c457c Document wxOSX/Carbon removal
Mention that requesting it from configure is now silently ignored.
2016-02-03 18:19:14 +01:00
Igor Korot
f5187859cc Add support for wxTE_AUTO_URL to wxOSX
Recognize URLs by using native support for this available since OS X 10.5.

Closes #17137.
2016-02-01 02:16:51 +01:00
John Roberts
33d8d4e57c Correct positioning of popup menus relative to mouse pointer
Also simplify the code by using the native method available since OS X 10.6
instead of emulating it.

Closes #15385.
2016-02-01 01:58:17 +01:00
Vadim Zeitlin
a016e6b896 Allow suppressing warnings from wxImage::LoadFile()
Add wxImage::SetLoadFlags() and static SetDefaultLoadFlags() to allow
suppressing the warning messages that can be logged when loading some files,
notably PNG ones with invalid sRGB profiles which, unfortunately, seem to be
rather common and result in annoying warnings about them with libpng 1.6+.

Closes #15331.
2016-01-31 02:22:55 +01:00
Paul Kulchenko
987235da53 Update the bundled libpng to 1.6.21
This fixes several security and other important bugs present in the previously
used 1.6.2.

Closes #17232.
2016-01-31 01:53:01 +01:00
Igor Korot
aa4aa74154 Don't generate wxEVT_LIST_ITEM_RIGHT_CLICK outside of item area
Make wxGenericListCtrl used under wxGTK and wxOSX behave the same as the
native wxMSW wxListCtrl and wxTreeCtrl under all platforms and only generate
ITEM_RIGHT_CLICK events when an item was actually clicked, i.e. don't generate
them for the clicks completely outside of the client area.

Closes #4711.
2016-01-30 18:54:09 +01:00
Zane U. Ji
71dfb3b414 Fix invisible captions in high contrast mode
Don't use black text on dark background.

Closes #16186.
2016-01-30 18:27:10 +01:00
Vadim Zeitlin
a7d31701ab Work around a crash in wxD2DContext when using gcc
Don't call GetSize() method as gcc can't handle aggregates returned by value
from D2D libraries currently and the code just crashes if this method is
called.

See #17171.
2016-01-30 04:43:46 +01:00
Vadim Zeitlin
0dc57e9e23 Avoid 1px gaps between consecutive underlined words in wxHTML
At least when using standard fonts under MSW, the underlines under the
consecutive words didn't overlap, resulting in ugly gaps between them when
using more than one word as the link text, for example.

Work around this by drawing an extra, slightly offset, underlined space when
the previous cell was drawn underlined.
2016-01-29 17:19:29 +01:00
Vadim Zeitlin
b67ca545cc Add --enable-cxx11 configure option
Make it simpler to enable C++11 support when building wxWidgets, in particular
take care of using the correct standard library under OS X in this case.

Notice that currently we still build the library using C++98 if no C++11
compiler is available, even with this option. We may want to change this to
give an error in such case later instead.

Also skip the check for <type_traits> in configure when C++11 is used, we know
that it's available in this case, so don't waste time checking for it (there
are probably several more checks that could be skipped in C++11 mode too...).
2016-01-24 21:22:15 +01:00
mgimenez
78b19e6811 Add wxTextEntryDialog::ForceUpper()
Just forward it to wxTextCtrll::ForceUpper().

Closes #17291.
2016-01-22 14:41:06 +01:00
Tobias Taschner
1f0a82b6a7 Update outdated year references to 2016.
Use 2016 instead of 2015, mostly in version info files.
2016-01-18 14:30:54 +01:00
Vadim Zeitlin
b4143a605c Fix typo in the change log introduced in the previous commit
See https://github.com/wxWidgets/wxWidgets/pull/157#issuecomment-170154327
2016-01-09 00:38:17 +01:00
Vadim Zeitlin
7d63a316af Mention the multimedia keys constants addition
This should have been part of the previous commit.

See https://github.com/wxWidgets/wxWidgets/pull/157
2016-01-08 23:25:15 +01:00
David Vanderson
c5659b19b4 Implement wxToolTip::SetDelay() for wxOSX
Set the "NSInitialToolTipDelay" object in NSUserDefaults.

Closes #17322.
2016-01-08 17:02:19 +01:00
Stefano D. Mtangoo
28bc1bdac0 Allow specifying the replacement character in wxString::ToAscii()
Don't hardcode "_" as the replacement character but accept the one specified
by the user.

Closes https://github.com/wxWidgets/wxWidgets/pull/116
2016-01-03 00:40:11 +01:00
Vadim Zeitlin
69b66e9e2e Add wxTextEntry::ForceUpper()
Allow automatically converting lower-case letters entered into wxTextCtrl to
upper-case equivalents. Provide generic fallback and implement the method
natively for all the major platforms.

Also update the text sample to show it in action.
2015-12-08 03:02:46 +01:00
Kinaou Hervé
d3931ea660 Add support for CSS "color", "size" and "font" to wxHTML <font>
Simply map them to the existing HTML parameters, just as we already do for a
few other styles.

Closes #16773.
2015-12-02 23:53:00 +01:00
Vadim Zeitlin
fbf59742a4 Don't always turn on wxTE_PROCESS_ENTER in wxOSX
This style was unconditionally used for all multiline controls for some
reason, meaning that wxEVT_TEXT_ENTER could be received even for the controls
not using wxTE_PROCESS_ENTER explicitly, which was unexpected.

Don't do this any more to conform to the expected behaviour.

Also do use wxTE_PROCESS_ENTER for the text control supposed to allow handling
"Enter" in the text sample: surprisingly, it didn't have this style before,
although it was clearly supposed to.

Closes #1913.
2015-11-09 03:51:18 +01:00
Vadim Zeitlin
98176fd7ac Really fix OS version detection for Windows 8.1 and later
Fix several problems in d61b52a60e.

See #15321.

Closes https://github.com/wxWidgets/wxWidgets/pull/114
2015-10-31 18:08:47 +01:00
Vadim Zeitlin
d61b52a60e Use RtlGetVersion() to retrieve the real OS version in wxMSW
Unlike GetVersionEx(), this function still returns the real version and not
the fiction concocted by the OS for each program depending on its manifest.

Also use OSVERSIONINFOEXW instead of OSVERSIONINFOEX as RtlGetVersion() only
exists in the Unicode version.

Closes #15321.
2015-10-30 23:20:47 +01:00
Vadim Zeitlin
04a784dfd3 Hide wxSlider labels too when it's hidden in wxOSX
Derive wxSlider from wxCompositeWindow to ensure that Show() (and other
methods) affect the slider labels as well.

Closes #2388.
2015-10-25 18:47:29 +01:00
Andreas Falkenhahn
d45ba8ce62 Add wxTE_{RIGHT,CENTER} support for multiline wxTextCtrl in wxOSX
Just use -[NSTextView setAlignment].

Closes #13702.
2015-10-22 00:06:45 +02:00
Vadim Zeitlin
5cce48186c Link with shlwapi.lib and version.lib under MSW
These libraries are required now that we don't load the functions from them
dynamically (see e78be14ac1)

Closes #17180
2015-10-07 18:56:33 +02:00
Tobias Taschner
0938141f3e Add Cocoa implementation of wxStandardPaths
Previously wxStandardPathsCF was used for all Mac builds and it used
FSFindFolder() (CoreFoundation) calls in Carbon builds, but many hard coded
values in Cocoa builds. The Cocoa implementation uses NSFileManager and
NSBundle to retrieve the folder locations from the system.

Closes https://github.com/wxWidgets/wxWidgets/pull/89
2015-10-04 01:05:57 +02:00
Tobias Taschner
a0fb808087 Add wxStandardPaths::GetUserDir() to get Desktop, Download etc
All major supported platforms have well defined per-user directories to store
Downloads, Music, Pictures, Videos and the Desktop files. The new method
wxStandardPaths::GetUserDir() allows for a unified way to access these on MSW,
OS X and Unix (if XDG user dirs specification is implemented for the latter).

See https://github.com/wxWidgets/wxWidgets/pull/89
2015-10-04 01:05:23 +02:00
Vadim Zeitlin
de96b0dae7 Implement native wxAuiTabArt for MSW
This wxAuiTabArt implementation uses Windows uxtheme API to draw AUI tabs. A
fallback to generic tab art is implemented for the bottom tabs or if uxtheme
is not available (disabled by user or no manifest file).

Closes https://github.com/wxWidgets/wxWidgets/pull/105
2015-10-04 00:28:00 +02:00
Bogdan Iordanescu
b2c3ad614f Add support for hiding sizer items in XRC
Handle the `<hideitems>` property for sizers and document it.

Also group `minsize` together with `hideitems` in `stdSizerProperties`, which
is used by all sizer classes except `wxStdDialogButtonSizer` in the XRC
schema.
2015-09-24 14:48:11 +02:00
Tobias Taschner
2fff3cd29f Add wxSystemThemedControl and use it in wxMSW
wxSystemThemedControl allows to use the "system theme" (i.e. the theme used by
the system applications such as file manager and which can, surprisingly, be
different from the default one). Currently it is only implemented for wxMSW
and does nothing under the other platforms.

Use wxSystemThemedControl for wxDataViewCtrl, wxListCtrl and, optionally, if
wxTR_TWIST_BUTTONS style is specified, wxTreeCtrl to give them more native
appearance under MSW.

Closes #16414.
2015-09-17 14:49:13 +02:00
Tobias Taschner
b7a89f8746 Add wxRendererNative::DrawItemText() for list-like controls
Add a new method that should be used for drawing the elements of list-like
controls (i.e. wx{List,Tree,DataView}Ctrl and similar).

Implement it for wxMSW natively and provide a straightforward generic fallback
for the other ports.

See #16414.
2015-09-17 14:49:13 +02:00
Artur Wieczorek
865c8565af Fixed setting colours of wxSlider and wxRadioBox in wxMSW.
Sibling windows (like labels and radio buttons) need to be explicitly
refreshed when foreground or background colour is changed. This is implemented
by invoking newly implemented method wxSubwindows::Refresh every time the
colour of the control is changed.

Note: Setting foreground colour of wxRadioBox still doesn't work correctly
when themes are enabled.

Closes #17142.
2015-09-12 03:01:30 +02:00
John Roberts
fe9a5f47f4 Add wxTopLevelWindow::Enable{Maximize,Minimize}Button()
Allow to disable maximize and minimize buttons dynamically just as we already
allow to disable the "Close" button using EnableCloseButton().

Currently implemented for MSW and OSX only.

Closes #17133.
2015-09-06 14:17:46 +02:00
John Roberts
6055d8d0a5 Implement wxTopLevelWindow::EnableCloseButton() for wxOSX
Just forward this wx method to Cocoa standardWindowButton:NSWindowCloseButton.

See #17133
2015-09-06 14:16:39 +02:00
Vadim Zeitlin
8d6a2b3921 Don't send wxActivateEvent for minimized windows in wxMSW
Unexpectedly, minimizing the window by clicking on its taskbar icon resulted
in a wxActivateEvent. This broke the focus handling in wxTLW and resulted in
debug messages about ::SetFocus() failure whenever the window was minimized in
this way.

It also seems that other existing code doesn't take into account the
possibility of getting an "active" activation event when the window is
minimized and this doesn't happen in the other ports, so don't send this event
in wxMSW neither.

Closes #17128.
2015-09-04 16:23:13 +02:00
Tobias Taschner
b9d46f0719 Add ZIP64 support to wxZipInputStream and wxZipOutputStream.
Zip archives with sizes larger 4GB or containing files larger than 4GB or more
than 65k files are saved in ZIP64 format which adds a few additional footers
and extra fields to allow to exceed these limits.

This implements the PKWARE specification available at:
https://www.pkware.com/support/zip-app-note

It has been tested for compatibility with Windows internal ZIP folders, OSX
Archive Utility and 7-zip.

Closes https://github.com/wxWidgets/wxWidgets/pull/72
2015-08-14 15:39:45 +02:00
Tobias Taschner
0f39ea0963 Add support for UTF8 filenames in wxZipInputstream.
Zip files may mark filenames and comments via bit 11 in the general purpose
flags. If this flag is set use wxConvUTF8 instead of the default wxConv.
2015-08-14 15:38:50 +02:00
Artur Wieczorek
c774494009 Use standard wxArtProvider icons for wxEditableListBox buttons.
This make wxEditableListBox appearance more native under the platforms where
the stock icons are used, e.g. GTK.

Closes #16885.
2015-08-09 01:39:41 +02:00
Tobias Taschner
c87c432033 Fix wxGetOsDescription() for Windows 10.
Check for Windows 10 was implemented as check for version 6.4 but the final
version of Windows 10 actually returns 10.0.
2015-08-04 14:42:46 +02:00
Vadim Zeitlin
9bc3ab1ea7 Add wxNativeWindow allowing to easily embed native widgets in wx.
Implement the class for wxMSW, wxGTK and wxOSX/Cocoa, show it in the widgets
sample and add documentation for it.
2015-08-03 17:57:42 +02:00
Suzumizaki-Kimitaka
28587c97d8 Add support for Unicode to wxStackWalker.
Use wide-char versions of debug help functions if available, falling back to
the narrow char ones otherwise.

Also improve 64 bit support by using 64 bit versions of the functions if
available as well.

Closes #15138.
2015-07-27 02:44:36 +02:00
Vadim Zeitlin
39ad820bee Check for Win32 exceptions inside our WindowProc().
Don't let unhandled Win32 (i.e. structured) exceptions escape from wxWndProc()
as they can just disappear into thin air when running under WOW64 as 32 bit
exceptions can't propagate through 64 bit kernel. So catch them immediately
and pass them to the global handler while we have the chance to do it, as
we're never going to get it in the outer __try/__catch block in wxEntry() in
src/msw/main.cpp.

In particular, this allows to catch crashes in wxEVT_PAINT handlers, such as
the one in debughlp sample, again.

Closes #16656.
2015-07-27 02:30:40 +02:00
Peter Tissen
328743bf2d Add Microsoft Visual Studio 2015 solution file for building wxMSW.
Allow building with VC14 out of the box.

Closes https://github.com/wxWidgets/wxWidgets/pull/48
2015-07-21 23:07:06 +02:00
Vadim Zeitlin
fc3d2bac2a Avoid bogus assert after calling wxDatePickerCtrl::SetRange() in wxMSW.
If the old value didn't lie inside the new range, it was changed by the native
control internally but the value stored by wxDatePickerCtrl itself remained
unchanged, resulting in asserts later when the mismatch between them was
detected.

Closes #13189.
2015-07-17 17:59:40 +02:00
Vadim Zeitlin
2eb04b44df Update Scintilla change log entry to use the latest 3.5.5 version.
Credit ARATA Mizuki for the latest round of updates (3.4.1 -> 3.5.5).

Closes #16776.
2015-06-15 02:28:14 +02:00
Roberto Perpuly
aa5dbad410 Use FSEvents in wxFileSystemWatcher on OS X
The FSEvents API allows for creating watches in entire trees of
directories in an efficient manner.

Closes #16969.
2015-06-06 02:37:35 +04:00
Vadim Zeitlin
39b9a6bbeb Don't generate bogus root item selection events in wxMSW wxTreeCtrl.
Setting focus to the control when receiving a selection event can result in
another selection event being generated by the control itself if it hadn't had
any selection before, which is completely artificial, i.e. doesn't correspond
to any user action, and so has to be suppressed.

Closes #16999.
2015-06-01 00:40:26 +02:00
Vadim Zeitlin
e78b57308f Get rid of wxListCtrl::m_count in wxMSW.
This simplifies the code and fixes the bug with GetItemCount() returning wrong
(old) value in wxEVT_LIST_INSERT_ITEM event handler as m_count wasn't updated
by then yet.

Closes #3793.
2015-06-01 00:32:09 +02:00
Olly Betts
ecf85bf4cb Remove WXWIN_OS_DESCRIPTION.
This constant wasn't very useful as it contained the description of the OS on
the machine where the library was built, not the one on which the application
using it was running. It also wasn't used anywhere in wxWidgets and apparently
wasn't meant to be used outside of it.

Finally, putting the output of `uname -r` into it created problems with
creating reproducible builds as just a change in the kernel version changed
the build results.

Closes #17002.
2015-05-22 02:29:49 +02:00
Vadim Zeitlin
0a6b08cca3 Don't cache cells being measured in wxHtmlListBox.
This can result in a crash if the measuring code is called, possibly
indirectly, from a method of a cell object itself and if that cell is
displaced from the cache while caching the cell created in OnMeasureItem().

Closes #16651.
2015-05-10 22:09:48 +02:00
Kevin B. McCarty
1298f5970b Fix race condition in Unix wxExecute() if child exited too quickly.
Check if the child has already finished before starting waiting for it.

Closes #16661.
2015-05-09 19:28:04 +02:00
Kevin B. McCarty
1ad4596e8c Fix setting "pressed" bitmap for wxToggleButton.
Move wxAnyButton::GetNormalState(), which allows wxToggleButton to override
what "normal" means for it, down to the platform-independent wxAnyButtonBase
class and use it now in wxGTK as well to correctly choose the pressed bitmap
for a toggle button in this state.

Closes #16771.
2015-05-09 19:22:28 +02:00
Kevin B. McCarty
178e9c9335 Improve wxFileCtrl::SetFilename() and SetPath() consistency.
Don't allow specifying the directory in the former and do check for the
directory existence in the latter.

Also update the file shown in the dialog in SetFilename().

Closes #16685.
2015-05-09 19:05:05 +02:00
Vadim Zeitlin
d1de0f3038 Document wxOSX non-BMP characters fix in the changelog.
This should have been part of the previous commit but was forgotten.

See #16979.
2015-05-09 18:21:36 +02:00
Dimitri Schoolwerth
6ca759b20b Update outdated year references to 2015.
Use 2015 insteaf of 201x, mostly in the manual and .plist files.
2015-04-30 16:11:30 +04:00
Nick Matthews
d13278ecc3 Add support for DOCTYPE to wxXmlDocument.
Allow retrieving the DOCTYPE specified in an existing document as well as
specifying the DOCTYPE to use when writing a new one.

Closes #13779.
2015-04-26 15:36:48 +02:00
Vadim Zeitlin
af01ef1bb0 Make default wxSizer border DPI-aware.
Scale the (still hard-coded) border in pixels by the content scale factor for
the platforms where this needs to be done, i.e. not wxGTK nor wxOSX where the
underlying toolkit already does it.
2015-04-23 19:18:10 +02:00
Vadim Zeitlin
277b848364 Handle all pixel values in XRC as being DPI-independent.
Pixel values in XRC can never be correct for high resolution displays, unlike
the pixel values passed to wxWidgets API, which could be already adjusted to
account for the resolution or obtained from resolution-dependent text metrics,
so scale them by the factor appropriate for the current resolution
automatically.
2015-04-23 19:18:09 +02:00
Vadim Zeitlin
16c22794b7 Give error messages for invalid sizer flags in XRC wxSizer handler.
This allows to give the exact line number of the error, unlike asserts that
happen in wxSizer code which don't point exactly to the error location when
sizers are created via XRC.

It also has the advantage of allowing to detect wrong use of wxALIGN_LEFT and
wxALIGN_TOP, unlike the asserts which can't do it because the value of both of
these flags is 0.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
78b98bf00c Validate wxBoxSizer flags instead of silently ignoring invalid combinations.
Detect using flags corresponding to the major sizer direction (which doesn't
make sense as only the proportion governs the behaviour in this direction) and
also combinations of alignment flags with wxEXPAND.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
fec1dcbd73 Don't send events for already selected radio popup menu items.
Selecting an already selected radio menu item didn't generate any events in
wxGTK nor in wxMSW with the top level (i.e. attached to a menu bar) menus but
did send them for popup menus under MSW.

Make the last case consistent with the rest of them and don't send any events
in this case neither.

Closes #16891.
2015-03-23 01:11:34 +01:00
Vadim Zeitlin
3f84cb17ca Add wxActivityIndicator control.
This is a simple animated control indicating some program activity.

Provide native GTK+ (for > 2.20) and OS X implementations as well as a generic
one used under MSW.

Update the sample and the documentation.
2015-03-20 00:08:37 +01:00
Vadim Zeitlin
00748bbaef Add wxWindow::FromDIP() for simpler high DPI support.
This method allows to scale a pixel value by a DPI-dependent factor to the
value used by the underlying toolkit only if necessary, i.e. when not using
GTK+ 3 or OS X which already do this internally.
2015-03-20 00:08:37 +01:00
Steve Browne
7f0963dcf7 Implement wxWindow::Disable() for non-native controls in wxOSX.
Previously disabling generic window simply didn't do anything.

Fix this by explicitly refusing to generate mouse/keyboard events for it.

Closes #13155.
2015-03-12 13:37:17 +01:00
Kinaou Hervé
de7e315557 Correct implement wxLIST_AUTOSIZE_XXX in the generic wxListCtrl.
Use both the contents and the header width when wxLIST_AUTOSIZE_USEHEADER is
given instead of just the latter.

Also make both wxLIST_AUTOSIZE_USEHEADER and the previously implemented
wxLIST_AUTOSIZE work efficiently for the virtual list controls by reusing
wxMaxWidthCalculatorBase already used in the generic wxDataViewCtrl.

Closes #10326.
2015-03-11 22:03:14 +01:00
Vadim Zeitlin
fe33cfc83f Add wxProcess::Activate() and implement it for MSW.
When launching child processes it can be convenient to be able to switch to
them later, provide a method in wxProcess to do it.

Currently this is only implemented in wxMSW but could almost certainly be done
for wxOSX too (it can be done using Apple Script, so presumably there is a way
to do it programmatically as well) and could be also made to work at least
under some Unix systems by emulating what wmctrl does (or just launching it?).
2015-03-10 20:31:24 +01:00
Vadim Zeitlin
b7388f36f2 Change wxFD_MULTIPLE value to avoid conflict with wxDIALOG_NO_PARENT.
This avoids GTK+ warnings about creating a dialog without parent when a
wxFileDialog with wxFD_MULTIPLE style is created.

Closes #16863.
2015-03-02 14:32:53 +01:00
Dimitri Schoolwerth
11a5b83e2c Add OS X implementation of wxAppProgressIndicator.
Closes #16638.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-15 20:09:10 +00:00
Vadim Zeitlin
ad527c5468 Show how to handle files on command line in docview sample.
This is not totally obvious, so show how to do it, including the Mac-specific
MacNewFile() overriding part.

Closes #16816.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-15 18:35:13 +00:00
Artur Wieczorek
b37d50db1d Initialize wxPGChoices object properly in its copy ctor if source object has no data.
Internal data must be always initialized whether the source object contains choices data or not.

Closes #16855

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-13 19:42:07 +00:00
Vadim Zeitlin
453897149f Add wxAddRemoveCtrl class.
This is a simple high level helper combining an arbitrary control showing
multiple items with the buttons allowing to add items to and remove items from
this control, but using the buttons and the layout appropriate for the current
platform.

Add the implementation itself, an example of using it to the dialogs sample
and the documentation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-09 00:26:11 +00:00
Vadim Zeitlin
3d2d8fc4ab Consistently refuse to create bitmaps with 0 width or height.
Homogenize the behaviour of all ports when creating bitmaps with 0 width or
height: just fail always as it doesn't seem to make sense to support this.

Closes #16828.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-03 18:28:21 +00:00
Vadim Zeitlin
3dff63b563 Add wxASSERT_MSG_AT() and wxFAIL_MSG_AT() macros.
These macros are useful for functions called from other macros to allow
pretending that an assert inside such function actually happens at the point
in the sources where the macro itself appears.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 22:08:41 +00:00
Vadim Zeitlin
f3833aa067 Don't change MDI children order after showing a file dialog in wxMSW.
Don't use the generic focus saving/restoring code for wxMDIParentFrame in
wxMSW as it already saves and restores the active MDI child on its own and we
should let it do it, as our code could change the active child when restoring
focus if it hadn't been saved correctly previously.

The fact that it is isn't saved is another bug, but even if it is fixed, we
should let MSW MDI implementation handle activation as we can't do it any
better -- but can do worse, as the bug described in #16635 shows.

Closes #16635.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 01:07:53 +00:00
Vadim Zeitlin
957f3c5b50 Fix reading of not NUL-terminated strings using wxRegKey.
Even though this is typically the case, some strings in Windows registry are
not NUL-terminated, deal with them correctly by using the explicit length.

Closes #16719.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:24:58 +00:00
Vadim Zeitlin
7dd75c8844 Revert "Add support for reading multi string values to wxRegKey."
Reverts r78136 (see #15727) because the multi-string values in Windows
registry are actually not "name=value" pairs at all but just NUL-separated
strings and the API provided for reading them was inappropriate.

Also see #16719.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:24:52 +00:00
Vadim Zeitlin
ea47af08cb Add wxEVT_MAGNIFY mouse event.
Currently this is implemented for wxOSX only.

Closes #14322.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-16 13:59:26 +00:00
Vadim Zeitlin
494b66b5fb Fix appearance of wxMSW wxToggleButtons with bitmaps in pressed state.
Correct the "pushed" state determination in our own drawn code, it didn't work
for wxToggleButton which doesn't return BST_PUSHED from BM_GETSTATE. But it
does have BM_GETCHECK returning its state directly, so add a new virtual
MSWIsPushed() method and implement it differently for it.

Closes #13755.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-07 01:52:42 +00:00
Vadim Zeitlin
29cd13cc8f Fix checked disabled wxToolBar tools with custom images in wxMSW.
Windows doesn't use the correct image for checked disabled tools, at least up
to and including Windows 7, so don't put such tools in the "checked" state at
all: this doesn't matter as they are disabled anyhow, but shows the correct
image for them.

Closes #12989.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-05 22:19:25 +00:00
Vadim Zeitlin
a2b0b8dbaa Handle updating tooltip text in wxCompositeWindow correctly.
While calling SetToolTip(wxToolTip*) overload already worked correctly for
wxCompositeWindow, using SetToolTip(wxString) did not if a tooltip already
existed, as it didn't use the virtual DoSetToolTip() in this case, resulting
in e.g. impossibility to update wxSpinCtrlDouble tooltip using this method.

Fix this by introducing DoSetToolTipText() virtual which is used by that
overload now and overriding it in wxCompositeWindow.

Also don't override DoSetToolTip() in wxSpinCtrlGenericBase any more, it is
not necessary as it's already done by its base class wxCompositeWindow.

Closes #16595.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-05 22:19:10 +00:00
Vadim Zeitlin
2d20e3fc51 Harmonize wxMenuEvent handling between all major ports.
Send these events to the menu itself first, then to the menu bar containing
it or the window invoking it if it's a popup menu and, finally, to the top
level window in all of wxGTK, wxMSW and wxOSX.

In particular, this ensures that help strings are now shown in the parent MDI
frame status bar by default, even when the menus are attached to the client
MDI frame or shown as popup menus.

At the implementation level, this logic is now encapsulated in a new static
wxMenu::ProcessMenuEvent() method which can be easily modified and reused in
other ports.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-05 22:17:58 +00:00
Vadim Zeitlin
90639b8339 Send idle events from inside wxYield() in all ports, including wxMSW.
This means it can be now done in wxEventLoopBase itself and calls to
ProcessIdle() in the port-specific code are not needed any more, so remove
them.

This introduces a change in behaviour for wxMSW, where idle event handlers
were not invoked from inside wxYield() at all previously, and for wxOSX, where
only a single idle event is now generated from wxYield() instead of a stream
of them until no idle handler needs any more of them as before. But on the
bright side, the new behaviour seems to make most sense and is now the same in
all ports.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-05 22:17:23 +00:00
Paul Cornett
bb9515c729 fix crashes in wxGTK3 when running with non-X11 backend, see #16688
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-20 17:04:13 +00:00
Vadim Zeitlin
4797f01bc0 Credit Marco Trevisan for wxGTK3/Mir patches.
Closes #16688.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-19 13:29:32 +00:00
Artur Wieczorek
c0e2e0c5d8 Fix adding/removing categorized/alphabetic mode buttons in wxPropertyGridManager.
Modify wxPropertyGridManager::RecreateControls() to allow adding/removing categorized/alphabetic mode buttons to/from wxPG manager tool bar at any time (not only when creating the tool bar).
Modify wxPropertyGridManager::SetExtraStyle() to fully support manipulating these buttons via wxPG_EX_MODE_BUTTONS flag.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-15 17:14:39 +00:00
Vadim Zeitlin
89738ef01f Add support for reading multi string values to wxRegKey.
Add a wxRegKey::QueryValue() overload working with REG_MULTI_SZ values.

Closes #16653.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:03:00 +00:00
Vadim Zeitlin
dec924cdf1 Add wxCursor::GetHotSpot() and implement it for wxMSW and wxGTK.
Allow retrieving the coordinates of the cursor hot spot, at least for the
ports for which we know how to do it.

Closes #16539.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:02:50 +00:00
Vadim Zeitlin
8de1128c07 Return correct menu pointer for wxEVT_MENU_{OPEN,CLOSE} in MDI frames.
These events are supposed to carry a pointer to the menu which was opened or
closed, but wxMenuEvent::GetMenu() always returned NULL for the menus opened
when a child MDI frame was active, as its menu bar, containing the menu, was
not searched for it.

Fix this by overriding MSWFindMenuFromHMENU() at wxMDIParentFrame level, just
as we already do for FindItemInMenuBar().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:02:31 +00:00
Vadim Zeitlin
8b72652a28 Make results of wxDC::DrawEllipticArc() consistent across all platforms.
And also consistent with wxGraphicsContext method with the same name.

Document the rules determining what is drawn.

Closes #4437.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:02:14 +00:00
Vadim Zeitlin
844159792f Fix clearing wxCB_READONLY wxComboBox in wxGTK.
wxComboBox::Clear() must call wxTextEntry::SetValue() explicitly instead of
calling its Clear() which just forwards back to wxComboBox own SetValue(),
which (correctly) doesn't work for read-only comboboxes when passed an empty
string.

Closes #16654.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-01 13:56:30 +00:00
Vadim Zeitlin
722057b3a0 Add a new wxUSE_STD_CONTAINERS_COMPATIBLY option.
This option, which is on by default unless the use of STL is disabled,
provides better interoperability with the standard library when it can be done
without breaking backwards compatibility.

The first example of its use is to allow passing std::vector<> of any string
compatible type to wxItemContainer::Append(), Insert() and Set(), allowing to
directly initialize various wxControls deriving from it such as wxChoice,
wxComboBox, wxListBox from a std::vector<> of strings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 21:54:51 +00:00
Vadim Zeitlin
434c95e1a1 Allow customizing wxBusyInfo appearance.
Allow customizing wxBusyInfo window by passing wxBusyInfoFlags containing
information about the icon, title, colours and frame transparency to use.

Update the sample to show such "rich" busy info.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 21:54:38 +00:00
Vadim Zeitlin
069415c2a6 Fix wxStringTokenizer copy ctor and assignment operator.
Implement copying of wxStringTokenizer correctly: compiler-generated versions
didn't work as the position of the tokenizer didn't point into the correct
string after making the copy.

Fix this by adjusting the position iterator to use the copy of the string.

Closes #16339.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-20 15:08:09 +00:00
Vadim Zeitlin
a3cf902002 Update the bundled Scintilla version to 3.4.1.
There are relatively few changes, see Scintilla changelog at
http://www.scintilla.org/ScintillaHistory.html

Closes #16182.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 12:57:22 +00:00
Vadim Zeitlin
1f6fae0f3f Define unambiguous Is{List,Text}Empty() in wxOwnerDrawnComboBox.
Like in wxComboBox itself, it's useful to provide these methods to avoid
problems with ambiguous IsEmpty(), inherited from both wxTextEntry and
wxItemContainer.

Closes #16618.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-13 12:08:10 +00:00
Vadim Zeitlin
c0548a02fd Fix vertical cell alignment in wxDataViewCtrl in wxGTK.
Pass the alignment used when creating the column to the renderer.

Closes #16035.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-12 20:48:52 +00:00
Vadim Zeitlin
b9e0e606a8 Add support for 'z' size format specifier.
Assume that non-MSVC compilers support it directly and use 'I' for MSVC.

Closes #16596.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-12 20:48:41 +00:00
Vadim Zeitlin
793187de9d Add wxART_FULL_SCREEN icon.
Use stock GTK+ icon in wxGTK and Tango icon elsewhere.

See #2662.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-11 16:30:06 +00:00
Vadim Zeitlin
36a5983f64 Use wxSelectionStore in wxDataViewCtrl generic implementation.
This makes the code (slightly) shorter and more clear and is more efficient as
selecting all items in wxDataViewCtrl is now a O(1) operation instead of being
O(N), where N is the number of items -- and the latter could take quite a long
time (and consume non-negligible amount of memory) for large N.

Increase the size of the virtual list control from 1000 to 10000000 in the
sample to show this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:25 +00:00
Vadim Zeitlin
9ecf317092 Implement strike-through support in wxFont in wxOSX.
Implement support for this attribute in wxOSX too.

Closes #16547.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-11 17:05:33 +00:00
Vadim Zeitlin
1addaeaa75 Add wxUIActionSimulator::Select().
Add a helper to select an item in a wxChoice, wxComboBox, wxListBox or similar.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:52:01 +00:00
Vadim Zeitlin
9a377ec117 Implement wxListBox::EnsureVisible() for wxMSW.
Manually check whether the item is currently visible and scroll the listbox
just enough if it isn't.

Closes #3224.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:51:17 +00:00
Vadim Zeitlin
dc65fa8d5a Allow recursive calls to wxEventLoop::Yield().
There doesn't seem to be any reason to forbid them and this change allows
wxExecute() without wxEXEC_NOEVENTS to work without assertion failures when
called from inside wxYield().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:51:06 +00:00
Vadim Zeitlin
46a414097b Always disable "Back" wxWizard button for the starting page.
Do it even if the start page has a previous page (e.g. because the wizard has
been started in the middle for some reason).

Closes #16535.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-05 12:46:38 +00:00
Vadim Zeitlin
118e8e7286 Add wxBitmap ctor from wxCursor to wxGTK and wxMSW.
Allow converting wxCursor to wxBitmap in order to draw it, for example.

Closes #15699.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-04 19:44:52 +00:00
Vadim Zeitlin
56d0a94ec8 Specialize std::hash<> for wxString when using C++11.
This allows to use wxString as key type of std::unordered_{map,hash} out of
the box.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-02 15:35:02 +00:00
Vadim Zeitlin
51d715e46d Add wxPowerResourceBlocker for power management.
Add functions to acquire/release power resources, preventing/allowing back the
system to go to sleep or turn off the screen and a class wrapping them in a
safe way.

This patch implements the functions for MSW and OSX, adds documentation and
updates the sample to demonstrate the new functionality.

Closes #16413.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 23:22:15 +00:00
Artur Wieczorek
7e859ec6c9 Fix drawing custom colours for wxEnumProperty choice items in wxPG.
In order to draw choice items with custom colours there is necessary to merge custom cell object (wxPGCell) associated with individual item with default cell object (in wxPGProperty::GetDisplayInfo).
wxPGProperty::GetDisplayInfo function should return customized cell object instead of returning pointer to the default cell object only.

Closes #16509

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-29 21:17:16 +00:00
Vadim Zeitlin
3bcec846a0 Provide wxApp::StoreCurrentException() implementation for C++11.
When using C++11 we can provide implementations of wxApp::StoreCurrentException()
and RethrowStoredException() ourselves and thus make catching exceptions outside
of the event loop work by default.

Do this and update the documentation and the sample to reflect it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:31:52 +00:00
Vadim Zeitlin
1cecee5bb7 Add wxApp::StoreCurrentException() and RethrowStoredException().
These methods can be used to ensure that the exceptions thrown from event
handlers are safely rethrown from the code dispatching the events once the
control flow gets back there.

This allows to work around the problem with not being able to propagate
exceptions through non-C++ code and can be used, for example, to catch
exceptions thrown by the handlers invoked from inside wxYield() by a try/catch
block around wxYield() -- something that didn't work before, update the except
sample to show that it does work now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:31:44 +00:00
Vadim Zeitlin
df13791078 Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 01:50:11 +00:00
Vadim Zeitlin
21da20d579 Restore dynamic linking of GDI functions for non-MSVC.
This partially reverts the changes of r77029 and r77039: now functions such as
Set/GetLayout(), AlphaBlend() and GradientFill() are still called (almost)
directly when using MSVC but pass by dynamic loading with the other compilers,
which don't have #pragma comment(lib) and, in MinGW case, also lack some of
these functions in their libraries even if we do link with them.

Closes #16411.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-14 12:11:39 +00:00
Vadim Zeitlin
afdb989e87 Link wxMSW with msimg32.lib now that AlphaBlend() is used statically.
Implicitly link msimg32.lib in when using MSVC and add it to MinGW (and
Borland) makefiles.

This should have been part of r77029.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-09 18:03:23 +00:00
Vadim Zeitlin
86cf756ba9 Add wxRendererNative::DrawGauge() method.
Add the method with the native implementations for MSW and OS X and a generic
version fallback.

Closes #16406.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-08 01:03:31 +00:00
Vadim Zeitlin
3c7ba39135 Allow requesting core OpenGL profile and explicit OpenGL version.
Add WX_GL_CORE_PROFILE and WX_GL_{MAJOR,MINOR}_VERSION attributes which can be
used to use modern OpenGL with wxGLCanvas.

Closes #16402.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-06 23:31:41 +00:00
Vadim Zeitlin
1b90acc357 Add wxDateTime::GetWeekBasedYear().
It was just added as a private function to implement %V format specifier
support, just extract and document it as it could possibly be useful in its
own right.

See #11857.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:41 +00:00
Vadim Zeitlin
f88585b4ab Update wxSlider background when its parent background changes in wxMSW.
The native control doesn't redraw itself, so force it to do it from the
overridden DoMSWControlColor() which is called every time the background
colour might have changed.

See #12271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:26 +00:00
Vadim Zeitlin
bdc5c6e628 Add --disable-sys-libs configure option.
This allows to disable the use of all system libraries with a single option
instead of having to use --with-{lib{png,jpeg,tiff},regex,zlib,expat}=builtin
or similar.

This is especially useful under OS X where we want to avoid the dependencies
on any locally installed homebrew or similar libraries.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-24 11:34:14 +00:00
Artur Wieczorek
1dec9f059b Credit for patch (r76895).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-12 19:34:50 +00:00
Tim Kosse
705a1b547d Implement wxGenericListCtrl::EndEditLabel.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 10:32:42 +00:00
Vadim Zeitlin
e2e79bd000 Allow specifying custom comparator for wxSortedArrayString.
Add a possibility to order wxSortedArrayString in some order different from
the default alphabetical one.

Closes #16330.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-23 01:08:50 +00:00
Vadim Zeitlin
b6469b4369 Fix changing the label of a submenu in wxMSW.
Use position, not the ID, to find the native menu items to allow the code in
wxMenuItem::SetItemLabel() and DoSetBitmap() to also work with submenus and
not just the normal items.

Closes #16246.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-09 20:33:17 +00:00
Vadim Zeitlin
40f2cf0a78 Allow access to the currently shown wxInfoBar buttons.
Add wxInfoBar::GetButtonCount(), GetButtonId() and HasButtonId() methods.

Closes #15110.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-02 01:15:11 +00:00
Vadim Zeitlin
1467e6c5df Revert "Correctly detect cancelled drag-and-drop operations in wxGTK."
This reverts r75745 (and r75749 fixing a minor problem in it) as this change
broke the reporting of the result of the drag and drop operation instead of
fixing it.

See #15930.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-02 00:16:13 +00:00
Vadim Zeitlin
c7fd48db6b Correct handling of the characters outside of the BMP in wxSTC.
The code mapping positions for the units of the UTF-13/32 string used by
wxWidgets to positions for the units of the UTF-8 string used by Scintilla
didn't work correctly for the characters outside of the BMP, i.e. Unicode code
points >= 0x10000.

See #15621.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-29 23:48:46 +00:00
Vadim Zeitlin
a309157a66 Don't include "webview" in "standard" libraries.
This means `wx-config --libs` doesn't include webview in its output by default
any longer, it must be explicitly requested.

Closes #16291.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-27 23:59:10 +00:00
Vadim Zeitlin
1558349361 Improve RTL support in wxStyledTextCtrl.
Use the correct HDC, inheriting the right text orientation, when creating
wxMemoryDC in SurfaceImpl code.

There may still be problems with the actual RTL languages, but at the very
least English text displayed in RTL locale is not mirrored any more.

Closes #16230.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-10 16:16:01 +00:00
Vadim Zeitlin
47138ac8fa Add wxStyledTextCtrl copy/paste text events.
Add wxEVT_STC_CLIPBOARD_{COPY,PASTE} events, allowing to transform the text
being copied from or pasted into wxStyledTextCtrl.

Closes #16191.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-08 14:43:45 +00:00
Vadim Zeitlin
5b56498f88 Allow using sizers for laying out wxMDIClientWindow in wxMSW.
Let the user code put wxMDIParentFrame::GetClientWindow() into a sizer and
manage it as any other window, instead of having to do it manually.

Closes #16196.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-06 18:20:38 +00:00
Vadim Zeitlin
8a245f0ec3 Fix handling of multiple and rectangular selections in wxSTC.
Copy and paste rectangular selections in the standard format, this is
especially important under Windows where a (de facto) standard clipboard
format for such selections exists.

Also fix handling of multipaste, i.e. pasting clipboard contents into several
locations at once.

Closes #16221.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-05 14:42:35 +00:00
Vadim Zeitlin
fd65d4b4f5 Implement setting foreground colour for wxRadioButton in wxMSW.
Native radio buttons don't support changing their foreground colour, so use
owner drawn buttons if SetForegroundColour() was called, similarly to what was
already done for wxCheckBox.

Closes #10137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:13:12 +00:00
Vadim Zeitlin
2e8988c3d6 Add wxGridCellRenderer::GetBest{Height,Width}() and use them in wxGrid.
Allow the renderer to specify the best height at the given width (or vice
versa) instead of the best size in both direction which is not defined for
e.g. wxGridCellAutoWrapStringRenderer.

Closes #15943.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:12:42 +00:00
Vadim Zeitlin
ccaebf6520 Add wxThread::MSWGetHandle().
Under MSW a thread has both an ID, returned by wxThread::GetId(), and a
handle, which couldn't be retrieved so far. Add an accessor to do it.

Closes #16170.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-27 22:41:50 +00:00
Vadim Zeitlin
cbe6495307 Allow dropping data outside of item area in wxDataViewCtrl.
Implement this change for the generic and the native GTK versions and document
it.

Closes #16152.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-27 22:41:40 +00:00
Vadim Zeitlin
fc014a6f19 Don't set wxINTERPOLATION_GOOD quality by default in wxGDIPlusContext.
This is inconsistent with wxOSX and also doesn't play well with the existence
of wxINTERPOLATION_DEFAULT which is different from wxINTERPOLATION_GOOD.

See #14134.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-08 21:38:09 +00:00
Vadim Zeitlin
da319a87cd Make wxMSW owner drawn menu item code more clear and correct.
The user-visible effect of this change is that removing the item from the menu
and adding it back doesn't lose its icon any more.

At the code level, wxMenuItem::SetBitmaps() and related methods are
implemented outside of "#if wxUSE_OWNER_DRAWN" which allows to use them even
in minimalistic library builds. And IsOwnerDrawn() is not used any more to
determine whether the item has bitmaps, just only if it's really owner drawn,
making the code more clear and fixing at least the bug above and possible more.

Closes #13878.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-27 00:02:28 +00:00
Vadim Zeitlin
a3da62503f Fix setting menu item bitmaps after appending them in wxMSW.
Update the bitmap used by Windows when using non-owner-drawn items with
bitmaps.

Closes #9388.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 15:18:37 +00:00
Vadim Zeitlin
33ad33d447 Add wxOVERRIDE and use it in common and wxOSX code.
Make overriding virtual methods more explicit and enable additional checks
provided by C++11 compilers when "override" is used.

Closes #16100.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 13:26:28 +00:00
Vadim Zeitlin
8c4b1dcbd0 Add wxInt64 support to wxText{Input,Output}Stream.
Add explicit Read64[S]() and Write64() methods.

Closes #14685.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-19 22:57:44 +00:00
Vadim Zeitlin
399371921f Add font colour support to wxFontPickerCtrl.
Currently this is only really implemented under Windows, just as the colour
support in wxFontDialog, but make the API available under all platforms for
consistency.

Closes #11614.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 17:23:13 +00:00
Vadim Zeitlin
371928415a Add support for loading old V1 bitmap files to wxBMPHandler.
Such files are apparently still seen in the wild, even though this format has
been superseded since Windows 3.0 (!).

Closes #3433.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-14 01:36:54 +00:00
Vadim Zeitlin
64deeb94b9 Add support for saving 32bpp icons too.
Save in 32bpp format if alpha channel is present in the image being saved in
ICO format.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:24 +00:00
Vadim Zeitlin
818e5f3a48 Allow saving 24 bpp ICO file in wxImage.
Create ICO files with 24bpp if the image being saved contains more than 256
colours.

Also use smaller values (4 bpp or monochrome) if the image uses fewer colours.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:19 +00:00
Vadim Zeitlin
7e64a29edb Add support for saving 256*256 ICOs in PNG format.
Allow saving icons larger than 127*127 pixels (up to 256*256 which is the
maximal size supported by the ICO format) and save large icons with the item
data in PNG format, as it is normally done for these sizes.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:14 +00:00
Vadim Zeitlin
d6ace87b61 Upgrade included Scintilla to version 3.3.9.
Closes #15742.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 13:23:54 +00:00