Commit Graph

61911 Commits

Author SHA1 Message Date
Robin Dunn
5260de1471 Fix typos and missing items in the ribbon interface definitions 2016-10-21 16:54:27 -07:00
Robin Dunn
1802a57696 Fix parameter names in wxMediaCtrl::Load* methods 2016-10-21 16:54:26 -07:00
Vadim Zeitlin
c9ec981a28 Fix MinGW builds by defining HDS_NOSIZING if it's not defined
Blind fix for compilation failures in MinGW builds after the changes of
92a1f643ba which started using HDS_NOSIZING
apparently not present in this compiler SDK headers.
2016-10-21 22:54:46 +02:00
Václav Slavík
a6be5bdae3 Fix wxGTK wxDataViewRenderers' alignment handling
Don't apply alignment to native controls in SetAlignment() method, where
it may not be known yet due to column-to-renderer inheritance if
wxDVR_DEFAULT_ALIGNMENT is used (the default). Move such code to
GtkUpdateAlignment() (which was made virtual) in all renderers.

This fixes unintended right-aligning of columns with GTK+ 2 when default
alignment was used.
2016-10-21 17:50:34 +02:00
Václav Slavík
552940b547 Change wxOSX ShowWithEffect() delay to 200ms
Change the animation delay from ridiculously long (half a second) to
somewhat more reasonable 200ms to bring it in line with Windows per the
comment in this code. Feels more similar to native macOS animations now
too.
2016-10-21 17:44:24 +02:00
Václav Slavík
7546989c44 Fix wxMarkupParserAttr's unwinding of colors
Fix the logic for restoring previous span's colors to account for the
possibility of spans that don't change the color, such as in "<i><span
color='red'>...</span></i>foo". Previously, "foo" would always be
rendered black, because unwinding the attributes stack would encounter
an invalid color (which has r=g=b=0) and set it, disregarding and
preexisting attributes.

