Windows¶
Window’s flags¶
-
enumerator
WindowResize
¶
-
class
Window
¶ A window that can accommodate one or more plots to be shown on the screen.
-
Window
()¶
Create an empty window with a single slot.
-
Window
(const char *layout)¶
Create an empty window subdivided accordingly to the
layout
string.The format string describe the layout of plots inside the window using the following grammar:
layout = element | h | v ; h = "h" { layout } ; v = "v" { layout } ; element = "." | "(" layout ")" ;
The character
.
means a slot to accommodate a single plot. The lettersh
andv
indicate respectively an horizontal and a vertical split and are followed by one or more sub-layouts. The parenthesis are used fro grouping.For example to accommodate two plots horizontally use the layout string
h..
. To subdivide a window in a 2x2 grid it can be used the layout stringh(v..)(v..)
.-
void
SetLayout
(const char *layout)¶ Set the window’s layout using the format string layout like when using the constructor
Window::Window()
. Can be used only if the windows is not yet running. If the window is already running the call has no effect.
-
int
Attach
(Plot &plot, const char *slot)¶ Attach the given plot inside a window using
slot
to address the slot. Return an integer index that can be used for theWindow::SlotRefresh()
function.The
slot
string should be composed by integer indexes separated by commas. Each index is used to address a position inside an horizontal or vertical split. Further indexes are used to address a sub-layout, if any is present.For example for a window layout specified by
h..
the simple strings1
or2
will address respectively the first and the second slot. For a layout with nested subdivisions, for example,h(v..)(v..)
the string1,2
will address the slot in the first column and the second row.
-
void
SlotRefresh
(unsigned index)¶ Incrementally update the image of the window for the plot in the slot identified by
index
. Only the elements on the plot marked as pending will be drawn.
-
void
Start
(unsigned width, unsigned height, unsigned flags)¶ Show the window on the screen with the given width and height. Thhe flags currently accept only the
WindowResize
.
-
void
Wait
()¶ Blocks waiting until the window is closed.
-