Skip to content

Subpanels

Saif Ahmed edited this page Jun 22, 2022 · 4 revisions

Apart from buttons and simple text entry and static text, one might desire other features from an application. Images may need to be displayed, and there may be a need to extend aplication to more complex graphical interactions. v0.0.2 intriduced the subpanel and currently only supports image content. A panel within the main frame of the application winodw may serve this purpose. Such widgets may expect to be on more than one row of our textual representation of the GUI. In GUIDeFATE this is represented by a border similar to the window itself. Images for Wx are handled through Jouke Visser's Wx::Perl::Imagick and appears therefore more powerful than Wx::Image. Image Magick also is used by Tk. Win32 requires Imager. Qt and Gtk (and of course web pages) have their own image handlers

Subpanel

A panel can be drawn on the main window representation using the "+" character for the corners and "-" and "|" for the horizonal and vertical borders respectively. the first character afer the "+" on the top left corner indicates the type of content, but is optional. The contents of the drawn frame may indicate the type of content (e.g. Image name).

+-------------------------+
| T Subpanel Example      |
+-------------------------+
|                         |
|  +I----------------+    |
|  | image.jpg       |    |
|  |                 |    |
|  |                 |    |
|  |                 |    |
|  +-----------------+    |
|                         |
+-------------------------+

The the second character (and later more characters) on the top row determines the type of subpanel. "I" stands for image, and "T" allows a multi-line Text Control to be constructed allowing a more expansive text entry, than the single line [Text Controls],(https://github.com/saiftynet/GUIDeFATE/wiki/Buttons-Text-Controls) described before. This could look like:-

+-------------------------+
| T Subpanel Example      |
+-------------------------+
|                         |
|  +T----------------+    |
|  | Initial text    |    |
|  | content         |    |
|  |                 |    |
|  |                 |    |
|  |                 |    |
|  +-----------------+    |
|                         |
+-------------------------+

A Check box list is a compound widget created at the request of Olivier Lahaye

+-------------------------+
| T Subpanel Example      |
+-------------------------+
|                         |
|  +C----------------+    |
|  | ListName        |    |
|  |                  |    |
|  |                 |    |
|  |                 |    |
|  |                 |    |
|  +-----------------+    |
|                         |
+-------------------------+
Clone this wiki locally