Because there's code in there that checks whether the attributes are
valid, we need to keep track of both the actually specified attributes
and the currently effective ones, and use the latter for restoration.
2016-10-21 17:36:32 +02:00
Václav Slavík
d9df970573 Don't use custom colors in selected wxDVC controls (wxOSX)
Don't use custom color attributes or color markup for rendering of
selected items' text in wxOSX's wxDataViewCtrl and use the selection
text color instead. This is consistent with the other ports and should
be done to improve readability (in absence of selection-specific
attributes).
2016-10-21 17:36:32 +02:00
Václav Slavík
5e5ffad0b8 Respect item font when rendering markup (wxOSX)
Respect per-item attributes and namely the font (which may differ from
the control's font) when rendering markup items in wxDataViewCtrl.
2016-10-21 17:36:32 +02:00
Václav Slavík
58fc33d7c2 Support ellipsizing of markup text in wxDVC
Fix wxDataViewTextRenderer to at least partially respect ellipsize mode
when using markup text. Generic implementation only supports
wxELLIPSIZE_END and wxELLIPSIZE_NONE at the moment, but the wxOSX and
wxGTK ones have full support.
2016-10-21 17:36:32 +02:00
Václav Slavík
92a1f643ba Set HDS_NOSIZING in wxHeaderCtrl when appropriate
Native Windows header control doesn't have the ability to show
per-column resizing cursor and it's only possible to enable or disable
it for the entire control, so we can't fully support the wxHeaderColumn
API. But we can at least hide the resizing cursor if none of the columns
are resizable.
2016-10-21 17:08:54 +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
73f6bf7b6f Allow wxDataViewCtrl to gain focus in wxOSX
Fix numerous focus-handling bugs in wxOSX in combination with
NSScrollView (which cannot get focus by itself and which was already
treated specially in many, but not all, places), including

- inability to set the focus
- loss of wxEVT_SET_FOCUS events
- loss of wxWindow<->NSView association after clearing wxDVC columns
2016-10-19 17:11:49 +02:00
Václav Slavík
f3b8dac3b7 Fix wxNullVariant handling in wxDataViewBitmapRenderer
In both the generic and GTK+ implementations, setting the value of a
bitmap column to wxNullVariant resulted in the bitmap, if set for some
rows, being repeated on the rows with null value.
2016-10-19 16:46:54 +02:00
TcT2k
065135adcc Remove QTKit support from wxMediaCtrl for OS X
QTKit has been removed from OS X 10.12 SDK.
QTKit has been superseded by AVFoundation since OS X 10.7.
Since wxWidgets >= 3.1 requires 10.7 anyway there is no reason to support the old API.

Additionally the AVFoundation implementation may use AVKit (available since 10.9). It will be used when available and the deployment target is met.

Closes https://github.com/wxWidgets/wxWidgets/pull/337
2016-10-19 13:56:29 +02:00
Václav Slavík
ec45fc5ae0 Return IAccessible from GetIAccessibleStd()
There's no reason to return an untyped void* pointer when we can
forward-declare IAccessible.
2016-10-19 10:36:07 +02:00
Vadim Zeitlin
dda1c7cfd4 Merge branch 'fix_osx_qtkit' of https://github.com/TcT2k/wxWidgets
Compilation fix for OS X 10.12 SDK.

Closes https://github.com/wxWidgets/wxWidgets/pull/336
2016-10-18 00:28:21 +02:00
JulianSmart
682d53fdaa Use correct selection after editing cell properties 2016-10-17 12:42:00 +01:00
JulianSmart
7505ccfd6d Find focus for comboboxes 2016-10-17 12:41:58 +01:00
Tobias Taschner
ce7bf5e539 Add typecast for C++11 compilation of OS X wxMediaCtrl
When compiling in C++11 mode the typecast of AVPlayerStatus in the callback is required to avoid a compiler error.
2016-10-17 11:44:16 +02:00
Tobias Taschner
281610142b Fix building wxMediaCtrl with OS X 10.12 SDK
Since OS X Sierra 10.12 QTKit has been removed. wxMediaCtrl for OS X already had a fallback to AVFoundation implemented. This makes sure this will be used and the correct media Frameworks are used for linking.
2016-10-17 11:29:48 +02:00
Artur Wieczorek
cfe0eaa7f2 Create wxAccessible object on demand in wxDVC
Create wxAccessible objects only in response to calls to GetOrCreateAccessible() to save resources.
2016-10-16 23:48:27 +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
Artur Wieczorek
d8b2da0334 Remove wxUSE_VARIANT guards
wxDataViewCtrl requires wxVariant so these guards are not necessary.
2016-10-15 21:02:05 +02:00
Artur Wieczorek
d5880dcfd9 Make output string localization-friendly 2016-10-15 21:02:04 +02:00
Vadim Zeitlin
ca3e63656c Remove unwanted flag from sizer in the help sample
This resulted in an assert failure as wxALIGN_CENTER_VERTICAL has no chance of
working for an element of a vertical wxBoxSizer.
2016-10-15 13:41:31 +02:00
Artur Wieczorek
a88cdfb49b Make strings localization-friendly
Reorganize string literals and add comments to make string more friendly  for translators.
2016-10-14 23:59:44 +02:00
Artur Wieczorek
d25cfa0e50 Handle disabled/hidden/invisible items for wxDVC accessibility purposes
Return corresponding states (wxACC_STATE_SYSTEM_UNAVAILABLE, wxACC_STATE_SYSTEM_INVISIBLE, wxACC_STATE_SYSTEM_OFFSCREEN) for objects which are disabled, hidden or invisible (out of screen).
2016-10-14 23:57:08 +02:00
Artur Wieczorek
239361c7c4 Fix determining last visible row in wxDataViewCtrl
If entire client area is filled with displayed rows, the last visible row is the row occupying the line at the bottom of the client area (at y = dimY-1).
Because last displayed row can be partially visible in the client area, it cannot be determined as previous row to the row virtually displayed below the client area (at y = dimY), like it is currently implemented.
2016-10-14 23:50:50 +02:00
Artur Wieczorek
9c3c6074eb Add accessibility support for wxDataViewCtrl and wxDataViewTreeCtrl
Implemented wxDataViewCtrlAccessible and wxDataViewTreeCtrlAccessible classes.
2016-10-09 21:13:00 +02:00
Václav Slavík
29d310c6f0 Implement wxDataViewCtrl::SetFont() on OS X
wxDataViewCtrl now behaves consistently with other ports on OS X:
calling SetFont() sets the default font used by renderers and adjusts
row height to fit.
2016-10-09 16:10:31 +02:00
Václav Slavík
8a6a20b1e3 Implement wxDataViewCtrl::SetRowHeight() on OS X 2016-10-09 16:10:30 +02:00
Artur Wieczorek
e7145999f4 Update documentation 2016-10-09 14:03:20 +02:00
Artur Wieczorek
b948965eba Use symbolic constants rather than numeric values
Zero represents 'this' object which is identified by wxACC_SELF symbol.
2016-10-09 13:17:41 +02:00
Artur Wieczorek
9efaca908f Guard functions with wxCHECK macro rather than wxASSERT
Make the code shorter.
2016-10-09 13:16:16 +02:00
Václav Slavík
8e70ef3aec OS X: Fix wxDataViewBitmapRenderer autosizing
wxDataViewCtrl code expects, quite reasonably, that NSCell's cellSize:
will behave as documented and return the minimal size for image cells
too. Unfortunately, that's not the case.

A cell created as NSImageCell, which seems to exists for exactly this
purpose, will always return the size as (0,0), regardless of whether it
has any image set or not an regardless of its size.

On the other hand, a cell created with NSCell.imageCell constructor
sizes itself correctly, but is not a NSImageCell instance and somehow
interferes with other wxDataViewCtrl rendering, presumably due to its
special status.

The simplest fix to make the sizing work correctly therefore seems to be
to specialize NSImageCell and implement its (trivial) cellSize: method.
2016-10-08 18:29:22 +02:00
Václav Slavík
8ad375592c OS X: fixes wxDataViewBitmapRenderer data handling
Handle both wxIcon and wxBitmap data, as other ports do, and correctly
handle their null values when no bitmap should be shown.
2016-10-08 16:59:31 +02:00
Václav Slavík
eece498d0a OS X: Don't show focus ring around wxDataViewCtrl
In native OS X apps, focus ring is not shown around NSTableView controls
(focus is indicated differently, with selection's color). For some
reason, NSTableView shows the focus ring by default when used in wxDVC,
so we need to explicitly disable it.
2016-10-08 16:58:53 +02:00
Václav Slavík
0fa34f8d5b OS X: Fix wxEVT_SIZE handling in wxDataViewCtrl
Don't set Cocoa autoresizing mask on the control, because it causes it
to be, well, automatically resized, causing wx code to miss the size
change and omit wxEVT_SIZE events. As wx handles all of the sizing and
positioning itself, it almost never makes sense to use
setAutoresizingMask:
2016-10-08 16:58:53 +02:00
Václav Slavík
7d03ed608b Fix compilation warning in wx/osx/dataview.h 2016-10-08 16:58:53 +02:00
Václav Slavík
dec97dfa65 OS X: Implement support wxCOL_REORDERABLE
wxDataViewCtrl were always reorderable in wxOSX, regardless of the
presence of wxCOL_REORDERABLE. Fix in the code to respect per-column
flag in a somewhat hacky, but recommended by Apple, way of making this
setting, which is normally global for the entire control, apply to
individual columns.
2016-10-08 16:58:53 +02:00
Václav Slavík
71aa152af2 OS X: Reset selection in wxDataViewCtrl::SetSelections
SetSelections() should reset selection to the specified items
(consistently with other platforms), not add these items to the existing
selection.
2016-10-08 16:58:52 +02:00
Václav Slavík
ae93a83e76 wxGTK: Handle null bitmaps in wxDataViewBitmapRenderer
Consistently with other implementations, accept wxNullBitmap and
wxNullIcon in wxDataViewBitmapRenderer if the column shouldn't show any
icon.
2016-10-08 16:58:52 +02:00
Václav Slavík
f4445caba3 Fix wrong type used for PangoAlignment 2016-10-08 16:58:52 +02:00
Artur Wieczorek
8505a1360c More sanity check in wxIAccessible methods
Child ID passed to the wxIAccessible methods can be only a VARIANT of type VT_I4 which value is greater or equal to 0 (CHILDID_SELF = 0 and child objects indexed from 1).
2016-10-06 21:03:40 +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