Cursor mode and window input.
"View history" views holds the view before each view change, for the u key; kipp_rebuild
empties it via clear_views after an axis change. Keys write st view limits and toggles,
then render through draw.f90.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=1), | private, | parameter | :: | K_LCLICK | = | 'A' |
Left click. |
| character(len=1), | private, | parameter | :: | K_MCLICK | = | 'D' |
Middle click. |
| character(len=1), | private, | parameter | :: | K_RCLICK | = | 'X' |
Right click. |
| character(len=1), | private, | parameter | :: | K_SCRUP | = | achar(21) |
Scroll up. |
| character(len=1), | private, | parameter | :: | K_SCRDN | = | achar(4) |
Scroll down. |
| character(len=1), | private, | parameter | :: | K_SCRLT | = | achar(12) |
Scroll left. |
| character(len=1), | private, | parameter | :: | K_SCRRT | = | achar(18) |
Scroll right. |
| character(len=1), | private, | parameter | :: | K_ESC | = | achar(27) |
Esc key. |
| character(len=1), | private, | parameter | :: | K_CTRLC | = | achar(3) |
Ctrl-C. |
| integer(kind=int32), | private | :: | nsnap | = | 0 |
Number of last numbered snapshot saved from cursor mode. |
|
| type(view_t), | private, | allocatable | :: | views(:) |
View history for |
Return process id, via POSIX getpid.
Names temporary PNG of p clipboard copy.
Test file descriptor for a terminal, via POSIX isatty.
Nonzero for a terminal.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | fd |
File descriptor to test. |
View of view history.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=real64), | public | :: | lim(4) |
View limits: xmin, xmax, ymin, ymax. |
|||
| logical, | public | :: | xauto |
Auto-scale flags of x and y in this view. |
|||
| logical, | public | :: | yauto |
Auto-scale flags of x and y in this view. |
Block at REPL prompt until stdin or plot window has input.
Apply one cursor key ch at world position (x, y).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=1), | intent(in) | :: | ch |
Key or mouse event character, as giza reports it. |
||
| real(kind=real64), | intent(in) | :: | x |
Cursor x, in world coords. |
||
| real(kind=real64), | intent(in) | :: | y |
Cursor y, in world coords. |
||
| logical, | intent(out) | :: | done |
Set when |
Restore view from view history.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(view_t), | intent(in) | :: | v |
View to restore. |
Empty the view history.
Give centre of current view, in world coords.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(out) | :: | cx |
x of view centre. |
||
| real(kind=real64), | intent(out) | :: | cy |
y of view centre. |
Print cursor key reference.
Print model and zone cell at world position (wx, wy).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | wx |
Cursor x, in world coords. |
||
| real(kind=real64), | intent(in) | :: | wy |
Cursor y, in world coords. |
Set x view limits from two world coords, in either order.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | a |
One end of selection. |
||
| real(kind=real64), | intent(in) | :: | b |
Other end of selection. |
Set y view limits from two world coords, in either order.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | a |
One end of selection. |
||
| real(kind=real64), | intent(in) | :: | b |
Other end of selection. |
Rescale both axes by f about a world position.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | cx |
x of fixed point, in world coords. |
||
| real(kind=real64), | intent(in) | :: | cy |
y of fixed point, in world coords. |
||
| real(kind=real64), | intent(in) | :: | f |
Factor applied to world-space spans. |
Shift view by a fraction of current world-space span.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | fx |
Shift along x, as fraction of x span. |
||
| real(kind=real64), | intent(in) | :: | fy |
Shift along y, as fraction of y span. |
Pan so a world position becomes view centre.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | cx |
x of new centre, in world coords. |
||
| real(kind=real64), | intent(in) | :: | cy |
y of new centre, in world coords. |