Skip to content

pisaiah/ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Isaiah's UI

0.0.20 GitHub vlang

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 Card Layout
Menubar Modal
MenuItem Page
Checkbox ButtonGroup
Selectbox ScrollView
Treeview Splitview
ProgressBar TitleGroup
Hyperlink Popup
Image DesktopPane
Slider NavPane
Switch
InternalFrame
NavItem
  • 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 Blue, 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