/*
* Copyright(c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
extern alias TizenSystemSettings;
using TizenSystemSettings.Tizen.System;
using System;
using System.Runtime.InteropServices;
using System.Globalization;
using System.ComponentModel;
using Tizen.NUI.Binding;
namespace Tizen.NUI.BaseComponents
{
///
/// A control which provides a multi-line editable text editor.
///
/// 3
public class TextEditor : View
{
/// 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 TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.TEXT, new Tizen.NUI.PropertyValue((string)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
string temp;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.TEXT).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 TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.TEXT_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.TEXT_COLOR).Get(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 FontFamilyProperty = BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.FONT_FAMILY, new Tizen.NUI.PropertyValue((string)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
string temp;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.FONT_FAMILY).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 FontStyleProperty = BindableProperty.Create(nameof(FontStyle), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.FONT_STYLE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.FONT_STYLE).Get(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 PointSizeProperty = BindableProperty.Create(nameof(PointSize), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.POINT_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
float temp = 0.0f;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.POINT_SIZE).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 HorizontalAlignmentProperty = BindableProperty.Create(nameof(HorizontalAlignment), typeof(HorizontalAlignment), typeof(TextEditor), HorizontalAlignment.Begin, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue((int)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
string temp;
if (Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
{
NUILog.Error("HorizontalAlignment get error!");
}
switch (temp)
{
case "BEGIN":
return HorizontalAlignment.Begin;
case "CENTER":
return HorizontalAlignment.Center;
case "END":
return HorizontalAlignment.End;
default:
return HorizontalAlignment.Begin;
}
});
/// 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 ScrollThresholdProperty = BindableProperty.Create(nameof(ScrollThreshold), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_THRESHOLD, new Tizen.NUI.PropertyValue((float)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
float temp = 0.0f;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_THRESHOLD).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 ScrollSpeedProperty = BindableProperty.Create(nameof(ScrollSpeed), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_SPEED, new Tizen.NUI.PropertyValue((float)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
float temp = 0.0f;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_SPEED).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(PrimaryCursorColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.PRIMARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.PRIMARY_CURSOR_COLOR).Get(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 SecondaryCursorColorProperty = BindableProperty.Create(nameof(SecondaryCursorColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SECONDARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SECONDARY_CURSOR_COLOR).Get(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 EnableCursorBlinkProperty = BindableProperty.Create(nameof(EnableCursorBlink), typeof(bool), typeof(TextEditor), false, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_CURSOR_BLINK, new Tizen.NUI.PropertyValue((bool)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
bool temp = false;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_CURSOR_BLINK).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 CursorBlinkIntervalProperty = BindableProperty.Create(nameof(CursorBlinkInterval), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.CURSOR_BLINK_INTERVAL, new Tizen.NUI.PropertyValue((float)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
float temp = 0.0f;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.CURSOR_BLINK_INTERVAL).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 CursorBlinkDurationProperty = BindableProperty.Create(nameof(CursorBlinkDuration), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.CURSOR_BLINK_DURATION, new Tizen.NUI.PropertyValue((float)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
float temp = 0.0f;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.CURSOR_BLINK_DURATION).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 CursorWidthProperty = BindableProperty.Create(nameof(CursorWidth), typeof(int), typeof(TextEditor), default(int), propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.CURSOR_WIDTH, new Tizen.NUI.PropertyValue((int)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
int temp = 0;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.CURSOR_WIDTH).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 GrabHandleImageProperty = BindableProperty.Create(nameof(GrabHandleImage), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.GRAB_HANDLE_IMAGE, new Tizen.NUI.PropertyValue((string)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
string temp;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.GRAB_HANDLE_IMAGE).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 GrabHandlePressedImageProperty = BindableProperty.Create(nameof(GrabHandlePressedImage), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.GRAB_HANDLE_PRESSED_IMAGE, new Tizen.NUI.PropertyValue((string)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
string temp;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.GRAB_HANDLE_PRESSED_IMAGE).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 SelectionHandleImageLeftProperty = BindableProperty.Create(nameof(SelectionHandleImageLeft), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_IMAGE_LEFT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_IMAGE_LEFT).Get(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 SelectionHandleImageRightProperty = BindableProperty.Create(nameof(SelectionHandleImageRight), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_IMAGE_RIGHT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_IMAGE_RIGHT).Get(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 SelectionHandlePressedImageLeftProperty = BindableProperty.Create(nameof(SelectionHandlePressedImageLeft), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_LEFT).Get(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 SelectionHandlePressedImageRightProperty = BindableProperty.Create(nameof(SelectionHandlePressedImageRight), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_PRESSED_IMAGE_RIGHT).Get(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 SelectionHandleMarkerImageLeftProperty = BindableProperty.Create(nameof(SelectionHandleMarkerImageLeft), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_LEFT).Get(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 SelectionHandleMarkerImageRightProperty = BindableProperty.Create(nameof(SelectionHandleMarkerImageRight), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HANDLE_MARKER_IMAGE_RIGHT).Get(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 SelectionHighlightColorProperty = BindableProperty.Create(nameof(SelectionHighlightColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HIGHLIGHT_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SELECTION_HIGHLIGHT_COLOR).Get(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 DecorationBoundingBoxProperty = BindableProperty.Create(nameof(DecorationBoundingBox), typeof(Rectangle), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.DECORATION_BOUNDING_BOX, new Tizen.NUI.PropertyValue((Rectangle)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
Rectangle temp = new Rectangle(0, 0, 0, 0);
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.DECORATION_BOUNDING_BOX).Get(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 EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool), typeof(TextEditor), false, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_MARKUP, new Tizen.NUI.PropertyValue((bool)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
bool temp = false;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_MARKUP).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 InputColorProperty = BindableProperty.Create(nameof(InputColor), typeof(Vector4), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_COLOR).Get(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 InputFontFamilyProperty = BindableProperty.Create(nameof(InputFontFamily), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_FONT_FAMILY, new Tizen.NUI.PropertyValue((string)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
string temp;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_FONT_FAMILY).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 InputFontStyleProperty = BindableProperty.Create(nameof(InputFontStyle), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_FONT_STYLE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_FONT_STYLE).Get(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 InputPointSizeProperty = BindableProperty.Create(nameof(InputPointSize), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_POINT_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
float temp = 0.0f;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_POINT_SIZE).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 LineSpacingProperty = BindableProperty.Create(nameof(LineSpacing), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.LINE_SPACING, new Tizen.NUI.PropertyValue((float)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
float temp = 0.0f;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.LINE_SPACING).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 InputLineSpacingProperty = BindableProperty.Create(nameof(InputLineSpacing), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_LINE_SPACING, new Tizen.NUI.PropertyValue((float)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
float temp = 0.0f;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_LINE_SPACING).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 UnderlineProperty = BindableProperty.Create(nameof(Underline), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.UNDERLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.UNDERLINE).Get(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 InputUnderlineProperty = BindableProperty.Create(nameof(InputUnderline), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_UNDERLINE, new Tizen.NUI.PropertyValue((string)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
string temp;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_UNDERLINE).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 ShadowProperty = BindableProperty.Create(nameof(Shadow), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SHADOW, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SHADOW).Get(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 InputShadowProperty = BindableProperty.Create(nameof(InputShadow), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_SHADOW, new Tizen.NUI.PropertyValue((string)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
string temp;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_SHADOW).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 EmbossProperty = BindableProperty.Create(nameof(Emboss), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.EMBOSS, new Tizen.NUI.PropertyValue((string)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
string temp;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.EMBOSS).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 InputEmbossProperty = BindableProperty.Create(nameof(InputEmboss), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_EMBOSS, new Tizen.NUI.PropertyValue((string)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
string temp;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_EMBOSS).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 OutlineProperty = BindableProperty.Create(nameof(Outline), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.OUTLINE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.OUTLINE).Get(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 InputOutlineProperty = BindableProperty.Create(nameof(InputOutline), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_OUTLINE, new Tizen.NUI.PropertyValue((string)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
string temp;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.INPUT_OUTLINE).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 SmoothScrollProperty = BindableProperty.Create(nameof(SmoothScroll), typeof(bool), typeof(TextEditor), false, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SMOOTH_SCROLL, new Tizen.NUI.PropertyValue((bool)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
bool temp = false;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SMOOTH_SCROLL).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 SmoothScrollDurationProperty = BindableProperty.Create(nameof(SmoothScrollDuration), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SMOOTH_SCROLL_DURATION, new Tizen.NUI.PropertyValue((float)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
float temp = 0.0f;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SMOOTH_SCROLL_DURATION).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 EnableScrollBarProperty = BindableProperty.Create(nameof(EnableScrollBar), typeof(bool), typeof(TextEditor), false, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_SCROLL_BAR, new Tizen.NUI.PropertyValue((bool)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
bool temp = false;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_SCROLL_BAR).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 ScrollBarShowDurationProperty = BindableProperty.Create(nameof(ScrollBarShowDuration), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_BAR_SHOW_DURATION, new Tizen.NUI.PropertyValue((float)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
float temp = 0.0f;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_BAR_SHOW_DURATION).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 ScrollBarFadeDurationProperty = BindableProperty.Create(nameof(ScrollBarFadeDuration), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_BAR_FADE_DURATION, new Tizen.NUI.PropertyValue((float)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
float temp = 0.0f;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.SCROLL_BAR_FADE_DURATION).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 PixelSizeProperty = BindableProperty.Create(nameof(PixelSize), typeof(float), typeof(TextEditor), default(float), propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
float temp = 0.0f;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.PIXEL_SIZE).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 PlaceholderTextProperty = BindableProperty.Create(nameof(PlaceholderText), typeof(string), typeof(TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.PLACEHOLDER_TEXT, new Tizen.NUI.PropertyValue((string)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
string temp;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.PLACEHOLDER_TEXT).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 PlaceholderTextColorProperty = BindableProperty.Create(nameof(PlaceholderTextColor), typeof(Color), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue((Color)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.PLACEHOLDER_TEXT_COLOR).Get(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 EnableSelectionProperty = BindableProperty.Create(nameof(EnableSelection), typeof(bool), typeof(TextEditor), false, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_SELECTION, new Tizen.NUI.PropertyValue((bool)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
bool temp = false;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_SELECTION).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 PlaceholderProperty = BindableProperty.Create(nameof(Placeholder), typeof(PropertyMap), typeof(TextEditor), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.PLACEHOLDER, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.PLACEHOLDER).Get(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 LineWrapModeProperty = BindableProperty.Create(nameof(LineWrapMode), typeof(LineWrapMode), typeof(TextEditor), LineWrapMode.Word, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue((int)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
int temp;
if (Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.LINE_WRAP_MODE).Get(out temp) == false)
{
NUILog.Error("LineWrapMode get error!");
}
return (LineWrapMode)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 EnableShiftSelectionProperty = BindableProperty.Create(nameof(TextEditor.EnableShiftSelection), typeof(bool), typeof(TextEditor), true, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_SHIFT_SELECTION, new Tizen.NUI.PropertyValue((bool)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
//textEditor.mShiftSelectionFlag(true);
bool temp = false;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.ENABLE_SHIFT_SELECTION).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 MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(TextEditor.MatchSystemLanguageDirection), typeof(bool), typeof(TextEditor), false, propertyChanged: (bindable, oldValue, newValue) =>
{
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(textEditor.swigCPtr, TextEditor.Property.MATCH_SYSTEM_LANGUAGE_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var textEditor = (TextEditor)bindable;
bool temp = false;
Tizen.NUI.Object.GetProperty(textEditor.swigCPtr, TextEditor.Property.MATCH_SYSTEM_LANGUAGE_DIRECTION).Get(out temp);
return (bool)temp;
});
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
private string textEditorTextSid = null;
private string textEditorPlaceHolderTextSid = null;
private bool systemlangTextFlag = false;
private InputMethodContext inputMethodContext = null;
private EventHandler _textEditorTextChangedEventHandler;
private TextChangedCallbackDelegate _textEditorTextChangedCallbackDelegate;
private EventHandler _textEditorScrollStateChangedEventHandler;
private ScrollStateChangedCallbackDelegate _textEditorScrollStateChangedCallbackDelegate;
///
/// Creates the TextEditor control.
///
/// 3
public TextEditor() : this(Interop.TextEditor.TextEditor_New(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Creates the TextEditor with setting the status of shown or hidden.
///
/// false : Not displayed (hidden), true : displayed (shown)
/// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
[EditorBrowsable(EditorBrowsableState.Never)]
public TextEditor(bool shown) : this(Interop.TextEditor.TextEditor_New(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
SetVisible(shown);
}
internal TextEditor(TextEditor handle, bool shown = true) : this(Interop.TextEditor.new_TextEditor__SWIG_1(TextEditor.getCPtr(handle)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
if (!shown)
{
SetVisible(false);
}
}
internal TextEditor(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(Interop.TextEditor.TextEditor_SWIGUpcast(cPtr), cMemoryOwn)
{
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
if (!shown)
{
SetVisible(false);
}
}
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
private delegate void TextChangedCallbackDelegate(IntPtr textEditor);
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
private delegate void ScrollStateChangedCallbackDelegate(IntPtr textEditor, ScrollState state);
///
/// An event for the TextChanged signal which can be used to subscribe or unsubscribe the event handler
/// provided by the user. The TextChanged signal is emitted when the text changes.
///
/// 3
public event EventHandler TextChanged
{
add
{
if (_textEditorTextChangedEventHandler == null)
{
_textEditorTextChangedCallbackDelegate = (OnTextChanged);
TextChangedSignal().Connect(_textEditorTextChangedCallbackDelegate);
}
_textEditorTextChangedEventHandler += value;
}
remove
{
_textEditorTextChangedEventHandler -= value;
if (_textEditorTextChangedEventHandler == null && TextChangedSignal().Empty() == false)
{
TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
}
}
}
///
/// Event for the ScrollStateChanged signal which can be used to subscribe or unsubscribe the event handler
/// provided by the user. The ScrollStateChanged signal is emitted when the scroll state changes.
///
/// 3
public event EventHandler ScrollStateChanged
{
add
{
if (_textEditorScrollStateChangedEventHandler == null)
{
_textEditorScrollStateChangedCallbackDelegate = OnScrollStateChanged;
ScrollStateChangedSignal(this).Connect(_textEditorScrollStateChangedCallbackDelegate);
}
_textEditorScrollStateChangedEventHandler += value;
}
remove
{
_textEditorScrollStateChangedEventHandler -= value;
if (_textEditorScrollStateChangedEventHandler == null && ScrollStateChangedSignal(this).Empty() == false)
{
ScrollStateChangedSignal(this).Disconnect(_textEditorScrollStateChangedCallbackDelegate);
}
}
}
///
/// The TranslatableText property.
/// The text can set the SID value.
///
///
/// ResourceManager about multilingual is null.
///
/// 4
public string TranslatableText
{
get
{
return textEditorTextSid;
}
set
{
if (NUIApplication.MultilingualResourceManager == null)
{
throw new ArgumentNullException("ResourceManager about multilingual is null");
}
textEditorTextSid = value;
Text = SetTranslatable(textEditorTextSid);
NotifyPropertyChanged();
}
}
///
/// The TranslatablePlaceholderText property.
/// The text can set the SID value.
///
///
/// ResourceManager about multilingual is null.
///
/// 4
public string TranslatablePlaceholderText
{
get
{
return textEditorPlaceHolderTextSid;
}
set
{
if (NUIApplication.MultilingualResourceManager == null)
{
throw new ArgumentNullException("ResourceManager about multilingual is null");
}
textEditorPlaceHolderTextSid = value;
PlaceholderText = SetTranslatable(textEditorPlaceHolderTextSid);
NotifyPropertyChanged();
}
}
///
/// The Text property.
///
/// 3
public string Text
{
get
{
return (string)GetValue(TextProperty);
}
set
{
SetValueAndForceSendChangeSignal(TextProperty, value);
NotifyPropertyChanged();
}
}
///
/// The TextColor property.
///
/// 3
public Vector4 TextColor
{
get
{
return (Vector4)GetValue(TextColorProperty);
}
set
{
SetValue(TextColorProperty, value);
NotifyPropertyChanged();
}
}
///
/// The FontFamily property.
///
/// 3
public string FontFamily
{
get
{
return (string)GetValue(FontFamilyProperty);
}
set
{
SetValue(FontFamilyProperty, value);
NotifyPropertyChanged();
}
}
///
/// The FontStyle property.
///
/// 3
public PropertyMap FontStyle
{
get
{
return (PropertyMap)GetValue(FontStyleProperty);
}
set
{
SetValue(FontStyleProperty, value);
NotifyPropertyChanged();
}
}
///
/// The PointSize property.
///
/// 3
public float PointSize
{
get
{
return (float)GetValue(PointSizeProperty);
}
set
{
SetValue(PointSizeProperty, value);
NotifyPropertyChanged();
}
}
///
/// The HorizontalAlignment property.
///
/// 3
public HorizontalAlignment HorizontalAlignment
{
get
{
return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
}
set
{
SetValue(HorizontalAlignmentProperty, value);
NotifyPropertyChanged();
}
}
///
/// The ScrollThreshold property.
///
/// 3
public float ScrollThreshold
{
get
{
return (float)GetValue(ScrollThresholdProperty);
}
set
{
SetValue(ScrollThresholdProperty, value);
NotifyPropertyChanged();
}
}
///
/// The ScrollSpeed property.
///
/// 3
public float ScrollSpeed
{
get
{
return (float)GetValue(ScrollSpeedProperty);
}
set
{
SetValue(ScrollSpeedProperty, value);
NotifyPropertyChanged();
}
}
///
/// The PrimaryCursorColor property.
///
/// 3
public Vector4 PrimaryCursorColor
{
get
{
return (Vector4)GetValue(PrimaryCursorColorProperty);
}
set
{
SetValue(PrimaryCursorColorProperty, value);
NotifyPropertyChanged();
}
}
///
/// The SecondaryCursorColor property.
///
/// 3
public Vector4 SecondaryCursorColor
{
get
{
return (Vector4)GetValue(SecondaryCursorColorProperty);
}
set
{
SetValue(SecondaryCursorColorProperty, value);
NotifyPropertyChanged();
}
}
///
/// The EnableCursorBlink property.
///
/// 3
public bool EnableCursorBlink
{
get
{
return (bool)GetValue(EnableCursorBlinkProperty);
}
set
{
SetValue(EnableCursorBlinkProperty, value);
NotifyPropertyChanged();
}
}
///
/// The CursorBlinkInterval property.
///
/// 3
public float CursorBlinkInterval
{
get
{
return (float)GetValue(CursorBlinkIntervalProperty);
}
set
{
SetValue(CursorBlinkIntervalProperty, value);
NotifyPropertyChanged();
}
}
///
/// The CursorBlinkDuration property.
///
/// 3
public float CursorBlinkDuration
{
get
{
return (float)GetValue(CursorBlinkDurationProperty);
}
set
{
SetValue(CursorBlinkDurationProperty, value);
NotifyPropertyChanged();
}
}
///
/// The CursorWidth property.
///
/// 3
public int CursorWidth
{
get
{
return (int)GetValue(CursorWidthProperty);
}
set
{
SetValue(CursorWidthProperty, value);
NotifyPropertyChanged();
}
}
///
/// The GrabHandleImage property.
///
/// 3
public string GrabHandleImage
{
get
{
return (string)GetValue(GrabHandleImageProperty);
}
set
{
SetValue(GrabHandleImageProperty, value);
NotifyPropertyChanged();
}
}
///
/// The GrabHandlePressedImage property.
///
/// 3
public string GrabHandlePressedImage
{
get
{
return (string)GetValue(GrabHandlePressedImageProperty);
}
set
{
SetValue(GrabHandlePressedImageProperty, value);
NotifyPropertyChanged();
}
}
///
/// The SelectionHandleImageLeft property.
///
/// 3
public PropertyMap SelectionHandleImageLeft
{
get
{
return (PropertyMap)GetValue(SelectionHandleImageLeftProperty);
}
set
{
SetValue(SelectionHandleImageLeftProperty, value);
NotifyPropertyChanged();
}
}
///
/// The SelectionHandleImageRight property.
///
/// 3
public PropertyMap SelectionHandleImageRight
{
get
{
return (PropertyMap)GetValue(SelectionHandleImageRightProperty);
}
set
{
SetValue(SelectionHandleImageRightProperty, value);
NotifyPropertyChanged();
}
}
///
/// The SelectionHandlePressedImageLeft property.
///
/// 3
public PropertyMap SelectionHandlePressedImageLeft
{
get
{
return (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty);
}
set
{
SetValue(SelectionHandlePressedImageLeftProperty, value);
NotifyPropertyChanged();
}
}
///
/// The SelectionHandlePressedImageRight property.
///
/// 3
public PropertyMap SelectionHandlePressedImageRight
{
get
{
return (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty);
}
set
{
SetValue(SelectionHandlePressedImageRightProperty, value);
NotifyPropertyChanged();
}
}
///
/// The SelectionHandleMarkerImageLeft property.
///
/// 3
public PropertyMap SelectionHandleMarkerImageLeft
{
get
{
return (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty);
}
set
{
SetValue(SelectionHandleMarkerImageLeftProperty, value);
NotifyPropertyChanged();
}
}
///
/// The SelectionHandleMarkerImageRight property.
///
/// 3
public PropertyMap SelectionHandleMarkerImageRight
{
get
{
return (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty);
}
set
{
SetValue(SelectionHandleMarkerImageRightProperty, value);
NotifyPropertyChanged();
}
}
///
/// The SelectionHighlightColor property.
///
/// 3
public Vector4 SelectionHighlightColor
{
get
{
return (Vector4)GetValue(SelectionHighlightColorProperty);
}
set
{
SetValue(SelectionHighlightColorProperty, value);
NotifyPropertyChanged();
}
}
///
/// The DecorationBoundingBox property.
///
/// 3
public Rectangle DecorationBoundingBox
{
get
{
return (Rectangle)GetValue(DecorationBoundingBoxProperty);
}
set
{
SetValue(DecorationBoundingBoxProperty, value);
NotifyPropertyChanged();
}
}
///
/// The EnableMarkup property.
///
/// 3
public bool EnableMarkup
{
get
{
return (bool)GetValue(EnableMarkupProperty);
}
set
{
SetValue(EnableMarkupProperty, value);
NotifyPropertyChanged();
}
}
///
/// The InputColor property.
///
/// 3
public Vector4 InputColor
{
get
{
return (Vector4)GetValue(InputColorProperty);
}
set
{
SetValue(InputColorProperty, value);
NotifyPropertyChanged();
}
}
///
/// The InputFontFamily property.
///
/// 3
public string InputFontFamily
{
get
{
return (string)GetValue(InputFontFamilyProperty);
}
set
{
SetValue(InputFontFamilyProperty, value);
NotifyPropertyChanged();
}
}
///
/// The InputFontStyle property.
///
/// 3
public PropertyMap InputFontStyle
{
get
{
return (PropertyMap)GetValue(InputFontStyleProperty);
}
set
{
SetValue(InputFontStyleProperty, value);
NotifyPropertyChanged();
}
}
///
/// The InputPointSize property.
///
/// 3
public float InputPointSize
{
get
{
return (float)GetValue(InputPointSizeProperty);
}
set
{
SetValue(InputPointSizeProperty, value);
NotifyPropertyChanged();
}
}
///
/// The LineSpacing property.
///
/// 3
public float LineSpacing
{
get
{
return (float)GetValue(LineSpacingProperty);
}
set
{
SetValue(LineSpacingProperty, value);
NotifyPropertyChanged();
}
}
///
/// The InputLineSpacing property.
///
/// 3
public float InputLineSpacing
{
get
{
return (float)GetValue(InputLineSpacingProperty);
}
set
{
SetValue(InputLineSpacingProperty, value);
NotifyPropertyChanged();
}
}
///
/// The Underline property.
///
/// 3
public PropertyMap Underline
{
get
{
return (PropertyMap)GetValue(UnderlineProperty);
}
set
{
SetValue(UnderlineProperty, value);
NotifyPropertyChanged();
}
}
///
/// The InputUnderline property.
///
/// 3
public string InputUnderline
{
get
{
return (string)GetValue(InputUnderlineProperty);
}
set
{
SetValue(InputUnderlineProperty, value);
NotifyPropertyChanged();
}
}
///
/// The Shadow property.
///
/// 3
public PropertyMap Shadow
{
get
{
return (PropertyMap)GetValue(ShadowProperty);
}
set
{
SetValue(ShadowProperty, value);
NotifyPropertyChanged();
}
}
///
/// The InputShadow property.
///
/// 3
public string InputShadow
{
get
{
return (string)GetValue(InputShadowProperty);
}
set
{
SetValue(InputShadowProperty, value);
NotifyPropertyChanged();
}
}
///
/// The Emboss property.
///
/// 3
public string Emboss
{
get
{
return (string)GetValue(EmbossProperty);
}
set
{
SetValue(EmbossProperty, value);
NotifyPropertyChanged();
}
}
///
/// The InputEmboss property.
///
/// 3
public string InputEmboss
{
get
{
return (string)GetValue(InputEmbossProperty);
}
set
{
SetValue(InputEmbossProperty, value);
NotifyPropertyChanged();
}
}
///
/// The Outline property.
///
/// 3
public PropertyMap Outline
{
get
{
return (PropertyMap)GetValue(OutlineProperty);
}
set
{
SetValue(OutlineProperty, value);
NotifyPropertyChanged();
}
}
///
/// The InputOutline property.
///
/// 3
public string InputOutline
{
get
{
return (string)GetValue(InputOutlineProperty);
}
set
{
SetValue(InputOutlineProperty, value);
NotifyPropertyChanged();
}
}
///
/// The SmoothScroll property.
///
/// 3
public bool SmoothScroll
{
get
{
return (bool)GetValue(SmoothScrollProperty);
}
set
{
SetValue(SmoothScrollProperty, value);
NotifyPropertyChanged();
}
}
///
/// The SmoothScrollDuration property.
///
/// 3
public float SmoothScrollDuration
{
get
{
return (float)GetValue(SmoothScrollDurationProperty);
}
set
{
SetValue(SmoothScrollDurationProperty, value);
NotifyPropertyChanged();
}
}
///
/// The EnableScrollBar property.
///
/// 3
public bool EnableScrollBar
{
get
{
return (bool)GetValue(EnableScrollBarProperty);
}
set
{
SetValue(EnableScrollBarProperty, value);
NotifyPropertyChanged();
}
}
///
/// The ScrollBarShowDuration property.
///
/// 3
public float ScrollBarShowDuration
{
get
{
return (float)GetValue(ScrollBarShowDurationProperty);
}
set
{
SetValue(ScrollBarShowDurationProperty, value);
NotifyPropertyChanged();
}
}
///
/// The ScrollBarFadeDuration property.
///
/// 3
public float ScrollBarFadeDuration
{
get
{
return (float)GetValue(ScrollBarFadeDurationProperty);
}
set
{
SetValue(ScrollBarFadeDurationProperty, value);
NotifyPropertyChanged();
}
}
///
/// The PixelSize property.
///
/// 3
public float PixelSize
{
get
{
return (float)GetValue(PixelSizeProperty);
}
set
{
SetValue(PixelSizeProperty, value);
NotifyPropertyChanged();
}
}
///
/// The line count of the text.
///
/// 3
public int LineCount
{
get
{
int temp = 0;
GetProperty(TextEditor.Property.LINE_COUNT).Get(out temp);
return temp;
}
}
///
/// The text to display when the TextEditor is empty and inactive.
///
/// 3
public string PlaceholderText
{
get
{
return (string)GetValue(PlaceholderTextProperty);
}
set
{
SetValue(PlaceholderTextProperty, value);
NotifyPropertyChanged();
}
}
///
/// The Placeholder text color.
///
/// 3
public Color PlaceholderTextColor
{
get
{
return (Color)GetValue(PlaceholderTextColorProperty);
}
set
{
SetValue(PlaceholderTextColorProperty, value);
NotifyPropertyChanged();
}
}
///
/// The EnableSelection property.
///
/// 3
public bool EnableSelection
{
get
{
return (bool)GetValue(EnableSelectionProperty);
}
set
{
SetValue(EnableSelectionProperty, value);
NotifyPropertyChanged();
}
}
///
/// The Placeholder property.
/// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
///
///
/// The following example demonstrates how to set the placeholder property.
///
/// PropertyMap propertyMap = new PropertyMap();
/// propertyMap.Add("text", new PropertyValue("Setting Placeholder Text"));
/// propertyMap.Add("textFocused", new PropertyValue("Setting Placeholder Text Focused"));
/// propertyMap.Add("color", new PropertyValue(Color.Red));
/// propertyMap.Add("fontFamily", new PropertyValue("Arial"));
/// propertyMap.Add("pointSize", new PropertyValue(12.0f));
///
/// PropertyMap fontStyleMap = new PropertyMap();
/// fontStyleMap.Add("weight", new PropertyValue("bold"));
/// fontStyleMap.Add("width", new PropertyValue("condensed"));
/// fontStyleMap.Add("slant", new PropertyValue("italic"));
/// propertyMap.Add("fontStyle", new PropertyValue(fontStyleMap));
///
/// TextEditor editor = new TextEditor();
/// editor.Placeholder = propertyMap;
///
///
/// 3
public Tizen.NUI.PropertyMap Placeholder
{
get
{
return (PropertyMap)GetValue(PlaceholderProperty);
}
set
{
SetValue(PlaceholderProperty, value);
NotifyPropertyChanged();
}
}
///
/// The LineWrapMode property.
/// The line wrap mode when the text lines over the layout width.
///
/// 4
public LineWrapMode LineWrapMode
{
get
{
return (LineWrapMode)GetValue(LineWrapModeProperty);
}
set
{
SetValue(LineWrapModeProperty, value);
NotifyPropertyChanged();
}
}
///
/// Enables Text selection using Shift key.
///
/// 5
/// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public bool EnableShiftSelection
{
get
{
return (bool)GetValue(EnableShiftSelectionProperty);
}
set
{
SetValue(EnableShiftSelectionProperty, value);
NotifyPropertyChanged();
}
}
///
/// The text alignment to match the direction of the system language.
///
/// 6
public bool MatchSystemLanguageDirection
{
get
{
return (bool)GetValue(MatchSystemLanguageDirectionProperty);
}
set
{
SetValue(MatchSystemLanguageDirectionProperty, value);
NotifyPropertyChanged();
}
}
/// Only used by the IL of xaml, will never changed to not hidden.
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool IsCreateByXaml
{
get
{
return base.IsCreateByXaml;
}
set
{
base.IsCreateByXaml = value;
if (value == true)
{
this.TextChanged += (obj, e) =>
{
this.Text = this.Text;
};
}
}
}
///
/// Get the InputMethodContext instance.
///
/// The InputMethodContext instance.
/// 5
public InputMethodContext GetInputMethodContext()
{
if (inputMethodContext == null)
{
/*Avoid raising InputMethodContext reference count.*/
inputMethodContext = new InputMethodContext(Interop.TextEditor.TextEditor_GetInputMethodContext(swigCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
return inputMethodContext;
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextEditor obj)
{
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
internal TextEditorSignal TextChangedSignal()
{
TextEditorSignal ret = new TextEditorSignal(Interop.TextEditor.TextEditor_TextChangedSignal(swigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal ScrollStateChangedSignal ScrollStateChangedSignal(TextEditor textEditor)
{
ScrollStateChangedSignal ret = new ScrollStateChangedSignal(Interop.TextEditor.TextEditor_ScrollStateChangedSignal(TextEditor.getCPtr(textEditor)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t InputStyleChangedSignal()
{
SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__TextEditor_Dali__Toolkit__TextEditor__InputStyle__MaskF_t(Interop.TextEditor.TextEditor_InputStyleChangedSignal(swigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Dispose.
///
/// 3
protected override void Dispose(DisposeTypes type)
{
if (disposed)
{
return;
}
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
if (this.HasBody() && _textEditorTextChangedCallbackDelegate != null)
{
TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
}
if (swigCPtr.Handle != global::System.IntPtr.Zero)
{
if (swigCMemOwn)
{
swigCMemOwn = false;
// In order to speed up IME hide, temporarily add
GetInputMethodContext()?.DestroyContext();
Interop.TextEditor.delete_TextEditor(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
base.Dispose(type);
}
private void OnTextChanged(IntPtr textEditor)
{
TextChangedEventArgs e = new TextChangedEventArgs();
// Populate all members of "e" (TextChangedEventArgs) with real data
e.TextEditor = Registry.GetManagedBaseHandleFromNativePtr(textEditor) as TextEditor;
if (_textEditorTextChangedEventHandler != null)
{
//here we send all data to user event handlers
_textEditorTextChangedEventHandler(this, e);
}
}
private void OnScrollStateChanged(IntPtr textEditor, ScrollState state)
{
ScrollStateChangedEventArgs e = new ScrollStateChangedEventArgs();
if (textEditor != global::System.IntPtr.Zero)
{
// Populate all members of "e" (ScrollStateChangedEventArgs) with real data
e.TextEditor = Registry.GetManagedBaseHandleFromNativePtr(textEditor) as TextEditor;
e.ScrollState = state;
}
if (_textEditorScrollStateChangedEventHandler != null)
{
//here we send all data to user event handlers
_textEditorScrollStateChangedEventHandler(this, e);
}
}
private string SetTranslatable(string textEditorSid)
{
string translatableText = null;
translatableText = NUIApplication.MultilingualResourceManager?.GetString(textEditorSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
if (translatableText != null)
{
if (systemlangTextFlag == false)
{
SystemSettings.LocaleLanguageChanged += new WeakEventHandler(SystemSettings_LocaleLanguageChanged).Handler;
systemlangTextFlag = true;
}
return translatableText;
}
else
{
translatableText = "";
return translatableText;
}
}
private void SystemSettings_LocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
{
if (textEditorTextSid != null)
{
Text = NUIApplication.MultilingualResourceManager?.GetString(textEditorTextSid, new CultureInfo(e.Value.Replace("_", "-")));
}
if (textEditorPlaceHolderTextSid != null)
{
PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textEditorPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
}
}
///
/// Event arguments that passed via the TextChanged signal.
///
/// 3
public class TextChangedEventArgs : EventArgs
{
private TextEditor _textEditor;
///
/// TextEditor - is the texteditor control which has the text contents changed.
///
/// 3
public TextEditor TextEditor
{
get
{
return _textEditor;
}
set
{
_textEditor = value;
}
}
}
///
/// Event arguments that passed via the ScrollStateChanged signal.
///
/// 3
public class ScrollStateChangedEventArgs : EventArgs
{
private TextEditor _textEditor;
private ScrollState _scrollState;
///
/// TextEditor - is the texteditor control which has the scroll state changed.
///
/// 3
public TextEditor TextEditor
{
get
{
return _textEditor;
}
set
{
_textEditor = value;
}
}
///
/// ScrollState - is the texteditor control scroll state.
///
/// 3
public ScrollState ScrollState
{
get
{
return _scrollState;
}
set
{
_scrollState = value;
}
}
}
internal new class Property
{
internal static readonly int RENDERING_BACKEND = Interop.TextEditor.TextEditor_Property_RENDERING_BACKEND_get();
internal static readonly int TEXT = Interop.TextEditor.TextEditor_Property_TEXT_get();
internal static readonly int TEXT_COLOR = Interop.TextEditor.TextEditor_Property_TEXT_COLOR_get();
internal static readonly int FONT_FAMILY = Interop.TextEditor.TextEditor_Property_FONT_FAMILY_get();
internal static readonly int FONT_STYLE = Interop.TextEditor.TextEditor_Property_FONT_STYLE_get();
internal static readonly int POINT_SIZE = Interop.TextEditor.TextEditor_Property_POINT_SIZE_get();
internal static readonly int HORIZONTAL_ALIGNMENT = Interop.TextEditor.TextEditor_Property_HORIZONTAL_ALIGNMENT_get();
internal static readonly int SCROLL_THRESHOLD = Interop.TextEditor.TextEditor_Property_SCROLL_THRESHOLD_get();
internal static readonly int SCROLL_SPEED = Interop.TextEditor.TextEditor_Property_SCROLL_SPEED_get();
internal static readonly int PRIMARY_CURSOR_COLOR = Interop.TextEditor.TextEditor_Property_PRIMARY_CURSOR_COLOR_get();
internal static readonly int SECONDARY_CURSOR_COLOR = Interop.TextEditor.TextEditor_Property_SECONDARY_CURSOR_COLOR_get();
internal static readonly int ENABLE_CURSOR_BLINK = Interop.TextEditor.TextEditor_Property_ENABLE_CURSOR_BLINK_get();
internal static readonly int CURSOR_BLINK_INTERVAL = Interop.TextEditor.TextEditor_Property_CURSOR_BLINK_INTERVAL_get();
internal static readonly int CURSOR_BLINK_DURATION = Interop.TextEditor.TextEditor_Property_CURSOR_BLINK_DURATION_get();
internal static readonly int CURSOR_WIDTH = Interop.TextEditor.TextEditor_Property_CURSOR_WIDTH_get();
internal static readonly int GRAB_HANDLE_IMAGE = Interop.TextEditor.TextEditor_Property_GRAB_HANDLE_IMAGE_get();
internal static readonly int GRAB_HANDLE_PRESSED_IMAGE = Interop.TextEditor.TextEditor_Property_GRAB_HANDLE_PRESSED_IMAGE_get();
internal static readonly int SELECTION_HANDLE_IMAGE_LEFT = Interop.TextEditor.TextEditor_Property_SELECTION_HANDLE_IMAGE_LEFT_get();
internal static readonly int SELECTION_HANDLE_IMAGE_RIGHT = Interop.TextEditor.TextEditor_Property_SELECTION_HANDLE_IMAGE_RIGHT_get();
internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_LEFT = Interop.TextEditor.TextEditor_Property_SELECTION_HANDLE_PRESSED_IMAGE_LEFT_get();
internal static readonly int SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = Interop.TextEditor.TextEditor_Property_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT_get();
internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_LEFT = Interop.TextEditor.TextEditor_Property_SELECTION_HANDLE_MARKER_IMAGE_LEFT_get();
internal static readonly int SELECTION_HANDLE_MARKER_IMAGE_RIGHT = Interop.TextEditor.TextEditor_Property_SELECTION_HANDLE_MARKER_IMAGE_RIGHT_get();
internal static readonly int SELECTION_HIGHLIGHT_COLOR = Interop.TextEditor.TextEditor_Property_SELECTION_HIGHLIGHT_COLOR_get();
internal static readonly int DECORATION_BOUNDING_BOX = Interop.TextEditor.TextEditor_Property_DECORATION_BOUNDING_BOX_get();
internal static readonly int ENABLE_MARKUP = Interop.TextEditor.TextEditor_Property_ENABLE_MARKUP_get();
internal static readonly int INPUT_COLOR = Interop.TextEditor.TextEditor_Property_INPUT_COLOR_get();
internal static readonly int INPUT_FONT_FAMILY = Interop.TextEditor.TextEditor_Property_INPUT_FONT_FAMILY_get();
internal static readonly int INPUT_FONT_STYLE = Interop.TextEditor.TextEditor_Property_INPUT_FONT_STYLE_get();
internal static readonly int INPUT_POINT_SIZE = Interop.TextEditor.TextEditor_Property_INPUT_POINT_SIZE_get();
internal static readonly int LINE_SPACING = Interop.TextEditor.TextEditor_Property_LINE_SPACING_get();
internal static readonly int INPUT_LINE_SPACING = Interop.TextEditor.TextEditor_Property_INPUT_LINE_SPACING_get();
internal static readonly int UNDERLINE = Interop.TextEditor.TextEditor_Property_UNDERLINE_get();
internal static readonly int INPUT_UNDERLINE = Interop.TextEditor.TextEditor_Property_INPUT_UNDERLINE_get();
internal static readonly int SHADOW = Interop.TextEditor.TextEditor_Property_SHADOW_get();
internal static readonly int INPUT_SHADOW = Interop.TextEditor.TextEditor_Property_INPUT_SHADOW_get();
internal static readonly int EMBOSS = Interop.TextEditor.TextEditor_Property_EMBOSS_get();
internal static readonly int INPUT_EMBOSS = Interop.TextEditor.TextEditor_Property_INPUT_EMBOSS_get();
internal static readonly int OUTLINE = Interop.TextEditor.TextEditor_Property_OUTLINE_get();
internal static readonly int INPUT_OUTLINE = Interop.TextEditor.TextEditor_Property_INPUT_OUTLINE_get();
internal static readonly int SMOOTH_SCROLL = Interop.TextEditor.TextEditor_Property_SMOOTH_SCROLL_get();
internal static readonly int SMOOTH_SCROLL_DURATION = Interop.TextEditor.TextEditor_Property_SMOOTH_SCROLL_DURATION_get();
internal static readonly int ENABLE_SCROLL_BAR = Interop.TextEditor.TextEditor_Property_ENABLE_SCROLL_BAR_get();
internal static readonly int SCROLL_BAR_SHOW_DURATION = Interop.TextEditor.TextEditor_Property_SCROLL_BAR_SHOW_DURATION_get();
internal static readonly int SCROLL_BAR_FADE_DURATION = Interop.TextEditor.TextEditor_Property_SCROLL_BAR_FADE_DURATION_get();
internal static readonly int PIXEL_SIZE = Interop.TextEditor.TextEditor_Property_PIXEL_SIZE_get();
internal static readonly int LINE_COUNT = Interop.TextEditor.TextEditor_Property_LINE_COUNT_get();
internal static readonly int ENABLE_SELECTION = Interop.TextEditor.TextEditor_Property_ENABLE_SELECTION_get();
internal static readonly int PLACEHOLDER = Interop.TextEditor.TextEditor_Property_PLACEHOLDER_get();
internal static readonly int LINE_WRAP_MODE = Interop.TextEditor.TextEditor_Property_LINE_WRAP_MODE_get();
internal static readonly int PLACEHOLDER_TEXT = Interop.TextEditor.TextEditor_Property_PLACEHOLDER_TEXT_get();
internal static readonly int PLACEHOLDER_TEXT_COLOR = Interop.TextEditor.TextEditor_Property_PLACEHOLDER_TEXT_COLOR_get();
internal static readonly int ENABLE_SHIFT_SELECTION = Interop.TextEditor.TextEditor_Property_ENABLE_SHIFT_SELECTION_get();
internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = Interop.TextEditor.TextEditor_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get();
}
internal class InputStyle
{
internal enum Mask
{
None = 0x0000,
Color = 0x0001,
FontFamily = 0x0002,
PointSize = 0x0004,
FontStyle = 0x0008,
LineSpacing = 0x0010,
Underline = 0x0020,
Shadow = 0x0040,
Emboss = 0x0080,
Outline = 0x0100
}
}
}
}