Library
Documentation for TextUserInterfaces.jl
.
TextUserInterfaces.fieldjust
— Constant.Dictionary defining values of the field justification.
TextUserInterfaces.fieldopts
— Constant.Dictionary defining values of the field options.
TextUserInterfaces.formcmd
— Constant.Dictionary defining values of the form commands.
TextUserInterfaces.menucmd
— Constant.Dictionary defining values of the menu commands.
TextUserInterfaces.Keystroke
— Type.struct Keystorke
Structure that defines a keystroke.
Fields
value
: String representing the keystroke.ktype
: Type of the key (:char
,:F1
,:up
, etc.).alt
:true
if ALT key was pressed (only valid ifktype != :char
).ctrl
:true
if CTRL key was pressed (only valid ifktype != :char
).shift
:true
if SHIFT key was pressed (only valid ifktype != :char
).
TextUserInterfaces.WINDOW
— Type.struct WINDOW
Handles a ncurses window.
TextUserInterfaces.ACS_
— Method.function ACS_(s::Symbol)
Return the symbol s
of the acs_map
. For example, ACS_HLINE
can be obtained from ACS_(:HLINE)
.
TextUserInterfaces.COLS
— Method.function COLS()
Return the number of columns in the root window. It must be called after initscr()
.
For more information, consult libncurses
documentation.
TextUserInterfaces.LINES
— Method.function LINES()
Return the number of lines in the root window. It must be called after initscr()
.
For more information, consult libncurses
documentation.
TextUserInterfaces.TYPE_ALNUM
— Function.function TYPE_ALNUM()
Return a pointer to the global symbol TYPE_ALNUM
of libform
.
TextUserInterfaces.TYPE_ALPHA
— Function.function TYPE_ALPHA()
Return a pointer to the global symbol TYPE_ALPHA
of libform
.
TextUserInterfaces.TYPE_ENUM
— Function.function TYPE_ENUM()
Return a pointer to the global symbol TYPE_ENUM
of libform
.
TextUserInterfaces.TYPE_INTEGER
— Function.function TYPE_INTEGER()
Return a pointer to the global symbol TYPE_INTEGER
of libform
.
TextUserInterfaces.TYPE_IPV4
— Function.function TYPE_IPV4()
Return a pointer to the global symbol TYPE_IPV4
of libform
.
TextUserInterfaces.TYPE_IPV6
— Function.function TYPE_IPV6()
Return a pointer to the global symbol TYPE_IPV6
of libform
.
TextUserInterfaces.TYPE_NUMERIC
— Function.function TYPE_NUMERIC()
Return a pointer to the global symbol TYPE_NUMERIC
of libform
.
TextUserInterfaces.TYPE_REGEXP
— Function.function TYPE_REGEXP()
Return a pointer to the global symbol TYPE_REGEXP
of libform
.
TextUserInterfaces.accept_focus
— Method.function accept_focus(widget)
Return true
is the widget widget
accepts focus or false
otherwise.
TextUserInterfaces.accept_focus
— Method.function accept_focus(form::TUI_FORM)
Command executed when form form
must state whether or not it accepts the focus. If the focus is accepted, then this function returns true
. Otherwise, it returns false
.
TextUserInterfaces.accept_focus
— Method.function accept_focus(menu::TUI_MENU)
Command executed when menu menu
must state whether or not it accepts the focus. If the focus is accepted, then this function returns true
. Otherwise, it returns false
.
TextUserInterfaces.accept_focus
— Method.function accept_focus(window::Window)
Check if the window window
can accept focus and, if it can, then perform the actions to change the focus.
TextUserInterfaces.attroff
— Function.function attroff(attrs::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.attron
— Function.function attron(attrs::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.bottom_panel
— Function.function bottom_panel(pan::Ptr{Cvoid})
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.box
— Function.function box(win::Ptr{WINDOW}, verch::jlchtype, horch::jlchtype)
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.cbreak
— Function.function cbreak()
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.change_text
— Method.function change_text(widget::WidgetLabel, new_text::AbstractString; alignment = :l, color::Int = -1)
Change to text of the label widget widget
to new_text
.
The text alignment in the widget can be selected by the keyword alignment
, which can be:
:l
: left alignment (default);:c
: Center alignment; or:r
: Right alignment.
The text color can be selected by the keyword color
. It it is negative (default), then the current color will not be changed.
TextUserInterfaces.change_value
— Method.function change_value(widget::WidgetProgressBar, new_value::Integer; color::Int = -1)
Change the value of the progress bar to new_value
.
The color can be selected by the keyword color
. It it is negative (default), then the current color will not be changed.
TextUserInterfaces.clear
— Function.function clear()
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.clrtobot
— Function.function clrtobot()
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.clrtoeol
— Function.function clrtoeol()
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.copywin
— Function.function copywin(scr::Ptr{WINDOW}, dest::Ptr{WINDOW}, sminrow::Integer, smincol::Integer, dminrow::Integer, dmincol::Integer, dmaxrow::Integer, dmaxcol::Integer, overlay::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.create_field
— Function.function create_field(height::Int, width::Int, y::Int, x::Int, buffer::String = "", id::String = "", offscreen::Int = 0, nbuffers::Int = 0; ...)
Create a field with id id
, height height
and width width
, positioned at y
and x
coordinates. The initial buffer string can be set by the variable buffer
. The number of off-screen rows is set by offscreen
and the number of buffers nbuffers
.
Keywords
color_foreground
: Color mask that will be used in the field foreground. See functionncurses_color
. If negative, then the color will not be changed. (Default = -1)color_background
: Color mask that will be used in the field background. See functionncurses_color
. If negative, then the color will not be changed. (Default = -1)justification
: Justification of the form. It can be:l
for left,:c
for center, and:r
for right. For any other symbol, the left justification is used. (Default =:l
)visible
: Iftrue
, then the control is visible on the screen. (Default =true
)active
: Iftrue
, then the control is active. (Default =true
)public
: Iftrue
, then the data of the field is displayed during entry. For example, set this tofalse
for password fields. (Default =true
)edit
: Iftrue
, then the data of the field can be modified. (Default =true
)wrap
: Iftrue
, then the word will be wrapped in multi-line fields. (Default =true
)blank
: Iftrue
, then entering a character at the first field position erases the entire fields. (Default =false
)autoskip
: Iftrue
, then the field will be automatically skipped when filled. (Default =false
)nullok
: Iftrue
, then the validation is not applied to blank fields. (Default =true
)passok
: Iftrue
, then the validation will occur on every exit. Otherwise, it will only occur when the field is modified. (Default =false
)static
: Iftrue
, then the field is fixed to the initial dimensions. Otherwise, it will stretch to fit the entered data. (Default =true
)
TextUserInterfaces.create_form
— Method.function create_form(fields::Vector{TUI_FIELD}; ...)
Create a new form with the fields fields
.
Keywords
newline_overload
: Enable overloading ofREQ_NEW_LINE
. (Default =false
)backspace_overload
: Enable overloading ofREQ_DEL_PREV
. (Default =false
)
TextUserInterfaces.create_menu
— Method.function create_menu(names::Vector{T1}, descriptions::Union{Nothing,Vector{T2}} = nothing; kwargs...)
Create a menu with the names names
and descriptions descriptions
. If descriptions
is nothing
or is omitted, then the menu descriptions will not be shown.
Keywords
format
: Ifnothing
, then the default menu format will be used. Otherwise, it must be a tuple with two integers describing respectively the number of rows and columns. (Default =nothing
)mark
: The menu mark. (Default =-
)one_value
: Iftrue
, then the menu cannot have multiple selections. (Default =true
)show_desc
: Iftrue
, then the menu description will be shown. (Default =true
)row_major
: Iftrue
, then the menu will be constructed in a row-major ordering.ignore_case
: Iftrue
, then the case will be ignored on pattern matching.show_match
: Iftrue
, then the cursor will be moved to within the item name while pattern-matching.non_cyclic
: Iftrue
, then the menu will be non cyclic.
TextUserInterfaces.create_widget
— Function.function create_widget(T, parent::Window, begin_y::Integer, begin_x::Integer, vargs...; kwargs...)
Create the widget of type T
in the parent window parent
. The widget will be positioned on the coordinate (begin_y, begin_x)
of the parent window.
Additional variables and keywords related to each widget can be passed using vargs
and kwargs
respectively.
TextUserInterfaces.create_window
— Function.function create_window(nlines::Integer, ncols::Integer, begin_y::Integer, begin_x::Integer, id::String = ""; bcols::Integer = 0, blines::Integer = 0, border::Bool = true, border_color::Int = -1, title::String = "", title_color::Int = -1)
Create a window. The new window size will be nlines × ncols
and the origin will be placed at (begin_y, begin_x)
coordinate of the root window. The window ID id
is used to identify the new window in the global window list.
Keyword
bcols
: Number of columns in the window buffer. This will be automatically increased to, at least, fit the viewable part of the window (ncols
). (Default = 0)blines
: Number of lines in the window buffer. This will be automatically increased to, at least, fit the viewable part of the window (nlines
). (Default = 0)border
: Iftrue
, then the window will have a border. (Default =true
)border_color
: Color mask that will be used to print the border. See functionncurses_color
. If negative, then the color will not be changed. (Default = -1)focusable
: Iftrue
, then the window can have focus. Otherwise, all focus request will be rejected. (Default =true
)title
: The title of the window, which will only be printed ifborder
istrue
. (Default = "")title_color
: Color mask that will be used to print the title. See functionncurses_color
. If negative, then the color will not be changed. (Default = -1)
TextUserInterfaces.current_item
— Function.function current_item(menu::Ptr{Cvoid})
Return type: Ptr{Nothing}
For more information, consult libmenu
documentation.
TextUserInterfaces.current_item
— Method.current_item(menu::TUI_MENU) = current_item(menu.ptr)
Return the current item of the menu menu
.
TextUserInterfaces.current_item_desc
— Method.function current_item_desc(menu::TUI_MENU)
Return the item description of the menu menu
.
TextUserInterfaces.current_item_name
— Method.function current_item_name(menu::TUI_MENU)
Return the item name of the menu menu
.
TextUserInterfaces.curs_set
— Function.function curs_set(visibility::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.curses_version
— Method.function curses_version()
Return the NCurses version in a named tuple with the following fields:
major
: Major version.minor
: Minor version.patch
: Patch version.
TextUserInterfaces.del_panel
— Function.function del_panel(panel::Ptr{Cvoid})
Return type: Ptr{Nothing}
For more information, consult libmenu
documentation.
TextUserInterfaces.delwin
— Function.function delwin(win::Ptr{WINDOW})
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.derwin
— Function.function derwin(win::Ptr{WINDOW}, nlines::Integer, ncols::Integer, begin_y::Integer, begin_x::Integer)
Return type: Ptr{WINDOW}
For more information, consult libncurses
documentation.
TextUserInterfaces.destroy_all_windows
— Method.function destroy_all_windows()
Destroy all windows managed by the TUI.
TextUserInterfaces.destroy_field
— Method.function destroy_field(field::Ptr{Cvoid})
Destroy the field field
.
TextUserInterfaces.destroy_form
— Method.function destroy_form(form::TUI_FORM)
Destroy the form form
.
TextUserInterfaces.destroy_menu
— Method.function destroy_menu(menu::TUI_MENU)
Destroy the menu menu
.
TextUserInterfaces.destroy_tui
— Method.function destroy_tui()
Destroy the Text User Interface (TUI).
TextUserInterfaces.destroy_widget
— Method.function destroy_widget(widget; refresh::Bool = true)
Destroy the widget widget
.
If refresh
is true
(default), then a full refresh will be performed on the parent window. Otherwise, no refresh will be performed.
TextUserInterfaces.destroy_window
— Method.function destroy_window(win::Window)
Destroy the window win
.
TextUserInterfaces.doupdate
— Function.function doupdate()
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.endwin
— Function.function endwin()
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.erase
— Function.function erase()
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.field_buffer
— Method.function field_buffer(field::Ptr{Cvoid}, buffer::Integer)
Return type: Cstring
For more information, consult libform
documentation.
TextUserInterfaces.focus_on_widget
— Method.function focus_on_widget(widget::Widget)
Move focus to the widget widget
.
TextUserInterfaces.focus_on_widget
— Method.function focus_on_widget(window::Window, id::Integer)
Move focus to the widget ID id
on window window
.
TextUserInterfaces.form_add_char
— Method.function form_add_char(form::TUI_FORM, ch::Int)
Add the character ch
to the active field of the form form
.
TextUserInterfaces.form_beg_field
— Function.function form_beg_field(form::TUI_FORM)
Move to the beginning of the active field in the form form
.
TextUserInterfaces.form_del_char
— Function.function form_del_char(form::TUI_FORM)
Delete the character at the cursor of the active field in the form form
.
TextUserInterfaces.form_del_prev
— Function.function form_del_prev(form::TUI_FORM)
Delete the previous character from the cursor of the active field in the form form
.
TextUserInterfaces.form_down_char
— Function.function form_down_char(form::TUI_FORM)
Move to the down character of the active field in the form form
.
TextUserInterfaces.form_driver
— Method.function form_driver(form::Ptr{Cvoid}, ch::Integer)
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.form_end_field
— Function.function form_end_field(form::TUI_FORM)
Move to the end of the active field in the form form
.
TextUserInterfaces.form_left_char
— Function.function form_left_char(form::TUI_FORM)
Move to the left character of the active field in the form form
.
TextUserInterfaces.form_next_char
— Function.function form_next_char(form::TUI_FORM)
Move to the next character of the active field in the form form
.
TextUserInterfaces.form_next_field
— Function.function form_next_field(form::TUI_FORM)
Move to the next field of the form form
.
TextUserInterfaces.form_prev_char
— Function.function form_prev_char(form::TUI_FORM)
Move to the previous character of the active field in the form form
.
TextUserInterfaces.form_prev_field
— Function.function form_prev_field(form::TUI_FORM)
Move to the previous field of the form form
.
TextUserInterfaces.form_right_char
— Function.function form_right_char(form::TUI_FORM)
Move to the right character of the active field in the form form
.
TextUserInterfaces.form_up_char
— Function.function form_up_char(form::TUI_FORM)
Move to the up character of the active field in the form form
.
TextUserInterfaces.free_field
— Method.function free_field(field::Ptr{Cvoid})
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.free_form
— Method.function free_form(form::Ptr{Cvoid})
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.free_item
— Function.function free_item(item::Ptr{Cvoid})
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.free_menu
— Function.function free_menu(menu::Ptr{Cvoid})
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.get_color_pair
— Method.function get_color_pair(foreground::Symbol, background::Symbol)
Return the ID of the color pair (foreground
, background
), or nothing
if the color pair is not initialized.
TextUserInterfaces.get_field_data
— Function.function get_field_data(form::TUI_FORM, field_id::String, buffer::Int = 0)
Get the data of the field with ID field_id
at buffer buffer
in the form form
TextUserInterfaces.get_field_data
— Function.function get_field_data(field::TUI_FIELD, buffer::Int = 0)
Get the data of the field field
at buffer buffer
.
TextUserInterfaces.get_focused_window
— Method.function get_focused_window()
Return the focused window.
TextUserInterfaces.getbegx
— Function.function getbegx(win::Ptr{WINDOW})
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.getbegy
— Function.function getbegy(win::Ptr{WINDOW})
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.getch
— Function.function getch()
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.getcurx
— Function.function getcurx(win::Ptr{WINDOW})
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.getcury
— Function.function getcury(win::Ptr{WINDOW})
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.getmaxx
— Function.function getmaxx(win::Ptr{WINDOW})
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.getmaxy
— Function.function getmaxy(win::Ptr{WINDOW})
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.has_colors
— Function.function has_colors()
Return type: UInt8
For more information, consult libncurses
documentation.
TextUserInterfaces.has_focus
— Method.function has_focus(window::Window, widget)
Return true
if the widget widget
is in focus on window window
, or false
otherwise.
TextUserInterfaces.hide_panel
— Function.function hide_panel(panel::Ptr{Cvoid})
Return type: Ptr{Nothing}
For more information, consult libmenu
documentation.
TextUserInterfaces.hide_window
— Method.function hide_window(win::Window)
Hide the window win
.
TextUserInterfaces.hline
— Function.function hline(ch::jlchtype, n::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.init_color
— Function.function init_color(color::Integer, r::Integer, g::Integer, b::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.init_color
— Method.function init_color(name::Symbol, r::Int, g::Int, b::Int)
Initialize the color with name name
and RGB color r
, g
, and b
. Notice that the range for the last three variables is [0,1000]
.
If the color is already initialized, then nothing will be changed.
If the color was initialized, then it returns the color ID. Otherwise, it returns -1
.
TextUserInterfaces.init_color_pair
— Method.function init_color_pair(foreground::Symbol, background::Symbol)
Initialize the color pair (foreground
, background
) and return its ID. If the pair already exists, then just the function just returns its ID.
TextUserInterfaces.init_focus_manager
— Method.function init_focus_manager()
Initialization of the focus manager. The elements in focus_chain
are iterated to find the first one that can accept the focus.
TextUserInterfaces.init_pair
— Function.function init_pair(pair::Integer, f::Integer, b::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.init_tui
— Function.function init_tui(dir::String = "")
Initialize the Text User Interface (TUI). The full-path of the ncurses directory can be specified by dir
. If it is empty or omitted, then it will look on the default library directories.
TextUserInterfaces.initscr
— Function.function initscr()
Return type: Ptr{WINDOW}
For more information, consult libncurses
documentation.
TextUserInterfaces.item_description
— Function.function item_description(menu::Ptr{Cvoid})
Return type: Cstring
For more information, consult libmenu
documentation.
TextUserInterfaces.item_index
— Function.function item_index(menu::Ptr{Cvoid})
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.item_name
— Function.function item_name(menu::Ptr{Cvoid})
Return type: Cstring
For more information, consult libmenu
documentation.
TextUserInterfaces.item_value
— Function.function item_value(item::Ptr{Cvoid})
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.jlgetch
— Function.function jlgetch(win::Union{Ptr{WINDOW},Nothing} = nothing)
Wait for an keystroke in the window win
and return it (see Keystroke
). If win
is nothing
, then getch()
will be used instead of wgetch(win)
to listen for the keystroke.
TextUserInterfaces.keypad
— Function.function keypad(win::Ptr{WINDOW}, bf::Bool)
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.leaveok
— Function.function leaveok(win::Ptr{WINDOW}, bf::Bool)
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.log_message
— Function.function log_message(level::Int, msg::AbstractString, id::AbstractString = "")
Log the message msg
with level level
. The ID of the called can be specified by id
.
TextUserInterfaces.menu_down_item
— Method.function menu_down_item(menu::TUI_MENU)
Move down to an item of the menu menu
.
TextUserInterfaces.menu_down_line
— Method.function menu_down_line(menu::TUI_MENU)
Scroll down a line of the menu menu
.
TextUserInterfaces.menu_down_page
— Method.function menu_down_page(menu::TUI_MENU)
Scroll down a page of the menu menu
.
TextUserInterfaces.menu_driver
— Function.function menu_driver(menu::Ptr{Cvoid}, c::Integer)
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.menu_first_item
— Method.function menu_first_item(menu::TUI_MENU)
Move to the first item of the menu menu
.
TextUserInterfaces.menu_last_item
— Method.function menu_last_item(menu::TUI_MENU)
Move to the last item of the menu menu
.
TextUserInterfaces.menu_left_item
— Method.function menu_left_item(menu::TUI_MENU)
Move left to an item of the menu menu
.
TextUserInterfaces.menu_next_item
— Method.function menu_next_item(menu::TUI_MENU)
Move to the next item of the menu menu
.
TextUserInterfaces.menu_prev_item
— Method.function menu_prev_item(menu::TUI_MENU)
Move to the previous menu item of the menu
.
TextUserInterfaces.menu_right_item
— Method.function menu_right_item(menu::TUI_MENU)
Move right to an item of the menu menu
.
TextUserInterfaces.menu_toggle_item
— Method.function menu_toggle_item(menu::TUI_MENU)
Toggle the current item of the menu menu
.
TextUserInterfaces.menu_up_item
— Method.function menu_up_item(menu::TUI_MENU)
Move up to an item of the menu menu
.
TextUserInterfaces.menu_up_line
— Method.function menu_up_line(menu::TUI_MENU)
Scroll up a line of the menu menu
.
TextUserInterfaces.menu_up_page
— Method.function menu_up_page(menu::TUI_MENU)
Scroll up a page of the menu menu
.
TextUserInterfaces.mouseinterval
— Function.function mouseinterval(n::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.move_panel
— Function.function move_panel(panel::Ptr{Cvoid}, starty::Integer, startx::Integer)
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.move_view
— Method.function move_view(win::Window, y::Integer, x::Integer; update::Bool = true)
Move the origin of the view of window win
to the position (y,x)
. This routine makes sure that the view will never reach positions outside the buffer.
TextUserInterfaces.move_view_inc
— Method.function move_view_inc(win::Window; Δy::Integer, Δx::Integer; kwargs...)
Move the view of the window win
to the position (y+Δy, x+Δx)
. This function has the same set of keywords of the function move_view
.
TextUserInterfaces.move_window
— Method.function move_window(win::Window, starty::Integer, startx::Integer)
Move the window win
to the position (starty, startx
).
TextUserInterfaces.move_window_to_top
— Method.function move_window_to_top(win::Window)
Move window win
to the top.
TextUserInterfaces.mvhline
— Function.function mvhline(y::Integer, x::Integer, ch::jlchtype, n::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.mvprintw
— Function.function mvprintw(y::Integer, x::Integer, str::T) where T<:AbstractString
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.mvvline
— Function.function mvvline(y::Integer, x::Integer, ch::jlchtype, n::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.mvwhline
— Function.function mvwhline(win::Ptr{WINDOW}, y::Integer, x::Integer, ch::jlchtype, n::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.mvwprintw
— Function.function mvwprintw(win::Ptr{WINDOW}, y::Integer, x::Integer, str::T) where T<:AbstractString
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.mvwvline
— Function.function mvwvline(win::Ptr{WINDOW}, y::Integer, x::Integer, ch::jlchtype, n::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.ncurses_color
— Function.function ncurses_color([foreground::Symbol, background::Symbol,] attrs::Int = 0; kwargs...)
Return a mask to apply a color format with the foreground color foreground
, background color background
, and the attributes attrs
.
If the pair (foreground
, background
) is omitted, then the foreground and background color will not be changed.
Keywords
bold
: Iftrue
, then apply bold format mask toattrs
. (Default =false
)underline
: Iftrue
, then apply underline format mask toattrs
. (Default =false
)
TextUserInterfaces.new_form
— Method.function new_form(fields::Vector{Ptr{Cvoid}})
Return type: Ptr{Nothing}
For more information, consult libform
documentation.
TextUserInterfaces.new_item
— Function.function new_item(name::T, description::T) where T<:AbstractString
Return type: Ptr{Nothing}
For more information, consult libmenu
documentation.
TextUserInterfaces.new_menu
— Function.function new_menu(items::Vector{Ptr{Cvoid}})
Return type: Ptr{Nothing}
For more information, consult libmenu
documentation.
TextUserInterfaces.new_panel
— Function.function new_panel(win::Ptr{WINDOW})
Return type: Ptr{Nothing}
For more information, consult libmenu
documentation.
TextUserInterfaces.newpad
— Function.function newpad(lines::Integer, cols::Integer)
Return type: Ptr{WINDOW}
For more information, consult libncurses
documentation.
TextUserInterfaces.newwin
— Function.function newwin(lines::Integer, cols::Integer, y::Integer, x::Integer)
Return type: Ptr{WINDOW}
For more information, consult libncurses
documentation.
TextUserInterfaces.next_widget
— Method.function next_widget(window::Window)
Move the focus of window window
to the next widget.
TextUserInterfaces.nodelay
— Function.function nodelay(win::Ptr{WINDOW}, bf::Bool)
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.noecho
— Function.function noecho()
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.notimeout
— Function.function notimeout(win::Ptr{WINDOW}, bf::Bool)
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.obj_desc
— Method.function obj_desc(obj)
Return a string with the description of the object obj
formed by:
<Object type> (<Object address if mutable>)
TextUserInterfaces.obj_to_ptr
— Method. function obj_to_ptr(obj)
Returns the hexadecimal representation of the address of the object obj
. It only works with mutable objects. If obj
is immutable, then 0x0
will be returned.
TextUserInterfaces.panel_userptr
— Function.function panel_userptr(pan::Ptr{Cvoid})
Return type: Ptr{Nothing}
For more information, consult libmenu
documentation.
TextUserInterfaces.pnoutrefresh
— Function.function pnoutrefresh(win::Ptr{WINDOW}, pminrow::Integer, pmincol::Integer, sminrow::Integer, smincol::Integer, smaxrow::Integer, smaxcol::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.pos_form_cursor
— Method.function pos_form_cursor(form::Ptr{Cvoid})
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.pos_menu_cursor
— Function.function pos_menu_cursor(menu::Ptr{Cvoid})
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.post_form
— Method.function post_form(form::Ptr{Cvoid})
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.post_form
— Method.function post_form(form::TUI_FORM)
Post the for form
.
TextUserInterfaces.post_menu
— Function.function post_menu(menu::Ptr{Cvoid})
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.post_menu
— Method.function post_menu(menu::TUI_MENU)
Post the menu menu
.
TextUserInterfaces.prefresh
— Function.function prefresh(win::Ptr{WINDOW}, pminrow::Integer, pmincol::Integer, sminrow::Integer, smincol::Integer, smaxrow::Integer, smaxcol::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.previous_widget
— Method.function previous_widget(window::Window)
Move the focus of window window
to the previous widget.
TextUserInterfaces.printw
— Function.function printw(str::T) where T<:AbstractString
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.process_focus
— Method.function process_focus(widget, k::Keystroke)
Process the actions when widget widget
is in focus and the keystroke k
is pressed. If it returns false
, then it is means that the widget was not capable to process the focus. Otherwise, it must return true
.
TextUserInterfaces.process_focus
— Method.function process_focus(k::Keystroke)
Process the focus considering the user's keystorke k
.
TextUserInterfaces.process_focus
— Method.function process_focus(form::TUI_FORM, k::Keystroke)
Process the actions when the form form
is in focus and the keystroke k
was issued by the user.
TextUserInterfaces.process_focus
— Method.function process_focus(menu::TUI_MENU, k::Keystroke)
Process the actions when the menu menu
is in focus and the keystroke k
was issued by the user.
TextUserInterfaces.process_focus
— Method.function process_focus(window::Window, k::Keystroke)
Process the focus on window window
due to keystroke k
.
TextUserInterfaces.redraw
— Function.function redraw(widget)
Redraw the widget inside its content window cwin
.
TextUserInterfaces.refresh
— Function.function refresh()
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.refresh_all_windows
— Method.function refresh_all_windows()
Refresh all the windows, including the root window.
TextUserInterfaces.refresh_window
— Method.function refresh_window(id::String)
Refresh the window with id id
and all its parents windows except for the root window.
TextUserInterfaces.refresh_window
— Method.function refresh_window(win::Window; update = true, backpropagation = true)
Refresh the window win
and all its child windows. If the view needs to be updated (see view_needs_update
), then the content of the buffer will be copied to the view before updating.
If update
is true
, then doupdate()
is called and the physical screen is updated.
If backpropagation
is true
, then all the parents windows (except from the root window) will also be refreshed.
TextUserInterfaces.release_focus
— Method.function release_focus(widget)
Request focus to be released. It should return true
if the focus can be released or false
otherwise.
TextUserInterfaces.release_focus
— Method.function release_focus(form::TUI_FORM)
Release the focus from the form form
.
TextUserInterfaces.release_focus
— Method.function release_focus(menu::TUI_MENU)
Release the focus from the menu menu
.
TextUserInterfaces.request_update
— Method.function request_update(widget)
Request update of the widget widget
.
TextUserInterfaces.resizeterm
— Function.function resizeterm(lines::Integer, columns::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.selected_items
— Method.function selected_items(menu::TUI_MENU)
Return a Vector
with the selected items in the menu menu
.
TextUserInterfaces.selected_items_desc
— Method.function selected_items_desc(menu::TUI_MENU)
Return a Vector
with the selected items descriptions in the menu menu
.
TextUserInterfaces.selected_items_names
— Method.function selected_items_names(menu::TUI_MENU)
Return a Vector
with the selected items names in the menu menu
.
TextUserInterfaces.set_color
— Method.function set_color([win::Window,] color::Int)
Set the color of the window win
to color
(see ncurses_color
). If win
is omitted, then it defaults to the root window.
TextUserInterfaces.set_field_back
— Method.function set_field_back(field::Ptr{Cvoid}, value::Integer)
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.set_field_buffer
— Function.function set_field_buffer(field::Ptr{Cvoid}, buf::Int, c::T) where T<:AbstractString
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.set_field_just
— Method.function set_field_just(field::Ptr{Cvoid}, justification::Integer)
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.set_field_opts
— Method.function set_field_opts(field::Ptr{Cvoid}, field_options::Integer)
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.set_field_type
— Method.function set_field_type(field::Ptr{Cvoid}, type::Ptr{Cvoid}, valuelist::Vector, checkcase::Integer, checkunique::Integer)
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.set_field_type
— Method.function set_field_type(field::Ptr{Cvoid}, type::Ptr{Cvoid}, padding::Integer, vmin::Float64, vmax::Float64)
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.set_field_type
— Method.function set_field_type(field::Ptr{Cvoid}, type::Ptr{Cvoid}, padding::Integer, vmin::Integer, vmax::Integer)
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.set_field_type
— Method.function set_field_type(field::Ptr{Cvoid}, type::Ptr{Cvoid}, arg::Integer)
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.set_field_type
— Method.function set_field_type(field::Ptr{Cvoid}, type::Ptr{Cvoid}, regex::String)
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.set_focus_chain
— Method.function set_focus_chain(wins::Window...; new_focus_id::Integer = 1)
Set the focus chain, i.e. the ordered list of windows that can receive the focus. The keyword new_focus_id
can be set to specify which element is currently focused in the new chain.
TextUserInterfaces.set_form_opts
— Method.function set_form_opts(form::Ptr{Cvoid}, form_options::Integer)
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.set_form_sub
— Method.function set_form_sub(form::Ptr{Cvoid}, win_form::Ptr{WINDOW})
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.set_form_win
— Method.function set_form_win(form::Ptr{Cvoid}, win_form::Ptr{WINDOW})
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.set_form_win
— Method.function set_form_win(form::TUI_FORM, win::Window)
Set the form form
window to win
.
TextUserInterfaces.set_menu_format
— Function.function set_menu_format(menu::Ptr{Cvoid}, rows::Integer, cols::Integer)
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.set_menu_mark
— Function.function set_menu_mark(menu::Ptr{Cvoid}, mark::T) where T<:AbstractString
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.set_menu_opts
— Function.function set_menu_opts(menu::Ptr{Cvoid}, opts::Integer)
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.set_menu_sub
— Function.function set_menu_sub(menu::Ptr{Cvoid}, win::Ptr{WINDOW})
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.set_menu_win
— Function.function set_menu_win(menu::Ptr{Cvoid}, win::Ptr{WINDOW})
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.set_menu_win
— Method.function set_menu_win(menu::TUI_MENU, win::Window)
Set menu menu
window to win
.
TextUserInterfaces.set_next_window_func
— Method.function set_next_window_func(f)
Set the function f
to be the one that will be called to check whether the user wants the next window. The signature must be:
f(k::Keystroke)::Bool
It must return true
if the next window is required of false
otherwise.
TextUserInterfaces.set_panel_userptr
— Function.function set_panel_userptr(pan::Ptr{Cvoid}, ptr::Ptr{Cvoid})
Return type: Int32
For more information, consult libmenu
documentation.
function set_previous_window_func(f)
Set the function f
to be the one that will be called to check whether the user wants the previous window. The signature must be:
f(k::Keystroke)::Bool
It must return true
if the previous window is required of false
otherwise.
TextUserInterfaces.set_window_title
— Method.function set_window_title(win::Window, title::AbstractString; ...)
Set the title of the window win
to title
.
Keywords
title_color
: Color mask that will be used to print the title. See functionncurses_color
. If negative, then the color will not be changed. (Default = -1)
TextUserInterfaces.show_panel
— Function.function show_panel(panel::Ptr{Cvoid})
Return type: Ptr{Nothing}
For more information, consult libmenu
documentation.
TextUserInterfaces.show_window
— Method.function show_window(win::Window)
Show the window win
.
TextUserInterfaces.start_color
— Function.function start_color()
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.subpad
— Function.function subpad(win::Ptr{WINDOW}, nlines::Integer, ncols::Integer, begin_y::Integer, begin_x::Integer)
Return type: Ptr{WINDOW}
For more information, consult libncurses
documentation.
TextUserInterfaces.sync_cursor
— Method.function sync_cursor(window::Window)
Synchronize the cursor to the position of the focused widget in window window
. This is necessary because all the operations are done in the buffer and then copied to the view.
TextUserInterfaces.top_panel
— Function.function top_panel(pan::Ptr{Cvoid})
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.touchwin
— Function.function touchwin(win::Ptr{WINDOW})
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.unpost_form
— Method.function unpost_form(form::Ptr{Cvoid})
Return type: Int32
For more information, consult libform
documentation.
TextUserInterfaces.unpost_form
— Method.function unpost_form(form::TUI_FORM)
Unpost the form form
.
TextUserInterfaces.unpost_menu
— Function.function unpost_menu(menu::Ptr{Cvoid})
Return type: Int32
For more information, consult libmenu
documentation.
TextUserInterfaces.unpost_menu
— Method.function unpost_menu(menu::TUI_MENU)
Unpost the menu menu
.
TextUserInterfaces.unset_color
— Method.function unset_color([win::Window,] color::Number)
Unset the color color
(see ncurses_color
) in the window win
. If win
is omitted, then it defaults to the root window.
TextUserInterfaces.update
— Method.function update(widget; force_redraw = false)
Update the widget by calling the function redraw
. This function returns true
if the widget needed to be updated of false
otherwise.
If force_redraw
is true
, then the widget will be updated even if it is not needed.
TextUserInterfaces.update_panels
— Function.function update_panels()
Return type: Nothing
For more information, consult libmenu
documentation.
TextUserInterfaces.update_view
— Method.function update_view(win::Window; force::Bool = false)
Update the view of window win
by copying the contents from the buffer. If the view does not need to be updated (see view_needs_update
), then nothing is done. If the keyword force
is true
, then the copy will always happen.
Return
It returns true
if the view has been updated and false
otherwise.
TextUserInterfaces.vline
— Function.function vline(ch::jlchtype, n::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.waddch
— Function.function waddch(win::Ptr{WINDOW}, ch::jlchtype)
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.wattroff
— Function.function wattroff(win::Ptr{WINDOW}, attrs::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.wattron
— Function.function wattron(win::Ptr{WINDOW}, attrs::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.wborder
— Function.function wborder(win::Ptr{WINDOW}, ls::jlchtype, rs::jlchtype, ts::jlchtype, bs::jlchtype, tl::jlchtype, tr::jlchtype, bl::jlchtype, br::jlchtype)
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.wborder
— Method.function wborder(win::Ptr{WINDOW})
Call the function wborder(win, 0, 0, 0, 0, 0, 0, 0, 0)
.
TextUserInterfaces.wclear
— Function.function wclear(win::Ptr{WINDOW})
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.wclrtobot
— Function.function wclrtobot(win::Ptr{WINDOW})
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.wclrtoeol
— Function.function wclrtoeol(win::Ptr{WINDOW})
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.werase
— Function.function werase(win::Ptr{WINDOW})
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.wgetch
— Function.function wgetch(win::Ptr{WINDOW})
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.whline
— Function.function whline(win::Ptr{WINDOW}, ch::jlchtype, n::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.wmove
— Function.function wmove(win::Ptr{WINDOW}, y::Integer, x::Integer)
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.wnoutrefresh
— Function.function wnoutrefresh(win::Ptr{WINDOW})
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.wprintw
— Function.function wprintw(win::Ptr{WINDOW}, str::T) where T<:AbstractString
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.wrefresh
— Function.function wrefresh(win::Ptr{WINDOW})
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.wtimeout
— Function.function wtimeout(win::Ptr{WINDOW}, delay::Integer)
Return type: Nothing
For more information, consult libncurses
documentation.
TextUserInterfaces.wvline
— Function.function wvline(win::Ptr{WINDOW}, ch::jlchtype, n::Integer)
Return type: Int32
For more information, consult libncurses
documentation.
TextUserInterfaces.@log
— Macro.macro log(level, msg, id)
Log the messagem msg
with level level
of the caller id
TextUserInterfaces.@log
— Macro.macro log(level, msg)
Log the message msg
with level level
.
TextUserInterfaces.NCURSES
— Type.struct NCURSES
This private structure handles some global variables that are used in the ncurses wrapper.
TextUserInterfaces._get_window_cur_pos
— Method.function _get_window_cur_pos(win::Ptr{WINDOW})
Get the cursor position of the window win
and return it on a tuple (cur_y,cur_x)
. If the window is not initialized, then this function returns (-1,-1)
.
TextUserInterfaces._get_window_dims
— Method.function _get_window_dims(win::Ptr{WINDOW})
Get the dimensions of the window win
and return it on a tuple (dim_y,dim_x)
. If the window is not initialized, then this function returns (-1,-1)
.
TextUserInterfaces.next_window
— Method.function next_window()
Move the focus to the next window.
TextUserInterfaces.previous_window
— Method.function previous_window()
Move the focus to the previous window.
TextUserInterfaces.request_view_update
— Method.function request_view_update(win::Window)
Request to update the view of window win
. Notice that this must also request update on all parent windows until the root window.
TextUserInterfaces.require_cursor
— Method.function require_cursor()
If true
, then the physical cursor will be shown and the position will be updated according to its position in the widget window. Otherwise, the physical cursor will be hidden.
TextUserInterfaces.@_ccallf
— Macro.macro _ccallf(expr)
Make a ccall
to a libform
function. The usage should be:
@_ccallf function(arg1::Type1, arg2::Type2, ...)::TypeReturn
It uses the global constant structure ncurses
to call the function. Hence, it must be initialized.
TextUserInterfaces.@_ccallm
— Macro.macro _ccallm(expr)
Make a ccall
to a libmenu
function. The usage should be:
@_ccallf function(arg1::Type1, arg2::Type2, ...)::TypeReturn
It uses the global constant structure ncurses
to call the function. Hence, it must be initialized.
TextUserInterfaces.@_ccalln
— Macro.macro _ccalln(expr)
Make a ccall
to a libncurses
function. The usage should be:
@_ccalln function(arg1::Type1, arg2::Type2, ...)::TypeReturn
It uses the global constant structure ncurses
to call the function. Hence, it must be initialized.
TextUserInterfaces.@_ccallp
— Macro.macro _ccallm(expr)
Make a ccall
to a libpanel
function. The usage should be:
@_ccallf function(arg1::Type1, arg2::Type2, ...)::TypeReturn
It uses the global constant structure ncurses
to call the function. Hence, it must be initialized.