Changing SetPointSize() argument type from int to float wasn't 100%
backwards-compatible as it notably started resulting in warnings (from
at least MSVC) about conversions from int to float in the existing code.
To avoid these warnings and for symmetry with GetFractionalPointSize(),
add SetFractionalPointSize() taking float argument and preserve the
argument of type int in SetPointSize() for compatibility.
SetPointSize() is now just a wrapper forwarding to the more general
SetFractionalPointSize().
Notice that the other ports still remain broken, this commit only
updates the currently working wxGTK, wxMac and wxMSW.
Use float as the fundamental type for the font size and implement
wxNativeFontInfo::{Set,Get}PointSize() as wrappers around the new
{Set,Get}FractionalPointSize().
Update wxNativeFontInfo for all platforms and replace the use of its
SetPointSize() method with SetFractionalPointSize() in wxFont for the
platforms already supporting fractional point sizes (don't change the
others just yet).
Note that wxNativeFontInfo::{Get,Set}PointSize() are preserved for
backwards compatibility but shouldn't be used in any code inside the
library itself any more (again, this is not the case yet, but will be
soon).
Add wxFontBase::AccountForCompatValues() and use it in all ports instead
of redoing the same comparison with wxDEFAULT in all of them.
This is done not so much to avoid the code duplication, which was
minimal anyhow, but to make the code more clear and make it easier to
remove it from all ports at once in the bright (but remote) future when
we don't need these compatibility hacks any more.
Also document that wxDEFAULT and wxNORMAL are only handled specially in
the old-style ctor taking the individual font components and not the new
one using wxFontInfo and extend the unit test to check this.
Similarly to the previous commit, verify that wxNORMAL, wxITALIC and
wxSLANT still work for compatibility (note the latter is synonymous with
wxITALIC under MSW).
This is mostly done to fix (half of) compilation errors after
introduction of pure virtual wxFont::{Get,Set}NumericWeight() as wxFont
in wxX11 couldn't be compiled any more as it didn't define them.
Make these functions available for the upcoming reuse in wxFont.
This is almost a pure refactoring, except that assert checking for the
symbolic weight validity was corrected (it was always true before due to
wrong use of "||" instead of "&&", so split it in 2 asserts to ensure
that this doesn't happen any more).
Resolve ambiguity in wxCFTypeRef::GetValue() calls: CGFloat is float,
not double, in 32 bit builds, so the type of the first argument is
"float *" while the type of 0.0 is "double".
Fix this by casting 0 to CGFloat too, as this works in both 32 and 64
bit builds.
Move the entire contents of wxAdv library into wxCore.
In the future, wxAdv will disappear entirely, but for now keep it as an
empty placeholder to allow the existing make/project files to work.
See https://github.com/wxWidgets/wxWidgets/pull/900
* Switch to pure Core Text Implementation, Start extended Font API
* mac fixes
* First msw implementation
* Fixing paste error
* fixing typo
* Rearranging lines to former fallthrough order
* Blind fixes for covering new abstract methods
* Blind gtk implementations
* Fixing according to travis ..
* Removing method defined in base
* formatting adaptions
* Extending the schema definition for new weights
* fixing typo, using wxRound, other fixes according to comments
* changes according to suggestions
* fixing init order, before the init of m_info was overridden by Init()
* redo
* redo
* redo
* Cleanup
Removing obsolete code snippets, proper traces for font names
* Moving common code
Only the Get/SetNumericWeight calls should now be implemented in the native part, the ‚old‘ Get/SetWeight are common code and use the numeric counterparts.
* Updating docs
* commit wa missing changes.txt
* Doc fixes
* Full stops added
On OSX, wxImageList::GetIcon() returned wxNullIcon when a wxBitmap was
stored. This could lead to no image seen in controls like wxTreeListCtrl.
Instead of that, we convert the wxBitmap to wxIcon with CopyFromBitmap.
The value returned by wxDataViewColumn::IsSortOrderAscending() wasn't
updated when the sort order changed due to the user clicking on a column
and reversing the sort order.
Fix this now by explicitly calling SetSortOrderVariable() when this
happens.
Closes https://github.com/wxWidgets/wxWidgets/pull/901
No library was created as no symbols were exported by the DLL any more,
so add a dummy symbol just to force the import library creation -- this
is important to let the projects referencing it to continue to link,
even if it's now useless.
This object is defined in "base", not "core".
Somehow this still worked before, but it was still wrong and stopped
working when taskbarcmn.cpp was moved to "core" itself from "adv".
This basically removes the "adv" library, even though it's still
preserved for compatibility with user make/project files referring to
it.
It is done because the distinction between "adv" and "core" was never
really clear (e.g. why wxTreeCtrl was in core but wxTreeListCtrl in
adv?) and it prevented some core classes from using adv ones.
Previously it was somehow possible to implicitly convert "false" to
wxMethodPtrArray (which is an array of wxMethod pointers), but this,
correctly, doesn't compile any more, so return an empty array instead.