Skip to content

ppibburr/opal-ui

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 

opal-ui

GUI ToolKit inpsired by Gtk for use with opal and opal-browser

Example (Standard)

include PBR::OpalUI

DefaultTheme.apply()

Window.new(size:[400,400]).

add(
  Accordian.new.
  
  append(label:"foo", icon:"http://google.com/favicon.ico") do |item|
    item.add TextView.new do |v|
      v.text("
      
      Sample Text
      
      ")
    end
  end.
  
  append(label:"bar") do |item|
    item.add(
      Frame.new(label:"Book Example").
      
      add(Notebook.new) do |nb|
        5.times do |i|
          nb.append(label:"Page #{i}") do |pg, t|
            pg.add TextView.new(text:"Page #{i} content")
          end
        end
        
        nb.page(2)
      end
    )
  end.
  
  item(1)
)

About

A GUI Toolkit in your Browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages