/iui

My UI Widget library for V

Primary LanguageVMIT LicenseMIT

Isaiah's UI

0.0.20 GitHub vlang

Isaiah's cross-platform GUI library for V. Inspired by the syntax of Java's Swing.

Example: (examples/demo/)

Example

fn main() {
	mut window := ui.Window.new(
		title: 'My App'
		width: 640
		height: 480
	)

	// Create Button
	mut btn := ui.Button.new(text: 'My Button')
	btn.subscribe_event('mouse_up', on_click_event)

	// Add Button to Window & Run
	window.add_child(btn)
	window.gg.run()
}

fn on_click_event(mut e ui.MouseEvent) {
	println('Button clicked!')
}

Install

Install via VPM:

v install https://github.com/pisaiah/ui

then

import iui as ui

Components, Containers, & Layouts

Components Containers Panel Layouts
Button Window Flow Layout
Label Panel Border Layout
Panel Tabbox Box Layout
Textbox HBox Grid Layout
TextField VBox
Menubar Modal
MenuItem Page
Checkbox ButtonGroup
Selectbox ScrollView
Treeview Splitview
ProgressBar TitleGroup
Hyperlink Popup
Image
Slider
Switch
  • Components are the elements of the UI (buttons, inputs, etc).
  • Containers are components that can hold other components (known as children).
  • Layouts define how the panel positions it's children.

More details about Layout: A Visual Guide to Layout Managers - docs.oracle.com

Themes

Light:
- Default, Minty, Ocean, Seven.
Dark:
- Dark, Black (with White, Red, & Green accent colors), Seven Dark.

Included Examples

NotepadCalculatorBorderLayout DemoClockInternal Frames
See: Notepad Calculator Border Layout Demo Clock Internal Frames
Mines(Tic Tac Toe)^2Snake
1-Minesweeper 2-Tic-Tac-Toe-Squared 3-Snake

Used in

image

License

This project is licensed under MIT OR Boost.


Veasel (v mascot) on a Swing