Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DateTimePicker"/> class.
 /// </summary>
 public DateTimePicker() : base()
 {
     Handle = Libui.uiNewDateTimePicker();
     InitializeEvents();
 }
Ejemplo n.º 2
0
 public TextLayout(TextLayoutOptions options)
 {
     Handle  = Libui.uiDrawNewTextLayout(options.Native);
     Options = options;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ComboBox"/> class.
 /// </summary>
 public EditableComboBox() : base(new SafeControlHandle(Libui.NewEditableCombobox())) => InitializeEvents();
Ejemplo n.º 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);
Ejemplo n.º 5
0
 public FontFeatures Clone() => new FontFeatures(Libui.uiOpenTypeFeaturesClone(this));
Ejemplo n.º 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();
 }
Ejemplo n.º 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;
Ejemplo n.º 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);
Ejemplo n.º 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);
Ejemplo n.º 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();
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Initalizes a new instance of the <see cref="ComboBox"/> class.
 /// </summary>
 public ComboBox() : base()
 {
     Handle = Libui.uiNewCombobox();
     InitializeEvents();
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TextBox"/> class.
 /// </summary>
 public TextBox() : base()
 {
     Handle = Libui.uiNewEntry();
     InitializeEvents();
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VerticalSeparator"/> class.
 /// </summary>
 public VerticalSeparator() : base(new SafeControlHandle(Libui.Call <Libui.uiNewVerticalSeparator>()()))
 {
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HorizontalSeparator"/> class.
 /// </summary>
 public HorizontalSeparator() : base(new SafeControlHandle(Libui.Call <Libui.uiNewHorizontalSeparator>()()))
 {
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ColorPicker"/> class.
 /// </summary>
 public ColorPicker()
 {
     Handle = Libui.uiNewColorButton();
     color  = Color.Empty;
     InitializeEvents();
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProgressBar"/> class.
 /// </summary>
 public ProgressBar() : base(new SafeControlHandle(Libui.Call <Libui.uiNewProgressBar>()()))
 {
 }
Ejemplo n.º 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);
Ejemplo n.º 18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TextBlock"/> class.
 /// </summary>
 public TextBlock() : base(new SafeControlHandle(Libui.NewMultilineEntry()), true)
 {
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RadioButtonList"/> class.
 /// </summary>
 public RadioButtonList() : base(new SafeControlHandle(Libui.NewRadioButtons())) => InitializeEvents();
Ejemplo n.º 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();
 }
Ejemplo n.º 21
0
 public FontFeatures()
 {
     Handle = Libui.uiNewOpenTypeFeatures();
     InitializeEvents();
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 23
0
 public void Remove(char a, char b, char c, char d) => Libui.uiOpenTypeFeaturesRemove(this, a, b, c, d);
Ejemplo n.º 24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SearchBox"/> class.
 /// </summary>
 public SearchBox() : base(new SafeControlHandle(Libui.NewSearchEntry()), true)
 {
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PasswordBox"/> class.
 /// </summary>
 public PasswordBox() : base(new SafeControlHandle(Libui.NewPasswordEntry()), true)
 {
 }
Ejemplo n.º 26
0
 public NonWrappingTextBlock() : base(new SafeControlHandle(Libui.NewNonWrappingMultilineEntry()), true)
 {
 }
Ejemplo n.º 27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TimePicker"/> class.
 /// </summary>
 public TimePicker() : base(new SafeControlHandle(Libui.NewTimePicker())) => InitializeEvents();
Ejemplo n.º 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();
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Initializes this UI component's events.
 /// </summary>
 protected override void InitializeEvents() => Libui.uiEntryOnChanged(this, (entry, data) => { OnTextChanged(EventArgs.Empty); }, IntPtr.Zero);
Ejemplo n.º 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);