Difference between revisions of "GWIN"

From uGFX Wiki
Jump to: navigation, search
Line 26: Line 26:
 
* To do custom drawing within the basic [[Windows|window]] element.
 
* To do custom drawing within the basic [[Windows|window]] element.
 
'''''Note:''' Unlike the GDISP drawing routines, the GWIN ones don't take a color parameter. Instead, the currently set foreground color is used.''
 
'''''Note:''' Unlike the GDISP drawing routines, the GWIN ones don't take a color parameter. Instead, the currently set foreground color is used.''
 +
 +
== Redrawing mode ==
 +
It's possible to configure the redrawing behavior of GWIN. The redrawing mode defines how GWIN will handle redraw events.
 +
 +
'''''Note:''' Usually there is no need to change the default redrawing mode of GWIN. Only touch this if you know what you're doing.''
 +
 +
=== Normal mode ===
 +
ToDo
 +
 +
== Immediate mode ==
 +
ToDo
 +
 +
=== Single operation ===
 +
ToDo
  
 
[[Category:Module]]
 
[[Category:Module]]

Revision as of 14:25, 20 June 2015

The GWIN module takes usage of all the other modules and combines them into a complete GUI toolkit. It provides everything from buttons and checkboxes over lists and even graph widgets and much more. Most commonly, the user will interact with the provided widgets through a touchscreen. However, the GINPUT module also allows to use other input methods as well.

There are three basic types of GWIN elements:

API reference

The API reference of the GWIN module can be found here.

GHandle

The GHandle data type is the main GWIN data type. All three GWIN types use this data type. The GHandle is the object reference and it is used to pass the different windows, widgets and containers around the different GWIN functions.

Drawing

All drawing operations that are provided by the GDISP module can also be used within a GWIN window.

GDISP GWIN
gdispDrawXxx(...) gwinDrawXxx(...)
gdispFillXxx(...) gwinFillXxx(GHandle gh, ...)

All coordinates supplied to the GWIN drawing calls are relative to the specified window. The GWIN drawing support is usually used for two cases:

  • Drawing/rendering routines for widgets
  • To do custom drawing within the basic window element.

Note: Unlike the GDISP drawing routines, the GWIN ones don't take a color parameter. Instead, the currently set foreground color is used.

Redrawing mode

It's possible to configure the redrawing behavior of GWIN. The redrawing mode defines how GWIN will handle redraw events.

Note: Usually there is no need to change the default redrawing mode of GWIN. Only touch this if you know what you're doing.

Normal mode

ToDo

Immediate mode

ToDo

Single operation

ToDo