Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FTXUI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Will2.Mcgregor@live.uwe.ac.uk
FTXUI
Commits
4450cca3
Unverified
Commit
4450cca3
authored
3 years ago
by
Arthur Sonzogni
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update docs to use std::string. (#184)
parent
9a54528b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+3
-3
3 additions, 3 deletions
README.md
doc/mainpage.md
+24
-24
24 additions, 24 deletions
doc/mainpage.md
with
27 additions
and
27 deletions
README.md
+
3
−
3
View file @
4450cca3
...
...
@@ -52,9 +52,9 @@ A simple C++ library for terminal based user interface.
~~~
cpp
vbox
({
hbox
({
text
(
L
"left"
)
|
border
,
text
(
L
"middle"
)
|
border
|
flex
,
text
(
L
"right"
)
|
border
,
text
(
"left"
)
|
border
,
text
(
"middle"
)
|
border
|
flex
,
text
(
"right"
)
|
border
,
}),
gauge
(
0.5
)
|
border
,
});
...
...
This diff is collapsed.
Click to expand it.
doc/mainpage.md
+
24
−
24
View file @
4450cca3
...
...
@@ -21,9 +21,9 @@ int main(void) {
// Define the document
Element
document
=
hbox
({
text
(
L
"left"
)
|
border
,
text
(
L
"middle"
)
|
border
|
flex
,
text
(
L
"right"
)
|
border
,
text
(
"left"
)
|
border
,
text
(
"middle"
)
|
border
|
flex
,
text
(
"right"
)
|
border
,
});
auto
screen
=
Screen
::
Create
(
...
...
@@ -141,9 +141,9 @@ can be responsive to the terminal dimensions.
```
cpp
// Define the document
Element
document
=
vbox
({
text
(
L
"The window"
)
|
bold
|
color
(
Color
::
Blue
),
text
(
"The window"
)
|
bold
|
color
(
Color
::
Blue
),
gauge
(
0.5
)
text
(
L
"The footer"
)
text
(
"The footer"
)
});
// Add a border.
...
...
@@ -160,7 +160,7 @@ You only need one header: ftxui/dom/elements.hpp
The most simple widget. It displays a text.
~~~
cpp
text
(
L
"I am a piece of text"
);
text
(
"I am a piece of text"
);
~~~
~~~
bash
I am a piece of text.
...
...
@@ -170,7 +170,7 @@ I am a piece of text.
Add a border around an element
~~~
cpp
border
(
text
(
L
"The element"
))
border
(
text
(
"The element"
))
~~~
~~~
bash
...
...
@@ -184,7 +184,7 @@ border(text(L"The element"))
A
`ftxui::window`
is a
`ftxui::border`
, but with some text on top of the border.
Add a border around an element
~~~
cpp
window
(
L
"The window"
,
text
(
L
"The element"
))
window
(
"The window"
,
text
(
"The element"
))
~~~
~~~
bash
...
...
@@ -201,9 +201,9 @@ container in two.
~~~
cpp
border
(
hbox
({
text
(
L
"Left"
),
text
(
"Left"
),
separator
(),
text
(
L
"Right"
)
text
(
"Right"
)
})
)
~~~
...
...
@@ -272,9 +272,9 @@ On most terminal the following colors are supported:
Example:
```
cpp
text
(
L
"Blue foreground"
)
|
color
(
Color
::
Blue
);
text
(
L
"Blue background"
)
|
bgcolor
(
Color
::
Blue
);
text
(
L
"Black on white"
)
|
color
(
Color
::
Black
)
|
bgcolor
(
Color
::
White
);
text
(
"Blue foreground"
)
|
color
(
Color
::
Blue
);
text
(
"Blue background"
)
|
bgcolor
(
Color
::
Blue
);
text
(
"Black on white"
)
|
color
(
Color
::
Black
)
|
bgcolor
(
Color
::
White
);
```
### Palette256
...
...
@@ -285,7 +285,7 @@ On terminal supporting 256 colors.
@endhtmlonly
```
cpp
text
(
L
"HotPink"
)
|
color
(
Color
::
HotPink
);
text
(
"HotPink"
)
|
color
(
Color
::
HotPink
);
```
### TrueColor
...
...
@@ -320,12 +320,12 @@ Decorator bgcolor(Color);
Example:
~~~
cpp
underlined
(
bold
(
text
(
L
"This text is bold and underlined"
)))
underlined
(
bold
(
text
(
"This text is bold and underlined"
)))
~~~
Tips: The pipe operator can be used to chain Decorator:
~~~
cpp
text
(
L
"This text is bold"
))
|
bold
|
underlined
text
(
"This text is bold"
))
|
bold
|
underlined
~~~
## Layout
...
...
@@ -348,9 +348,9 @@ An horizontal flow layout is implemented by:
**Examples**
~~~
cpp
hbox
({
text
(
L
"left"
)
|
border
,
text
(
L
"middle"
)
|
border
|
flex
,
text
(
L
"right"
)
|
border
,
text
(
"left"
)
|
border
,
text
(
"middle"
)
|
border
|
flex
,
text
(
"right"
)
|
border
,
});
~~~
~~~
bash
...
...
@@ -361,9 +361,9 @@ An horizontal flow layout is implemented by:
~~~
cpp
hbox
({
text
(
L
"left"
)
|
border
,
text
(
L
"middle"
)
|
border
|
flex
,
text
(
L
"right"
)
|
border
|
flex
,
text
(
"left"
)
|
border
,
text
(
"middle"
)
|
border
|
flex
,
text
(
"right"
)
|
border
|
flex
,
});
~~~
~~~
bash
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment