Commit Graph

61876 Commits

Author SHA1 Message Date
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
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
243db82c28 Use wxVariant::IsType() function to check the type of variant values
Since there is a dedicated function to check the type of variant then there is not necessary to call wxVariant::GetType() and perform explicit comparisons of returned strings.
2016-09-29 23:46:27 +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
Scott Talbert
fae271c21c Fix assert in webview sample when using find functionality 2016-09-29 01:35:28 +02:00
Maarten
977a826639 use more wxOVERRIDE (#329) 2016-09-25 13:21:28 -07:00
Vadim Zeitlin
d0c57dbef0 Fix string iteration logic in wxFTP::Pwd()
wxString iterators can't be dereferenced once they reach the end of the
string, so compare them with end rather than checking if the value they point
to is non-NUL.

This makes wxFTP::Pwd() actually work, which was apparently broken since quite
some time (perhaps ever since c9f7896861 9+
years ago).

Closes #17679.
2016-09-25 01:20:41 +02:00
Vadim Zeitlin
461d0b2005 Connect to the FTP server in a single place in wxFTP unit test
As all tests need a valid connection, just do it once in the test set up
instead of duplicating the call to Connect() in all tests.

No real changes.
2016-09-25 01:19:53 +02:00
Paul Cornett
9b19a6e529 use wxOVERRIDE in wxMSW sources 2016-09-23 07:59:11 -07:00
Vadim Zeitlin
9b477e46e5 Use Xcode 6.2 for OS X Travis-CI builds
This is the new minimal version required by Homebrew.
2016-09-23 16:19:26 +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
ebfda5e5be Don't use local variable to store value which is already stored in the member variable.
Use pointer to wxGraphicsContext stored in the member variable instead of using additional local variable.
2016-09-20 21:32:10 +02:00
Artur Wieczorek
b5a740a85f Remove unused member variables from wxGCDCImpl 2016-09-20 21:32:09 +02:00
Artur Wieczorek
41a2b3e371 Fix applying affine transformation matrix in wxGCDC
In wxGCDCImpl::ComputeScaleAndOrigin() current affine transformation matrix (applied with SetTransformMatrix, ResetTransformMatrix) has to be concatenated with current basic transformations (applied with SetDeviceOrigin, SetLogicalScale, etc.).

Closes #17674.
2016-09-20 21:31:56 +02:00
Artur Wieczorek
27627db87d Fix warning about signed/unsigned mismatch in the accessibility sample
Just to suppress harmless compiler warning.
2016-09-20 20:37:18 +02:00
Artur Wieczorek
6ae6a79c67 Fix MSVC14 warnings about a shadowed variable in the accessibility sample
Just to suppress some harmless warnings.
2016-09-20 20:37:17 +02:00
Artur Wieczorek
8197acfd4b Fix compilation error in accessibility sample
Since f3ddefc1ad wxSplitterWindow::SashHitTest() has only two parameters.
2016-09-20 20:37:17 +02:00
Tim Kosse
255b2adea2 Do not return empty tokens when parsing XDG_DATA_HOME and XDG_DATA_DIRS. This fixes an assert where wxString::Last would have been called on an empty string. 2016-09-19 16:07:17 +02:00
Artur Wieczorek
c916845aaa Add new test of affine transformation matrix
Add test of concatenating two wxAffineMatrix2D.
2016-09-18 23:10:26 +02:00
Artur Wieczorek
fb9cbc0879 Add test suite to check wxGraphicsMatrix operations
Implemented tests of some basic operations like Invert() and Concat().

See #17670.
2016-09-18 23:09:44 +02:00
Artur Wieczorek
aa687ec86e Implement wxGraphicsMatrixData::Clone() method for Direct2D renderer 2016-09-18 23:08:49 +02:00
Artur Wieczorek
4d6d73eab3 Fix wxGraphicsMatrix concatenation (Cairo)
The parameter matrix in wxGraphicsMatrixData::Concat() should be a multiplicand, not a multiplier.

Closes #17670.
2016-09-18 23:07:59 +02:00
Artur Wieczorek
b6d44d5329 Fix wxGraphicsMatrix concatenation (Direct2D)
1. Elements of resulting matrix are modified directly (in-place) in Matrix3x2F::SetProduct() so none of the multiplied matrices can be the instance of the resulting matrix.
2. The parameter matrix in wxGraphicsMatrixData::Concat() should be a multiplicand, not a multiplier.

See #17670.
2016-09-18 23:06:14 +02:00
arata, mizuki
c225774d94 Remove obsolete MSVC project files for the tests
The files built with these project files seem to be included in
tests/benchmark/bench_vc[789]_bench.vcproj and these files themselves
are out of date.
2016-09-18 13:39:08 +02:00
Artur Wieczorek
ecaeceb878 Add few tests of retrieving bounding box
New tests of retrieving bounding box coordinates after two consecutive drawing operations, for the case when wxDC coordinates have been changed between the operations and for resetting the bounding box.

See #17667.
2016-09-16 22:29:34 +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
pb101
0bb7d9966f Fix copy paste mistake in wxDCFontChanger::Set() documentation
Use correct "wxFont" instead of "wxColour".

Closes #17665.
2016-09-16 01:36:37 +02:00
Vadim Zeitlin
6ad64a5d69 Make wxTreeEvent::GetToolTip() const
This is not very important because this function is only used by wxWidgets
itself but it's still wrong to have a non-const trivial accessor like this.

See #17661.
2016-09-16 01:34:32 +02:00
Vadim Zeitlin
cc710218e6 Fix wrong indentation in wxDDE code
No real changes, but this avoids warnings about possibly wrong code from the
latest g++ versions.

Also add braces around a multiline "if" statement body.
2016-09-15 19:42:32 +02:00
ARATA Mizuki
affbcfa6c4 Remove HAVE_PARTIAL_SPECIALIZATION and HAVE_TEMPLATE_OVERLOAD_RESOLUTION macros
See #17655.
2016-09-14 18:45:12 +09:00
ARATA Mizuki
32666e8d4f Remove feature test for HAVE_EXPLICIT 2016-09-14 18:45:12 +09:00
ARATA Mizuki
8cfc74491a Replace wxEXPLICIT with the 'explicit' keyword
See #17655.
2016-09-14 18:45:12 +09:00