All Projects → lolgab → scalaui

lolgab / scalaui

Licence: MIT License
Scala Native GUI framework based on libui

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to scalaui

Wxwidgets
wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.
Stars: ✭ 3,994 (+7032.14%)
Mutual labels:  gtk, cocoa, win32
Crosswindow
💻📱 A cross platform system abstraction library written in C++ for managing windows and performing OS tasks.
Stars: ✭ 155 (+176.79%)
Mutual labels:  cocoa, win32
uibuilder.nim
UI prototyping w/ Glade for lazy me
Stars: ✭ 21 (-62.5%)
Mutual labels:  gtk, libui
ldview
Real-time 3D viewer for displaying LDraw models
Stars: ✭ 65 (+16.07%)
Mutual labels:  cocoa, win32
Pywebview
Build GUI for your Python program with JavaScript, HTML, and CSS
Stars: ✭ 2,649 (+4630.36%)
Mutual labels:  gtk, cocoa
Drill
Search files without indexing, but clever crawling
Stars: ✭ 224 (+300%)
Mutual labels:  gtk, win32
webviewhs
🌐 A Haskell binding to the webview library created by Serge Zaitsev.
Stars: ✭ 109 (+94.64%)
Mutual labels:  gtk, cocoa
quickmd
Quickly preview a markdown file
Stars: ✭ 24 (-57.14%)
Mutual labels:  gtk
WebPKit
A framework that extends a variety of Cocoa APIs with capabilities for encoding and decoding WebP files for all of Apple's platforms.
Stars: ✭ 29 (-48.21%)
Mutual labels:  cocoa
wingpanel-indicator-bluetooth
Wingpanel Bluetooth Indicator
Stars: ✭ 18 (-67.86%)
Mutual labels:  gtk
launchui
Launcher for GUI Node.js applications using libui-node.
Stars: ✭ 107 (+91.07%)
Mutual labels:  libui
nicotine-plus
Graphical client for the Soulseek peer-to-peer network
Stars: ✭ 601 (+973.21%)
Mutual labels:  gtk
Rearrange
Collection of utilities for interacting with NSRange and NSTextRange
Stars: ✭ 28 (-50%)
Mutual labels:  cocoa
csak
Cartel Swiss Army Knife for Android devices - easy to use toolkit for Android devices
Stars: ✭ 18 (-67.86%)
Mutual labels:  gtk
tasks
Synced tasks and reminders on elementary OS
Stars: ✭ 79 (+41.07%)
Mutual labels:  gtk
hello-libui
Hello World application using libui from maven repository
Stars: ✭ 17 (-69.64%)
Mutual labels:  libui
XScreenSaverWin
XScreenSaver for Windows
Stars: ✭ 76 (+35.71%)
Mutual labels:  win32
SoftwareHelper
This is a windows app shortcut widget 🔨
Stars: ✭ 122 (+117.86%)
Mutual labels:  win32
kiwi
A graphical UI framework on top of PyGTK
Stars: ✭ 24 (-57.14%)
Mutual labels:  gtk
switchboard-plug-bluetooth
Switchboard Bluetooth Plug
Stars: ✭ 23 (-58.93%)
Mutual labels:  gtk

scalaui

Scala Native GUI framework based on libui

Example text editor

How it looks like in elementary

scalaui-texteditor

Getting Started

Once you have setup your Scala Native project and enviroment, you have to compile libui and, on linux, copy the libui.so.0 and libui.so files to /usr/lib (probably you need to change their permissions too).

Then you have to add the following to your build.sbt:

libraryDependencies += "it.lolgab" %%% "scalaui" % "0.0.1"

(there is no release yet, you have to publishLocal the library to let it work!)

Then you can import scalaui:

import scalaui._

We want to create a simple window with a button that prints "Hello World!" on the console when clicked.

First you have to define a method which will be executed everytime the button is clicked:

def greeting(): Unit = println("Hello World!")

Then you create a button in your Main object, passing a name and the method name followed by a _:

val button = new Button("My Button", greeting _)

Then you create a window passing the button as content:

val window = new Window("My Window", width = 200, height = 200, content = button)

Then you can actually trigger the creation of the window with all its components in your main method:

def main(args: Array[String]) = {
  scalaui.render(window)
}

You now should see a nice window with a button, let's click it:

It works! 🎉🎉🎉

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].