Commit Graph

7110 Commits

Author SHA1 Message Date
Artur Wieczorek
d233b8939b Implement wxTextCtrl::PositionToXY() and XYToPosition() (wxOSX)
Apparently there is no native API to retrieve such information in a simple
way so all calculations have to be done with raw text stored in
the corresponding control(s).

Closes #4146.
See #17811.
2017-07-22 22:23:34 +02:00
Vadim Zeitlin
a07013a6f1 Tab navigation improvements for wxOSX
Closes #17341.

Closes https://github.com/wxWidgets/wxWidgets/pull/493
2017-07-16 15:59:48 +02:00
Vadim Zeitlin
16fdbb4e97 Credit ikamakj for the tab navigation fixes in wxOSX
See the description of https://github.com/wxWidgets/wxWidgets/pull/493.
2017-07-16 15:58:27 +02:00
Steve Browne
31ba2d4ca3 Fix setting foreground color for several controls in wxOSX
This allows setting color of wxStaticBox, wxCheckBox, wxRadioButton and
any other controls that use NSBox and NSButton to work.

Closes #16284.

Closes https://github.com/wxWidgets/wxWidgets/pull/489
2017-07-11 23:51:30 +02:00
mikek
2d8657d37c Fix escaping/unescaping in wxLongStringProperty
wxPropertyGrid::ExpandEscapeSequences() function should convert all valid
escape sequences (\r, \n, \t, \\) to the corresponding single characters
(CR, LF, TAB, backslash, accordingly) and
wxPropertyGrid::CreateEscapeSequences() function should do the reverse
operation and convert these raw characters to the corresponding escape
sequences.

Closes #17896.
2017-07-06 23:14:08 +02:00
Vadim Zeitlin
5292f77ab4 Check for window best size in wxPersistentTLW
Ensure that the restored size is at least equal to the best size of the
window to avoid cutting off parts of it in (a common) case when a newer
version of the program adds new UI elements, thus increasing the window
best size and possibly making the previously stored size too small.
2017-07-06 15:22:10 +02:00
Vadim Zeitlin
7092b1112e Fix caching of wxFONTSTYLE_SLANT fonts in wxTheFontList in wxMSW
Creating a font with wxFONTSTYLE_SLANT results in a font whose
GetStyle() returned wxFONTSTYLE_ITALIC, so it was never found in the
cache, resulting in, effectively, leaking memory and GDI handles because
each new call to wxFontList::FindOrCreateFont(...wxFONTSTYLE_SLANT)
created a new font.

Fix this by just hardcoding that wxFONTSTYLE_SLANT is wxFONTSTYLE_ITALIC
under MSW, this is ugly but avoids backwards incompatible (and not
obviously correct) change of making wxFont::GetStyle() return
wxFONTSTYLE_SLANT if the font was created using this style.

Notice that wxFont::GetStyle() does behave like this in wxOSX currently,
so there is an inconsistency between ports here. It would arguably be
better to make wxOSX behave like wxMSW because the actual font is really
italic and not slant/oblique and if we do this, the preprocessor
condition in this commit should be extended to cover wxOSX too.

Closes #17903.
2017-07-06 15:01:00 +02:00
Vadim Zeitlin
b158385c47 Fix completely broken default button handling in wxMSW
The logic in wxButton::{Set,Unset}TmpDefault() didn't work at all when
the temporary button was the same as the permanent default button as the
code made the same button non-default immediately after making it
default (or vice versa). In particular, this ensured that default button
was never highlighted correctly (at least after the first focus change)
in dialogs containing a single button only.

Fix this by simply skipping modification of the old default button if it
was the same one as the new default button.
2017-07-06 14:43:27 +02:00
Bryan Petty
ed173ed91e Use HTTPS with Trac links. 2017-07-04 13:15:14 -06:00
Artur Wieczorek
823f75c739 Enable selecting opacity in generic wxColourPicker
This is implmentation of the feature which is already implemented in
the native wxColourPicker under wxGTK.
2017-07-03 22:48:30 +02:00
Artur Wieczorek
a29815e19a Allow turning on/off opacity selector in wxColourDialog (wxOSX)
This feature to show/hide alpha values and opacity selector (slider) is
already implemented under wxGTK and for generic wxColourDialog.
For the sake of backward compatibility, this feature is enabled here by
default (through the corresponding property of wxColourData).
2017-07-03 22:48:04 +02:00
Artur Wieczorek
c55bbdf700 Fix setting wxGCDC clipping region with device coordinates (wxOSX)
Currently region given in device coordinates is decomposed into the stripes which are next transformed to the logical coordinates required by underlying wxGraphicsContext::Clip() function. Some of these stripes given in device coordinates can have 1-pixel height what after transformation to logical coordinates can give zero-height stripes (after rounding). This can lead to the situation that in the region transformed to logical coordinates some stripes can disappear and final transformed region shape is different from the source shape (it has gaps).
To fix this issue device coordinates of the region are not manually transformed to the logical coordinates but instead wxGraphicsContext's is temporarily set to the state where its logical coordinates are equivalent to device coordinates and thus clipping region can be applied directly.
Solution for wxMSW, wxGTK is implemented in ea8cb7a24a.

