* Added LayoutGroup and LayoutItem classes in NUI.
This was done by using bindings wrapper classes for LayoutItem,
LayoutGroup, LayoutMeasureSpec, LayoutLength, and LayoutMeasuredSize.
Change-Id: I19e28bdff59a62cf1c8e8711f50f9f0e8f1c119a
* Layouting support in NUI
Change-Id: I3d6f688d869faa81c34385db37feceb1d8c1d0c0
* Fixed disposed bug and removed RegisterChildProperties API usage.
Change-Id: I7b71bd1a3a03306897abdf3c263c6bbb65c1bff8
* RootLayout added to Window
Change-Id: Ie47ceec452b5f254950263bdaf661e9e3fe86d1f
* All Layers have an Absolute layout
Change-Id: I08281a25b2b73822b45f5c6a567b574b5af74fb4
* Set View.Size2D sets layout minimum size if exists.
Change-Id: Ide73c78957d9ee5d4799bfff4aa2232b87ffa536
* [NUI] Minimize public api for xaml
Change-Id: Ib1426b1956a2af307bd6128d6b97067b0d732847
* Renaming of rootlayer in Layer.cs
Change-Id: I583f49caaad819cabaca83b09c9c7dd9c2b9a331
* Fix NUI nested layout issue
Change-Id: I68edd6cf8295e06a52655d84b8ce039a4e1f1008
* [NUI] Back-sync Samsung/TizenFX into dalihub/TizenFX
Change-Id: Ib63e792bc3474c9226506f30889994219e237ec1
* [NUI] Remove tabs and redundant spaces
Change-Id: I1d512d7f478e532f76629b2529995386820fc764
* Sync dalihub/TizenFX and Samsung/TizenFX
- [NUI] Remove apis which are using internal APIs (#324)
Some apis are using DALi internal APIs.
Clean up these wrong apis to prevent future errors.
Signed-off-by: minho.sun <minho.sun@samsung.com>
Change-Id: I77f773ec84f93f69684c2bdad26d9721f8ed705d
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* Sync dalihub/TizenFX and Samsung/TizenFX for NUI-XAML related changes
Change-Id: Ied6a4e33d462712672e65763572c6aa88065a897
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* Support multi-cascade property setting for Size2D and Position2D
Change-Id: Ibeb9e9ec639742b78054fe8592167170ea0f00d2
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* Add Mouse button type to identify clicked button kind
Change-Id: Id336dacccff8192a17cda552ba8ea2ba01121002
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* [NUI] Fix dereferenced error
Value trans, which has null value,
is dereferenced in member access expression trans.Name
Change-Id: I5b7fa2a0e96689ff0cc0821f2e931ed3c4001e9d
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* [NUI]Remove ContentProperty attribute and update sample
Change-Id: I0fbb60bf00c609779b6f5ff4d8aff58a26a8819e
* [NUI] Fix children count of LayoutGroup bug
Change-Id: I73c3b597b161a2dbf4a52d37e6f5a0ab4858c11b
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* [NUI] Make Layout APIs as internal ones (will be changed as public APIs later)
Conflicts:
src/Tizen.NUI/src/internal/Layouting/LayoutGroupWrapper.cs
src/Tizen.NUI/src/internal/Layouting/LayoutItemWrapper.cs
Change-Id: Ia64e9216d10ecc986e0e977f2e0633a03813faec
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* Fix View Size2D.
We force Size2D by setting fixed width & height specifications.
There is no really another way in new layouting without breaking
new layouting design.
Also MinimumSize will set now Layout.MinimumSize.
Change-Id: I65c7eaab8210c83b9097426a14c8877173d11f90
* [NUI] Change Parameter type of KeyboardRepeatInfo APIs
- Changed the parameters type of KeyboardRepeatInfo APIs
: 'double' type -> 'float' type
Change-Id: I3940e44a1a2c116988e8c947ae81d118ac266000
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
* [NUI] Fix getting ClippingMode error
Change-Id: I2379ec6adda1442e819d2adbaa9751e5dd154996
* [NUI] Fix animation flickering issue.
Change-Id: Idd3e28ac861a6fa33ad316e4bcae6a7b2199c0de
Signed-off-by: Feng Jin <feng16.jin@samsung.com>
* [NUI] Remove redundant logs
Change-Id: Ic7ec157fe8117b613d0d008f68e74cf7c4bccf64
* [NUI] Fix KeyValue issue
Change-Id: I1970a61633fba277379a43035cf84ec2871d1cdd
* [NUI]public BindableObject.GetValue and BindableObject.SetValue to enable other modules(EX.Tizen.TV.NUI) to implement data binding.
Change-Id: Ibb048e668e765a96f1e8553951e4073b181e9a84
Signed-off-by: Feng Jin <feng16.jin@samsung.com>
* [NUI]Add protect codes in API View::Add
1. Add protect codes, so that if the child is null, this API won't don anything.
Change-Id: Icfd7e2cbb08b99ed962660edb88e8797bad2b654
* [NUI] public gesture detector.
Change-Id: Ife9902fe77b43f2c422a1a2ebeaf474d13e67589
Signed-off-by: Feng Jin <feng16.jin@samsung.com>
* GridLayout added
Change-Id: I67916a0e2a8efde6fd8d28daac79bca39d679d10
* Add PropertyValue.Get function for RelativeVector2, RelativeVector3, and RelativeVector4 type.
Change-Id: I181c51a6eea0a94721b28a48d8187673a3f0b88b
Signed-off-by: Feng Jin <feng16.jin@samsung.com>
* Explict assigning of Layouts to children
Allows legacy GridContainer to display it's children.
CustomLayouts children get a LayoutItem and displayed.
Change-Id: Ic3f900ae01800de77695b85a57661f886ee060b7
* [NUI] Add DestroyContext call before disposing TextField/TextEditor
In order to speed up IME hide, temporarily add DestroyContext call.
Change-Id: Id93c99f4d45061d4e406d36ced7a0ec09c8f2c34
* [NUI] VisualMap revising
Here are some changes:
Add VisualFittingMode property
Add Atlasing property
Add Shadow,Underline,Outline,Background property
Add RenderIfTransparent property
Change-Id: I8d85f9d1a438cb6fbb636f79c7438e9134e1df8f
* [NUI] Add visual test example
Change-Id: I25f41d969f7b98a494a4fa1716b0335c09ab5026
* [NUI] Add friend assembly for Tizen.TV.NUI.Component
Change-Id: I2fdc02205c03aa98260035fb81998d68514c030e
* View.cs assignement error and logging fix
Change-Id: Ic43213bb7e565f03f83d27df153d095b0e9f7143
* [NUI] Add support for changing the Rendering behavior
Change-Id: Ibbe3627659132fd40105482761795f62a92d1856
* Size2D set updates measure spec for all Views
Previously Size2D set only updated the WIDTH/HEIGHT MEASURESPEC
for Views that already had a Layout set.
But if the Size2D was set before the View added to it's parent
then the set size would not update the measure specs.
Change-Id: I28e731e5e6c6318231b5ba25108bf2daa9cd3411
* [NUI] Avoid raising InputMethodContext reference count
Change-Id: I25e89f41daa41008c81ae1b46fbb82c75a98a011
* [NUI] Add getter property for VisualFittingMode
Change-Id: I1ee389dd4a84f153e4a5d063fe3331a9525757eb
* [NUI] VisualMaps revising continue
Here are changes:
1. Update VisualFittingMode
2. Remove EditorBrowsable attribute
Change-Id: I2f272e822ba227fe255031b3574db325505e90e1
* [NUI] Add LinearLayout Alignment and Weight
Change-Id: I0ed3010fd27f8f4cb26126efc5547a301c69cf38
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
* SetLayoutRequired, IsLayoutRequired View API added
Change-Id: I6b4351901ad841c04f92b22be62c43f7f20b9263
* Fixes required after https://review.tizen.org/gerrit/#/c/189231/
Removal of dangerous float conversion
Change-Id: I6766c8747865c229a1df3ed669a1d9ab90fefdc4
* Update LayoutItem doxygen for Minimum(Width|Height) API.
Change-Id: I0ead74f919c73823cb6f4b241bea81cbcdde4c98
* [NUI] Fix LayoutItemWrapperImpl null issue
Change-Id: I158533d132eb81c4681d8ff622124ba45bfe0e4b
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* [NUI] Fix RenderingBehavior issue
Change-Id: I35b83e115fd60d2b43ed49c2a35a0f34377e55c2
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* [NUI] Support Resource path when using xaml
Change-Id: I066c4a6b051bfdcc5fa6b26f9f784a2be5a255a7
* [NUI] Public ChildAdded,ChildRemoved,PropertySet events & properties of TableView.CellPosition
Change-Id: I77b58a63e863b16e9eeef8c09da9ae5160f5e735
* [NUI] Public some apis of TableView,Animation,NUIApplication
Change-Id: I280e6389cb9d2aa537d72c183b1547ee807fcfd6
* Layer SetLayoutingRequired for added Views
Change-Id: I7e9ead91ddec74fee998bdafc0e9249ffe250453
* [NUI] Add comment
Add Size, Size2D comment
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
Change-Id: Ic790ea0af14e9aa76314e92ac74a034ab2f7985c
* [NUI] Fix ImageLoadThread issue
PLM ID : [
DF181025-02207],[
DF181005-00132],[
DF180906-00491]
heap-use-after-free issue using ASAN.
The application's destructor was not called after terminated.
The Join of ImageLoadThread was not called in ImageLoadThread's destructor.
The cause is that AnimationImpl is still referenced in C#.
Resolve by explicitly calling dispose.
Change-Id: Ica66a8a7a17ff305777c173be33e0a196213e566
* All Views in a tree can be layouts
Prior to this fix a View with children within a View would
not become a layout if the parent View did not have SetLayout
explicitly called on it.
Change-Id: Ibf9b214f907a0ea8df30f54269626747c50499ca
* [NUI] Set LayoutItem Width/Height specification
Change-Id: Idec264329f6dc20db4692fba84ac8ee1f95067aa
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* [NUI] Public some apis for TCT and fix an issue
Here are some changes:
1. public ScrollViewPagePathEffect class
2. public TypeRegistry class
3. public PinchGesture constructor
4. public SetScrollPropertySource api
5. Fix ScrollInterval event issue
Change-Id: I649f0fc464a5af0453475b7ef0dcf4df614eb34e
* [NUI] Modify since_tizen tag
Change-Id: Ib9ee882177d2372b8f132542cb235a3fcae5e734
* [NUI] Fix build error
Change-Id: Ib1ff4dcb142ce09539dbef3b567f649e40459527
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* LayoutGroup to layout children
Change-Id: Idff81189013e4cb0e85a8bbf13e268170b8aad31
* [NUI] Add reverse support for parse
Change-Id: Ia6f55508e34cf5adbf23d0f9acd4f69da7b6d3c5
* Disable layouting until set Layout
Added a (static) flag that is set once a Layout is set on any View.
Until this flag is set automatic Layout setting will not occur
Change-Id: Ieff5ed12df75a062a899831681f138c5aa3b6e1f
* [NUI] Fix ParentOrigin doesn't work when using XAML
Change-Id: I53e4b18b6c24db79c16c75b758613113152c5b25
* Remove build warnings
Change-Id: I8744e8f690a4e93b199dc762c14607bd8b191718
* VisualFactory Instance to retreive from native
VisualFactory.Get() is deprecated whilst Instance just gets the C# class.
Added call to native to return the native VisualFactory when Instance used.
Change-Id: I3be36e8f6cb70a2a1b2128c7d934fa45fe5bf570
* [NUI] Fix State issue of View
Change-Id: Ide87c43406e55b9399f191dd76f8fb0b68b0cae9
* Map non dependant ResizePolicies to Specs.
Maps NaturalSize, FillToParent and FitToChildren to the
new layouting specifications.
NaturalSize is mapped to a fixed value.
Parent relative mappings not done here, need to be done in the
measure once parent sizes known.
Change-Id: I1f11a9dca126541cd534a386583fc36f97646ed4
* [NUI] Clean NUI codes from Adaptor.cs to Window.cs
Change-Id: Ic1e5458dd1b3b4ac43cff028204254ac378d2f86
* [NUI] Add test sample for C# binding of MatchSystemLanguageDirection
Change-Id: I0ac4e82c0e026ee1c5074ec00fb4677c4690ddfe
* Remove StereoMode
Change-Id: If19a2e403114bf5375e914584e1e7fa513f7d889
* Sync dalihub and Samsung's TizenFX codes
Change-Id: I634fbe56ff9772c05f5ba59736289b3eca7d3def
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* [NUI] Remove deprecated APIs in native DALi
Change-Id: Icc5d90e6e5752fc3b24ce3ea29cd11a89280b4b7
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
* [NUI] Clean code: BaseComponents,UIComponents,CustomView
Change-Id: I6fbd47154f179ba3a908d140f0cfb267c1e76c2d
* [NUI] Manual merge from tizen50
Merged patches from tizenfx tizen_50 branch
- [NUI] Fix Svace issue (#534), Add to check Null value (View.cs)
- [NUI] Fix SizeWidth/Height issue (#555) (View.cs)
- [NUI] ResizePolicy UseNaturalSize mapped to WrapContent (#613) (View.cs)
- Improve the performance when firstly create the View (#642) (ImageView.cs, Scrollable.cs, TableView.cs, TextEditor.cs, TextField.cs, TextLabel.cs, VideoView.cs, View.cs)
- [NUI] Remove GL/VK if-else, reduce dll size (#649) (LayoutPINVOKE.cs, ManualPINVOKE.cs, NDalicPINVOKE.cs, NUIApplication.cs)
Change-Id: I846ad3353dd7d6ef78ec096565e491d7a6eef44a
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* [NUI] Sync dalihub and Samsung's TizenFX codes.
Change-Id: I8278896c39209e076cc7e1cce3fee63a6e3a53ad
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* [NUI] modify GetHashCode()
Change-Id: Ib642ba64e746fb811be7a5e7e2cb4e82d5c6eb8a
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* [NUI] Fix VD svace issue
- add null check
- add lock
Change-Id: I706d1b0314e1e9096597eedc01593932945286e1
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* [NUI] Fix VD Svace issue
Change-Id: I032ed4e562603441be4d26be68e29e0081e8c917
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* [NUI] Remove all warnings
Change-Id: I399e6395c83664040999f4f204f51970de1dc5df
* [NUI] Add API for get the original size of image
* [NUI] Codacy error fix
Change-Id: Ib407c7be01ad4e42913bf7896edc050e9b4bd370
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* Make some apis as inhouse, will be internal later
Change-Id: I0fc398a3b33eaab5fd12df5e8f183d9c94ab7049
* Adding LayoutController
LayoutController from C# exclusive Layouting (LayoutingEx)
where all layouting in processed in the NUI side.
Change-Id: Ic97166e51cd2ef173f6685659f53f53253c93b21
* [NUI] Fix NUI Manual TCT issue
Add Null Checker
Change-Id: If07ebc246bad5a55f5614a10fb2f63f4bdd4115e
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* [NUI] Fix PropertyMap setting issue
Change-Id: I90548287836a4e4338c3a6d2dd5c1802ef24f876
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* [NUI] Fix svace issue
Change-Id: I014294612530f600c14c237484f95dfff0c5ec96
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* [NUI] Update comments of ImfManager and InputMethodContext
Change-Id: I72cdb3665f2e6ee3d2e355c7d18e41f74c09bba6
* Override Equals function for Color.
Signed-off-by: Feng Jin <feng16.jin@samsung.com>
* [NUI] Remove unuseful ApplicationExtensions
Change-Id: Iba33bce373883d5f049e6d4e146d9e3dd33fdf44
* Fix ImageView issues:
(1)Cannot get the correct ResourceUrl after seting the Border.
(2)The ImageView with empty url will show the default picture after seting the Border(Actualy it should show nothing).
Signed-off-by: Feng Jin <feng16.jin@samsung.com>
* add support for CustomView OnTouch callback
Change-Id: I713a91e931e58b38a09c4838a2a3fd0ace5de749
* Adding MeasureSpecification class
Class for C# exclusive layouting
Change-Id: I189fcf297c098e0b0446466de3aa0f4dadb26448
* Adding LayoutLengthEx class
Change-Id: Ic12e7d33eaa50f66bdcd55a058f1562ad42ab4ad
* Adding LayoutSizeEx class
Change-Id: I15738a2fc8c40da90ebe89888cf1779b9124b98e
* Adding MeasuredSizeEx
Change-Id: Ia8fc53d8c1700e90d00870eef22fea9b6a0b1169
* Fix svace issue
Signed-off-by: Feng Jin <feng16.jin@samsung.com>
* [NUI] Fixed some warnings
Change-Id: Id8e1c1502370f600276b30f13607b387270d7ece
* [NUI] Sync Xaml code to newest (#795)
* C# exclusive layouting
Squashed commit of the following:
updated TizenFX layouting tests
GridLayout change columns bug
Replacing EX class suffixes
Removing existing Layout code
Remove fix, Margin fix and other fixes
1) Ensure removing a View from a container removes the LayoutItem from the LayoutGroup.
2) Setting fixed specs also sets size of View.
3) LayoutController to MATCH_PARENT on height not just width.
4) Margin support added although bug raised for toolkit error/
Nested Layout support
LayoutController multiple roots
1) Layouting can now starts from the first View assigned at Layout.
2) Previously had to start from the Window and then all Views would need a layout.
3) Multiple starting roots are supported.
Remove AbsoluteLayout from Layer, Child removal fixed.
Changing Layouts bug
Pure C# Grid Layout
Updating unmanaged GridLayout to a Pure C# implementation
Ensure RequestLayout is called when layout dirty
1) When a child is added to a Layout the ForceLayout flag needs setting.
2) Also changing parameters of a Layout can require a ForceLayout.
LayoutParamsPolices now a class
1) Previous an enum which required casting to an int when comparing.
2) Now a class with defined ints.
AbsoluteLayout updated to pure C#
Adding LinearLayoutEx
Adding Layout base classes and updates to View, Window
Added ILayoutParent,LayoutGroupEx and LayoutItemEx and LayoutData
Ex classes will replace the existing classes before this branch is merged.
Change-Id: I5da5b7853d1a19194f8a390f7913cf1ace1146fa
* [NUI] Sync with Samsung/TizenFX master branch (tizen_5.5)
Change-Id: I604d42cfb21e97199e81dcdd5b3957b8f40660fb
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* [NUI] select the whole text of text-field.
In some cases, the whole text of text-field need be selected,
and grab_handle and its popup need be disabled.
Change-Id: I6533842ba4742e356f770734d543ace63490a8e9
* LayoutItem to store View's Margin || Padding if Layout set
Prevents the legacy size negotiation repositioning View with Margins
or Padding..
Control-impl Resets position and size if Margin or Padding set.
Solution here is to move Margin and Padding storage from View to LayoutItem so
native code will not find a margin or padding hence not try to reset positions.
Change-Id: I1d874fa854b0f229059ddfa3476b1426014d075e
* [NUI] Fix build warnings
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
Change-Id: Id9956349222ca215fde7034f65c99482a3898286
* Removal of Layouting Logs
Change-Id: Ifafe4960d6d0cf4f2490025f50bdd9dc34804639
* fix
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* [NUI]Fix issue
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
# Auto-generated from csapi-tizenfx.spec.in by makespec.sh
%define TIZEN_NET_API_VERSION 6
-%define TIZEN_NET_RPM_VERSION 6.0.0.999+nui505
+%define TIZEN_NET_RPM_VERSION 6.0.0.999+nui550
%define TIZEN_NET_NUGET_VERSION 6.0.0.99999
%define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
[assembly: InternalsVisibleTo("Tizen.TV.NUI.Example, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed445c2a988d35b99e5766f42eef33d89d1f67225db051f011abcfce47a4788875c39750a2e5695f1ec117f41d96610419811762669f98131db30a6e64c6bb8fde3731f373f6cda4c0087d121f5108559f216dc015807dc46ec5a4d1b63f5deff64c01754a0db0dc849bc300672572cbd2697432ab6c193ebf9fade6bf0f2aad")]
[assembly: InternalsVisibleTo("NuiSample, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a5bcf6fb6095141fa8146ec74d5b0be8b09a063f8f1f32604b10df6e498788182840bd15c93ba1a5c0b9aeee8fe2be42ea9c0b5fe32e1d6d5602b2a4fa813114fd58c4b2910d93e5181b90925458b4b8b003c30d97830a17ad90a92f34f60a11f67a78757e6b2035e799be5ab69a41ede17cad2e2b7967fbf49b685452496be0")]
+[assembly: InternalsVisibleTo("Tizen.TV.FLUX, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed445c2a988d35b99e5766f42eef33d89d1f67225db051f011abcfce47a4788875c39750a2e5695f1ec117f41d96610419811762669f98131db30a6e64c6bb8fde3731f373f6cda4c0087d121f5108559f216dc015807dc46ec5a4d1b63f5deff64c01754a0db0dc849bc300672572cbd2697432ab6c193ebf9fade6bf0f2aad")]
+[assembly: InternalsVisibleTo("Tizen.TV.FLUX.Component, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed445c2a988d35b99e5766f42eef33d89d1f67225db051f011abcfce47a4788875c39750a2e5695f1ec117f41d96610419811762669f98131db30a6e64c6bb8fde3731f373f6cda4c0087d121f5108559f216dc015807dc46ec5a4d1b63f5deff64c01754a0db0dc849bc300672572cbd2697432ab6c193ebf9fade6bf0f2aad")]
+[assembly: InternalsVisibleTo("Tizen.TV.FLUX.Example, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed445c2a988d35b99e5766f42eef33d89d1f67225db051f011abcfce47a4788875c39750a2e5695f1ec117f41d96610419811762669f98131db30a6e64c6bb8fde3731f373f6cda4c0087d121f5108559f216dc015807dc46ec5a4d1b63f5deff64c01754a0db0dc849bc300672572cbd2697432ab6c193ebf9fade6bf0f2aad")]
+
+
namespace Tizen.NUI
{
}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_TextField_Property_ELLIPSIS_get")]
public static extern int TextField_Property_ELLIPSIS_get();
+
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_TextField_SelectWholeText")]
+ public static extern void TextField_SelectWholeText(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_TextField_Property_ENABLE_GRAB_HANDLE_get")]
+ public static extern int TextField_Property_ENABLE_GRAB_HANDLE_get();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_TextField_Property_ENABLE_GRAB_HANDLE_POPUP_get")]
+ public static extern int TextField_Property_ENABLE_GRAB_HANDLE_POPUP_get();
}
}
}
Tizen.Log.Error("NUI", "Create NDalicPINVOKE");
}
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_BaseHandle")]
+ public static extern void delete_BaseHandle(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Application_SWIGUpcast")]
public static extern global::System.IntPtr Application_SWIGUpcast(global::System.IntPtr jarg1);
protected override void OnMeasure(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
{
- Log.Info("NUI", "Measuring[" + _children.Count + "] child(ren)\n");
float totalHeight = 0.0f;
float totalWidth = 0.0f;
// Store current width and height needed to contain all children.
totalWidth = maxPositionX - minPositionX;
totalHeight = maxPositionY - minPositionY;
- Log.Info( "NUI" , "AbsoluteLayout::OnMeasure child width(" + childWidth + ") height(" + childHeight + ")\n" );
if (childLayout.MeasuredWidthAndState.State == MeasuredSize.StateType.MeasuredSizeTooSmall)
{
}
}
- Log.Info( "NUI" , "AbsoluteLayout::OnMeasure total width(" + totalWidth + ") total height(" + totalHeight + ")\n" );
MeasuredSize widthSizeAndState = ResolveSizeAndState(new LayoutLength(totalWidth), widthMeasureSpec, MeasuredSize.StateType.MeasuredSizeOK);
MeasuredSize heightSizeAndState = ResolveSizeAndState(new LayoutLength(totalHeight), heightMeasureSpec, MeasuredSize.StateType.MeasuredSizeOK);
LayoutLength childLeft = new LayoutLength(childPosition.X);
LayoutLength childTop = new LayoutLength(childPosition.Y);
- Log.Info("NUI", "Child View:" + childLayout.Owner.Name
- + " position(" + childLeft.AsRoundedValue() + ", "
- + childTop.AsRoundedValue() + ") width:"
- + childWidth.AsRoundedValue() + " height:"
- + childHeight.AsRoundedValue() + "\n");
-
childLayout.Layout( childLeft, childTop, childLeft + childWidth, childTop + childHeight );
}
}
int desiredChildHeight;
int desiredChildWidth;
- Extents gridLayoutPadding = Owner.Padding;
+ Extents gridLayoutPadding = Padding;
var childCount = _children.Count;
desiredChildWidth = (int)childLayoutItem.MeasuredWidth.Size.AsRoundedValue();
// If child has a margin then add it to desired size
- Extents childMargin = childOwner.Margin;
+
+ Extents childMargin = childLayoutItem.Margin;
desiredChildHeight += childMargin.Top + childMargin.Bottom;
desiredChildWidth += childMargin.Start + childMargin.End;
_totalWidth = desiredChildWidth * _columns;
- Log.Info("NUI", "Grid::OnMeasure TotalDesiredWidth(" + _totalWidth + ") \n" );
// Include padding for max and min checks
_totalWidth += gridLayoutPadding.Start + gridLayoutPadding.End;
availableContentWidth = _totalWidth - gridLayoutPadding.Start - gridLayoutPadding.End;
widthSize = _totalWidth;
- Log.Info("NUI", "Grid::OnMeasure availableContentWidth:" + availableContentWidth + " TotalWidth(" + _totalWidth + ") \n" );
// HEIGHT SPECIFICATIONS
// heightMode EXACTLY so grid must be the given height
{
_totalHeight += desiredChildHeight;
}
- Log.Info( "NUI", "Grid::OnMeasure TotalDesiredHeight(" + _totalHeight + ") \n" );
// Ensure ourHeight does not exceed specified at most height
_totalHeight = Math.Min( _totalHeight, heightSize );
{
List<GridLocations.Cell> locations = _locations.GetLocations();
- Extents gridLayoutPadding = Owner.Padding;
+ Extents gridLayoutPadding = Padding;
Extents childMargins = new Extents();
// Margin for all children dependant on if set on first child
if( _children.Count > 0 )
{
- childMargins = _children[0]?.Owner?.Margin;
+ childMargins = _children[0]?.Margin;
}
int index = 0;
int y1 = locations[ index ].Top;
int y2 = locations[ index ].Bottom;
- Log.Info("NUI", "CellSize(" + (x2-x1) + "," + (y2-y1) +
- ") CellPos(" + x1 + "," + y1 + "," + x2 + "," + y2 +")\n");
-
// Offset children by the grids padding if present
x1 += gridLayoutPadding.Start;
x2 += gridLayoutPadding.Start;
rowHeight = (availableHeight / numberOfRows);
}
- Log.Info("NUI", "ColumnWidth[" + columnWidth + "] RowHeight[" +rowHeight + "] NumberOfRows["
- + numberOfRows + "] NumberOfColumns[" + numberOfColumns +"]\n");
-
int y1 = 0;
int y2 = y1 + rowHeight;
}
}
+
/// <summary>
/// Destructor which adds LayoutController to the Dispose queue.
/// </summary>
{
if (rootNode.GetType() == typeof(View))
{
- Log.Info("NUI", "Creating LayoutGroup for " + rootNode.Name + "\n");
rootNode.Layout = new LayoutGroup();
AutomaticallyAssignLayouts(rootNode);
}
else
{
- Log.Info("NUI", "Creating LayoutItem for " + rootNode.Name + "\n");
rootNode.Layout = new LayoutItem();
}
}
rootSize = new Size2D(_window.Size.Width, _window.Size.Height);
}
- Log.Info("NUI", "Root parent size(" + rootSize.Width + "," + rootSize.Height + ")\n");
-
// Determine measure specification for root.
// The root layout policy could be an exact size, be match parent or wrap children.
// If wrap children then at most it can be the root parent size.
/// </summary>
private void Process(int id)
{
- Log.Info("NUI", "LayoutController Process id:" + id + "\n");
-
Layer defaultLayer = _window.GetDefaultLayer();
for (uint i = 0; i < defaultLayer.ChildCount; i++)
{
View view = defaultLayer.GetChildAt(i);
FindRootLayouts(view);
}
+
}
/// <summary>
/// </summary>
public virtual void Add(LayoutItem childLayout)
{
- Log.Info("NUI","Add Layout:" + childLayout.Owner.Name + " to Layout:" + Owner.Name + "\n");
_children.Add(childLayout);
childLayout.SetParent(this);
OnChildAdd(childLayout);
/// </summary>
public void RemoveAll()
{
- Log.Info("NUI","Removing:" + _children.Count + "\n");
foreach( LayoutItem childLayout in _children )
{
childLayout.Owner = null;
private void AddChildToLayoutGroup(View child)
{
- Log.Info("NUI", "Adding child View:" + child.Name + " to Layout:" + Owner?.Name + "\n");
-
// Only give children a layout if their parent is an explicit container or a pure View.
// Pure View meaning not derived from a View, e.g a Legacy container.
// layoutSet flag is true when the View became a layout using the set Layout API opposed to automatically due to it's parent.
// Only wrap View with a Layout if a child a pure View or Layout explicitly set on this Layout
if ((true == Owner.layoutSet || GetType() == typeof(View)))
{
- Log.Info("NUI", "Parent[" + Owner.Name + "] Layout set[" + Owner.layoutSet.ToString() + "] Pure View[" + (!Owner.layoutSet).ToString() + "]\n");
// If child of this layout is a pure View then assign it a LayoutGroup
// If the child is derived from a View then it may be a legacy or existing container hence will do layouting itself.
if (child.GetType() == typeof(View))
{
- Log.Info("NUI", "Creating LayoutGroup for " + child.Name + "]\n");
child.Layout = new LayoutGroup();
}
else
{
// Adding child as a leaf, layouting will not propagate past this child.
// Legacy containers will be a LayoutItems too and layout their children how they wish.
- Log.Info("NUI", "Creating LayoutItem for " + child.Name + "\n");
child.Layout = new LayoutItem();
}
}
/// <param name="child">Child to remove.true</param>
private void RemoveChildFromLayoutGroup(View child)
{
- Log.Info("NUI", "Removing child View:" + child.Name + " from Layout:" + Owner?.Name + "\n");
-
if(child.Layout != null)
{
Remove(child.Layout);
}
} // switch
- Log.Info("NUI", "MeasureSpecification resultSize:" + resultSize.AsRoundedValue()
- + " resultMode:" + resultMode + "\n");
return new MeasureSpecification( resultSize, resultMode );
}
/// <param name="heightMeasureSpec">vertical space requirements as imposed by the parent.</param>
protected override void OnMeasure(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
{
- Log.Info("NUI", "OnMeasure\n");
LayoutLength measuredWidth = new LayoutLength(0.0f);
LayoutLength measuredHeight = new LayoutLength(0.0f);
MeasureChild( childLayout, widthMeasureSpec, heightMeasureSpec );
LayoutLength childWidth = new LayoutLength(childLayout.MeasuredWidth.Size);
LayoutLength childHeight = new LayoutLength( childLayout.MeasuredHeight.Size);
- Extents childMargin = childLayout.Owner.Margin;
+
+ Extents childMargin = childLayout.Margin;
measuredWidth = new LayoutLength(Math.Max( measuredWidth.AsDecimal(), childWidth.AsDecimal() + childMargin.Start + childMargin.End));
measuredHeight = new LayoutLength(Math.Max( measuredHeight.AsDecimal(), childHeight.AsDecimal() + childMargin.Top + childMargin.Bottom));
}
/// <param name="bottom">Bottom position, relative to parent.</param>
protected override void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
{
- Log.Info("NUI", "OnLayout\n");
foreach( LayoutItem childLayout in _children )
{
if( childLayout !=null )
// Margin and Padding only supported when child anchor point is TOP_LEFT.
if ( owner.PivotPoint == PivotPoint.TopLeft || ( owner.PositionUsesPivotPoint == false ) )
{
- childLeft = childLeft + owner.Padding.Start + childLayout.Owner.Margin.Start;
- childTop = childTop + owner.Padding.Top + childLayout.Owner.Margin.Top;
+ childLeft = childLeft + owner.Padding.Start + childLayout.Margin.Start;
+ childTop = childTop + owner.Padding.Top + childLayout.Margin.Top;
}
}
childLayout.Layout( childLeft, childTop, childLeft + childLayout.MeasuredWidth.Size, childTop + childLayout.MeasuredHeight.Size );
/// </summary>
protected override void OnAttachedToOwner()
{
- Log.Info("NUI", "Attaching to Owner:" + Owner.Name + "\n");
// Layout takes ownership of it's owner's children.
foreach (View view in Owner.Children)
{
protected virtual void MeasureChild(LayoutItem child, MeasureSpecification parentWidthMeasureSpec, MeasureSpecification parentHeightMeasureSpec)
{
View childOwner = child.Owner;
- Log.Info("NUI", "LayoutGroup MeasureChild:" + childOwner.Name
- + " child widthSpecification policy:" + childOwner.WidthSpecification
- + " child heightSpecification policy:" + childOwner.HeightSpecification + "\n");
- Extents padding = childOwner.Padding; // Padding of this layout's owner, not of the child being measured.
+ Extents padding = child.Padding; // Padding of this layout's owner, not of the child being measured.
MeasureSpecification childWidthMeasureSpec = GetChildMeasureSpecification( parentWidthMeasureSpec,
new LayoutLength(padding.Start + padding.End ),
int desiredWidth = childOwner.WidthSpecification;
int desiredHeight = childOwner.HeightSpecification;
- Extents padding = childOwner.Padding; // Padding of this layout's owner, not of the child being measured.
+ Extents padding = child.Padding; // Padding of this layout's owner, not of the child being measured.
MeasureSpecification childWidthMeasureSpec = GetChildMeasureSpecification( parentWidthMeasureSpec,
new LayoutLength( padding.Start + padding.End ) +
private LayoutLength _bottom;
private LayoutData _layoutData;
+ private Extents _padding;
+ private Extents _margin;
+
/// <summary>
- /// The View that this Layout has been assigned to.
+ /// [Draft] The View that this Layout has been assigned to.
/// </summary>
public View Owner{get; set;} // Should not keep a View alive.
/// <summary>
+ /// [Draft] Margin for this LayoutItem
+ /// </summary>
+ public Extents Margin
+ {
+ get
+ {
+ return _margin;
+ }
+ set
+ {
+ _margin = value;
+ RequestLayout();
+ }
+ }
+
+ /// <summary>
+ /// [Draft] Padding for this LayoutItem
+ /// </summary>
+ public Extents Padding
+ {
+ get
+ {
+ return _padding;
+ }
+ set
+ {
+ _padding = value;
+ RequestLayout();
+ }
+ }
+
+ /// <summary>
/// [Draft] Constructor
/// </summary>
public LayoutItem()
{
+ Initialize();
}
/// <summary>
public LayoutItem(View owner)
{
Owner = owner;
- _layoutData = new LayoutData();
- _left = new LayoutLength(0);
- _top = new LayoutLength(0);
- _right = new LayoutLength(0);
- _bottom = new LayoutLength(0);
+ Initialize();
}
/// <summary>
public void SetParent( ILayoutParent parent)
{
Parent = parent as LayoutGroup;
- Log.Info("NUI", "Setting Parent Layout for:" + Owner?.Name + " to (Parent):" + (parent == null ? "null":parent.ToString() ) + "\n");
}
/// <summary>
Owner?.ResetLayout();
}
+ private void Initialize()
+ {
+ _layoutData = new LayoutData();
+ _left = new LayoutLength(0);
+ _top = new LayoutLength(0);
+ _right = new LayoutLength(0);
+ _bottom = new LayoutLength(0);
+ _padding = new Extents(0,0,0,0);
+ _margin = new Extents(0,0,0,0);
+ }
+
/// <summary>
/// Get the View owning this LayoutItem
/// </summary>
bool needsLayout = specChanged && ( !isSpecExactly || !matchesSpecSize);
needsLayout = needsLayout || ((Flags & LayoutFlags.ForceLayout) == LayoutFlags.ForceLayout);
- Log.Info("NUI", "Measuring:" + Owner.Name + " needsLayout[" + needsLayout.ToString() + "]\n");
-
if (needsLayout)
{
OnMeasure(widthMeasureSpec, heightMeasureSpec);
}
OldWidthMeasureSpec = widthMeasureSpec;
OldHeightMeasureSpec = heightMeasureSpec;
-
- Log.Info("NUI", "LayoutItem Measure owner:" + Owner.Name + " width:" + widthMeasureSpec.Size.AsRoundedValue() + " height:" + heightMeasureSpec.Size.AsRoundedValue() + "\n");
}
/// <summary>
/// <param name="bottom">Bottom position, relative to parent.</param>
public void Layout(LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
{
- Log.Info("NUI", "LayoutItem Layout owner:" + Owner.Name + "\n");
-
bool changed = SetFrame(left, top, right, bottom);
// Check if Measure needed before Layouting
if (changed || ((Flags & LayoutFlags.LayoutRequired) == LayoutFlags.LayoutRequired))
{
- Log.Info("NUI", "LayoutItem Layout Frame changed or Layout forced\n");
OnLayout(changed, left, top, right, bottom);
// Clear flag
Flags &= ~LayoutFlags.LayoutRequired;
}
}
- Log.Info("NUI", "DefaultSize :" + result.AsRoundedValue() + "\n");
-
return result;
}
/// </summary>
public void RequestLayout()
{
- Log.Info("NUI", "RequestLayout on:" + Owner?.Name + "\n");
Flags = Flags | LayoutFlags.ForceLayout;
Window.Instance.LayoutController.RequestLayout(this);
}
get
{
int naturalWidth = Owner.NaturalSize2D.Width;
- Log.Info("NUI", "NaturalWidth for: " + Owner.Name + " :" + naturalWidth +"\n");
return new LayoutLength(Math.Max( MinimumWidth.AsDecimal(), naturalWidth ));
}
}
get
{
int naturalHeight = Owner.NaturalSize2D.Height;
- Log.Info("NUI", "NaturalHeight for: " + Owner.Name + " :" + naturalHeight +"\n");
return new LayoutLength(Math.Max( MinimumHeight.AsDecimal(), naturalHeight ));
}
}
/// <param name="measuredHeight">The measured height of this layout.</param>
protected void SetMeasuredDimensions( MeasuredSize measuredWidth, MeasuredSize measuredHeight )
{
- Log.Info("NUI", "For " + Owner.Name + " MeasuredWidth:" + measuredWidth.Size.AsRoundedValue()
- + " MeasureHeight:" + measuredHeight.Size.AsRoundedValue() + "\n");
-
MeasuredWidth = measuredWidth;
MeasuredHeight = measuredHeight;
Flags = Flags | LayoutFlags.MeasuredDimensionSet;
Owner.SetY(_top.AsRoundedValue());
Owner.SetSize((int)newWidth.AsRoundedValue(), (int)newHeight.AsRoundedValue());
- Log.Info("NUI", "Frame set for " + Owner.Name + " to left:" + _left.AsRoundedValue() + " top:"
- + _top.AsRoundedValue() + " width: " + newWidth.AsRoundedValue() + " height: "
- + newHeight.AsRoundedValue() + "\n");
-
return changed;
}
// Weighted children are not measured at this phase.
// Available space for weighted children will be calculated in the phase 2 based on totalLength value.
- Log.Info("NUI", "Measuring Horizontal, " + _children.Count + " child(ren) with parent width mode:" + widthMode + ",height mode:" + heightMode + "\n");
-
foreach( LayoutItem childLayout in _children )
{
LayoutLength childDesiredWidth = new LayoutLength(childLayout.Owner.WidthSpecification);
LayoutLength childDesiredHeight = new LayoutLength(childLayout.Owner.HeightSpecification);
float childWeight = childLayout.Owner.Weight;
- Extents childMargin = childLayout.Owner.Margin;
- Log.Info("NUI", "Retrieved parameters for child:" + childLayout.Owner.Name
- + " childDesiredWidth: " + childDesiredWidth.AsRoundedValue()
- + " childDesiredHeight:" + childDesiredHeight.AsRoundedValue()
- + " childWeight:" + childWeight+ "\n");
-
+ Extents childMargin = childLayout.Margin;
totalWeight += childWeight;
bool useExcessSpace = (childDesiredWidth.AsRoundedValue() == 0 ) && (childWeight > 0);
// this child is only laid out using excess space. Measure
// using WRAP_CONTENT so that we can find out the view's
// optimal width.
- MeasureSpecification childWidthMeasureSpec = GetChildMeasureSpecification(widthMeasureSpec, new LayoutLength(childLayout.Owner.Padding.Start + childLayout.Owner.Padding.End),
+ MeasureSpecification childWidthMeasureSpec = GetChildMeasureSpecification(widthMeasureSpec, new LayoutLength(childLayout.Padding.Start + childLayout.Padding.End),
new LayoutLength(LayoutParamPolicies.WrapContent) );
- MeasureSpecification childHeightMeasureSpec = GetChildMeasureSpecification(heightMeasureSpec, new LayoutLength(childLayout.Owner.Padding.Top + childLayout.Owner.Padding.Bottom),
+ MeasureSpecification childHeightMeasureSpec = GetChildMeasureSpecification(heightMeasureSpec, new LayoutLength(childLayout.Padding.Top + childLayout.Padding.Bottom),
childDesiredHeight);
childLayout.Measure( childWidthMeasureSpec, childHeightMeasureSpec);
usedExcessSpace += childLayout.MeasuredWidth.Size;
}
} // foreach
- Extents padding = Owner.Padding;
+ Extents padding = Padding;
_totalLength += padding.Start + padding.End;
LayoutLength widthSize = new LayoutLength(_totalLength);
widthSize = new LayoutLength( Math.Max( widthSize.AsDecimal(), SuggestedMinimumWidth.AsDecimal()));
// to accumulate total used space in mTotalLength based on measured sizes and margins.
// Weighted children are not measured at this phase.
// Available space for weighted children will be calculated in the phase 2 based on mTotalLength value.
-
- Log.Info("NUI", "Measuring Vertical[" + _children.Count + "] child with parent width mode:" + widthMode + ",height mode:" + heightMode + "\n");
-
uint index = 0;
foreach( LayoutItem childLayout in _children )
{
LayoutLength childDesiredWidth = new LayoutLength(childLayout.Owner.WidthSpecification);
LayoutLength childDesiredHeight = new LayoutLength(childLayout.Owner.HeightSpecification);
float childWeight = childLayout.Owner.Weight;
- Extents childMargin = childLayout.Owner.Margin;
- Log.Info("NUI", "Retrieved parameters for child:" + childLayout.Owner.Name
- + " desiredWidth: " + childDesiredWidth.AsRoundedValue()
- + " desiredHeight:" + childDesiredHeight.AsRoundedValue()
- + " childWeight:" + childWeight + "\n");
-
+ Extents childMargin = childLayout.Margin;
totalWeight += childWeight;
bool useExcessSpace = (childDesiredHeight.AsRoundedValue() == 0) && (childWeight > 0);
// optimal height. We'll restore the original height of 0
// after measurement.
MeasureSpecification childWidthMeasureSpec = GetChildMeasureSpecification( widthMeasureSpec,
- new LayoutLength(childLayout.Owner.Padding.Start + childLayout.Owner.Padding.End),
+ new LayoutLength(childLayout.Padding.Start + childLayout.Padding.End),
childDesiredWidth);
MeasureSpecification childHeightMeasureSpec = GetChildMeasureSpecification( heightMeasureSpec,
- new LayoutLength(childLayout.Owner.Padding.Top + childLayout.Owner.Padding.Bottom),
+ new LayoutLength(childLayout.Padding.Top + childLayout.Padding.Bottom),
new LayoutLength(LayoutParamPolicies.WrapContent) );
childLayout.Measure( childWidthMeasureSpec, childHeightMeasureSpec );
childHeight = childLayout.MeasuredHeight.Size;
matchWidthLocally = true;
}
- float marginWidth = (childLayout.Owner.Margin.Start) + (childLayout.Owner.Margin.End);
+ float marginWidth = (childLayout.Margin.Start) + (childLayout.Margin.End);
LayoutLength childWidth = new LayoutLength(childLayout.MeasuredWidth.Size.AsDecimal() + marginWidth);
// was combineMeasuredStates()
} // foreach
- Extents padding = Owner.Padding;
+ Extents padding = Padding;
_totalLength += padding.Top + padding.Bottom;
LayoutLength heightSize = new LayoutLength(_totalLength);
heightSize = new LayoutLength(Math.Max( heightSize.AsDecimal(), SuggestedMinimumHeight.AsDecimal() ));
int desiredWidth = childLayout.Owner.WidthSpecification;
int desiredHeight = childLayout.Owner.HeightSpecification;
float childWeight = childLayout.Owner.Weight;
- Extents childMargin = childLayout.Owner.Margin;
+ Extents childMargin = childLayout.Margin;
float childHeight = 0;
if( childWeight > 0 )
}
MeasureSpecification childWidthMeasureSpec = GetChildMeasureSpecification( widthMeasureSpec,
- new LayoutLength(Owner.Padding.Start + Owner.Padding.End),
+ new LayoutLength(Padding.Start + Padding.End),
new LayoutLength(desiredWidth) );
MeasureSpecification childHeightMeasureSpec = new MeasureSpecification( new LayoutLength(childHeight), MeasureSpecification.ModeType.Exactly);
} // foreach
// Add in our padding
- _totalLength += Owner.Padding.Top + Owner.Padding.Bottom;
+ _totalLength += Padding.Top + Padding.Bottom;
}
else
{
void LayoutHorizontal(LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
{
- Log.Info("NUI", "left,top,right,bottom:" + left.AsRoundedValue() + "," + top.AsRoundedValue()
- + " " + right .AsRoundedValue() + "," + bottom.AsRoundedValue() + "\n");
bool isLayoutRtl = Owner.LayoutDirection == ViewLayoutDirectionType.RTL;
- LayoutLength childTop = new LayoutLength(Owner.Padding.Top);
- LayoutLength childLeft = new LayoutLength(Owner.Padding.Start);
+ LayoutLength childTop = new LayoutLength(Padding.Top);
+ LayoutLength childLeft = new LayoutLength(Padding.Start);
// Where bottom of child should go
LayoutLength height = new LayoutLength(bottom - top);
// Space available for child
- LayoutLength childSpace = new LayoutLength( height - Owner.Padding.Top - Owner.Padding.Bottom);
+ LayoutLength childSpace = new LayoutLength( height - Padding.Top - Padding.Bottom);
int count = _children.Count;
// In case of RTL map BEGIN alignment to the right edge
if (isLayoutRtl)
{
- childLeft = new LayoutLength(Owner.Padding.Start + right.AsDecimal() - left.AsDecimal() - _totalLength);
+ childLeft = new LayoutLength(Padding.Start + right.AsDecimal() - left.AsDecimal() - _totalLength);
}
else
{
- childLeft = new LayoutLength(Owner.Padding.Start);
+ childLeft = new LayoutLength(Padding.Start);
}
break;
case Alignment.End:
// In case of RTL map END alignment to the left edge
if (isLayoutRtl)
{
- childLeft = new LayoutLength(Owner.Padding.Start);
+ childLeft = new LayoutLength(Padding.Start);
}
else
{
- childLeft = new LayoutLength(Owner.Padding.Start + right.AsDecimal() - left.AsDecimal() - _totalLength);
+ childLeft = new LayoutLength(Padding.Start + right.AsDecimal() - left.AsDecimal() - _totalLength);
}
break;
case Alignment.CenterHorizontal:
// totalLength contains the padding already
- childLeft = new LayoutLength(Owner.Padding.Start + (right.AsDecimal() - left.AsDecimal() - _totalLength) / 2.0f);
+ childLeft = new LayoutLength(Padding.Start + (right.AsDecimal() - left.AsDecimal() - _totalLength) / 2.0f);
break;
}
{
LayoutLength childWidth = childLayout.MeasuredWidth.Size;
LayoutLength childHeight = childLayout.MeasuredHeight.Size;
- Extents childMargin = childLayout.Owner.Margin;
+ Extents childMargin = childLayout.Margin;
switch ( LinearAlignment )
{
case Alignment.Top:
- childTop = new LayoutLength(Owner.Padding.Top + childMargin.Top);
+ childTop = new LayoutLength(Padding.Top + childMargin.Top);
break;
case Alignment.Bottom:
- childTop = new LayoutLength(height - Owner.Padding.Bottom - childHeight - childMargin.Bottom);
+ childTop = new LayoutLength(height - Padding.Bottom - childHeight - childMargin.Bottom);
break;
case Alignment.CenterVertical: // FALLTHROUGH
default:
- childTop = new LayoutLength(Owner.Padding.Top + ( ( childSpace - childHeight ).AsDecimal() / 2.0f ) + childMargin.Top - childMargin.Bottom);
+ childTop = new LayoutLength(Padding.Top + ( ( childSpace - childHeight ).AsDecimal() / 2.0f ) + childMargin.Top - childMargin.Bottom);
break;
}
childLeft += childMargin.Start;
void LayoutVertical(LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
{
- Log.Info("NUI", "left,top,right,bottom:" + left.AsRoundedValue() + "," + top.AsRoundedValue()
- + " " + right .AsRoundedValue() + "," + bottom.AsRoundedValue() + "\n");
-
- LayoutLength childTop = new LayoutLength(Owner.Padding.Top);
- LayoutLength childLeft = new LayoutLength(Owner.Padding.Start);
+ LayoutLength childTop = new LayoutLength(Padding.Top);
+ LayoutLength childLeft = new LayoutLength(Padding.Start);
// Where end of child should go
LayoutLength width = new LayoutLength(right - left);
// Space available for child
- LayoutLength childSpace = new LayoutLength( width - Owner.Padding.Start - Owner.Padding.End);
+ LayoutLength childSpace = new LayoutLength( width - Padding.Start - Padding.End);
int count = _children.Count;
{
case Alignment.Top:
// totalLength contains the padding already
- childTop = new LayoutLength( Owner.Padding.Top );
+ childTop = new LayoutLength( Padding.Top );
break;
case Alignment.Bottom:
// totalLength contains the padding already
- childTop = new LayoutLength( Owner.Padding.Top + bottom.AsDecimal() - top.AsDecimal() - _totalLength);
+ childTop = new LayoutLength( Padding.Top + bottom.AsDecimal() - top.AsDecimal() - _totalLength);
break;
case Alignment.CenterVertical:
default:
// totalLength contains the padding already
- childTop = new LayoutLength(Owner.Padding.Top + ( bottom.AsDecimal() - top.AsDecimal() - _totalLength ) / 2.0f);
+ childTop = new LayoutLength(Padding.Top + ( bottom.AsDecimal() - top.AsDecimal() - _totalLength ) / 2.0f);
break;
}
{
LayoutLength childWidth = childLayout.MeasuredWidth.Size;
LayoutLength childHeight = childLayout.MeasuredHeight.Size;
- Extents childMargin = childLayout.Owner.Margin;
+ Extents childMargin = childLayout.Margin;
childTop += childMargin.Top;
switch ( LinearAlignment )
case Alignment.Begin:
default:
{
- childLeft = new LayoutLength( Owner.Padding.Start + childMargin.Start);
+ childLeft = new LayoutLength(Padding.Start + childMargin.Start);
break;
}
case Alignment.End:
{
- childLeft = new LayoutLength(width - Owner.Padding.End - childWidth - childMargin.End);
+ childLeft = new LayoutLength(width - Padding.End - childWidth - childMargin.End);
break;
}
case Alignment.CenterHorizontal:
{
- childLeft = new LayoutLength(Owner.Padding.Start + (( childSpace - childWidth ).AsDecimal() / 2.0f) + childMargin.Start - childMargin.End);
+ childLeft = new LayoutLength(Padding.Start + (( childSpace - childWidth ).AsDecimal() / 2.0f) + childMargin.Start - childMargin.End);
break;
}
}
{
StreamReader reader = new StreamReader(animationXamlPath);
xaml = reader.ReadToEnd();
+ reader.Close();
+ reader.Dispose();
Tizen.Log.Fatal("NUI", "File is exist!, try with xaml: " + xaml);
return xaml;
}
{
StreamReader reader = new StreamReader(likelyResourcePath);
xaml = reader.ReadToEnd();
+ reader.Close();
+ reader.Dispose();
Tizen.Log.Fatal("NUI", "File is exist!, try with xaml: " + xaml);
var pattern = String.Format("x:Class *= *\"{0}\"", type.FullName);
var regex = new Regex(pattern, RegexOptions.ECMAScript);
// public Rotation(Radian radian(float), Vector3 vector3)
// Default: <View Orientation="45.0,12,13,0" />
// Oritation="D:23, 0, 0, 1"
- // Oritation="R:23, 0, 0, 1"
+ // Oritation="R:23, 0, 0, 1"
if (value != null)
{
string[] parts = value.Split(',');
if (useDefault)
{
- //Default: <View Orientation="45.0,12,13,0" />
+ // Default: <View Orientation="45.0,12,13,0" />
radian = new Radian( Single.Parse( parts[0].Trim(), CultureInfo.InvariantCulture ) );
}
Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT_COLOR).Get(temp);
return temp;
});
-
+ /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty EnableGrabHandleProperty = BindableProperty.Create(nameof(TextField.EnableGrabHandle), typeof(bool), typeof(TextField), true, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var textField = (TextField)bindable;
+ if (newValue != null)
+ {
+ Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.ENABLE_GRAB_HANDLE, new Tizen.NUI.PropertyValue((bool)newValue));
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var textField = (TextField)bindable;
+ bool temp = false;
+ Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.ENABLE_GRAB_HANDLE).Get(out temp);
+ return temp;
+ });
+ /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty EnableGrabHandlePopupProperty = BindableProperty.Create(nameof(TextField.EnableGrabHandlePopup), typeof(bool), typeof(TextField), true, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var textField = (TextField)bindable;
+ if (newValue != null)
+ {
+ Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.ENABLE_GRAB_HANDLE_POPUP, new Tizen.NUI.PropertyValue((bool)newValue));
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var textField = (TextField)bindable;
+ bool temp = false;
+ Tizen.NUI.Object.GetProperty(textField.swigCPtr, TextField.Property.ENABLE_GRAB_HANDLE_POPUP).Get(out temp);
+ return temp;
+ });
/// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty PrimaryCursorColorProperty = BindableProperty.Create(nameof(TextField.PrimaryCursorColor), typeof(Vector4), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
}
/// <summary>
+ /// The Enable selection property.
+ /// </summary>
+ /// <since_tizen> 5.5 </since_tizen>
+ /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool EnableGrabHandle
+ {
+ get
+ {
+ return (bool)GetValue(EnableGrabHandleProperty);
+ }
+ set
+ {
+ SetValue(EnableGrabHandleProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
+ /// The Enable selection property.
+ /// </summary>
+ /// <since_tizen> 5.5 </since_tizen>
+ /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool EnableGrabHandlePopup
+ {
+ get
+ {
+ return (bool)GetValue(EnableGrabHandlePopupProperty);
+ }
+ set
+ {
+ SetValue(EnableGrabHandlePopupProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
/// The Placeholder property.
/// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
/// </summary>
return inputMethodCotext;
}
+ /// <summary>
+ /// Select the whole text.
+ /// </summary>
+ /// <since_tizen> 5.5 </since_tizen>
+ /// This will be released at Tizen.NET API Level 5.5, so currently this would be used as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SelectWholeText()
+ {
+ Interop.TextField.TextField_SelectWholeText(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj)
{
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
internal static readonly int ELLIPSIS = Interop.TextField.TextField_Property_ELLIPSIS_get();
internal static readonly int ENABLE_SHIFT_SELECTION = Interop.TextField.TextField_Property_ENABLE_SHIFT_SELECTION_get();
internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = Interop.TextField.TextField_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get();
+ internal static readonly int ENABLE_GRAB_HANDLE = Interop.TextField.TextField_Property_ENABLE_GRAB_HANDLE_get();
+ internal static readonly int ENABLE_GRAB_HANDLE_POPUP = Interop.TextField.TextField_Property_ENABLE_GRAB_HANDLE_POPUP_get();
}
internal class InputStyle
{
get
{
- return (Extents)GetValue(PaddingProperty);
+ // If View has a Layout then padding in stored in the base Layout class
+ if (Layout !=null)
+ {
+ return Layout.Padding;
+ }
+ else
+ {
+ return (Extents)GetValue(PaddingProperty);
+ }
+ // Two return points to prevent creating a zeroed Extent native object before assignment
}
set
{
- SetValue(PaddingProperty, value);
+ Extents padding = value;
+ if (Layout !=null)
+ {
+ // Layout set so store Padding in LayoutItem instead of in View.
+ // If View stores the Padding value then Legacy Size Negotiation will overwrite
+ // the position and sizes measure in the Layouting.
+ Layout.Padding = value;
+ // If Layout is a LayoutItem then it could be a View that handles it's own padding.
+ // Let the View keeps it's padding. Still store Padding in Layout to reduce code paths.
+ if( Layout.GetType() != typeof(LayoutItem)) // If a Layout container of some kind.
+ {
+ padding = new Extents(0,0,0,0); // Reset value stored in View.
+ }
+ _layout?.RequestLayout();
+ }
+ SetValue(PaddingProperty, padding);
NotifyPropertyChanged();
_layout?.RequestLayout();
}
{
get
{
- return (Extents)GetValue(MarginProperty);
+ // If View has a Layout then margin is stored in Layout.
+ if (Layout != null)
+ {
+ return Layout.Margin;
+ }
+ else
+ {
+ // If Layout not set then return margin stored in View.
+ return (Extents)GetValue(MarginProperty);
+ }
+ // Two return points to prevent creating a zeroed Extent native object before assignment
}
set
{
- SetValue(MarginProperty, value);
+ if (Layout != null)
+ {
+ // Layout set so store Margin in LayoutItem instead of View.
+ // If View stores the Margin too then the Legacy Size Negotiation will
+ // overwrite the position and size values measured in the Layouting.
+ Layout.Margin = value;
+ SetValue(MarginProperty, new Extents(0,0,0,0));
+ _layout?.RequestLayout();
+ }
+ else
+ {
+ SetValue(MarginProperty, value);
+ }
NotifyPropertyChanged();
_layout?.RequestLayout();
}
}
}
+
/// <summary>
/// [Obsolete("Please do not use! this will be deprecated")]
/// </summary>
// If new layout being set already has a owner then that owner receives a replacement default layout.
// First check if the layout to be set already has a owner.
- if ( value.Owner != null )
+ if (value?.Owner != null)
{
Log.Info("NUI", "Set layout already in use by another View: " + value.Owner.Name + "will get a LayoutGroup\n");
// Previous owner of the layout gets a default layout as a replacement.
value.Owner.Layout = new LayoutGroup();
+
+ // Copy Margin and Padding to replacement LayoutGroup.
+ value.Owner.Layout.Margin = value.Margin;
+ value.Owner.Layout.Padding = value.Padding;
+ }
+
+ // Copy Margin and Padding to new layout being set or restore padding and margin back to
+ // View if no replacement. Previously margin and padding values would have been moved from
+ // the View to the layout.
+ if (_layout != null ) // Existing layout
+ {
+ if (value != null)
+ {
+ // Existing layout being replaced so copy over margin and padding values.
+ value.Margin = _layout.Margin;
+ value.Padding = _layout.Padding;
+ }
+ else
+ {
+ // Layout not being replaced so restore margin and padding to View.
+ SetValue(MarginProperty, _layout.Margin);
+ SetValue(PaddingProperty, _layout.Padding);
+ NotifyPropertyChanged();
+ }
+ }
+ else
+ {
+ // First Layout to be added to the View hence copy
+
+ // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
+ if (value !=null)
+ {
+ if (Margin.Top != 0 || Margin.Bottom !=0 || Margin.Start !=0 || Margin.End != 0)
+ {
+ // If View already has a margin set then store it in Layout instead.
+ value.Margin = Margin;
+ SetValue(MarginProperty, new Extents(0,0,0,0));
+ NotifyPropertyChanged();
+ }
+
+ if (Padding.Top != 0 || Padding.Bottom !=0 || Padding.Start !=0 || Padding.End != 0)
+ {
+ // If View already has a padding set then store it in Layout instead.
+ value.Padding = Padding;
+ SetValue(PaddingProperty, new Extents(0,0,0,0));
+ NotifyPropertyChanged();
+ }
+ }
}
// Remove existing layout from it's parent layout group.
internal void SetLayout(LayoutItem layout)
{
_layout = layout;
- _layout.AttachToOwner(this);
- _layout.RequestLayout();
+ _layout?.AttachToOwner(this);
+ _layout?.RequestLayout();
}
/// <summary>