/// <summary>
 /// Initializes a new instance of the <see cref="DateTimePicker"/> class.
 /// </summary>
 public DateTimePicker() : base()
 {
     Handle = Libui.uiNewDateTimePicker();
     InitializeEvents();
 }
Beispiel #2
0
 public TextLayout(TextLayoutOptions options)
 {
     Handle  = Libui.uiDrawNewTextLayout(options.Native);
     Options = options;
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ComboBox"/> class.
 /// </summary>
 public EditableComboBox() : base(new SafeControlHandle(Libui.NewEditableCombobox())) => InitializeEvents();
Beispiel #4
0
        // public event EventHandler ForEachFeature;

        public void Add(char a, char b, char c, char d, long value) => Libui.uiOpenTypeFeaturesAdd(this, a, b, c, d, (uint)value);
Beispiel #5
0
 public FontFeatures Clone() => new FontFeatures(Libui.uiOpenTypeFeaturesClone(this));
Beispiel #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Slider"/> class with the specified minimum and maximum values.
 /// </summary>
 /// <param name="min">The minimum this <see cref="Slider"/> object's value can be.</param>
 /// <param name="max">The maximum this <see cref="Slider"/> object's value can be.</param>
 public Slider(int min = 0, int max = 100) : base(new SafeControlHandle(Libui.NewSlider(min, max)))
 {
     MinimumValue = min;
     MaximumValue = max;
     InitializeEvents();
 }
Beispiel #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Path"/> class with the specified <see cref="FillMode"/>.
 /// </summary>
 /// <param name="mode">The <see cref="FillMode"/> specifying how the initialized <see cref="Path"/> should be filled.</param>
 public Path(FillMode mode) : base(new SafePathHandle(Libui.Call <Libui.uiDrawNewPath>()((Libui.uiDrawFillMode)mode))) => FillMode = mode;
Beispiel #8
0
 /// <summary>
 /// Adds a drop-down item to this control.
 /// </summary>
 /// <param name="item">The item to add to this control.</param>
 public override void Add(string item) => Libui.uiComboboxAppend(this, item);
Beispiel #9
0
 /// <summary>
 /// Initializes this UI component's events.
 /// </summary>
 protected sealed override void InitializeEvents() => Libui.uiComboboxOnSelected(this, (c, data) => { OnSelected(EventArgs.Empty); }, IntPtr.Zero);
Beispiel #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Window"/> class, with the options of specifying
 /// the window's width, height, title, and whether or not it has a <see cref="Controls.Containers.Menu"/>.
 /// </summary>
 /// <param name="title">The title at the top of the window.</param>
 /// <param name="width">The width of the window.</param>
 /// <param name="height">The height of the window.</param>
 /// <param name="hasMenu">Whether or not the window will have a menu.</param>
 public Window(string title = "", int width = 600, int height = 400, bool hasMenu = false) : base(new SafeControlHandle(Libui.NewWindow(title, width, height, hasMenu)))
 {
     this.title    = title;
     Console.Title = title;
     size          = new Size(width, height);
     HasMenu       = hasMenu;
     IsMargined    = isMargined;
     Fullscreen    = fullscreen;
     Borderless    = borderless;
     InitializeEvents();
 }
Beispiel #11
0
 /// <summary>
 /// Initalizes a new instance of the <see cref="ComboBox"/> class.
 /// </summary>
 public ComboBox() : base()
 {
     Handle = Libui.uiNewCombobox();
     InitializeEvents();
 }
Beispiel #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TextBox"/> class.
 /// </summary>
 public TextBox() : base()
 {
     Handle = Libui.uiNewEntry();
     InitializeEvents();
 }
Beispiel #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VerticalSeparator"/> class.
 /// </summary>
 public VerticalSeparator() : base(new SafeControlHandle(Libui.Call <Libui.uiNewVerticalSeparator>()()))
 {
 }
Beispiel #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HorizontalSeparator"/> class.
 /// </summary>
 public HorizontalSeparator() : base(new SafeControlHandle(Libui.Call <Libui.uiNewHorizontalSeparator>()()))
 {
 }
Beispiel #15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ColorPicker"/> class.
 /// </summary>
 public ColorPicker()
 {
     Handle = Libui.uiNewColorButton();
     color  = Color.Empty;
     InitializeEvents();
 }
Beispiel #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProgressBar"/> class.
 /// </summary>
 public ProgressBar() : base(new SafeControlHandle(Libui.Call <Libui.uiNewProgressBar>()()))
 {
 }
Beispiel #17
0
 /// <summary>
 /// Initializes this UI component's events.
 /// </summary>
 protected sealed override void InitializeEvents() => Libui.uiColorButtonOnChanged(this, (button, data) => { OnColorChanged(EventArgs.Empty); }, IntPtr.Zero);
Beispiel #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TextBlock"/> class.
 /// </summary>
 public TextBlock() : base(new SafeControlHandle(Libui.NewMultilineEntry()), true)
 {
 }
Beispiel #19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RadioButtonList"/> class.
 /// </summary>
 public RadioButtonList() : base(new SafeControlHandle(Libui.NewRadioButtons())) => InitializeEvents();
Beispiel #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Button"/> class with the specified text.
 /// </summary>
 /// <param name="text">The text to be displayed by this <see cref="Button"/>.</param>
 public Button(string text) : base(new SafeControlHandle(Libui.Call <Libui.uiNewButton>()(text)))
 {
     this.text = text;
     InitializeEvents();
 }
Beispiel #21
0
 public FontFeatures()
 {
     Handle = Libui.uiNewOpenTypeFeatures();
     InitializeEvents();
 }
Beispiel #22
0
 /// <summary>
 /// Removes the first occurrence of a specific <see cref="Control"/> from the <see cref="FormContainerItemCollection"/>.
 /// </summary>
 /// <param name="item">The <see cref="Control"/> to remove from the <see cref="FormContainerItemCollection"/>.</param>
 /// <returns>true if item is successfully removed; otherwise, false. This method also returns false if item was not found in the <see cref="FormContainerItemCollection"/>.</returns>
 public override bool Remove(Control item)
 {
     Libui.uiFormDelete(Owner, item.Index);
     return(base.Remove(item));
 }
Beispiel #23
0
 public void Remove(char a, char b, char c, char d) => Libui.uiOpenTypeFeaturesRemove(this, a, b, c, d);
Beispiel #24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SearchBox"/> class.
 /// </summary>
 public SearchBox() : base(new SafeControlHandle(Libui.NewSearchEntry()), true)
 {
 }
Beispiel #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PasswordBox"/> class.
 /// </summary>
 public PasswordBox() : base(new SafeControlHandle(Libui.NewPasswordEntry()), true)
 {
 }
Beispiel #26
0
 public NonWrappingTextBlock() : base(new SafeControlHandle(Libui.NewNonWrappingMultilineEntry()), true)
 {
 }
Beispiel #27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TimePicker"/> class.
 /// </summary>
 public TimePicker() : base(new SafeControlHandle(Libui.NewTimePicker())) => InitializeEvents();
Beispiel #28
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SpinBox"/> class with the specified minimum and maximum values.
 /// </summary>
 /// <param name="min">The minimum this <see cref="SpinBox"/> object's value can be.</param>
 /// <param name="max">The maximum this <see cref="SpinBox"/> object's value can be.</param>
 public SpinBox(int min = 0, int max = 100) : base(new SafeControlHandle(Libui.Call <Libui.uiNewSpinbox>()(min, max)))
 {
     MinimumValue = min;
     MaximumValue = max;
     InitializeEvents();
 }
Beispiel #29
0
 /// <summary>
 /// Initializes this UI component's events.
 /// </summary>
 protected override void InitializeEvents() => Libui.uiEntryOnChanged(this, (entry, data) => { OnTextChanged(EventArgs.Empty); }, IntPtr.Zero);
Beispiel #30
0
 /// <summary>
 /// Initializes this <see cref="Application"/> object's events.
 /// </summary>
 protected override void InitializeEvents() => Libui.Call <Libui.uiOnShouldQuit>()(data =>
 {
     CloseEventArgs e = new CloseEventArgs();
     Closing.Invoke(this, e);
     return(e.Close);
 }, IntPtr.Zero);