Closes #17609.
2017-07-02 14:43:50 +02:00
Artur Wieczorek
a9fcfe1085 Fix getting/setting transformation matrix (wxOSX)
Transformation settings already applied to the source objects (CGContext, wxWindow) and inherited by wxGraphicsContext should be considered as a baseline transformation matrix for wxGC and shouldn't be exposed through e.g. GetTransform() function (like it's done in Cairo or Direct2D). To report only transformations explicitly applied to wxGC by calls to the corresponding wxGC functions, we need to store initial CTM (in a dedicated variable) and "subtract" it from the actual transformation settings.

See #17609.
2017-07-02 14:31:00 +02:00
Artur Wieczorek
6b4be47a7a Fix retrieving clipping box after changing wxGCDC coordinates (wxOSX)
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().
Solution for wxMSW, wxGTK was implemented in 98714ea452.

See #17646.
2017-07-02 13:55:53 +02:00
Stefan Csomor
1902c5ceb8 Document iOS 9 as minimum deployment version. 2017-06-28 09:17:36 +02:00
Stefan Csomor
c9c74d957c Update docs with wsOSX font changes and wxOSX & Cairo bitmap clearing 2017-06-26 08:26:47 +02:00
Dimitri Schoolwerth
07c8f15e43 Fix 'destionation' typos
Rename relatively new enum value wxTASKBAR_JUMP_LIST_DESTIONATION to
wxTASKBAR_JUMP_LIST_DESTINATION as well as a private function containing
the same typo.
2017-06-21 22:51:57 +04:00
Vadim Zeitlin
3d6334f0f1 Mention wxGetOsDescription() removal in the change log
Even though this function was private and not available in the default build
(in which wxUSE_OLE==1, while this function was only defined with
wxUSE_OLE==0), still mention its removal for completeness.
2017-06-01 00:40:49 +02:00
Vadim Zeitlin
de47af2f0f Merge branch 'configure-enhance'
Miscellaneous enhancements to configure
2017-05-28 16:21:21 +02:00
tm
7ce3693956 Add support for bitmaps to wxToggleButton XRC handler
Handle "bitmap" and "bitmapposition" attributes in wxToggleButton XRC handler,
just as it's already done for wxBitmap and wxBitmapToggleButton.

Closes #17850.
2017-05-28 16:05:38 +02:00
tm
0a3720beff Handle wxST_ELLIPSIZE_XXX styles in wxStaticText XRC handler
Add forgotten/missing styles.

See #17850.
2017-05-28 16:05:31 +02:00
Vadim Zeitlin
2f8a343b22 Add an option for reproducible library builds
This can be useful to the library packagers, notably under Debian.

Closes #17000.
2017-05-27 19:03:32 +02:00
Vadim Zeitlin
1c4071a3cb Remove obsolete and useless --enable_no_deps configure option
This option didn't do anything for the last 14 years, ever since the switch to
bakefile-generated makefiles in fe0895cf82, so
remove it from configure and stop mentioning it in documentation.

Use --disable-dependency-tracking to do what this option used to be doing 15
years ago.
2017-05-27 19:03:31 +02:00
Vadim Zeitlin
66865ed714 Merge branch 'icon-bundle-from-msw-res'
Add support for using icons from MSW resources in wxIconBundle.

