31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

17.3 Panels ( panel )<br />

1. Definition<br />

Panels are windows consisting of a panel section only (cf. section 17.2). <strong>The</strong>y are used<br />

for displaying text messages and updating the values of variables.<br />

#include < <strong>LEDA</strong>/graphics/panel.h ><br />

2. Creation<br />

panel P ; creates an empty panel P .<br />

panel P (string s); creates an empty panel P with header s.<br />

panel P (int w, int h);<br />

panel P (int w, int h, string s);<br />

creates an empty panel P of width w and height h.<br />

creates an empty panel P of width w and height h with header s.<br />

3. Operations<br />

All window operations for displaying, reading, closing and adding panel items are available<br />

(see section 17.2). <strong>The</strong>re are two additional operations for opening and reading panels.<br />

int<br />

int<br />

P.open(int x = window :: center, int y = window :: center)<br />

P.display(x, y) + P.read mouse( ) + P.close( ).<br />

P.open(window& W, int x = window :: center, int y = window :: center)<br />

P.display(W, x, y) + P.read mouse( ) + P.close( ).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!