Ruby/Newt

Newt への ruby インタフェース

Module/Class Hierarchy

Newt -+
      |
      +- Newt::Screen
      |
      +- Newt::Widget -+- Newt::Label
                       |
                       +- Newt::CompactButton
                       |
                       +- Newt::Button
                       |
                       +- Newt::Checkbox
                       |
                       +- Newt::RadioButton
                       |
                       +- Newt::Listbox
                       |
                       +- Newt::CheckboxTree
                       |
                       +- Newt::CheckboxTreeMulti
                       |
                       +- Newt::Textbox
                       |
                       +- Newt::TextboxReflowed
                       |
                       +- Newt::Entry
                       |
                       +- Newt::Scale
                       |
                       +- Newt::Form
                       |
                       +- Newt::Grid

Module Newt

定数

フラグのセット、リセットの指定

Newt::FLAGS_SET
Newt::FLAGS_RESET
Newt::FLAGS_TOGGLE

フラグ

Newt::FLAG_RETURNEXIT
Newt::FLAG_HIDDEN
Newt::FLAG_SCROLL
Newt::FLAG_DISABLED
Newt::FLAG_BORDER
Newt::FLAG_WRAP
Newt::FLAG_NOF12
Newt::FLAG_MULTIPLE
Newt::FLAG_SELECTED
Newt::FLAG_CHECKBOX

位置揃え

Newt::ANCHOR_LEFT
Newt::ANCHOR_RIGHT
Newt::ANCHOR_TOP
Newt::ANCHOR_BOTTOM

グリッド

Newt::GRID_FLAG_GROWX
Newt::GRID_FLAG_GROWY
Newt::GRID_EMPTY
Newt::GRID_COMPONENT
Newt::GRID_SUBGRID

キー

Newt::KEY_UP
Newt::KEY_DOWN
Newt::KEY_LEFT
Newt::KEY_RIGHT
Newt::KEY_BKSPC
Newt::KEY_DELETE
Newt::KEY_HOME
Newt::KEY_END
Newt::KEY_UNTAB
Newt::KEY_PGUP
Newt::KEY_PGDN
Newt::KEY_INSERT

ファンクションキー

Newt::KEY_F1
Newt::KEY_F2
Newt::KEY_F3
Newt::KEY_F4
Newt::KEY_F5
Newt::KEY_F6
Newt::KEY_F7
Newt::KEY_F8
Newt::KEY_F9
Newt::KEY_F10
Newt::KEY_F11
Newt::KEY_F12

Module Function

Newt.reflow_text(text, width, flexDown, flexUp)

Class Newt::Screen

Class Methods

Newt::Screen.new()
Newt::Screen.init()
Newt::Screen.cls()
Newt::Screen.finish()
Newt::Screen.wait_for_key()
Newt::Screen.clear_keybuffer()
Newt::Screen.open_window(left, top, width, height, title)
Newt::Screen.centered_window(width, height, title)
Newt::Screen.pop_window()
Newt::Screen.refresh()
Newt::Screen.suspend()
Newt::Screen.resume()
Newt::Screen.push_helpline(text)
Newt::Screen.redraw_helpline()
Newt::Screen.pop_helpline()
Newt::Screen.draw_roottext(col, row, text)
Newt::Screen.bell()
Newt::Screen.size()
Newt::Screen.win_message(title, buttonText, text)
Newt::Screen.win_choice(title, button1, button2, text)
Newt::Screen.win_menu(title, text, suggestedWidth, flexDown, flexUp, maxListHeight, items, button1 [, button2, ...])
Newt::Screen.win_entries(title, text, suggestedWidth, flexDown, flexUp, dataWidth, items, button1 [, button2, ...])

Class Newt::Widget

Methods

Newt::Widget#callback()
Newt::Widget#==

Class Newt::CompactButton

Super Class

Class Methods

Newt::CompactButton.new(left, top, text)

CompactButton クラスを生成して返す。

Class Newt::Label

Super Class

Class Methods

Newt::Label.new(left, top, text)

Label クラスを生成して返す。

Methods

Newt::Label#set_text(text)

Class Newt::CompactButton

Super Class

Class Methods

Newt::CompactButton.new(left, top, text)

CompactButton クラスを生成して返す。

Class Newt::Button

Super Class

Class Methods

Newt::Button.new(left, top, text)

Button クラスを生成して返す。

Class Newt::Listbox

Super Class

Class Methods

Newt::Listbox.new(left, top, height, flags)

Listbox クラスを生成して返す。

Methods

Newt::Listbox#append
Newt::Listbox#insert
Newt::Listbox#delete
Newt::Listbox#clear

Class Newt::CheckboxTree

Super Class

Class Methods

Newt::CheckboxTree.new(left, top, height, flags)

CheckboxTree クラスを生成して返す。

Methods

Newt::CheckboxTree#add(text, data, flags, index)

Class Newt::CheckboxTreeMulti

Super Class

Class Methods

Newt::CheckboxTreeMulti.new(left, top, height, seq, flags)

CheckboxTreeMulti クラスを生成して返す。

Class Newt::Textbox

Super Class

Class Methods

Newt::Textbox.new(left, top, width, height, flags)

Textbox クラスを生成して返す。

Methods

Newt::Textbox#set_text(text)
Newt::Textbox#set_height(height)
Newt::Textbox#get_num_lines()

Class Newt::TextboxReflowed

Super Class

Class Methods

Newt::TextboxReflowed.new(left, top, text, width, flexDown, flexUp, flags)

TextboxReflowed クラスを生成して返す。

Class Newt::Entry

Super Class

Class Methods

Newt::Entry.new()

Entry クラスを生成して返す。

Methods

Newt::Entry#set(value, cursorAtEnd)
Newt::Entry#get()
Newt::Entry#set_flags(flags [, sense])

Class Newt::Scale

Super Class

Class Methods

Newt::Scale.new()

Scale クラスを生成して返す。

Methods

Newt::Scale#set(amount)

Class Newt::Form

Super Class

Class Methods

Newt::Form.new()

Form クラスを生成して返す。

Methods

Newt::Form#set_background()
Newt::Form#add(widget)
Newt::Form#set_height(height)
Newt::Form#set_width(width)
Newt::Form#run()
Newt::Form#draw()
Newt::Form#add_hotkey(key)

Class Newt::Grid

Super Class

Class Methods

Newt::Grid.new()

Grid クラスを生成して返す。

Methods

Newt::Grid#set_field(col, row, type, val, padLeft, padTop, padRight, padBottom, anchor, flags)
Newt::Grid#wrapped_window(title [, left, top])
Newt::Grid#get_size()