Closes https://github.com/wxWidgets/wxWidgets/pull/482
2017-05-20 17:03:50 +02:00
Vadim Zeitlin
f5a0893ee9 Update comment and change log after MSW wxIconBundle improvements
It is now possible to load icons from a bundle too.
2017-05-20 17:01:59 +02:00
Vadim Zeitlin
f0c5f35dc3 Remove the obsolete wxPython overview
This was really old and better and more up-to-date documentation is included
in wxPython itself.
2017-05-20 16:50:59 +02:00
Vadim Zeitlin
2ed5d9f716 Mention workaround for a bug with parallel build with mingw32-make
When using -jN, setup_h needs to be created first to avoid a bug due to
missing dependencies in the current makefiles which breaks the build
otherwise.
2017-05-07 00:16:55 +02:00
Vadim Zeitlin
d0aaea5143 Merge branch 'staging' of https://github.com/stahta01/wxWidgets
Allow building wxGTK for MSW using MSys2 and configure.

Close https://github.com/wxWidgets/wxWidgets/pull/428
2017-05-04 02:51:52 +02:00
Artur Wieczorek
b375d81499 Use wxDataObject methods to retrieve data from clipboard when wxUSE_OLE==0
Dedicated wxDataObject::SetData() function can be used to import raw
clipboard data to the corresponding instances of wxDataObject and hence
there is no need to duplicate data retrieval code.
2017-05-03 22:48:04 +02:00
Artur Wieczorek
15e2dcc38d Fix adding bitmap to clipboard when wxUSE_OLE == 0 (wxMSW)
When CF_DIB object is placed to the clipboard, a handle to the memory
object containing a BITMAPINFO structure followed by the bitmap bits should
be passed to SetClipboardData(), not a handle to a DIB section.
Also, wxClipboard is the owner of the wxDataObject being added, so it
should release passed object.
2017-04-30 21:39:50 +02:00
Artur Wieczorek
b1fad4da44 Convert 0RGB wxBitmaps to RGB when copying them to clipboard
Not all applications recognize properly 0RGB bitmap format so for the sake
of interoperability bitmaps in such format should be converted to plain
24 bpp RGB format prior to being copied to the clipboard.

Closes #17640.
2017-04-30 21:35:01 +02:00
Artur Wieczorek
d5c46e87a6 Fix inserting multiple items to wxRearrangeList
In wxRearrangeList implementations (like wxMSW) where DoInsertItemsInLoop()
and DoInsertOneItem() are not used to insert multiple items, DoInsertItems()
has to be overriden to do this insertion.

See #17836.
2017-04-28 23:57:36 +02:00
Artur Wieczorek
37ecd7b760 Fix displaying labels of wxRadioBox items
Labels containing mnemonic prefixes (&) and literal underscore characters
have to be converted to the proper GTK labels where underscore
characters act as mnemonic markers. If label contains mnemonic then
dedicated function gtk_radio_button_new_with_mnemonic() should be used
to create radio button item.

Closes #17419.
2017-04-25 18:15:34 +02:00
Vadim Zeitlin
d10c600773 Add instructions for checking ABI compatibility to release HOWTO
Explain how to use abi-compliance-checker.
2017-04-22 15:58:13 +02:00
Vadim Zeitlin
dd134b9534 Fix wrong example using printf() in wxDateTime overview
Use wxPrintf() and remove the c_str() call which is redundant with it instead
of using printf() which can't be used with non-POD objects like wxCStrData
returned by c_str() in wx 3.0+.
2017-04-19 17:07:44 +02:00
Artur Wieczorek
003cb8a9ce Document recent wxMemoryDC::Blit() fix in changelog
Document changes introduced in 0ac0f4b259.
2017-04-14 18:31:26 +02:00
Vadim Zeitlin
e9ce55e000 Fix wxRmdir() with non-ASCII paths
Don't apply at best unnecessary, and actually harmful, as it uses a wrong
conversion, fn_str() when calling wxRmDir() which takes wxString.

Update unit tests to check that wxRmdir() now works with non-ASCII filenames
too.

Closes #17644.
2017-04-01 19:12:27 +02:00
jprotopopov
9b1afaa7a6 Don't crash in wxFFile::Eof() and Error() if file is closed
Assert and return false instead, this is more developer-friendly.

Add unit tests to check that these functions really work as expected when
called on a closed file.

Closes #17828.
2017-04-01 18:43:13 +02:00
orbitcowboy
f8ea4d61bc wxEnumProperty: Fixed wrong variable name in Doxygen documentation. 2017-03-22 18:03:24 +01:00
Vadim Zeitlin
3eda902331 Merge branch 'more-xdg-dirs'
Add possibility to use wxStandardPaths and, hence, wxFileConfig, in
XDG-compliant (but backwards-incompatible) mode.

