Граф коммитов

2404 Коммитов

Автор SHA1 Сообщение Дата
Vsevolod Kukol 92a3975d63 Merge pull request #433 from sevoku/extend-fix-cellbounds
Extend cell bounds API, various Gtk fixes, Mac impl.
2015-07-01 12:22:48 +02:00
Vsevolod Kukol edeb73a323 [Mac] fix build with XamMac2 2015-07-01 11:33:12 +02:00
Vsevolod Kukol 65bfff9020 [XamMac] fix nint cast in TreeViewBackend 2015-07-01 11:08:23 +02:00
Vsevolod Kukol 8f105b7bcb [Mac] fix exception in TreeView.GetRowAtPosition
Return null if there is no valid row at the specified
position in TreeViewBackend.GetRowAtPosition.
2015-07-01 11:08:23 +02:00
Vsevolod Kukol 8f0e09afd5 [Mac] remove tree column mapping for bounds
Use CellViewBackend.Column to retrieve the column
index from a cell.
2015-07-01 11:08:23 +02:00
Vsevolod Kukol bd010fd1c9 [Wpf] add new tree cell bounds retrival impl. 2015-07-01 11:08:23 +02:00
Vsevolod Kukol 74d0b3ba66 Optimize cell bounds examples 2015-07-01 11:08:23 +02:00
Vsevolod Kukol 736864be6f [Gtk] adjust mouse event positions
the mouse coordinates in events emitted by
the Gtk.TreeView do not include the column headers
and have an offset to the frontend bounds.
2015-07-01 11:08:23 +02:00
Vsevolod Kukol 36356404ba [Gtk] fix tree cell size calculation
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.
2015-07-01 11:08:23 +02:00
Vsevolod Kukol 74ca64ff03 [Gtk3] add Gtk.CellRenderer.GetSize extension
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.
2015-07-01 11:08:23 +02:00
Vsevolod Kukol 185a2c3f73 [Gtk] add new tree cell bounds retrival impl. 2015-07-01 11:07:53 +02:00
Vsevolod Kukol 7d2c224b28 [Mac] add new tree cell bounds retrival impl. 2015-07-01 11:07:53 +02:00
Vsevolod Kukol c25508f197 Add tree, list cell bounds retrival samples 2015-07-01 11:07:53 +02:00
Vsevolod Kukol 3db86554a7 Add tree row bounds, position retrival API 2015-07-01 11:06:44 +02:00
Vsevolod Kukol 8305b6924b Merge pull request #506 from sevoku/fix-radiobutton-menu
Fix RadioButtonMenuItem group handling
2015-06-30 19:41:06 +02:00
Vsevolod Kukol cadc60a8c8 [Gtk] optimize GtkInterop 2015-06-30 19:15:53 +02:00
Vsevolod Kukol a1adb29caa [Gtk3] add missing fontconfig dllmap 2015-06-30 19:15:53 +02:00
Jo Shields e894d701de Add a dllmap for fontconfig 2015-06-30 19:15:53 +02:00
Jo Shields 4a4f8f0580 Use static dllimport name for libpangocairo 2015-06-30 19:15:53 +02:00
Vsevolod Kukol aca1faa9ed [Mac] Track API changes (TextInput) 2015-06-30 19:03:40 +02:00
Vsevolod Kukol 5dffa2e99f Merge pull request #384 from sevoku/text-input
TextInput event optimization
2015-06-30 18:47:51 +02:00
Vsevolod Kukol 181321e07f [Gtk] fix TextInput event stop request
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.
2015-06-30 17:17:11 +02:00
Vsevolod Kukol 7898f82c0a [Gtk] add TextInput event support
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.
2015-06-30 17:15:42 +02:00
Vsevolod Kukol a563bb1685 rename PreviewTextInput event to TextInput
Xwt has no preview events. To stop an event, the Handled property
of the event arguments object should be used.
2015-06-30 17:15:37 +02:00
Vsevolod Kukol b7926331dd [Gtk] fix secondary text markup in alert dialogs
fixes #521
2015-06-21 21:57:06 +02:00
Jeremie Laval eb15d4f3f9 [Xwt.WPF] Make sure natural size don't override size constraints
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.
2015-06-19 15:52:45 -04:00
Jeremie Laval 2a60250647 [Xwt.WPF] Fix popover style and placement 2015-06-19 15:52:23 -04:00
Jeremie Laval 0eb3b00980 [Xwt.WPF] Make sure the label of a composite button has the right ForegroundColor
If the ForegroundColor of the external button is changed by another mean,
we want anything that depends on it also following that update.
2015-06-19 15:52:04 -04:00
Jérémie Laval 78193f68ad [Xwt.Wpf] Add missing stub 2015-06-11 12:45:43 -04:00
Jérémie Laval d09a252360 [Xwt] Expand on cf3fe0f and let user also setup a custom autocomplete match function.
Implementation included for Xwt.Gtk
2015-06-10 16:15:58 -04:00
Jérémie Laval bea7d06e01 [Gtk] Align left the label of menu button when the button is larger than its content. 2015-06-02 15:22:07 -04:00
Alex Corrado 5b523dc0b5 [WPF] Fix popover positioning with top arrow position
The popover should not obscure the content it is poping under.
This matches the behavior of the Mac backend.
2015-06-01 18:46:48 -05:00
Alex Corrado b93128864d Embedded native widgets should also participate in sizing 2015-06-01 18:39:15 -05:00
Alex Corrado 656599906b [Mac] Fix size calculation for extracted Custom Widget
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
2015-05-27 19:24:32 -04:00
Alex Corrado a697dacbf6 [Mac] Fix sizing of embedded (wrapped) native NSViews
The EmbeddedNativeWidget creates its own parent NSView and we need
to configure it to correctly size the child (the actual embedded view)
2015-05-27 19:22:38 -04:00
Alan McGovern a987a4a0f6 [Xwt.Mac] Obey the value passed to 'MenuItem.Sensitive'
MacOS will set all items enabled by when they are made visible
if this boolean is not set.

