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.
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
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.
This allows showing radio buttons in wxDataViewCtrl easily and natively.
Notice that this approach, adding an extra function to the existing
renderer class instead of creating some new wxDataViewRadioRenderer (see
https://github.com/wxWidgets/wxWidgets/pull/809), was finally chosen
because it is simpler to implement and, more importantly, because it
will be more natural to generalize if/when we also add a 3-state
check/radio renderer.
Closes https://github.com/wxWidgets/wxWidgets/pull/853
The new method returns a boolean flag which indicates whether there is
any clipping region or not and so is preferable to using the old one and
checking its return value to determine this, which can't be done
reliably.
Include gdk/gdkkeysyms.h from wx/gtk/private/gtk2-compat.h as it must be
included before it for the compatibility header to define the new names
for the key constants even when using old GTK+ versions.
Add wx/gtk/private/wrapgtk.h wrapping gtk/gtk.h in pragmas disabling
these warnings and include it everywhere instead of directly including
gtk/gtk.h.
Also include wx/gtk/private/gtk2-compat.h from this wrapper header as it
was included by 90% of the files including gtk/gtk.h itself and it seems
to be better and simpler to just always include it.
The default alignment of the text in wxSpinCtrl was changed to "right"
in 7e4952db83, which added alignment
support (see #10621), but this made it inconsistent with the native
up-down control under MSW and, perhaps more importantly, with spin
controls created from XRC as the default style was never modified there
and did not include wxALIGN_RIGHT.
Resolve this inconsistency by reverting to left-aligning the text by
default.
Previously, TLW geometry was implicitly defined as just its position,
size and the maximized/iconized state by wxPersistentTLW code. This
already wasn't enough for wxGTK which added the decoration sizes to the
geometry being saved/restored, but this had to be done using conditional
compilation, which was not ideal. And it didn't allow using an entirely
different geometry representation as will be done for wxMSW soon.
Change the code to use wxTLWGeometry class defining the geometry, as
used by the current port, explicitly and move wxPersistentTLW logic into
it, as wxPersistentXXX classes are supposed to be very simple, which
wasn't really the case.
Also provide public SaveGeometry() and RestoreToGeometry() methods in
wxTopLevelWindow, which can be useful even to people not using
wxPersistentTLW for whatever reason.
There should be no changes in behaviour so far.
Prepare for using liblzma in wxWidgets code by adding the necessary
option and updating the configure check for it (which had been already
present due to libtiff possible dependency on liblzma).
No real changes yet.
Define g_signal_handlers_disconnect_by_data() if it's not available,
i.e. when using glib older than 2.32 where it was added, to fix the
build under old systems such as CentOS 6 broken by the changes of
8278f7b618 (see #18084).
Also use it elsewhere instead of g_signal_handlers_disconnect_matched()
as it's more readable.
Closes https://github.com/wxWidgets/wxWidgets/pull/760
The custom scheme handling implementation had been inherited from the
original WebKit1 implementation. It attempted to intercept navigation
and resource load requests and then inject the resources. It seems that
this method doesn't work in WebKit2, but fortunately, there is native
support in WebKit2 for custom URI schemes through the
webkit_web_context_register_uri_scheme() API.
Also extend wxGtkError to allow creating it from an existing GError
object as a side-effect of these changes.
See https://github.com/wxWidgets/wxWidgets/pull/716
The code was more complicated than necessary, with the base class
providing both virtual GtkOnCellChanged() and GtkOnTextEdited() that
were both overridden to achieve the same thing, namely customizing how
the value entered by user is converted to wxVariant, in different
derived classes.
Make GtkOnTextEdited() non-virtual and remove GtkOnCellChanged()
completely and add a new simple GtkGetValueFromString() which is called
from GtkOnTextEdited() to do the conversion.
This removes the existing code duplication and will make it simpler to
modify this code in the future, without changing the behaviour.
Make GTKHandleFocusOut() virtual and override it in wxChoice in order to
avoid generating wxEVT_KILL_FOCUS events when the combobox dropdown
button is clicked.
This is important because it allows fatal problems when using a
combobox-based in-place editor in wxDataViewCtrl as getting these events
totally broke the UI before.
See #17034.
Doing two different things in the same class, using m_isDynamicCompleter
to determine which kind of completion is used, was not very clear, so
create two simple classes each of which does one and one thing only and
create the one we need in wxTextEntry methods.
Note that wxTextAutoCompleteDynamic can assume to always have a valid
wxTextCompleter as otherwise no wxTextAutoCompleteData is needed at all,
which results in more simplifications.
There should be no changes in behaviour.
This allows to avoid initializing the variables to 0 in all the
overloaded ctors: wxSize default ctor already does it.
It's also more convenient to use GetScaledSize() rather than assigning
m_width and m_height separately, even if the rest of the code is broadly
unchanged.
We can reuse another ctor taking wxWindow* instead. Although this does
require an ugly cast, it's more explicit than just passing 0 which
could, in principle, match both the ctor taking wxWindow* and another
one taking double, and so is still preferable.
This is similar to the previous commit and is done for the same reasons:
screen DC needs to use the same DPI as the screen itself, instead of the
default Cairo 72 DPI.
For wxDC associated with a window, such as wx{Window,Client,Paint}DC,
this method should return the window PPI, not the hard coded 72 DPI of
Cairo graphics context.
This still doesn't work correctly when using multiple monitors with
different DPI settings, but is still a (modest) improvement.
This allows to call the protected wxWindowGTK::DoApplyWidgetStyle()
method when it's really necessary, e.g. when forwarding to it from
DoApplyWidgetStyle() implementation for another window.
It seems that MinGW-w32 started distributing GDI+ headers since this
version and MinGW-w64 might have supported them for even longer, but
it's difficult to test for the MinGW distribution used in this header,
as it is included before wx/msw/gccpriv.h which defines
__MINGW32_TOOLCHAIN__ and __MINGW64_TOOLCHAIN__ symbols and changing
this is tricky due to relative order of defining UNICODE and
wxUSE_UNICODE and including MinGW headers, which can only be included
once UNICODE is set properly.
But while the fully correct solution is difficult, just checking for the
compiler version should solve the problem in 99.99% of the cases in
practice as there should be vanishingly few people using MinGW-w64 with
gcc < 4.8 currently, so this simple solution is good enough.
Closes#17973.
Handle this feature as all the other ones and provide a configure switch
and a setup.h option to disable it if necessary, as it may be desirable
to do it, especially under Linux, to avoid extra dependency on pangoft2
if this functionality is unnecessary.
Use wx_is_at_least_gtk2(minor) instead of gtk_check_version(2, minor)
because it is more clear and also works as expected (i.e. returns true)
when using GTK+ 3 instead of creating difficult to notice bugs in the
code by failing the version check in this case.
See #18004.