NAFPack_ANSI Module


Uses

  • module~~nafpack_ansi~~UsesGraph module~nafpack_ansi NAFPack_ANSI iso_fortran_env iso_fortran_env module~nafpack_ansi->iso_fortran_env module~nafpack_io_utils NAFPack_io_utils module~nafpack_ansi->module~nafpack_io_utils module~nafpack_kinds NAFPack_kinds module~nafpack_ansi->module~nafpack_kinds module~nafpack_io_utils->module~nafpack_kinds module~nafpack_kinds->iso_fortran_env

Used by

  • module~~nafpack_ansi~~UsedByGraph module~nafpack_ansi NAFPack_ANSI module~nafpack_ansi_ascii NAFPack_ANSI_ASCII module~nafpack_ansi_ascii->module~nafpack_ansi module~nafpack_ansi_ucs4 NAFPack_ANSI_ucs4 module~nafpack_ansi_ucs4->module~nafpack_ansi module~nafpack_logger_mod NAFPack_Logger_mod module~nafpack_logger_mod->module~nafpack_ansi module~nafpack_terminal NAFPack_terminal module~nafpack_logger_mod->module~nafpack_terminal module~nafpack_terminal->module~nafpack_ansi module~nafpack_iterative_methods NAFPack_Iterative_methods module~nafpack_iterative_methods->module~nafpack_logger_mod module~nafpack_linalg NAFPack_linalg module~nafpack_linalg->module~nafpack_iterative_methods

Variables

Type Visibility Attributes Name Initial
type(AnsiConstants), public, parameter :: Ansi_Constants = AnsiConstants()

Interfaces

interface

  • public pure module function create_ansi_ascii(ansi_code) result(ansi_string)

    Arguments

    Type IntentOptional Attributes Name
    type(AnsiCode), intent(in) :: ansi_code

    Return Value character(kind=ascii, len=:), allocatable

interface

  • public pure module function apply_style_ascii(text, style) result(styled_text)

    Arguments

    Type IntentOptional Attributes Name
    character(kind=ascii, len=*), intent(in) :: text
    type(AnsiCode), intent(in) :: style

    Return Value character(kind=ascii, len=:), allocatable

interface

  • public pure module function colorize_text_ascii(text, color) result(colored_text)

    Arguments

    Type IntentOptional Attributes Name
    character(kind=ascii, len=*), intent(in) :: text
    integer(kind=i16), intent(in) :: color

    Return Value character(kind=ascii, len=:), allocatable

interface

  • public module subroutine cursor_position_ascii(row, col)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: row
    integer, intent(in) :: col

interface

  • public module subroutine clear_screen_ascii()

    Arguments

    None

interface

  • public module subroutine clear_line_ascii()

    Arguments

    None

interface

  • public module subroutine save_cursor_ascii()

    Arguments

    None

interface

  • public module subroutine restore_cursor_ascii()

    Arguments

    None

interface

  • public pure module function create_ansi_ucs4(ansi_code) result(ansi_string)

    Arguments

    Type IntentOptional Attributes Name
    type(AnsiCode), intent(in) :: ansi_code

    Return Value character(kind=ucs4, len=:), allocatable

interface

  • public pure module function apply_style_ucs4(text, style) result(styled_text)

    Arguments

    Type IntentOptional Attributes Name
    character(kind=ucs4, len=*), intent(in) :: text
    type(AnsiCode), intent(in) :: style

    Return Value character(kind=ucs4, len=:), allocatable

interface

  • public pure module function colorize_text_ucs4(text, color) result(colored_text)

    Arguments

    Type IntentOptional Attributes Name
    character(kind=ucs4, len=*), intent(in) :: text
    integer(kind=i16), intent(in) :: color

    Return Value character(kind=ucs4, len=:), allocatable

interface

  • public module subroutine cursor_position_ucs4(row, col)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: row
    integer, intent(in) :: col

interface

  • public module subroutine clear_screen_ucs4()

    Arguments

    None

interface

  • public module subroutine clear_line_ucs4()

    Arguments

    None

interface

  • public module subroutine save_cursor_ucs4()

    Arguments

    None

interface

  • public module subroutine restore_cursor_ucs4()

    Arguments

    None

Derived Types

type, public ::  AnsiCode

type, public ::  ColorsAscii

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: reset
character(len=:), public, allocatable :: bold
character(len=:), public, allocatable :: faint
character(len=:), public, allocatable :: italic
character(len=:), public, allocatable :: underline
character(len=:), public, allocatable :: blink
character(len=:), public, allocatable :: reverse
character(len=:), public, allocatable :: hidden
character(len=:), public, allocatable :: strikethrough
character(len=:), public, allocatable :: red
character(len=:), public, allocatable :: green
character(len=:), public, allocatable :: yellow
character(len=:), public, allocatable :: blue
character(len=:), public, allocatable :: magenta
character(len=:), public, allocatable :: cyan
character(len=:), public, allocatable :: white
character(len=:), public, allocatable :: bright_red
character(len=:), public, allocatable :: bright_green
character(len=:), public, allocatable :: bright_yellow
character(len=:), public, allocatable :: bright_blue
character(len=:), public, allocatable :: bright_magenta
character(len=:), public, allocatable :: bright_cyan
character(len=:), public, allocatable :: bright_white

Type-Bound Procedures

procedure, public :: init => init_colors_ascii

type, public ::  ColorsUcs4

Components

Type Visibility Attributes Name Initial
character(kind=ucs4, len=:), public, allocatable :: reset
character(kind=ucs4, len=:), public, allocatable :: bold
character(kind=ucs4, len=:), public, allocatable :: faint
character(kind=ucs4, len=:), public, allocatable :: italic
character(kind=ucs4, len=:), public, allocatable :: underline
character(kind=ucs4, len=:), public, allocatable :: blink
character(kind=ucs4, len=:), public, allocatable :: reverse
character(kind=ucs4, len=:), public, allocatable :: hidden
character(kind=ucs4, len=:), public, allocatable :: strikethrough
character(kind=ucs4, len=:), public, allocatable :: red
character(kind=ucs4, len=:), public, allocatable :: green
character(kind=ucs4, len=:), public, allocatable :: yellow
character(kind=ucs4, len=:), public, allocatable :: blue
character(kind=ucs4, len=:), public, allocatable :: magenta
character(kind=ucs4, len=:), public, allocatable :: cyan
character(kind=ucs4, len=:), public, allocatable :: white
character(kind=ucs4, len=:), public, allocatable :: bright_red
character(kind=ucs4, len=:), public, allocatable :: bright_green
character(kind=ucs4, len=:), public, allocatable :: bright_yellow
character(kind=ucs4, len=:), public, allocatable :: bright_blue
character(kind=ucs4, len=:), public, allocatable :: bright_magenta
character(kind=ucs4, len=:), public, allocatable :: bright_cyan
character(kind=ucs4, len=:), public, allocatable :: bright_white

Type-Bound Procedures

procedure, public :: init => init_colors_ucs4

Functions

public pure module function set_ansi_code(style, fg_color, bg_color) result(ansi_code)

Arguments

Type IntentOptional Attributes Name
integer(kind=i8), intent(in), optional :: style
integer(kind=i16), intent(in), optional :: fg_color
integer(kind=i16), intent(in), optional :: bg_color

Return Value type(AnsiCode)

public pure module function reset_ansi_code() result(ansi_code)

Arguments

None

Return Value type(AnsiCode)