[][src]Crate termimad

Macros

rgb

Structs

Area

a part of a screen

CompoundStyle

A style which may be applied to a compound Right now it's just a wrapper around a crossterm ObjectStyle

FmtComposite

wrap a Minimad Composite, which is a list of Compounds, which are strings with an homogeneous style

FmtInline

a directly printable markdown snippet, complete with the reference to a skin so that it can implement the Display trait. Use this when you don't have a text but just part of a line

FmtText

a formatted text, implementing Display

LineStyle

A style applicable to a type of line:

MadSkin

A skin defining how a parsed mardkown appears on the terminal (fg and bg colors, bold, italic, underline, etc.)

MadView

A MadView is like a textview but it owns everything, from the source markdown to the area and the skin, which often makes it more convenient for dynamic texts. It's also resizeable.

ScrollBarStyle

The scrollbar style is defined by two styled chars, one for the track, and one for the thumb. For the default styling only the fg color is defined and the char is ▐ but everything can be changed

StyledChar

a modifiable character which can be easily written or repeated. Can be used for bullets, horizontal rules or quote marks.

TextView

a scrollable text, in a specific area. The text is assumed to have been computed for the given area (it's generally recommended to use a MadView instead of a TextView to ensure the text is properly computed).

Enums

Alignment
FmtLine

A line in a text. This structure should normally not be used outside of the lib.

Functions

get_default_skin

return a reference to the global skin (modifiable). If you want a new default skin without messing with the other default printings, get a separate instance with Skin::default() instead.

inline

return a formatted line, which implements Display This uses the default skin. Don't use if you expect your markdown to be several lines.

print_inline
print_text
term_text

return a formatted text, which implements Display This uses the default skin and the terminal's width

terminal_size

return a (width, height) with the dimensions of the available terminal in characters.

text

return a formatted text, which implements Display This uses the default skin and doesn't wrap the lines at all. Most often you'll prefer to use term_text which makes a text wrapped for the current terminal.