https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/MenuList/Articles/EnablingMenuItems.html
2015-05-18 14:17:45 +01:00
Lluis Sanchez 3815aa6fa5 Fix build 2015-05-18 11:31:54 +02:00
Alan McGovern ebf2ca54fb Fix compilation 2015-05-18 08:47:01 +01:00
Jérémie Laval cf3fe0f3bc [Xwt] Add simple method to register autocompletion data on entry widgets.
Currently only implemented for the Gtk+ backend.
2015-05-14 15:10:36 -04:00
Jérémie Laval 48076d177e [Xwt.Gtk] Apply font settings to composite buttons 2015-05-12 17:50:37 -04:00
Lluis Sanchez Gual ca15fd675b Merge remote-tracking branch 'origin/xammac2' 2015-05-12 18:17:27 +02:00
Jérémie Laval 2cf5df5ef9 [Xwt] Allow Gradient instances to be shared among toolkits using InitForToolkit pattern 2015-05-08 12:32:14 -04:00
Alan McGovern fecebb2267 [Xwt.Wpf] Properly handle TargetTypes
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.
2015-04-24 19:36:31 +01:00
Jérémie Laval 7cf4213ad2 [Xwt.Gtk] Improve Popover positioning to take into account window geometry.
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.
2015-04-24 10:16:25 -04:00
Jérémie Laval 98fc856d5d [Xwt] Add property to TextLayout to query its baseline
This allow proper vertical centering of custom drawn text.
2015-04-22 14:46:01 -04:00
Alan McGovern 2dce5aa7ec [Xwt.XamMac] Gross hack to fix focusing for Xwt.TextEntry (again!)
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.
2015-04-22 15:57:51 +01:00
Alan McGovern 1e31b7315a [Xwt.XamMac] Fix TextEntry for this backend
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.
2015-04-22 11:55:28 +01:00
Alan McGovern d89fe856c8 [Xwt.XamMac] Fix a regression in e1275a29
There were some missing braces, so commit e1275a29 resulted in the
event *always* emitting. Oops.
2015-04-21 11:39:27 +01:00
Alan McGovern 825bb042a7 [Xwt.Mac] Make it possible to disable dash in Xwt.Drawing.Context
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.
2015-04-20 15:23:35 +01:00
Alan McGovern e1275a2995 [Xwt.Mac] Don't crash if the TextEntry is destroyed while inside a KeyUp
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.
2015-04-20 12:40:52 +01:00