Sha256: 70f934e4b608dbad433a89a73973ada45598b718830422dd0f0c72c6e7c844a1

Contents?: true

Size: 580 Bytes

Versions: 7

Compression:

Stored size: 580 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'
require_relative '../../lib/ppcurses.rb'

def display_menu

  item1 = PPCurses::MenuItem.new('Item 1')
  item1.selectable=true
  item2 = PPCurses::MenuItem.new('Item 2')
  item2.selectable=true
  item2.state=PPCurses::PP_ON_STATE         # Displays a checkbox next to the menu item
  item3 = PPCurses::MenuItem.new('Item 3')
  item3.selectable=true

  main_menu = PPCurses::Menu.new( [ item1, item2, item3], nil )
  main_menu.show
  main_menu.menu_selection
  main_menu.close
end

screen = PPCurses::Screen.new
screen.run { display_menu }

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ppcurses-0.1.2 test/menu/menuWmenuItems.rb
ppcurses-0.1.1 test/menu/menuWmenuItems.rb
ppcurses-0.1.0 test/menu/menuWmenuItems.rb
ppcurses-0.0.25 test/menu/menuWmenuItems.rb
ppcurses-0.0.24 test/menu/menuWmenuItems.rb
ppcurses-0.0.23 test/menu/menuWmenuItems.rb
ppcurses-0.0.22 test/menu/menuWmenuItems.rb