Closes #17727.
2017-03-15 00:49:11 +01:00
New Pagodi
91a2869b0e Extend FindText() to return end position of matched text in wxSTC
New 5th parameter of FindText() can be used to receive the end position of matched text returned by SCI_FINDTEXT API.

Closes #17305.
Closes https://github.com/wxWidgets/wxWidgets/pull/23
2017-03-13 20:21:41 +01:00
Vadim Zeitlin
f6b91ad143 Mention wxStandardPaths::SetFileLayout() in the change log 2017-03-09 18:08:23 +01:00
New Pagodi
1bcb30f6d7 Add wxStyledTextCtrl::AutoCompGetCurrentText()
Added support for SCI_AUTOCGETCURRENTTEXT API.

Closes #16263.
2017-03-07 19:15:46 +01:00
Tim S
d88e110256 Added samples to test to wxGTK MSys2 directions.
Also, added option "--disable-precomp-headers".
And, changed MSys2 packages to install.
2017-03-07 12:47:35 -05:00
Tim S
ee0525386a Added MSys2 wxMSW configure build directions. 2017-03-07 12:47:34 -05:00
Tim S
cb67b07629 Added directions to build wxGTK/Win32 using MSys2. 2017-03-03 13:37:16 -05:00
Artur Wieczorek
b308ff3746 Document bounding box fix in changelog
Document changes introduced in ae57d89df8.
2017-03-02 23:46:54 +01:00
Artur Wieczorek
74ab36c125 Simplify PostScript code generated by wxPostScriptDC to draw elliptic arc
Optimize procedure 'ellipticarc' by doing all operations on the operand stack instead of creating local dictionary and temporary variables.
2017-02-22 21:23:44 +01:00
Artur Wieczorek
f49528cc2f Fix DrawArc() implementation in wxPostScriptDC
Draw pie, not arc, if current brush is not transparent.
Also simplify the code by invoking PostScript 'arc' operator only once if pie is drawn.

Closes #17805.
2017-02-22 21:09:17 +01:00
Artur Wieczorek
b37884b2cb Optimize PostScript code generated by wxPostScriptDC
PostScript code to register (and re-encode) given font should be emitted only once. Once registered, the font is available in the entire document and there is no need to register it again.
2017-02-20 21:56:34 +01:00
Vadim Zeitlin
ef3c0c83af Merge branch 'osx-fix-dialog-level-on-floating-frames-master' of https://github.com/lanurmi/wxWidgets
Closes #4355.
2017-02-20 17:56:50 +01:00
Lauri Nurmi
b8192cb8e1 Allow hiding command line arguments from Usage()
Add wxCMD_LINE_HIDDEN wxCmdLineParser flag allowing to hide options and/or
parameters.

A hidden/unlisted argument is processed as usual, but not shown in the output
given by Usage(). A use case for such could be diagnostics switches that
should exist but are not useful to the end user.

Closes https://github.com/wxWidgets/wxWidgets/pull/390
2017-02-20 17:53:04 +01:00
New Pagodi
e68cafaf94 Remove references to never generated wxSTC events
EVT_STC_KEY and EVT_STC_URIDROPPED events are never generated so there is no need to reference them in the code and documentation. For backwards compatibility reasons their declarations are not entirely removed but marked as deprecated.

Closes #17688.
2017-02-16 18:18:13 +01:00
New Pagodi
68888ca0a2 Upgrade Scintilla component to 3.7.2
Closes #17705.

Closes https://github.com/wxWidgets/wxWidgets/pull/409
2017-02-12 19:56:21 +01:00
Artur Wieczorek
25b0c48e0c Update changelog
To reflect changes introduced in 8e47b3ca97.
2017-02-12 09:32:21 +01:00
Vadim Zeitlin
e125c3b657 Allow disabling unsafe implicit conversions in wxString
While we have to keep these conversions enabled by default, they are very
dangerous as they can result in silent data loss on any system not using a
locale with UTF-8 encoding, i.e. always under MSW.

Allow mitigating this by defining wxNO_UNSAFE_WXSTRING_CONV when compiling the
application code using the library, which makes these conversions invisible to
the user code, and so can be used without recompiling the library.

Also add wxUSE_UNSAFE_WXSTRING_CONV which can be set to 0 when compiling the
library to disable these conversions globally for all applications using it.

Closes #11830.
2017-02-12 02:29:30 +01:00
Vadim Zeitlin
dbc4e4dc52 Add a section with compatibility-related macros to the documentation
Although WXWIN_COMPATIBILITY_x_y macros were mentioned in the backwards
compatibility overview, it seems appropriate to also document them with all
the other macros on the page dedicated to them.
2017-02-12 00:27:26 +01:00
Cătălin Răceanu
05b980aba1 Fix wxMSW wxSpinCtrl appearance: show arrows inside the control
As recommended in the "Spin Controls" MSDN documentation (see
https://msdn.microsoft.com/en-us/library/windows/desktop/dn742439.aspx), put
the spin control inside the associated "buddy" edit control and not near it.

Closes #12297.

Closes https://github.com/wxWidgets/wxWidgets/pull/410
2017-02-11 23:39:31 +01:00
Vadim Zeitlin
80d15dc87b Document Expat 2.2.0 upgrade in the change log 2017-02-05 02:54:38 +01:00
Catalin
35b4c82f18 Add libexpat upgrade example for MSW. 2017-02-02 02:18:02 +02:00
Artur Wieczorek
ba5d07f4b4 Fix underline length for underlined text (wxPostScriptDC)
Draw underline relatively to the baseline and obtain line parameters using 'stringwidth' operator instead of calculating them manually based on the parameters returned by DoGetTextExtent(), which are not always accurate (e.g. if no AFM files are available).

Closes #17788.
2017-01-27 23:02:43 +01:00
Tobias Taschner
b026674913 Update documentation to mention Visual Studio 2017 support
Extend the list of MSVS version to include the latest 2017 one.
2017-01-16 22:28:40 +01:00
Tobias Taschner
3206df50c4 Add Microsoft Visual Studio 2017 solution file for building wxMSW
Allow building with VS15 out of the box.

Closes https://github.com/wxWidgets/wxWidgets/pull/353
2017-01-16 17:02:10 +01:00
Artur Wieczorek
e811c0640a Optimize creating wxCairoContext from wxMemoryDC associated with ARGB wxBitmap (MSW)
Legacy API cairo_win32_surface_create() can create only 24 bpp RGB surfaces but new API cairo_win32_surface_create_with_format() introduced in 1.15.4 supports creating also 32 bpp ARGB surfaces.
So, this new API can be used to create ARGB surface directly from ARGB bitmap (HDC), superseding current implementation based on the access to the bitmap data with cairo_image_surface_create_for_data().
Unfortunately, 0RGB bitmaps are not supported by cairo_win32_surface_create_with_format() and for such bitmaps surface has to be still created from bitmap data.
2017-01-10 21:34:51 +01:00
Artur Wieczorek
6cef4eaa11 Refactor code in wxQuantize() for MSVC to avoid crash
VC++ compilers (at least up to VS 2015) seem to generate incorrect code for the dithering code taken from libjpeg (pass2_fs_dither() function), where it is known to create problems too.
Refactor the code to avoid invalid optimization in this function and turn optimization on.

Closes #17764.
2017-01-10 21:31:59 +01:00
Vadim Zeitlin
fad9c688e6 Merge branch 'libpng-1.6.28' of https://github.com/catalinr/wxWidgets
This brings in several bug fixes and optimizations (notably the use of SSE),
see src/png/CHANGES for full details.

Closes https://github.com/wxWidgets/wxWidgets/pull/384
2017-01-07 23:20:57 +01:00
Catalin
7f54eba05c Define PNG_ZLIB_VERNUM as 0. 2017-01-07 01:12:11 +02:00
Catalin
72971d3329 Add libpng upgrade example for MSW. 2017-01-06 18:16:00 +02:00
Tobias Taschner
e0a2e09031 Update year in copyright notices to 2017
Use 2017 instead of 2016, mostly in version info files.

Closes https://github.com/wxWidgets/wxWidgets/pull/379
2017-01-04 11:25:00 +01:00
Laurent Poujoulat
632997e449 Fix parsing RGBA string in wxColour::FromString()
Using "%20c" in scanf() doesn't work unless we really have exactly 20
characters, so use "%20[^)]" to take up to 20 characters until the closing
parenthesis instead.

Closes #17739.
2016-12-19 19:42:54 +01:00
VZ
5551932c25 Allow using Bind() with non-public inheritance in C++11 code
Using Bind() with a method of the class deriving from wxEvtHandler
non-publicly used to result in a compile-time error, but at least with C++11
we can detect this case and allow the code to compile.

Closes #17623.
2016-11-29 19:32:40 +01:00
Jens Göpfert
c43b59616f Make Ctrl+A not work in multiline wxTextCtrl in MSW
The native EDIT control doesn't handle this key combination, but RICHEDIT does
and people just expect it to work, so handle it at wxMSW level.

Closes https://github.com/wxWidgets/wxWidgets/pull/300
2016-11-24 02:10:39 +01:00
Paul Cornett
0ef695ef9b Revert d30673e5, it's completely broken. See #17089 2016-11-23 09:28:28 -08:00
Vadim Zeitlin
fe685bc4c6 Allow pasting using Cmd+V in wxTextCtrl with wxTE_PASSWORD style
For some reason known only to Apple, NSSecureTextField allows pasting text
into it using its standard context menu, but not using the standard Cmd+V
keyboard shortcut. Moreover, apparently the control does something special to
disable it because pressing Cmd+V does result in a call to
-[NSSecureTextField control:textView:doCommandBySelector:], but with a dummy
"noop:" selector.

Detect this specific situation and check if we're called while handling Cmd+V
event and, if this is indeed the case, do paste the text into the control.

While it could be argued that this changes the platform behaviour, it seems
very hard, if not impossible, to imagine a situation in which this would be a
problem while not being able to easily paste into password fields is
definitely a real usability bug.
2016-11-22 15:01:19 +01:00
Andreas Falkenhahn
d5c008da03 Fix setting alignment for wxOSX wxTextCtrl with wxTE_DONTWRAP
Don't make the controls with wxTE_DONTWRAP (a.k.a. wxHSCROLL) style
"infinitely" wide, but just "very" wide to allow alignment still work in it.

See #17529.
2016-11-22 02:29:13 +01:00
Vadim Zeitlin
dcb1229f41 Don't send mouse events to disabled windows in wxOSX
Disabled controls are not supposed to accept any input, so don't send any
mouse events to them.

This fixes the behaviour of wxSlider which could be moved (and generated the
corresponding events) even when it was disabled.

Closes #17194.
2016-11-22 02:10:40 +01:00
Tim Kosse
b99ad85b6f Weight pixels by their respective alpha value in wxImage::ResampleBox
Without this weighting, even the color value of invisible pixels with a zero
alpha would influence the result.

Closes #17724.
2016-11-21 18:09:07 +01:00
Václav Slavík
7dab555f71 Don't create wxWindowAccessible by default
Don't unconditionally use wxWidgets' implementation of IAccessible for
all windows when wxUSE_ACCESSIBILITY is 1, because it is inferior to the
system provided one: it often lacks appropriate labels, doesn't fully
support navigation and wxIAccessible isn't fully implemented.

The approach, when using MSAA, recommended by Microsoft documentation is
to customize accessibility for custom controls only, by proxying to the
standard and overriding what is necessary. By making this change, user
code is still allowed to customize accessibility if needed, without
negatively impacting standard controls that don't need any custom code.

See also https://github.com/wxWidgets/wxWidgets/pull/340
2016-11-20 17:35:32 +01:00
Vadim Zeitlin
3404d55be0 Merge branch 'helloworld-doc'
Modernize "Hello world" page: Bind(), C++11 etc.

Closes https://github.com/wxWidgets/wxWidgets/pull/317
2016-11-16 18:02:28 +01:00
Vadim Zeitlin
8072481f86 Show using C++11 lambda in the "Hello world" example
This is so useful, that it should be mentioned even on this introductory page.
2016-11-16 18:01:47 +01:00
Vadim Zeitlin
2d56fb5298 Use Bind() instead of event tables on the "Hello World" page
Let the new users know that Bind() is the preferred way to handle events in
modern wxWidgets.
2016-11-16 18:01:46 +01:00
Artur Wieczorek
d9fbde805b Implement wxDataViewRenderer::GetAccessibleDescription() method
The purpose of this method is to provide a textual description of the renderer's content to the class implementing accessibility framework in wxDVC (wxDataViewCtrlAccessible).
It is exposed if wxUSE_ACCESSIBILITY is set to 1.
2016-10-24 21:52:22 +02:00
Vadim Zeitlin
0afb95d2f4 Escape double dashes in Doxygen input to preserve them
By default double dashes are converted to en-dashes in the output (and triple
ones -- to em-dashes), but this is undesirable when double dashes are used not
as a punctuation mark but in command line options or as C++ decrement
operator, so escape them to avoid such conversion in this case.
2016-10-20 21:47:37 +02:00
Václav Slavík
90e1769569 Add API to control OS X wxTextCtrl’s smart behavior
Allow the user to customize smart quotes and dashes substutions on OS X
and also provide the OSXDisableAllSmartSubstitutions() method for
disabling them all at once.
2016-10-16 16:49:18 +02:00
Václav Slavík
3028fd40a0 Re-enable automatic substitutions in wxTextCtrl on OS X
This reverts ill-advised commits
c07523734f and
8d42890df4 that disabled native OS X
behavior of substituting dashes and quotes with typographically correct
characters if the user has this feature enabled.

This was a bad idea for two reasons:

1. It made wx applications behave non-natively, and thus be worse, in a
   highly noticeable area.

2. It made it impossible for applications that want to behave correctly
   to restore the native behavior, because once
   setAutomaticDashSubstitutionEnabled or
   setAutomaticQuoteSubstitutionEnabled is called (as wxTextCtrl
   constructor does), it's no longer possible to obtain its original,
   default setting.

It's not better to disable native functionality by default, it's better to
be native and make customizations possible. wxWindow API exposes access
to the native control and if an application desires to disable
substitution behavior, it can easily do so from user code.

See also #186 and #241.
2016-10-16 16:49:18 +02:00
Václav Slavík
8a6a20b1e3 Implement wxDataViewCtrl::SetRowHeight() on OS X 2016-10-09 16:10:30 +02:00
Artur Wieczorek
8980abacad Return null BSTR from wxIAccessible if string returned from wxAccessible method is empty
wxIAccessible should return a NULL BSTR to the accessibility framework if strings returned from wxIAccessible::get_accName() and get_accValue() are empty because this convention is already applied to the other methods returning string values, like get_accHelp(), get_accDescription().
2016-10-06 20:48:59 +02:00
Artur Wieczorek
e2a5b19fac Return DISP_E_MEMBERNOTFOUND error to the accessibility framework, if necessary
In response to wxACC_NOT_SUPPORTED returned by wxAccessible methods, wxIAccessible should return DISP_E_MEMBERNOTFOUND to the framework.
2016-10-06 20:31:49 +02:00
Metallicow
60eefe0bc3 Reduce size of the PNGs used in Doxygen documentation
PNGs optimized with FileOptimizer.
249 files processed. 296,293 bytes saved (64%)

Closes https://github.com/wxWidgets/wxWidgets/pull/333
2016-10-05 22:19:26 +02:00
Artur Wieczorek
25ac053adb Adjust rectangle coordinates returned by wxDataViewCtrl::GetItemRect()
Because query for item rectangle is executed in the context of wxDataViewCtrl so coordinates of retrieved rectangle should be specified in wxDataViewCtrl client coordinates (not in wxDataViewMainWindow coordinates).
To return correct coordinates it is necessary to convert rectangle coordinates retrieved by wxDataViewMainWindow::GetItemRect() from wxDataViewMainWindow client coordinates to wxDataViewCtrl client coordinates (they can different due to the presence of the header in wxDataViewCtrl client area).
2016-10-04 23:39:38 +02:00
Artur Wieczorek
2ec1bad4d6 Adjust point coordinates in wxDataViewCtrl::HitTest
Point coordinates passed from wxDataViewCtrl::HitTest() to wxDataViewMainWindow::HitTest()
should be converted from wxDataViewCtrl client coordinates to wxDataViewMainWindow client coordinates because they can different due to the presence of the header in wxDataViewCtrl client area.
2016-10-04 23:20:06 +02:00
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
Vadim Zeitlin
4f0701c82c Merge branch 'clean-up-pre-c++98-compatibility-macro' of https://github.com/minoki/wxWidgets
Don't bother with checking for some really obsolete compilers and just assume
that C++98 keywords "explicit", "{static,const,dynamic}_cast" and support for
partial template specialization is always available.

Closes #17655.
2016-09-16 01:41:19 +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
ARATA Mizuki
1e6251d592 Replace wx_static_cast/wx_const_cast/wx_reinterpret_cast with the function-style casts
See #17655.
2016-09-14 18:45:12 +09:00