Isaiah's cross-platform GUI library for V. Inspired by the syntax of Java's Swing.
Example: (examples/demo/)
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 via VPM:
v install https://github.com/pisaiah/ui
then
import iui as ui
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 |
More details about Layout: A Visual Guide to Layout Managers - docs.oracle.com
Light: - Default, Minty, Ocean, Seven. | |
Dark: - Dark, Black (with White, Red, & Green accent colors), Seven Dark. |
Notepad | Calculator | BorderLayout Demo | Clock | Internal Frames |
---|---|---|---|---|
See: Notepad | Calculator | Border Layout Demo | Clock | Internal Frames |
Mines | (Tic Tac Toe)^2 | Snake |
---|---|---|
1-Minesweeper | 2-Tic-Tac-Toe-Squared | 3-Snake |
This project is licensed under MIT OR Boost.
Veasel (v mascot) on a Swing