Documentation ¶
Index ¶
- Constants
- func Bell()
- func CenteredWindow(width, height int, title string) int
- func CenteredWindowf(width, height int, format string, args ...interface{}) int
- func ClearKeyBuffer()
- func Cls()
- func CursorOff()
- func CursorOn()
- func Delay(d time.Duration)
- func DrawRootText(col, row int, text string)
- func DrawRootTextf(col, row int, format string, args ...interface{})
- func Finished() int
- func GetScreenSize() (cols, rows int)
- func Init() int
- func NEWT_COLORSET_CUSTOM(x int) int
- func OpenWindow(left, top, width, height int, title string) int
- func OpenWindowf(left, top, width, height int, format string, args ...interface{}) int
- func PopHelpLine()
- func PopWindow()
- func PopWindowNoRefresh()
- func PushHelpLine(text string)
- func PushHelpLinef(format string, args ...interface{})
- func RedrawHelpLine()
- func ReflowText(text string, width, flexDown, flexUp int) (string, int, int)
- func ReflowTextf(width, flexDown, flexUp int, format string, args ...interface{}) (string, int, int)
- func Refresh()
- func ResizeScreen(redraw bool)
- func Resume() int
- func SetColor(colorset int, fg, bg string)
- func SetHelpCallback()
- func SetSuspendCallback(f func())
- func Suspend()
- func WaitForKey()
- func WinChoice(title, button1, button2, format string, args ...interface{}) int
- func WinMenu(title, text string, suggestedWidth, flexDown, flexUp, maxListHeight int, ...) (int, int)
- func WinMessage(title, buttonText, format string, args ...interface{})
- func WinTernary(title, button1, button2, button3, format string, args ...interface{}) int
- type Button
- func (co Button) AddCallback(f func(Component))
- func (co Button) AddDestroyCallback(f func(Component))
- func (co Button) ComponentDestroy()
- func (co Button) ComponentGetSize() (int, int)
- func (co Button) GetPosition() (int, int)
- func (co Button) IsA(c uintptr) bool
- func (co Button) Ptr() uintptr
- func (co Button) TakesFocus(val bool)
- type Checkbox
- func (co Checkbox) AddCallback(f func(Component))
- func (co Checkbox) AddDestroyCallback(f func(Component))
- func (co Checkbox) ComponentDestroy()
- func (co Checkbox) ComponentGetSize() (int, int)
- func (co Checkbox) GetPosition() (int, int)
- func (co *Checkbox) GetValue() byte
- func (co Checkbox) IsA(c uintptr) bool
- func (co Checkbox) Ptr() uintptr
- func (co *Checkbox) SetFlags(flags, sense int)
- func (co *Checkbox) SetValue(value byte)
- func (co Checkbox) TakesFocus(val bool)
- type CheckboxTree
- func (co *CheckboxTree) AddArray(text string, key, flags int, path []int) int
- func (co CheckboxTree) AddCallback(f func(Component))
- func (co CheckboxTree) AddDestroyCallback(f func(Component))
- func (co *CheckboxTree) AddItem(text string, key, flags int, path ...int) int
- func (co CheckboxTree) ComponentDestroy()
- func (co CheckboxTree) ComponentGetSize() (int, int)
- func (co *CheckboxTree) FindItem(key int) (int, bool)
- func (co *CheckboxTree) GetCurrent() int
- func (co *CheckboxTree) GetEntryValue(key int) byte
- func (co *CheckboxTree) GetMultiSelection(seqnum byte) (int, []int)
- func (co CheckboxTree) GetPosition() (int, int)
- func (co *CheckboxTree) GetSelection() (int, []int)
- func (co CheckboxTree) IsA(c uintptr) bool
- func (co CheckboxTree) Ptr() uintptr
- func (co *CheckboxTree) SetCurrent(item int)
- func (co *CheckboxTree) SetEntry(key int, text string)
- func (co *CheckboxTree) SetEntryValue(key int, value byte)
- func (co *CheckboxTree) SetEntryf(num int, format string, args ...interface{})
- func (co *CheckboxTree) SetWidth(width int)
- func (co CheckboxTree) TakesFocus(val bool)
- type CompactButton
- func (co CompactButton) AddCallback(f func(Component))
- func (co CompactButton) AddDestroyCallback(f func(Component))
- func (co CompactButton) ComponentDestroy()
- func (co CompactButton) ComponentGetSize() (int, int)
- func (co CompactButton) GetPosition() (int, int)
- func (co CompactButton) IsA(c uintptr) bool
- func (co CompactButton) Ptr() uintptr
- func (co CompactButton) TakesFocus(val bool)
- type Component
- type Entry
- func (co Entry) AddCallback(f func(Component))
- func (co Entry) AddDestroyCallback(f func(Component))
- func (co Entry) ComponentDestroy()
- func (co Entry) ComponentGetSize() (int, int)
- func (co *Entry) GetCursorPosition() int
- func (co Entry) GetPosition() (int, int)
- func (co *Entry) GetValue() string
- func (co Entry) IsA(c uintptr) bool
- func (co Entry) Ptr() uintptr
- func (co *Entry) Set(value string, cursorAtEnd bool)
- func (co *Entry) SetColors(normal, disabled int)
- func (co *Entry) SetCursorPosition(position int)
- func (co *Entry) SetFilter(f func(*Entry, rune, int) rune)
- func (co *Entry) SetFlags(flags, sense int)
- func (co *Entry) SetText(value string)
- func (co *Entry) SetTextf(format string, args ...interface{})
- func (co *Entry) Setf(cursorAtEnd bool, format string, args ...interface{})
- func (co Entry) TakesFocus(val bool)
- type Form
- func (co Form) AddCallback(f func(Component))
- func (co *Form) AddComponent(component Component)
- func (co *Form) AddComponents(cos ...Component)
- func (co Form) AddDestroyCallback(f func(Component))
- func (co *Form) AddHotKey(key int)
- func (co Form) ComponentDestroy()
- func (co Form) ComponentGetSize() (int, int)
- func (co *Form) Destroy()
- func (co *Form) Draw()
- func (co *Form) GetCurrent() uintptr
- func (co Form) GetPosition() (int, int)
- func (co *Form) GetScrollPosition() int
- func (co Form) IsA(c uintptr) bool
- func (co Form) Ptr() uintptr
- func (co *Form) Run() (int, int, uintptr)
- func (co *Form) RunComponent() uintptr
- func (co *Form) SetBackground(color int)
- func (co *Form) SetCurrent(subco *Form)
- func (co *Form) SetHeight(height int)
- func (co *Form) SetScrollPosition(position int)
- func (co *Form) SetSize()
- func (co *Form) SetTimer(d time.Duration)
- func (co *Form) SetWidth(width int)
- func (co Form) TakesFocus(val bool)
- func (co *Form) WatchFd(fd uintptr, fdFlags int)
- type Gauge
- type GaugeReader
- type Grid
- func NewButtonBar(buttons ...*Button) *Grid
- func NewGrid(cols, rows int) *Grid
- func NewGridBasicWindow(text Component, middle, buttons *Grid) *Grid
- func NewGridHCloseStacked(what ...GridElement) *Grid
- func NewGridHStacked(what ...GridElement) *Grid
- func NewGridSimpleWindow(text Component, middle Component, buttons *Grid) *Grid
- func NewGridVCloseStacked(what ...GridElement) *Grid
- func NewGridVStacked(what ...GridElement) *Grid
- func Stackem(isClose, isVertical bool, what ...GridElement) *Grid
- func (g *Grid) AddComponentsToForm(form *Form, recurse bool)
- func (g *Grid) Free(recursive bool)
- func (g *Grid) GetSize() (int, int)
- func (g *Grid) Place(left, top int)
- func (g *Grid) SetField(col, row int, cg GridElement, ...)
- func (g *Grid) WrappedWindow(title string)
- func (g *Grid) WrappedWindowAt(title string, left, top int)
- type GridElement
- type Label
- func (co Label) AddCallback(f func(Component))
- func (co Label) AddDestroyCallback(f func(Component))
- func (co Label) ComponentDestroy()
- func (co Label) ComponentGetSize() (int, int)
- func (co Label) GetPosition() (int, int)
- func (co Label) IsA(c uintptr) bool
- func (co Label) Ptr() uintptr
- func (co *Label) SetColors(colorset int)
- func (co *Label) SetText(text string)
- func (co *Label) SetTextf(format string, args ...interface{})
- func (co Label) TakesFocus(val bool)
- type Listbox
- func (co Listbox) AddCallback(f func(Component))
- func (co Listbox) AddDestroyCallback(f func(Component))
- func (co *Listbox) AppendEntry(text string, key int) int
- func (co *Listbox) Clear()
- func (co *Listbox) ClearSelection()
- func (co Listbox) ComponentDestroy()
- func (co Listbox) ComponentGetSize() (int, int)
- func (co *Listbox) DeleteEntry(key int) int
- func (co *Listbox) GetCurrent() int
- func (co *Listbox) GetEntry(num int) ([]string, []int)
- func (co Listbox) GetPosition() (int, int)
- func (co *Listbox) GetSelection() (int, []int)
- func (co *Listbox) InsertEntry(text string, key2, key1 int) int
- func (co Listbox) IsA(c uintptr) bool
- func (co *Listbox) ItemCount() int
- func (co Listbox) Ptr() uintptr
- func (co *Listbox) SelectItem(key int, sense int)
- func (co *Listbox) SetCurrent(num int)
- func (co *Listbox) SetCurrentByKey(key int)
- func (co *Listbox) SetData(num int, key int)
- func (co *Listbox) SetEntry(num int, text string)
- func (co *Listbox) SetEntryf(num int, format string, args ...interface{})
- func (co *Listbox) SetWidth(width int)
- func (co Listbox) TakesFocus(val bool)
- type Radiobutton
- func (co Radiobutton) AddCallback(f func(Component))
- func (co Radiobutton) AddDestroyCallback(f func(Component))
- func (co Radiobutton) ComponentDestroy()
- func (co Radiobutton) ComponentGetSize() (int, int)
- func (co *Radiobutton) GetCurrent() uintptr
- func (co Radiobutton) GetPosition() (int, int)
- func (co Radiobutton) IsA(c uintptr) bool
- func (co Radiobutton) Ptr() uintptr
- func (co *Radiobutton) SetCurrent()
- func (co Radiobutton) TakesFocus(val bool)
- type Scale
- func (co Scale) AddCallback(f func(Component))
- func (co Scale) AddDestroyCallback(f func(Component))
- func (co Scale) ComponentDestroy()
- func (co Scale) ComponentGetSize() (int, int)
- func (co Scale) GetPosition() (int, int)
- func (co Scale) IsA(c uintptr) bool
- func (co Scale) Ptr() uintptr
- func (co *Scale) Set(amount uint64)
- func (co *Scale) SetColors(empty, full int)
- func (co Scale) TakesFocus(val bool)
- type Textbox
- func (co Textbox) AddCallback(f func(Component))
- func (co Textbox) AddDestroyCallback(f func(Component))
- func (co Textbox) ComponentDestroy()
- func (co Textbox) ComponentGetSize() (int, int)
- func (co *Textbox) GetNumLines() int
- func (co Textbox) GetPosition() (int, int)
- func (co Textbox) IsA(c uintptr) bool
- func (co Textbox) Ptr() uintptr
- func (co *Textbox) SetColors(normal, active int)
- func (co *Textbox) SetHeight(height int)
- func (co *Textbox) SetText(text string)
- func (co *Textbox) SetTextf(format string, args ...interface{})
- func (co Textbox) TakesFocus(val bool)
- type VerticalScrollbar
- func (co VerticalScrollbar) AddCallback(f func(Component))
- func (co VerticalScrollbar) AddDestroyCallback(f func(Component))
- func (co VerticalScrollbar) ComponentDestroy()
- func (co VerticalScrollbar) ComponentGetSize() (int, int)
- func (co VerticalScrollbar) GetPosition() (int, int)
- func (co VerticalScrollbar) IsA(c uintptr) bool
- func (co VerticalScrollbar) Ptr() uintptr
- func (co *VerticalScrollbar) Set(where, total int)
- func (co *VerticalScrollbar) SetColors(normal, thumb int)
- func (co VerticalScrollbar) TakesFocus(val bool)
Constants ¶
const ( NEWT_COLORSET_ROOT = iota + 2 NEWT_COLORSET_BORDER NEWT_COLORSET_WINDOW NEWT_COLORSET_SHADOW NEWT_COLORSET_TITLE NEWT_COLORSET_BUTTON NEWT_COLORSET_ACTBUTTON NEWT_COLORSET_CHECKBOX NEWT_COLORSET_ACTCHECKBOX NEWT_COLORSET_ENTRY NEWT_COLORSET_LABEL NEWT_COLORSET_LISTBOX NEWT_COLORSET_ACTLISTBOX NEWT_COLORSET_TEXTBOX NEWT_COLORSET_ACTTEXTBOX NEWT_COLORSET_HELPLINE NEWT_COLORSET_ROOTTEXT NEWT_COLORSET_EMPTYSCALE NEWT_COLORSET_FULLSCALE NEWT_COLORSET_DISENTRY NEWT_COLORSET_COMPACTBUTTON NEWT_COLORSET_ACTSELLISTBOX NEWT_COLORSET_SELLISTBOX )
const ( NEWT_ARG_LAST = -100000 NEWT_ARG_APPEND = -1 )
const ( NEWT_FLAG_RETURNEXIT = 1 << iota 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_FLAG_PASSWORD NEWT_FLAG_SHOWCURSOR )
const ( NEWT_FD_READ = 1 << iota NEWT_FD_WRITE NEWT_FD_EXCEPT )
const ( NEWT_CHECKBOXTREE_UNSELECTABLE = iota << 12 NEWT_CHECKBOXTREE_HIDE_BOX )
const ( NEWT_CHECKBOXTREE_COLLAPSED = '\000' NEWT_CHECKBOXTREE_EXPANDED = '\001' NEWT_CHECKBOXTREE_UNSELECTED = ' ' NEWT_CHECKBOXTREE_SELECTED = '*' )
const ( NEWT_LISTBOX_RETURNEXIT = NEWT_FLAG_RETURNEXIT NEWT_ENTRY_SCROLL = NEWT_FLAG_SCROLL NEWT_ENTRY_HIDDEN = NEWT_FLAG_HIDDEN NEWT_ENTRY_RETURNEXIT = NEWT_FLAG_RETURNEXIT NEWT_ENTRY_DISABLED = NEWT_FLAG_DISABLED NEWT_TEXTBOX_WRAP = NEWT_FLAG_WRAP NEWT_TEXTBOX_SCROLL = NEWT_FLAG_SCROLL NEWT_FORM_NOF12 = NEWT_FLAG_NOF12 )
const ( NEWT_KEY_TAB = '\t' NEWT_KEY_ENTER = '\r' NEWT_KEY_SUSPEND = '\032' NEWT_KEY_ESCAPE = '\033' NEWT_KEY_RETURN = NEWT_KEY_ENTER )
const ( NEWT_KEY_EXTRA_BASE = 0x8000 + iota 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 )
const ( NEWT_KEY_F1 = NEWT_KEY_EXTRA_BASE + 101 + iota 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 NEWT_KEY_RESIZE NEWT_KEY_ERROR )
const ( NEWT_ANCHOR_LEFT = 1 << iota NEWT_ANCHOR_RIGHT NEWT_ANCHOR_TOP NEWT_ANCHOR_BOTTOM )
const ( NEWT_GRID_FLAG_GROWX = 1 << iota NEWT_GRID_FLAG_GROWY )
const ( NEWT_FLAGS_SET = iota NEWT_FLAGS_RESET NEWT_FLAGS_TOGGLE )
const ( NEWT_GRID_EMPTY = iota NEWT_GRID_COMPONENT NEWT_GRID_SUBGRID )
const ( NEWT_EXIT_HOTKEY = iota NEWT_EXIT_COMPONENT NEWT_EXIT_FDREADY NEWT_EXIT_TIMER NEWT_EXIT_ERROR )
Variables ¶
This section is empty.
Functions ¶
func CenteredWindow ¶
int newtCenteredWindow(unsigned int width,unsigned int height, const char * title);
func CenteredWindowf ¶
func DrawRootText ¶
void newtDrawRootText(int col, int row, const char * text);
func DrawRootTextf ¶
func GetScreenSize ¶
func GetScreenSize() (cols, rows int)
void newtGetScreenSize(int * cols, int * rows);
func NEWT_COLORSET_CUSTOM ¶
func OpenWindow ¶
int newtOpenWindow(int left,int top, unsigned int width,unsigned int height, const char * title);
func OpenWindowf ¶
func PushHelpLinef ¶
func PushHelpLinef(format string, args ...interface{})
func ReflowText ¶
char * newtReflowText(char * text, int width, int flexDown, int flexUp, int * actualWidth, int * actualHeight);
func ReflowTextf ¶
func SetSuspendCallback ¶
func SetSuspendCallback(f func())
void newtSetSuspendCallback(newtSuspendCallback cb, void * data);
func WinMenu ¶
func WinMenu(title, text string, suggestedWidth, flexDown, flexUp, maxListHeight int, items []string, selected int, buttons []string) (int, int)
int newtWinMenu(char * title, char * text, int suggestedWidth, int flexDown, int flexUp, int maxListHeight,
char ** items, int * listItem, char * button1, ...);
func WinMessage ¶
func WinMessage(title, buttonText, format string, args ...interface{})
void newtWinMessage(char * title, char * buttonText, char * text, ...);
func WinTernary ¶
int newtWinTernary(char * title, char * button1, char * button2, char * button3, char * message, ...);
Types ¶
type Button ¶
type Button struct {
// contains filtered or unexported fields
}
func (Button) AddCallback ¶
func (co Button) AddCallback(f func(Component))
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
func (Button) AddDestroyCallback ¶
func (co Button) AddDestroyCallback(f func(Component))
func (Button) ComponentDestroy ¶
func (co Button) ComponentDestroy()
void newtComponentDestroy(newtComponent co);
func (Button) ComponentGetSize ¶
void newtComponentGetSize(newtComponent co, int * width, int * height);
func (Button) GetPosition ¶
void newtComponentGetPosition(newtComponent co, int * left, int * top);
func (Button) TakesFocus ¶
func (co Button) TakesFocus(val bool)
void newtComponentTakesFocus(newtComponent co, int val);
type Checkbox ¶
type Checkbox struct {
// contains filtered or unexported fields
}
func NewCheckbox ¶
newtComponent newtCheckbox(int left, int top, const char * text, char defValue, const char * seq, char * result);
func (Checkbox) AddCallback ¶
func (co Checkbox) AddCallback(f func(Component))
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
func (Checkbox) AddDestroyCallback ¶
func (co Checkbox) AddDestroyCallback(f func(Component))
func (Checkbox) ComponentDestroy ¶
func (co Checkbox) ComponentDestroy()
void newtComponentDestroy(newtComponent co);
func (Checkbox) ComponentGetSize ¶
void newtComponentGetSize(newtComponent co, int * width, int * height);
func (Checkbox) GetPosition ¶
void newtComponentGetPosition(newtComponent co, int * left, int * top);
func (*Checkbox) SetFlags ¶
void newtCheckboxSetFlags(newtComponent co, int flags, enum newtFlagsSense sense);
func (Checkbox) TakesFocus ¶
func (co Checkbox) TakesFocus(val bool)
void newtComponentTakesFocus(newtComponent co, int val);
type CheckboxTree ¶
type CheckboxTree struct {
// contains filtered or unexported fields
}
func NewCheckboxTree ¶
func NewCheckboxTree(left, top, height, flags int) *CheckboxTree
newtComponent newtCheckboxTree(int left, int top, int height, int flags);
func NewCheckboxTreeMulti ¶
func NewCheckboxTreeMulti(left, top, height int, seq string, flags int) *CheckboxTree
newtComponent newtCheckboxTreeMulti(int left, int top, int height, char *seq, int flags);
func (*CheckboxTree) AddArray ¶
func (co *CheckboxTree) AddArray(text string, key, flags int, path []int) int
int newtCheckboxTreeAddArray(newtComponent co, const char * text, const void * data, int flags, int * indexes);
func (CheckboxTree) AddCallback ¶
func (co CheckboxTree) AddCallback(f func(Component))
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
func (CheckboxTree) AddDestroyCallback ¶
func (co CheckboxTree) AddDestroyCallback(f func(Component))
func (*CheckboxTree) AddItem ¶
func (co *CheckboxTree) AddItem(text string, key, flags int, path ...int) int
int newtCheckboxTreeAddItem(newtComponent co, const char * text, const void * data, int flags, int index, ...);
func (CheckboxTree) ComponentDestroy ¶
func (co CheckboxTree) ComponentDestroy()
void newtComponentDestroy(newtComponent co);
func (CheckboxTree) ComponentGetSize ¶
void newtComponentGetSize(newtComponent co, int * width, int * height);
func (*CheckboxTree) FindItem ¶
func (co *CheckboxTree) FindItem(key int) (int, bool)
int * newtCheckboxTreeFindItem(newtComponent co, void * data);
func (*CheckboxTree) GetCurrent ¶
func (co *CheckboxTree) GetCurrent() int
const void * newtCheckboxTreeGetCurrent(newtComponent co);
func (*CheckboxTree) GetEntryValue ¶
func (co *CheckboxTree) GetEntryValue(key int) byte
char newtCheckboxTreeGetEntryValue(newtComponent co, const void * data);
func (*CheckboxTree) GetMultiSelection ¶
func (co *CheckboxTree) GetMultiSelection(seqnum byte) (int, []int)
const void ** newtCheckboxTreeGetMultiSelection(newtComponent co, int *numitems, char seqnum);
func (CheckboxTree) GetPosition ¶
void newtComponentGetPosition(newtComponent co, int * left, int * top);
func (*CheckboxTree) GetSelection ¶
func (co *CheckboxTree) GetSelection() (int, []int)
const void ** newtCheckboxTreeGetSelection(newtComponent co, int *numitems);
func (*CheckboxTree) SetCurrent ¶
func (co *CheckboxTree) SetCurrent(item int)
void newtCheckboxTreeSetCurrent(newtComponent co, void * item);
func (*CheckboxTree) SetEntry ¶
func (co *CheckboxTree) SetEntry(key int, text string)
void newtCheckboxTreeSetEntry(newtComponent co, const void * data, const char * text);
func (*CheckboxTree) SetEntryValue ¶
func (co *CheckboxTree) SetEntryValue(key int, value byte)
void newtCheckboxTreeSetEntryValue(newtComponent co, const void * data, char value);
func (*CheckboxTree) SetEntryf ¶
func (co *CheckboxTree) SetEntryf(num int, format string, args ...interface{})
func (*CheckboxTree) SetWidth ¶
func (co *CheckboxTree) SetWidth(width int)
void newtCheckboxTreeSetWidth(newtComponent co, int width);
func (CheckboxTree) TakesFocus ¶
func (co CheckboxTree) TakesFocus(val bool)
void newtComponentTakesFocus(newtComponent co, int val);
type CompactButton ¶
type CompactButton struct {
// contains filtered or unexported fields
}
func NewCompactButton ¶
func NewCompactButton(left, top int, text string) *CompactButton
newtComponent newtCompactButton(int left, int top, const char * text);
func (CompactButton) AddCallback ¶
func (co CompactButton) AddCallback(f func(Component))
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
func (CompactButton) AddDestroyCallback ¶
func (co CompactButton) AddDestroyCallback(f func(Component))
func (CompactButton) ComponentDestroy ¶
func (co CompactButton) ComponentDestroy()
void newtComponentDestroy(newtComponent co);
func (CompactButton) ComponentGetSize ¶
void newtComponentGetSize(newtComponent co, int * width, int * height);
func (CompactButton) GetPosition ¶
void newtComponentGetPosition(newtComponent co, int * left, int * top);
func (CompactButton) TakesFocus ¶
func (co CompactButton) TakesFocus(val bool)
void newtComponentTakesFocus(newtComponent co, int val);
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
func NewEntry ¶
newtComponent newtEntry(int left, int top, const char * initialValue, int width, const char ** resultPtr, int flags);
func (Entry) AddCallback ¶
func (co Entry) AddCallback(f func(Component))
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
func (Entry) AddDestroyCallback ¶
func (co Entry) AddDestroyCallback(f func(Component))
func (Entry) ComponentDestroy ¶
func (co Entry) ComponentDestroy()
void newtComponentDestroy(newtComponent co);
func (Entry) ComponentGetSize ¶
void newtComponentGetSize(newtComponent co, int * width, int * height);
func (*Entry) GetCursorPosition ¶
int newtEntryGetCursorPosition(newtComponent co);
func (Entry) GetPosition ¶
void newtComponentGetPosition(newtComponent co, int * left, int * top);
func (*Entry) SetCursorPosition ¶
void newtEntrySetCursorPosition(newtComponent co, int position);
func (*Entry) SetFilter ¶
void newtEntrySetFilter(newtComponent co, newtEntryFilter filter, void * data);
func (*Entry) SetFlags ¶
void newtEntrySetFlags(newtComponent co, int flags, enum newtFlagsSense sense);
func (Entry) TakesFocus ¶
func (co Entry) TakesFocus(val bool)
void newtComponentTakesFocus(newtComponent co, int val);
type Form ¶
type Form struct {
// contains filtered or unexported fields
}
func NewForm ¶
func NewForm(vertBar *VerticalScrollbar, help func(Component), flags int) *Form
newtComponent newtForm(newtComponent vertBar, void * helpTag, int flags);
func (Form) AddCallback ¶
func (co Form) AddCallback(f func(Component))
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
func (*Form) AddComponent ¶
void newtFormAddComponent(newtComponent form, newtComponent co);
func (*Form) AddComponents ¶
void newtFormAddComponents(newtComponent form, ...);
func (Form) AddDestroyCallback ¶
func (co Form) AddDestroyCallback(f func(Component))
func (Form) ComponentDestroy ¶
func (co Form) ComponentDestroy()
void newtComponentDestroy(newtComponent co);
func (Form) ComponentGetSize ¶
void newtComponentGetSize(newtComponent co, int * width, int * height);
func (*Form) GetCurrent ¶
newtComponent newtFormGetCurrent(newtComponent co);
func (Form) GetPosition ¶
void newtComponentGetPosition(newtComponent co, int * left, int * top);
func (*Form) GetScrollPosition ¶
int newtFormGetScrollPosition(newtComponent co);
func (*Form) RunComponent ¶
newtComponent newtRunForm(newtComponent form);
func (*Form) SetBackground ¶
void newtFormSetBackground(newtComponent co, int color);
func (*Form) SetCurrent ¶
void newtFormSetCurrent(newtComponent co, newtComponent subco);
func (*Form) SetScrollPosition ¶
void newtFormSetScrollPosition(newtComponent co, int position);
func (Form) TakesFocus ¶
func (co Form) TakesFocus(val bool)
void newtComponentTakesFocus(newtComponent co, int val);
type GaugeReader ¶
func NewGaugeReader ¶
func NewGaugeReader(g *Gauge, r io.Reader) *GaugeReader
type Grid ¶
type Grid struct {
// contains filtered or unexported fields
}
func NewButtonBar ¶
newtGrid newtButtonBar(char * button1, newtComponent * b1comp, ...);
func NewGridBasicWindow ¶
newtGrid newtGridBasicWindow(newtComponent text, newtGrid middle, newtGrid buttons);
func NewGridHCloseStacked ¶
func NewGridHCloseStacked(what ...GridElement) *Grid
newtGrid newtGridHCloseStacked(enum newtGridElement type1, void * what1, ...);
func NewGridHStacked ¶
func NewGridHStacked(what ...GridElement) *Grid
newtGrid newtGridHStacked(enum newtGridElement type1, void * what1, ...);
func NewGridSimpleWindow ¶
newtGrid newtGridSimpleWindow(newtComponent text, newtComponent middle, newtGrid buttons);
func NewGridVCloseStacked ¶
func NewGridVCloseStacked(what ...GridElement) *Grid
newtGrid newtGridVCloseStacked(enum newtGridElement type, void * what, ...);
func NewGridVStacked ¶
func NewGridVStacked(what ...GridElement) *Grid
newtGrid newtGridVStacked(enum newtGridElement type, void * what, ...);
func Stackem ¶
func Stackem(isClose, isVertical bool, what ...GridElement) *Grid
static newtGrid stackem(int isVert, enum newtGridElement type1, void * what1,
va_list args, int close) {
func (*Grid) AddComponentsToForm ¶
void newtGridAddComponentsToForm(newtGrid grid, newtComponent form, int recurse);
func (*Grid) SetField ¶
func (g *Grid) SetField(col, row int, cg GridElement, padLeft, padTop, padRight, padBottom, anchor, flags int)
void newtGridSetField(newtGrid grid, int col, int row, enum newtGridElement type, void * val, int padLeft,
int padTop, int padRight, int padBottom, int anchor, int flags);
func (*Grid) WrappedWindow ¶
void newtGridWrappedWindow(newtGrid grid, char * title);
func (*Grid) WrappedWindowAt ¶
void newtGridWrappedWindowAt(newtGrid grid, char * title, int left, int top);
type GridElement ¶
type GridElement interface {
// contains filtered or unexported methods
}
type Label ¶
type Label struct {
// contains filtered or unexported fields
}
func (Label) AddCallback ¶
func (co Label) AddCallback(f func(Component))
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
func (Label) AddDestroyCallback ¶
func (co Label) AddDestroyCallback(f func(Component))
func (Label) ComponentDestroy ¶
func (co Label) ComponentDestroy()
void newtComponentDestroy(newtComponent co);
func (Label) ComponentGetSize ¶
void newtComponentGetSize(newtComponent co, int * width, int * height);
func (Label) GetPosition ¶
void newtComponentGetPosition(newtComponent co, int * left, int * top);
func (Label) TakesFocus ¶
func (co Label) TakesFocus(val bool)
void newtComponentTakesFocus(newtComponent co, int val);
type Listbox ¶
type Listbox struct {
// contains filtered or unexported fields
}
func NewListbox ¶
newtComponent newtListbox(int left, int top, int height, int flags);
func (Listbox) AddCallback ¶
func (co Listbox) AddCallback(f func(Component))
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
func (Listbox) AddDestroyCallback ¶
func (co Listbox) AddDestroyCallback(f func(Component))
func (*Listbox) AppendEntry ¶
int newtListboxAppendEntry(newtComponent co, const char * text, const void * data);
func (*Listbox) ClearSelection ¶
func (co *Listbox) ClearSelection()
void newtListboxClearSelection(newtComponent co);
func (Listbox) ComponentDestroy ¶
func (co Listbox) ComponentDestroy()
void newtComponentDestroy(newtComponent co);
func (Listbox) ComponentGetSize ¶
void newtComponentGetSize(newtComponent co, int * width, int * height);
func (*Listbox) DeleteEntry ¶
int newtListboxDeleteEntry(newtComponent co, void * data);
func (*Listbox) GetCurrent ¶
void * newtListboxGetCurrent(newtComponent co);
func (*Listbox) GetEntry ¶
void newtListboxGetEntry(newtComponent co, int num, char **text, void **data);
func (Listbox) GetPosition ¶
void newtComponentGetPosition(newtComponent co, int * left, int * top);
func (*Listbox) GetSelection ¶
void **newtListboxGetSelection(newtComponent co, int *numitems);
func (*Listbox) InsertEntry ¶
int newtListboxInsertEntry(newtComponent co, const char * text, const void * data, void * key);
func (*Listbox) SelectItem ¶
void newtListboxSelectItem(newtComponent co, const void * key, enum newtFlagsSense sense);
func (*Listbox) SetCurrent ¶
void newtListboxSetCurrent(newtComponent co, int num);
func (*Listbox) SetCurrentByKey ¶
void newtListboxSetCurrentByKey(newtComponent co, void * key);
func (Listbox) TakesFocus ¶
func (co Listbox) TakesFocus(val bool)
void newtComponentTakesFocus(newtComponent co, int val);
type Radiobutton ¶
type Radiobutton struct {
// contains filtered or unexported fields
}
func NewRadiobutton ¶
func NewRadiobutton(left, top int, text string, isDefault bool, prevButton *Radiobutton) *Radiobutton
newtComponent newtRadiobutton(int left, int top, const char * text, int isDefault, newtComponent prevButton);
func (Radiobutton) AddCallback ¶
func (co Radiobutton) AddCallback(f func(Component))
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
func (Radiobutton) AddDestroyCallback ¶
func (co Radiobutton) AddDestroyCallback(f func(Component))
func (Radiobutton) ComponentDestroy ¶
func (co Radiobutton) ComponentDestroy()
void newtComponentDestroy(newtComponent co);
func (Radiobutton) ComponentGetSize ¶
void newtComponentGetSize(newtComponent co, int * width, int * height);
func (*Radiobutton) GetCurrent ¶
func (co *Radiobutton) GetCurrent() uintptr
newtComponent newtRadioGetCurrent(newtComponent setMember);
func (Radiobutton) GetPosition ¶
void newtComponentGetPosition(newtComponent co, int * left, int * top);
func (*Radiobutton) SetCurrent ¶
func (co *Radiobutton) SetCurrent()
void newtRadioSetCurrent(newtComponent setMember);
func (Radiobutton) TakesFocus ¶
func (co Radiobutton) TakesFocus(val bool)
void newtComponentTakesFocus(newtComponent co, int val);
type Scale ¶
type Scale struct {
// contains filtered or unexported fields
}
func (Scale) AddCallback ¶
func (co Scale) AddCallback(f func(Component))
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
func (Scale) AddDestroyCallback ¶
func (co Scale) AddDestroyCallback(f func(Component))
func (Scale) ComponentDestroy ¶
func (co Scale) ComponentDestroy()
void newtComponentDestroy(newtComponent co);
func (Scale) ComponentGetSize ¶
void newtComponentGetSize(newtComponent co, int * width, int * height);
func (Scale) GetPosition ¶
void newtComponentGetPosition(newtComponent co, int * left, int * top);
func (Scale) TakesFocus ¶
func (co Scale) TakesFocus(val bool)
void newtComponentTakesFocus(newtComponent co, int val);
type Textbox ¶
type Textbox struct {
// contains filtered or unexported fields
}
func NewTextbox ¶
newtComponent newtTextbox(int left, int top, int width, int height, int flags);
func NewTextboxReflowed ¶
newtComponent newtTextboxReflowed(int left, int top, char * text, int width, int flexDown, int flexUp, int flags);
func NewTextboxReflowedf ¶
func (Textbox) AddCallback ¶
func (co Textbox) AddCallback(f func(Component))
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
func (Textbox) AddDestroyCallback ¶
func (co Textbox) AddDestroyCallback(f func(Component))
func (Textbox) ComponentDestroy ¶
func (co Textbox) ComponentDestroy()
void newtComponentDestroy(newtComponent co);
func (Textbox) ComponentGetSize ¶
void newtComponentGetSize(newtComponent co, int * width, int * height);
func (*Textbox) GetNumLines ¶
int newtTextboxGetNumLines(newtComponent co);
func (Textbox) GetPosition ¶
void newtComponentGetPosition(newtComponent co, int * left, int * top);
func (Textbox) TakesFocus ¶
func (co Textbox) TakesFocus(val bool)
void newtComponentTakesFocus(newtComponent co, int val);
type VerticalScrollbar ¶
type VerticalScrollbar struct {
// contains filtered or unexported fields
}
func NewVerticalScrollbar ¶
func NewVerticalScrollbar(left, top, height, normalColorset, thumbColorset int) *VerticalScrollbar
newtComponent newtVerticalScrollbar(int left, int top, int height, int normalColorset, int thumbColorset);
func (VerticalScrollbar) AddCallback ¶
func (co VerticalScrollbar) AddCallback(f func(Component))
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
func (VerticalScrollbar) AddDestroyCallback ¶
func (co VerticalScrollbar) AddDestroyCallback(f func(Component))
func (VerticalScrollbar) ComponentDestroy ¶
func (co VerticalScrollbar) ComponentDestroy()
void newtComponentDestroy(newtComponent co);
func (VerticalScrollbar) ComponentGetSize ¶
void newtComponentGetSize(newtComponent co, int * width, int * height);
func (VerticalScrollbar) GetPosition ¶
void newtComponentGetPosition(newtComponent co, int * left, int * top);
func (*VerticalScrollbar) Set ¶
func (co *VerticalScrollbar) Set(where, total int)
void newtScrollbarSet(newtComponent co, int where, int total);
func (*VerticalScrollbar) SetColors ¶
func (co *VerticalScrollbar) SetColors(normal, thumb int)
void newtScrollbarSetColors(newtComponent co, int normal, int thumb);
func (VerticalScrollbar) TakesFocus ¶
func (co VerticalScrollbar) TakesFocus(val bool)
void newtComponentTakesFocus(newtComponent co, int val);