/// </summary>
public enum BackgroundOptions
{
-
/// <summary>
/// Centers the background image
/// </summary>
namespace ElmSharp
{
+ /// <summary>
+ /// The check is a widget allows for toggling a value between true and false.
+ /// </summary>
public class Check : Layout
{
private SmartEvent _changed;
private bool _currentState;
+ /// <summary>
+ /// Creates and initializes a new instance of the Check class.
+ /// </summary>
+ /// <param name="parent">
+ /// The EvasObject to which the new Check will be attached as a child.
+ /// </param>
public Check(EvasObject parent) : base(parent)
{
_changed = new SmartEvent(this, this.RealHandle, "changed");
};
}
+ /// <summary>
+ /// StateChanged will be triggered when the IsChecked in the Check is changed.
+ /// </summary>
public event EventHandler<CheckStateChangedEventArgs> StateChanged;
+ /// <summary>
+ /// Sets or gets whether the given Check is checked or not.
+ /// </summary>
+ /// <remarks>
+ /// When object is checked, the value will set to true, Conversely will set to false.
+ /// </remarks>
public bool IsChecked
{
get
namespace ElmSharp
{
+ /// <summary>
+ /// It inherits System.EventArgs.
+ /// The CheckStateChangedEventArgs is EventArgs to record Check's state.
+ /// Include old state and new state.
+ /// </summary>
public class CheckStateChangedEventArgs : EventArgs
{
+ /// <summary>
+ /// Gets the OldState property.The return type is bool.
+ /// </summary>
public bool OldState { get; private set; }
+ /// <summary>
+ /// Gets the NewState property.The return type is bool.
+ /// </summary>
public bool NewState { get; private set; }
+ /// <summary>
+ /// Creates and initializes a new instance of the CheckStateChangedEventArgs class.
+ /// </summary>
+ /// <param name="oldState">Old state of Check which to use this CheckStateChangedEventArgs.</param>
+ /// <param name="newState">New state of Check which to use this CheckStateChangedEventArgs.</param>
public CheckStateChangedEventArgs(bool oldState, bool newState)
{
this.OldState = oldState;
namespace ElmSharp
{
+ /// <summary>
+ /// The Color is a struct to record Check's state.
+ /// </summary>
public struct Color
{
readonly int _a;
Rgb
}
+ /// <summary>
+ /// Gets a default Color instance.
+ /// </summary>
+ /// <remarks>
+ /// In default Color instance,Mode type is Default,RGBA all set as -1.
+ /// </remarks>
public static Color Default
{
get { return new Color(-1, -1, -1, -1, Mode.Default); }
}
+ /// <summary>
+ /// Gets whether the Color instance's mode is default or not.
+ /// Return type is bool.
+ /// </summary>
public bool IsDefault
{
get { return _mode == Mode.Default; }
}
+ /// <summary>
+ /// Gets A value of RGBA.
+ /// A means the Alpha in color.
+ /// </summary>
public int A
{
get { return _a; }
}
+ /// <summary>
+ /// Gets R value of RGBA.
+ /// R means the Red in color.
+ /// </summary>
public int R
{
get { return _r; }
}
+ /// <summary>
+ /// Gets G value of RGBA.
+ /// G means the Green in color.
+ /// </summary>
public int G
{
get { return _g; }
}
+ /// <summary>
+ /// Gets B value of RGBA.
+ /// B means the Blue in color.
+ /// </summary>
public int B
{
get { return _b; }
}
+ /// <summary>
+ /// Creates and initializes a new instance of the Color class.
+ /// With RGB parameters.
+ /// </summary>
+ /// <param name="r">Red of RGB</param>
+ /// <param name="g">Green of RGB</param>
+ /// <param name="b">Blue of RGB</param>
public Color(int r, int g, int b) : this(r, g, b, 255)
{
}
+ /// <summary>
+ /// Creates and initializes a new instance of the Color class.
+ /// With RGBA parameters.
+ /// </summary>
+ /// <param name="r">Red of RGBA</param>
+ /// <param name="g">Green of RGBA<</param>
+ /// <param name="b">Blue of RGBA<</param>
+ /// <param name="a">Alpha of RGBA<</param>
public Color(int r, int g, int b, int a) : this(r, g, b, a, Mode.Rgb)
{
}
return base.Equals(obj);
}
+ /// <summary>
+ /// Compare whether two Color instance is same or not.
+ /// </summary>
+ /// <param name="a">A Color instance.</param>
+ /// <param name="b">A Color instance.</param>
+ /// <returns>The result whether two instance is same or not.
+ /// Return type is bool.If they are same, return true.
+ /// </returns>
public static bool operator ==(Color a, Color b)
{
if (ReferenceEquals(a, b))
return EqualsInner(a, b);
}
+ /// <summary>
+ /// Compare whether two Color instance is different or not.
+ /// </summary>
+ /// <param name="a">A Color instance.</param>
+ /// <param name="b">A Color instance.</param>
+ /// <returns>The result whether two instance is different or not.
+ /// Return type is bool.If they are different, return true.
+ /// </returns>
public static bool operator !=(Color a, Color b)
{
return !(a == b);
return string.Format(CultureInfo.InvariantCulture, "[Color: R={0}, G={1}, B={2}, A={3}]", R, G, B, A);
}
+ /// <summary>
+ /// Gets a Color instance with a hexadecimal string parameter.
+ /// </summary>
+ /// <param name="hex">Hexadecimal string.</param>
+ /// <returns>New instance of Color struct.</returns>
public static Color FromHex(string hex)
{
hex = hex.Replace("#", "");
return FromUint(Convert.ToUInt32(hex.Replace("#", ""), 16));
}
+ /// <summary>
+ /// Gets a Color instance with a Unsigned integer parameter.
+ /// </summary>
+ /// <param name="argb">Unsigned integer indicates RGBA.</param>
+ /// <returns>New instance of Color struct.</returns>
[CLSCompliant(false)]
public static Color FromUint(uint argb)
{
return FromRgba((byte)((argb & 0x00ff0000) >> 0x10), (byte)((argb & 0x0000ff00) >> 0x8), (byte)(argb & 0x000000ff), (byte)((argb & 0xff000000) >> 0x18));
}
+ /// <summary>
+ /// Gets a Color instance with R,G,B,A parameters.
+ /// </summary>
+ /// <param name="r">Red in RGBA.</param>
+ /// <param name="g">Green in RGBA.</param>
+ /// <param name="b">Blue in RGBA.</param>
+ /// <param name="a">Alpha in RGBA.</param>
+ /// <returns>New instance of Color struct.</returns>
public static Color FromRgba(int r, int g, int b, int a)
{
return new Color(r, g, b, a);
}
+ /// <summary>
+ /// Gets a Color instance with R,G,B,A parameters.
+ /// </summary>
+ /// <param name="r">Red in RGB.</param>
+ /// <param name="g">Green in RGB.</param>
+ /// <param name="b">Blue in RGB.</param>
+ /// <returns>New instance of Color struct.</returns>
public static Color FromRgb(int r, int g, int b)
{
return FromRgba(r, g, b, 255);
namespace ElmSharp
{
+ /// <summary>
+ /// It inherits System.EventArgs.
+ /// Event ColorChanged of ColorSelector contain ColorChangedEventArgs as a parameter.
+ /// Refer to <see cref="ColorSelector"/>type.
+ /// </summary>
public class ColorChangedEventArgs : EventArgs
{
+ /// <summary>
+ /// Gets old color in color changed event.
+ /// </summary>
public Color OldColor { get; private set; }
+ /// <summary>
+ /// Gets new color in color changed event.
+ /// </summary>
public Color NewColor { get; private set; }
+ /// <summary>
+ /// Creates and initializes a new instance of the ColorChangedEventArgs class.
+ /// </summary>
+ /// <param name="oldColor">old color</param>
+ /// <param name="newColor">new color</param>
public ColorChangedEventArgs(Color oldColor, Color newColor)
{
this.OldColor = oldColor;
namespace ElmSharp
{
+ /// <summary>
+ /// Enumeration for mode of ColorSelector
+ /// </summary>
public enum ColorSelectorMode
{
+ /// <summary>
+ /// Only color palette is displayed, default
+ /// </summary>
Palette,
+ /// <summary>
+ /// Only color selector is displayed
+ /// </summary>
Components,
+ /// <summary>
+ /// Both Palette and selector is displayed
+ /// </summary>
Both,
+ /// <summary>
+ /// Only color picker is displayed
+ /// </summary>
Picker,
+ /// <summary>
+ /// This mode is not supported. If you use this, nothing will be shown
+ /// </summary>
Plane,
+ /// <summary>
+ /// This mode is not supported. If you use this, it will be shown same with Palette mode
+ /// </summary>
PallettePlane,
+ /// <summary>
+ /// This mode is not supported. If you use this, it will be shown same with Palette mode
+ /// </summary>
All
}
+ /// <summary>
+ /// The ColorSelector is a widget to set a series of colors.
+ /// It also allows to load/save colors from/to config with a unique identifier.
+ /// </summary>
+ /// <remarks>
+ /// By default, the colors are loaded/saved from/to config using "default" identifier.
+ /// The colors can be picked by user from the color set by clicking on individual
+ /// color item on the palette or by selecting it from selector.
+ /// </remarks>
public class ColorSelector : Layout
{
private readonly SmartEvent<ColorChangedEventArgs> _changed;
private Color _currentColor;
+ /// <summary>
+ /// Creates and initializes a new instance of the ColorSelector class.
+ /// </summary>
+ /// <param name="parent"></param>
public ColorSelector(EvasObject parent) : base(parent)
{
_changed = new SmartEvent<ColorChangedEventArgs>(this, "changed", (data, obj, info) =>
});
}
+ /// <summary>
+ /// ColorChanged will be triggered when the SelectedColor changed.
+ /// </summary>
public event EventHandler<ColorChangedEventArgs> ColorChanged
{
add { _changed.On += value; }
remove { _changed.On -= value; }
}
+ /// <summary>
+ /// Gets or sets color of colorselector.
+ /// </summary>
public Color SelectedColor
{
get
}
}
+ /// <summary>
+ /// Gets Alpha of a default Color Class.
+ /// </summary>
public override int Opacity
{
get
}
}
+ /// <summary>
+ /// Gets or sets Colorselector's mode.
+ /// </summary>
public ColorSelectorMode Mode
{
get
}
}
+ /// <summary>
+ /// Get or set current palette's name.
+ /// </summary>
public string PaletteName
{
get
}
}
+ /// <summary>
+ /// Adds a new color item to palette.
+ /// </summary>
+ /// <param name="color">Color item to add</param>
+ /// <returns>A new color palette Item.</returns>
public ColorSelectorItem AddPaletteColor(Color color)
{
ColorSelectorItem item = new ColorSelectorItem();
return item;
}
+ /// <summary>
+ /// Clear the palette items.
+ /// </summary>
public void ClearPalette()
{
Interop.Elementary.elm_colorselector_palette_clear(Handle);
namespace ElmSharp
{
+ /// <summary>
+ /// A instance to the ColorSelector item added.
+ /// </summary>
public class ColorSelectorItem : ItemObject
{
internal ColorSelectorItem() : base(IntPtr.Zero)
{
}
+ /// <summary>
+ /// Gets or sets the Palette item's color
+ /// </summary>
public Color Color
{
get
namespace ElmSharp
{
+ /// <summary>
+ /// The check is a widget that can be used in elementary apps
+ /// to account for space taken up by the indicator,
+ /// virtual keypad & softkey windows when running the illume2 module of E17.
+ /// </summary>
public class Conformant : Widget
{
+ /// <summary>
+ /// Creates and initializes a new instance of the Conformant class.
+ /// </summary>
+ /// <param name="parent">The parent is a given container which will be attached by Conformant
+ /// as a child.It's <see cref="EvasObject"/> type.</param>
public Conformant(Window parent) : base(parent)
{
Interop.Evas.evas_object_size_hint_weight_set(Handle, 1.0, 1.0);
namespace ElmSharp
{
+ /// <summary>
+ /// It inherits <see cref="Widget"/>.
+ /// The Container is a abstract class.
+ /// Other class inherits it to Elementary is about displaying
+ /// its widgets in a nice layout.
+ /// </summary>
public abstract class Container : Widget
{
HashSet<EvasObject> _children = new HashSet<EvasObject>();
+ /// <summary>
+ /// Creates and initializes a new instance of class which inherit from Container.
+ /// </summary>
+ /// <param name="parent">The parent is a given object which will be attached by Container
+ /// as a child.It's <see cref="EvasObject"/> type.</param>
public Container(EvasObject parent) : base(parent)
{
}
+ /// <summary>
+ /// Sets the background color of a given Container.
+ /// </summary>
public override Color BackgroundColor
{
set
namespace ElmSharp
{
+ /// <summary>
+ /// Enumeration of ContextPopup direction type.
+ /// </summary>
public enum ContextPopupDirection
{
+ /// <summary>
+ /// ContextPopup show appear below clicked area
+ /// /// </summary>
Down,
+ /// <summary>
+ /// ContextPopup show appear to the right of the clicked area
+ /// </summary>
Right,
+ /// <summary>
+ /// ContextPopup show appear to the left of the clicked area
+ /// </summary>
Left,
+ /// <summary>
+ /// ContextPopup show appear above the clicked area
+ /// </summary>
Up,
+ /// <summary>
+ /// ContextPopup does not determine it's direction yet
+ /// </summary>
Unknown
}
+ /// <summary>
+ /// It inherits <see cref="Layout"/>.
+ /// The ContextPopup is a widget that when it shown, pops up a list of items.
+ /// </summary>
public class ContextPopup : Layout
{
HashSet<ContextPopupItem> _children = new HashSet<ContextPopupItem>();
SmartEvent _dismissed;
Interop.Evas.SmartCallback _onSelected;
+ /// <summary>
+ /// Creates and initializes a new instance of the ContextPopup class.
+ /// </summary>
+ /// <param name="parent">The parent is a given container which will be attached by ContextPopup
+ /// as a child.It's <see cref="EvasObject"/> type.</param>
public ContextPopup(EvasObject parent) : base(parent)
{
_dismissed = new SmartEvent(this, this.RealHandle, "dismissed");
};
}
+ /// <summary>
+ /// Dismissed is raised when the ContextPopup item is dismissed.
+ /// </summary>
+ /// <remarks>
+ /// Outside of ContextPopup was clicked or it's parent area is changed or the language is changed. and then ContextPopup is dismissed.
+ /// </remarks>
public event EventHandler Dismissed;
+ /// <summary>
+ /// Gets the current direction of a ContextPopup.
+ /// </summary>
+ /// <remarks>
+ /// Once the ContextPopup showed up, the direction would be determined.
+ /// </remarks>
public ContextPopupDirection Direction
{
get
}
}
+ /// <summary>
+ /// Gets or sets the value of current ContextPopup object's orientation.
+ /// True for horizontal mode, False for vertical mode (or errors)
+ /// </summary>
public bool IsHorizontal
{
get
}
}
+ /// <summary>
+ /// Gets or sets whether ContextPopup hide automatically
+ /// or not when parent of ContextPopup is resized.
+ /// </summary>
+ /// <remarks>
+ /// Default value of AutoHide is False.
+ /// </remarks>
public bool AutoHide
{
get
}
}
+ /// <summary>
+ /// Clears all items in the given ContextPopup object.
+ /// </summary>
public void Clear()
{
Interop.Elementary.elm_ctxpopup_clear(Handle);
}
+ /// <summary>
+ /// Sets the direction priority of a ContextPopup.
+ /// </summary>
+ /// <param name="first">1st priority of direction </param>
+ /// <param name="second">2nd priority of direction </param>
+ /// <param name="third">3th priority of direction </param>
+ /// <param name="fourth">4th priority of direction</param>
public void SetDirectionPriorty(ContextPopupDirection first, ContextPopupDirection second, ContextPopupDirection third, ContextPopupDirection fourth)
{
Interop.Elementary.elm_ctxpopup_direction_priority_set(RealHandle, (int)first, (int)second, (int)third, (int)fourth);
}
+ /// <summary>
+ /// Gets the direction priority of a ContextPopup.
+ /// </summary>
+ /// <param name="first">1st priority of direction to be returned</param>
+ /// <param name="second">2nd priority of direction to be returned</param>
+ /// <param name="third">2nd priority of direction to be returned </param>
+ /// <param name="fourth">4th priority of direction to be returned</param>
public void GetDirectionPriority(out ContextPopupDirection first, out ContextPopupDirection second, out ContextPopupDirection third, out ContextPopupDirection fourth)
{
int firstOut, secondOut, thirdOut, fourthOut;
fourth = (ContextPopupDirection)fourthOut;
}
+ /// <summary>
+ /// Adds a new item to a ContextPopup object with label.
+ /// </summary>
+ /// <param name="label">The Label of the new item</param>
+ /// <returns>
+ /// A ContextPopupItem added or NULL, on errors
+ /// </returns>
public ContextPopupItem Append(string label)
{
return Append(label, null);
}
+ /// <summary>
+ /// Adds a new item to a ContextPopup object with label and icon.
+ /// </summary>
+ /// <param name="label">The Label of the new item</param>
+ /// <param name="icon">Icon to be set on new item</param>
+ /// <returns>A ContextPopupItem added or NULL, on errors</returns>
public ContextPopupItem Append(string label, EvasObject icon)
{
ContextPopupItem item = new ContextPopupItem(label, icon);
return item;
}
+ /// <summary>
+ /// Dismiss a ContextPopup object. The ContextPopup will be hidden and the "clicked" signal will be emitted.
+ /// </summary>
public void Dismiss()
{
Interop.Elementary.elm_ctxpopup_dismiss(RealHandle);
}
+ /// <summary>
+ /// Gets the possibility that the direction would be available
+ /// </summary>
+ /// <param name="direction">A direction user wants to check</param>
+ /// <returns>
+ /// Get false if you cannot put it in the direction. Gets true if it's possible.
+ /// </returns>
public bool IsAvailableDirection(ContextPopupDirection direction)
{
return Interop.Elementary.elm_ctxpopup_direction_available_get(RealHandle, (int)direction);
}
+ /// <summary>
+ /// Gets Alpha of a default Color Class.
+ /// </summary>
public override int Opacity
{
get
namespace ElmSharp
{
+ /// <summary>
+ /// It inherits <see cref="ItemObject"/>.
+ /// A instance to the ContextPopup item added.
+ /// </summary>
public class ContextPopupItem : ItemObject
{
internal ContextPopupItem(string text, EvasObject icon) : base(IntPtr.Zero)
Icon = icon;
}
+ /// <summary>
+ /// Gets the Text property of the given ContextPopupItem.
+ /// </summary>
public string Text { get; internal set; }
+
+ /// <summary>
+ /// Gets the Icon(type is <see cref="EvasObject"/>) property of the given ContextPopupItem.
+ /// </summary>
public EvasObject Icon { get; internal set; }
+
+ /// <summary>
+ /// Selected will be triggered when the ContextPopupItem is Selected.
+ /// </summary>
public event EventHandler Selected;
internal void SendSelected()
namespace ElmSharp
{
+ /// <summary>
+ /// It inherits System.EventArgs.
+ /// The DateChanged event in Calendar and DateTimeChanged event in DateTimeSelector.
+ /// contain DateChangedEventArgs as a parameter.
+ /// </summary>
public class DateChangedEventArgs : EventArgs
{
+ /// <summary>
+ /// Gets the OldDate property of the given DateChangedEventArgs.
+ /// </summary>
public DateTime OldDate { get; private set; }
+ /// <summary>
+ /// Gets the NewDate property of the given DateChangedEventArgs.
+ /// </summary>
public DateTime NewDate { get; private set; }
+ /// <summary>
+ /// Creates and initializes a new instance of the DateChangedEventArgs class.
+ /// </summary>
+ /// <param name="oldDate">
+ /// Old date when DateChanged event or DateTimeChanged event triggered
+ /// </param>
+ /// <param name="newDate">
+ /// New date when DateChanged event or DateTimeChanged event triggered
+ /// </param>
public DateChangedEventArgs(DateTime oldDate, DateTime newDate)
{
this.OldDate = oldDate;
namespace ElmSharp
{
+ /// <summary>
+ /// Enumeration of datetime field types for DateTimeSelector.
+ /// </summary>
public enum DateTimeFieldType
{
Year,
AmPm
}
+ /// <summary>
+ /// It inherits <see cref="Layout"/>
+ /// DateTimeSelector is a widget to display and input date & time values.
+ /// This widget displays date and time as per the system's locale settings
+ /// (Date includes Day, Month & Year along with the defined separators and Time includes Hour, Minute & AM/PM fields. Separator for AM/PM field is ignored.
+ /// </summary>
public class DateTimeSelector : Layout
{
SmartEvent _changed;
DateTime _cacheDateTime;
+ /// <summary>
+ /// Creates and initializes a new instance of the DateTimeSelector class.
+ /// </summary>
+ /// <param name="parent">The parent is a given container which will be attached by DateTimeSelector
+ ///as a child.It's <see cref="EvasObject"/> type.</param>
public DateTimeSelector(EvasObject parent) : base(parent)
{
_changed = new SmartEvent(this, this.RealHandle, "changed");
};
}
+ /// <summary>
+ /// ItemSelected is raised when Datetime field value changed.
+ /// </summary>
public event EventHandler<DateChangedEventArgs> DateTimeChanged;
+ /// <summary>
+ /// Gets or sets the datetime format.
+ /// </summary>
+ /// <remarks>
+ /// format is a combination of allowed LIBC date format specifiers like: "%b %d, %Y %I : %M %p".
+ /// </remarks>
public string Format
{
get
}
}
+ /// <summary>
+ /// Gets or sets the upper boundary of DateTime field.
+ /// </summary>
public DateTime MaximumDateTime
{
get
}
}
+ /// <summary>
+ /// Gets or sets the lower boundary of DateTime field.
+ /// </summary>
public DateTime MinimumDateTime
{
get
}
}
+ /// <summary>
+ /// Gets or sets the current value of DateTime field.
+ /// </summary>
public DateTime DateTime
{
get
}
}
+ /// <summary>
+ /// Gets whether a field can be visible.
+ /// </summary>
+ /// <param name="type">Enumeration <see cref="DateTimeFieldType"/></param>
+ /// <returns>
+ /// The field is visible or not.
+ /// Type is bool.If visible, return true.
+ /// </returns>
public bool IsFieldVisible(DateTimeFieldType type)
{
return Interop.Elementary.elm_datetime_field_visible_get(RealHandle, (int)type);
}
+ /// <summary>
+ /// Sets the field limits of a field.
+ /// </summary>
+ /// <param name="type">Enumeration <see cref="DateTimeFieldType"/></param>
+ /// <param name="minimum">minimum limit</param>
+ /// <param name="maximum">maximum limit</param>
public void SetFieldLimit(DateTimeFieldType type, int minimum, int maximum)
{
Interop.Elementary.elm_datetime_field_limit_set(RealHandle, (int)type, minimum, maximum);
}
+ /// <summary>
+ /// Gets whether a field can be visible.
+ /// </summary>
+ /// <param name="type">Enumeration <see cref="DateTimeFieldType"/></param>
+ /// <param name="visible">When set as true, the field type visible.</param>
public void SetFieldVisible(DateTimeFieldType type, bool visible)
{
Interop.Elementary.elm_datetime_field_visible_set(RealHandle, (int)type, visible);
namespace ElmSharp
{
+ /// <summary>
+ /// It inherits System.EventArgs.
+ /// The DisplayedMonthChangedEvent in Calendar contain
+ /// DisplayedMonthChangedEventArgs as a parameter.
+ /// </summary>
public class DisplayedMonthChangedEventArgs : EventArgs
{
+ /// <summary>
+ /// Gets the OldMonth property of the given DisplayedMonthChangedEventArgs.
+ /// </summary>
public int OldMonth { get; private set; }
+ /// <summary>
+ /// Gets the NewMonth property of the given DisplayedMonthChangedEventArgs.
+ /// </summary>
public int NewMonth { get; private set; }
+ /// <summary>
+ /// Creates and initializes a new instance of the DisplayedMonthChangedEventArgs class.
+ /// </summary>
+ /// <param name="oldMonth">
+ /// old month of date when DisplayedMonthChangedEvent triggered.
+ /// </param>
+ /// <param name="newMonth">
+ /// new month of date when DisplayedMonthChangedEvent triggered.
+ /// </param>
public DisplayedMonthChangedEventArgs(int oldMonth, int newMonth)
{
this.OldMonth = oldMonth;