This implementation relies more on native Gtk calculations
wothout the need of adding static padding to fit the coordinates.
Additionally it honors data dependent sizing and differences
between Gtk2 and Gtk3.
Gtk3 uses a new preferred size pattern and the old Gtk2
Gtk.CellRenderer.GetSize method has been removed from
the official API. The extension uses the new pattern to
get back the old behaviour.
the Gtk.Editable.TextInserted event can not be stopped by
setting TextInsertedArgs.RetVal = true like other Gtk events.
Use g_signal_stop_emission_by_name, if the signal has been handled
by the user already.
Handles the TextInserted event if the controlled Gtk Widget implements Gtk.IEditable.
Otherwise Gtk.IMMulticontext is used to get the typed text. Key recognition
and conversion is managed by the os specific input method in this case.
When using a TextEntry for instance, setting a WidthRequest of 30 wouldn't
work because, although the rest of the Xwt layout system do take it into
account, the default natural width of 100 for a TextEntry is used for the
last call to Measure on the WPF side which mean it will actually render as if
its width was 100 causing a lot of drawing issues.
CustomWidgetBackend will wrap its child in a WidgetPlacementWrapper
if the child has any margins set. The wrapper will inset the child
by the appropriate amount, but we also need to add that amount to
the total measured size of the Custom Widget
The 'FillDataStore' method uses the 'DataTypes' value to
figure out what values need to be copied over to the data store
which is given to the destination object. If we don't store these
values, no data is copied from the source store to the dest store
and drag/drop fails!
Fixes the ios designer on wpf mode when dragging from the toolbox
to the surface.
If the popover would overflow out of the bounds of its parent window, we try to use a few techniques (translation + arrow direction flip) to put it back inside it.
It turns out we cannot rely on the base implementation of SetFocus
because the 'Widget' property is a different object in our subclass.
This means if we want focus to work, we have to override all the methods
and make sure we invoke the same code but using the correct object.
This makes focus work again.
The 'GotFocus' and 'LostFocus' events should be implemented by
checking when the editor gets/loses focus. In order to do this
we need to create a custom field editor. This also allows us to
properly track the KeyDown/KeyUp events. The NSTextField itself
will not reliably get these events as they'll be consumed by the
editor.
Every other backend treats a dash-count of '0' to mean 'disable dash'.
Fix the XamMac backend to *not* break this behaviour by forcing a
dash count of '1' when the user tries to disable dashing.
There are two changes here:
1) We run our internal logic before letting the rest of the toolkit handle
the KeyUp event. This is so we always emit the event when the cursor position
changes, regardless of whether or not the user destroys the widget inside the
KeyUp handler they attached.
2) We null check 'CurrentEditor' and only access it if it's non-null. This
prevents a crash when destroying the editor inside the KeyUp handlers and
matches what the rest of the code does.