/// <summary> /// Initializes a new instance of the <see cref="DateTimePicker"/> class. /// </summary> public DateTimePicker() : base() { Handle = Libui.uiNewDateTimePicker(); InitializeEvents(); }
public TextLayout(TextLayoutOptions options) { Handle = Libui.uiDrawNewTextLayout(options.Native); Options = options; }
/// <summary> /// Initializes a new instance of the <see cref="ComboBox"/> class. /// </summary> public EditableComboBox() : base(new SafeControlHandle(Libui.NewEditableCombobox())) => InitializeEvents();
// 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);
public FontFeatures Clone() => new FontFeatures(Libui.uiOpenTypeFeaturesClone(this));
/// <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(); }
/// <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;
/// <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);
/// <summary> /// Initializes this UI component's events. /// </summary> protected sealed override void InitializeEvents() => Libui.uiComboboxOnSelected(this, (c, data) => { OnSelected(EventArgs.Empty); }, IntPtr.Zero);
/// <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(); }
/// <summary> /// Initalizes a new instance of the <see cref="ComboBox"/> class. /// </summary> public ComboBox() : base() { Handle = Libui.uiNewCombobox(); InitializeEvents(); }
/// <summary> /// Initializes a new instance of the <see cref="TextBox"/> class. /// </summary> public TextBox() : base() { Handle = Libui.uiNewEntry(); InitializeEvents(); }
/// <summary> /// Initializes a new instance of the <see cref="VerticalSeparator"/> class. /// </summary> public VerticalSeparator() : base(new SafeControlHandle(Libui.Call <Libui.uiNewVerticalSeparator>()())) { }
/// <summary> /// Initializes a new instance of the <see cref="HorizontalSeparator"/> class. /// </summary> public HorizontalSeparator() : base(new SafeControlHandle(Libui.Call <Libui.uiNewHorizontalSeparator>()())) { }
/// <summary> /// Initializes a new instance of the <see cref="ColorPicker"/> class. /// </summary> public ColorPicker() { Handle = Libui.uiNewColorButton(); color = Color.Empty; InitializeEvents(); }
/// <summary> /// Initializes a new instance of the <see cref="ProgressBar"/> class. /// </summary> public ProgressBar() : base(new SafeControlHandle(Libui.Call <Libui.uiNewProgressBar>()())) { }
/// <summary> /// Initializes this UI component's events. /// </summary> protected sealed override void InitializeEvents() => Libui.uiColorButtonOnChanged(this, (button, data) => { OnColorChanged(EventArgs.Empty); }, IntPtr.Zero);
/// <summary> /// Initializes a new instance of the <see cref="TextBlock"/> class. /// </summary> public TextBlock() : base(new SafeControlHandle(Libui.NewMultilineEntry()), true) { }
/// <summary> /// Initializes a new instance of the <see cref="RadioButtonList"/> class. /// </summary> public RadioButtonList() : base(new SafeControlHandle(Libui.NewRadioButtons())) => InitializeEvents();
/// <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(); }
public FontFeatures() { Handle = Libui.uiNewOpenTypeFeatures(); InitializeEvents(); }
/// <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)); }
public void Remove(char a, char b, char c, char d) => Libui.uiOpenTypeFeaturesRemove(this, a, b, c, d);
/// <summary> /// Initializes a new instance of the <see cref="SearchBox"/> class. /// </summary> public SearchBox() : base(new SafeControlHandle(Libui.NewSearchEntry()), true) { }
/// <summary> /// Initializes a new instance of the <see cref="PasswordBox"/> class. /// </summary> public PasswordBox() : base(new SafeControlHandle(Libui.NewPasswordEntry()), true) { }
public NonWrappingTextBlock() : base(new SafeControlHandle(Libui.NewNonWrappingMultilineEntry()), true) { }
/// <summary> /// Initializes a new instance of the <see cref="TimePicker"/> class. /// </summary> public TimePicker() : base(new SafeControlHandle(Libui.NewTimePicker())) => InitializeEvents();
/// <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(); }
/// <summary> /// Initializes this UI component's events. /// </summary> protected override void InitializeEvents() => Libui.uiEntryOnChanged(this, (entry, data) => { OnTextChanged(EventArgs.Empty); }, IntPtr.Zero);
/// <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);