Difference between revisions of "Component: Display Manager (Graphical Library)"

From Flowcode Help
Jump to navigationJump to search
 
(32 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
|-
 
|-
 
| width="20%" style="color:gray;" | Version
 
| width="20%" style="color:gray;" | Version
| 1.0
+
| 2.1
 
|-
 
|-
 
| width="20%" style="color:gray;" | Category
 
| width="20%" style="color:gray;" | Category
Line 15: Line 15:
 
A component designed to simplify the process of drawing primitives and text onto a  graphical display. Keeps track of coordinates so you don't have to. Also works great as a base layer for gLCD based games as it will check for collisions and  perform movement.
 
A component designed to simplify the process of drawing primitives and text onto a  graphical display. Keeps track of coordinates so you don't have to. Also works great as a base layer for gLCD based games as it will check for collisions and  perform movement.
  
==Component Source Code==
+
==Version information==
 
 
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Lib_DisplayManager.fcfx FC_Comp_Source_Lib_DisplayManager.fcfx]
 
  
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Lib_DisplayManager.fcfx FC_Comp_Source_Lib_DisplayManager.fcfx]
+
Library Version, Component Version, Date, Author, Info
 +
13, 2.0, 22-05-24, BR, Added text alignment options
 +
14, 2.1, 14-06-24, BR, Renamed Button to Widget to better include things like sliders
 +
15, 2.1, 26-07-24, BR, Added SetTextFloat and AddTextNumber macros
 +
16, 2.1, 29-07-24, BR, Renamed Themes to ObjectThemes and WidgetThemes
 +
17, 2.1, 29-07-24, BR, Added CreateTextField macro which automates creating a simple textbox
 +
18, 2.1, 06-08-24, BR, Fixed a problem with updating values, theme, text on IDs
 +
19, 2.1, 06-08-24, BR, Textfield now uses hidden object type instead of rectangle
 +
20, 2.1, 06-08-24, BR, Fixed a problem where slider value could be set with out of range value
 +
21, 2.1, 06-08-24, BR, Fixed problem where SetTextNumber would reset an ESP32
  
 
==Detailed description==
 
==Detailed description==
  
 +
===Objects===
  
 +
The component can create the following objects.
  
 +
*'''Object_Hidden''' - 0 - A hidden area with no graphics.
 +
*'''Object_Rectangle''' - 1 - A simple rectangular box.
 +
*'''Object_Line''' - 2 - A simple straight line.
 +
*'''Object_Ellipse''' - 3 - A simple ellipse or circle.
 +
*'''Object_EllipseFilled''' - 4 - A filled ellipse or circle.
 +
*'''Object_RectangeFilled''' - 5 - A filled rectangular box.
  
  
 +
===TextField===
  
 +
There is also an additional TextField object which consists of an Object_Rectangle that is pre-populated with text.
  
 +
===Widgets===
  
 +
The component can also create the following interactive buttons and sliders.
  
 
+
*'''Widget_Hidden''' - 0 - A hidden area with no graphics.
 
+
*'''Widget_Rectangle''' - 1 - A rectangular box with a shadow.
The component can create the follow objects.
+
*'''Widget_RoundedRectangle''' - 2 - A rounded rectangular box with a shadow.
 
+
*'''Widget_Ellipse''' - 3 - A simple ellipse or circle with a shadow.
*'''Type_Line''' - 2 - A simple straight line.
+
*'''Widget_VSlider''' - 4 - A vertical slider with a square thumb.
*'''Type_Rectangle''' - 1 - A simple rectangular box.
+
*'''Widget_HSlider''' - 5 - A horizontal slider with a square thumb.
*'''Type_RectangeFilled''' - 5 - A filled rectangular box.
+
*'''Widget_VSlider_Round''' - 6 - A vertical slider with a round thumb.
*'''Type_Ellipse''' - 3 - A simple ellipse or circle.
+
*'''Widget_HSlider_Round''' - 7 - A horizontal slider with a round thumb.
*'''Type_EllipseFilled''' - 4 - A filled ellipse or circle.
 
*'''Type_TextBox''' - 0 - A text area allowing a line of text to be displayed.
 
  
  
 
The type can be entered by using the component's public constants. Begin with the Display Manager handle name followed by :: and the list of the public variables will be displayed.
 
The type can be entered by using the component's public constants. Begin with the Display Manager handle name followed by :: and the list of the public variables will be displayed.
  
For example...  '''DisplayManager1::Type_TextBox'''
+
For example...  '''DisplayManager1::Object_Rectangle'''  or  '''DisplayManager1::Widget_VSlider'''
 
 
==Examples==
 
 
 
  
  
 +
===Touch Repeat Rate for Button Widgets===
  
 +
The Touch Repeat Rate property applies to button based widgets and sets the frequency that a valid touch will be detected for a held button. This is similar to holding down a single key on a keyboard and acts to reduce the frequency of positive button detections when touching the button. For example if you had a button that incremented a value, without the repeat rate the value would increment much faster then anticipated in an uncontrollable manner. When no touch is detected it is recommended to call the NoTouch macro to clear the touch counters and allow a more responsive user experience.
  
 +
Example of implementing touch repeat rate
  
 +
[[File:ButtonRepeatRate.jpg]]
  
 +
==Examples==
  
 +
An example showing how to use the display manager with a GLCd and a touch interface to create a full HMI.
  
 +
The example shows how to create a simple menu system as well as a toggle switch and a slider used to control a PWM output.
  
 
+
{{Fcfile|DisplayManagerDemo.fcfx|Display Manager Demo}}
An example showing the creation of some text areas inside formatted shapes.
 
 
 
{{Fcfile|DisplayManagerExample.fcfx|Display Manager Example}}
 
  
 
==Macro reference==
 
==Macro reference==
  
 +
===CheckForTouch===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MoveObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckForTouch'''
|-
 
| colspan="2" | Moves an existing object to absolute coordinates on the screen. 
 
|-
 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| colspan="2" | Uses the X and Y coordinates from a touch sensor to check for Widget presses. Returns 0 for no Widgets pressed. Returns ID for a valid Widget press. Any touched slider Widgets will automatically move their thumb and value to the touch position.  
| width="90%" | ObjectID
 
 
|-
 
|-
| colspan="2" |  
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
Line 88: Line 102:
 
| colspan="2" |  
 
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===ClearAll===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClearAll'''
 
|-
 
|-
| colspan="2" | Shifts an existing object coordinates on the screen relative to the previous coordinates. 
+
| colspan="2" | Removes all objects and Widgets from memory. Also clears the screen if required. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | ObjectID
+
| width="90%" | ClearScreen
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | 0=Don't clear the screen, 1=Clear the screen 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | X
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="90%" | Y
 
|-
 
| colspan="2" |  
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 121: Line 126:
  
  
 +
===CreateObject===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateObject'''
 
|-
 
|-
| colspan="2" | Draws a single object onto the display without clearing the display. Doesn't draw a textfield component, this is done using the SetObjectText macro. 
+
| colspan="2" | Define a none touchable graphical object. Returns the Object ID. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ObjectID
+
| width="90%" | ObjectType
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | 0=Hidden, 1=Rect, 2=Line, 3=Ellipse, 4=FilledEllipse, 5=FilledRect 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | X
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ScaleObject'''
 
|-
 
| colspan="2" | Changes the width and height of the selected Object 
 
 
|-
 
|-
 +
| colspan="2" | X Pixel Coordinate 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | ObjectID
+
| width="90%" | Y
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Y Pixel Coordinate 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Width
 
| width="90%" | Width
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Pixel Width or X Radius 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Height
 
| width="90%" | Height
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Pixel Height or Y Radius 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | ObjectTheme
 +
|-
 +
| colspan="2" | Theme index to use to draw the object 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | DrawObject
 +
|-
 +
| colspan="2" | 0=Do not draw object yet, 1=Draw object now (Does not apply to hidden objects) 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===CreateTextField===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RedrawAll'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateTextField'''
 +
|-
 +
| colspan="2" | Creates a text field consisting of a rectangular border containing a single line of text 
 +
|-
 
|-
 
|-
| colspan="2" | Redraws all the content from the display manager objects. Doesn't draw textfield components, this is done using the SetObjectText macro. 
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Text
 
|-
 
|-
 +
| colspan="2" | Text string to set as the label 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | X
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | X Pixel Coordinate 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetObjectText'''
 
 
|-
 
|-
| colspan="2" | Assigns text to a single line text object and draws directly to the display. Blanks the selected area first to ensure nothing from previous text is left behind. 
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Y
 
|-
 
|-
 +
| colspan="2" | Y Pixel Coordinate 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | ObjectID
+
| width="90%" | Width
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Pixel Width 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Text
+
| width="90%" | Height
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Pixel Height 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Font
 
| width="90%" | Font
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | GLCD Font Index to use 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | ObjectTheme
 +
|-
 +
| colspan="2" | Theme index to use to draw the object 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | HAlignment
 +
|-
 +
| colspan="2" | 0=Left, 1=Center, 2=Right 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | VAlignment
 +
|-
 +
| colspan="2" | 0=Top, 1=Middle, 2=Bottom 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===CreateWidget===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateWidget'''
 
|-
 
|-
| colspan="2" | Define an object on the graphical LCD. Returns the Object ID. 
+
| colspan="2" | Define an interactive Widget or slider. Returns the Widget ID. 
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ObjectType
+
| width="90%" | WidgetType
 
|-
 
|-
| colspan="2" | 0=TextBox, 1=Rect, 2=Line, 3=Ellipse, 4=FilledEllipse, 5=FilledRect 
+
| colspan="2" | 0=WidgetHidden, 1=WidgetRect, 2=WidgetRoundedRect, 3=WidgetEllipse, 4=VSlider, 5=HSlider, 6=VSliderRound, 7=HSliderRound 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
Line 240: Line 267:
 
|-
 
|-
 
| colspan="2" | Pixel Height or Y Radius 
 
| colspan="2" | Pixel Height or Y Radius 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | WidgetTheme
 +
|-
 +
| colspan="2" | Theme index to use to draw the Widget 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | DrawWidget
 +
|-
 +
| colspan="2" | 0=Do not draw Widget yet, 1=Draw Widget now  (Does not apply to hidden widgets) 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
Line 246: Line 283:
  
  
 +
===DrawAll===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawAll'''
 +
|-
 +
| colspan="2" | Redraws all of the defined Objects and Widgets. Doesn't draw text, this is done using the SetText macros. 
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
==Property reference==
+
===DrawItem===
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawItem'''
 +
|-
 +
| colspan="2" | Draws a single object or Widget onto the display without clearing the display. Doesn't draw text, this is done using the SetText macros. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | ID
 
|-
 
|-
 +
| colspan="2" | Unique ID of the Object or Widget 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | LinkTo
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 
 +
 
 +
===GetLastTouchID===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetLastTouchID'''
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Gets the ID of the last Widget that returned a valid press via the CheckForTouch macro. Returns 0  for no valid touch recorded. 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Max Objects
 
 
|-
 
|-
| colspan="2" | The total number of objects allowed on the screen. Sets the size of the RAM buffers used to track the various screen elements. 
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
|}==Macro reference==
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 
  
 +
===GetSliderValue===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MoveObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetSliderValue'''
 
|-
 
|-
| colspan="2" | Moves an existing object to absolute coordinates on the screen. 
+
| colspan="2" | Reads the value of one of the sliders ranging between 0 and 1. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | ObjectID
+
| width="90%" | WidgetID
 
|-
 
|-
 
| colspan="2" |  
 
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | X
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 
 +
 
 +
===Initialise===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| colspan="2" | Initialises the object and Widget control variables and sets up the default themes. 
| width="90%" | Y
 
 
|-
 
|-
| colspan="2" |  
 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 295: Line 363:
  
  
 +
===ModifyPosition===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ModifyPosition'''
 
|-
 
|-
| colspan="2" | Shifts an existing object coordinates on the screen relative to the previous coordinates. 
+
| colspan="2" | Moves an existing object or Widget to absolute coordinates on the screen. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | ObjectID
+
| width="90%" | ID
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Unique ID of the object or Widget 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
Line 317: Line 386:
 
|-
 
|-
 
| colspan="2" |  
 
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | Relative
 +
|-
 +
| colspan="2" | 0=Absolute Positioning, 1=Relative Positioning 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 323: Line 397:
  
  
 +
===ModifyScale===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ModifyScale'''
 
|-
 
|-
| colspan="2" | Draws a single object onto the display without clearing the display. Doesn't draw a textfield component, this is done using the SetObjectText macro. 
+
| colspan="2" | Changes the width and height of the selected Object or Widget. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | ObjectID
+
| width="90%" | ID
 +
|-
 +
| colspan="2" | Unique ID of the object or Widget 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Width
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Height
 
|-
 
|-
 
| colspan="2" |  
 
| colspan="2" |  
Line 341: Line 426:
  
  
 +
===ModifyTheme===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ScaleObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ModifyTheme'''
 
|-
 
|-
| colspan="2" | Changes the width and height of the selected Object 
+
| colspan="2" | Changes the theme index of the selected Object or Widget. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | ObjectID
+
| width="90%" | ID
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Unique ID of the object or Widget 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Width
+
| width="90%" | Theme
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Height
 
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Theme index of the Widget or object 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 369: Line 450:
  
  
 +
===NoTouch===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RedrawAll'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''NoTouch'''
 
|-
 
|-
| colspan="2" | Redraws all the content from the display manager objects. Doesn't draw textfield components, this is done using the SetObjectText macro. 
+
| colspan="2" | Called when no touch is present, Allows the repeat rate counter to be cleared allowing for better responses to fast touches. 
 
|-
 
|-
 
|-
 
|-
Line 382: Line 464:
  
  
 +
===OverrideObjectTheme===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetObjectText'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OverrideObjectTheme'''
 
|-
 
|-
| colspan="2" | Assigns text to a single line text object and draws directly to the display. Blanks the selected area first to ensure nothing from previous text is left behind. 
+
| colspan="2" | Overrides the colour of an object theme, used by the draw object macro.  
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ObjectID
+
| width="90%" | ThemeIndex
 +
|-
 +
| colspan="2" | Index of the object colour theme 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | FG_R
 +
|-
 +
| colspan="2" | Foreground colour channel value 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | FG_G
 +
|-
 +
| colspan="2" | Foreground colour channel value 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | FG_B
 +
|-
 +
| colspan="2" | Foreground colour channel value 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | BG_R
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Background colour channel value 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Text
+
| width="90%" | BG_G
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Background colour channel value 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Font
+
| width="90%" | BG_B
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Background colour channel value 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 410: Line 513:
  
  
 +
===OverrideWidgetTheme===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OverrideWidgetTheme'''
 
|-
 
|-
| colspan="2" | Define an object on the graphical LCD. Returns the Object ID. 
+
| colspan="2" | Overrides the colour of a Widget theme, used by the draw Widget macro.  
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ObjectType
+
| width="90%" | ThemeIndex
 
|-
 
|-
| colspan="2" | 0=TextBox, 1=Rect, 2=Line, 3=Ellipse, 4=FilledEllipse, 5=FilledRect 
+
| colspan="2" | Index of the object colour theme 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X
+
| width="90%" | FG_R
 
|-
 
|-
| colspan="2" | X Pixel Coordinate 
+
| colspan="2" | Foreground colour channel value 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y
+
| width="90%" | FG_G
 
|-
 
|-
| colspan="2" | Y Pixel Coordinate 
+
| colspan="2" | Foreground colour channel value 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Width
+
| width="90%" | FG_B
 
|-
 
|-
| colspan="2" | Pixel Width or X Radius 
+
| colspan="2" | Foreground colour channel value 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Height
+
| width="90%" | BG_R
 
|-
 
|-
| colspan="2" | Pixel Height or Y Radius 
+
| colspan="2" | Background colour channel value 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | BG_G
|}
 
 
 
 
 
 
 
 
 
==Property reference==
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
+
| colspan="2" | Background colour channel value 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
 
 
|-
 
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | BG_B
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
+
| colspan="2" | Background colour channel value 
| width="90%" | LinkTo
 
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | HL_R
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
+
| colspan="2" | Highlight colour channel value 
| width="90%" | Max Objects
 
 
|-
 
|-
| colspan="2" | The total number of objects allowed on the screen. Sets the size of the RAM buffers used to track the various screen elements. 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
|}==Macro reference==
+
| width="90%" | HL_G
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | Highlight colour channel value 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MoveObject'''
 
 
|-
 
|-
| colspan="2" | Moves an existing object to absolute coordinates on the screen. 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | HL_B
 
|-
 
|-
 +
| colspan="2" | Highlight colour channel value 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ObjectID
+
| width="90%" | LL_R
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Lowlight colour channel value 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X
+
| width="90%" | LL_G
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Lowlight colour channel value 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Y
+
| width="90%" | LL_B
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Lowlight colour channel value 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 497: Line 592:
  
  
 +
===SetSliderValue===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetSliderValue'''
 
|-
 
|-
| colspan="2" | Shifts an existing object coordinates on the screen relative to the previous coordinates. 
+
| colspan="2" | Sets the value of one of the sliders and optionally redraws the slider to reflect the value change. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | ObjectID
+
| width="90%" | WidgetID
 
|-
 
|-
 
| colspan="2" |  
 
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | X
+
| width="90%" | Value
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Range: 0 to 1 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Y
+
| width="90%" | RedrawSlider
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | 0=Do not redraw, 1=Redraw 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 525: Line 621:
  
  
 +
===SetTextFloat===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTextFloat'''
 
|-
 
|-
| colspan="2" | Draws a single object onto the display without clearing the display. Doesn't draw a textfield component, this is done using the SetObjectText macro. 
+
| colspan="2" | Draws a numerical value onto an object or Widget location. Useful for displaying, value statistics. Drawn using the object themes. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | ObjectID
+
| width="90%" | ID
 +
|-
 +
| colspan="2" | Unique identifier of object or Widget. 
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Number
 
|-
 
|-
 
| colspan="2" |  
 
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | NumDP
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | Number of decimal points to display 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ScaleObject'''
 
 
|-
 
|-
| colspan="2" | Changes the width and height of the selected Object 
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Unit
 
|-
 
|-
 +
| colspan="2" | Unit string to add after the numeric value. e.g. "g" or "s" 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ObjectID
+
| width="90%" | Font
 
|-
 
|-
 
| colspan="2" |  
 
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Width
+
| width="90%" | HAlignment
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | 0=Left, 1=Center, 2=Right 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Height
+
| width="90%" | VAlignment
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | 0=Top, 1=Middle, 2=Bottom 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | ObjectTheme
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | Object theme index to control the colour of the text 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RedrawAll'''
 
 
|-
 
|-
| colspan="2" | Redraws all the content from the display manager objects. Doesn't draw textfield components, this is done using the SetObjectText macro. 
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | Transparent
 
|-
 
|-
 +
| colspan="2" | 0=Background Colour Drawn, 1=Don't Draw Background Colour 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 584: Line 680:
  
  
 +
===SetTextLabel===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetObjectText'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTextLabel'''
 
|-
 
|-
| colspan="2" | Assigns text to a single line text object and draws directly to the display. Blanks the selected area first to ensure nothing from previous text is left behind. 
+
| colspan="2" | Draws a single line of text onto an object or Widget location. Useful for labelling Widgets such as buttons or having name, value statistics. Drawn using the object themes. 
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | ObjectID
+
| width="90%" | ID
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Unique identifier of object or Widget. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Text
 
| width="90%" | Text
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Text string to set as the label 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Font
 
| width="90%" | Font
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | GLCD Font Index to use 
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | HAlignment
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | 0=Left, 1=Center, 2=Right 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateObject'''
 
 
|-
 
|-
| colspan="2" | Define an object on the graphical LCD. Returns the Object ID. 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | VAlignment
 
|-
 
|-
 +
| colspan="2" | 0=Top, 1=Middle, 2=Bottom 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ObjectType
+
| width="90%" | ObjectTheme
 
|-
 
|-
| colspan="2" | 0=TextBox, 1=Rect, 2=Line, 3=Ellipse, 4=FilledEllipse, 5=FilledRect 
+
| colspan="2" | Object theme index to control the colour of the text 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | X
+
| width="90%" | Transparent
 
|-
 
|-
| colspan="2" | X Pixel Coordinate 
+
| colspan="2" | 0=Background Colour Drawn, 1=Don't Draw Background Colour 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | Y
 
|-
 
| colspan="2" | Y Pixel Coordinate 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Width
 
|-
 
| colspan="2" | Pixel Width or X Radius 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Height
 
|-
 
| colspan="2" | Pixel Height or Y Radius 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 
+
===SetTextNumber===
 
 
==Property reference==
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTextNumber'''
 +
|-
 +
| colspan="2" | Draws a numerical value onto an object or Widget location. Useful for displaying, value statistics. Drawn using the object themes. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | ID
 
|-
 
|-
 +
| colspan="2" | Unique identifier of object or Widget. 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
+
| width="10%" align="center" | [[File:]] -
| width="90%" | LinkTo
+
| width="90%" | Number
 
|-
 
|-
 
| colspan="2" |  
 
| colspan="2" |  
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Max Objects
+
| width="90%" | Unit
 +
|-
 +
| colspan="2" | Unit string to add after the numeric value. e.g. "g" or "s" 
 
|-
 
|-
| colspan="2" | The total number of objects allowed on the screen. Sets the size of the RAM buffers used to track the various screen elements. 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
|}==Macro reference==
+
| width="90%" | Font
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" |  
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MoveObject'''
 
 
|-
 
|-
| colspan="2" | Moves an existing object to absolute coordinates on the screen. 
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | HAlignment
 
|-
 
|-
 +
| colspan="2" | 0=Left, 1=Center, 2=Right 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ObjectID
+
| width="90%" | VAlignment
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | 0=Top, 1=Middle, 2=Bottom 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | X
+
| width="90%" | ObjectTheme
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Object theme index to control the colour of the text 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Y
+
| width="90%" | Transparent
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | 0=Background Colour Drawn, 1=Don't Draw Background Colour 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 698: Line 782:
 
|}
 
|}
  
 +
 +
==Property reference==
  
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShiftObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
|-
 
|-
| colspan="2" | Shifts an existing object coordinates on the screen relative to the previous coordinates. 
 
 
|-
 
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Graphical Display
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| colspan="2" | Graphical Display to draw our objects on 
| width="90%" | ObjectID
 
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | DM Library
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
+
| colspan="2" | Display Manager compatible GLCD library component.  e.g. Bitmap drawer components. 
| width="90%" | X
 
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Ram Usage Bytes
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
+
| colspan="2" | The calculated number of bytes of RAM required by the display manager. 
| width="90%" | Y
 
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Text Align Offset
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| colspan="2" | Number of pixels to move away from an edge when calling  
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DrawObject'''
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Objects
 
|-
 
|-
| colspan="2" | Draws a single object onto the display without clearing the display. Doesn't draw a textfield component, this is done using the SetObjectText macro. 
 
 
|-
 
|-
 +
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Max Objects
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| colspan="2" | The total number of primitive objects allowed on the screen at once. Sets the size of the RAM buffers used to track the various screen elements. Each object requires 10 bytes of RAM to stores things like size, location and type. 
| width="90%" | ObjectID
 
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Object Theme Count
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| colspan="2" | Sets the number of themes available when drawing primitive objects. Each object theme requires 6 bytes of RAM to store the colour channels. 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ScaleObject'''
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Object & Text Theme 0
 
|-
 
|-
| colspan="2" | Changes the width and height of the selected Object 
 
 
|-
 
|-
 +
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
 +
| width="90%" | Foreground
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| colspan="2" | Foreground colour of the theme 
| width="90%" | ObjectID
 
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
 +
| width="90%" | Background
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| colspan="2" | Background colour of the theme 
| width="90%" | Width
 
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Object & Text Theme 1
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Height
 
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
 +
| width="90%" | Foreground
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| colspan="2" | Foreground colour of the theme 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RedrawAll'''
+
| width="90%" | Background
 
|-
 
|-
| colspan="2" | Redraws all the content from the display manager objects. Doesn't draw textfield components, this is done using the SetObjectText macro. 
+
| colspan="2" | Background colour of the theme 
 
|-
 
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Widgets
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetObjectText'''
+
| width="90%" | Max Widgets
 
|-
 
|-
| colspan="2" | Assigns text to a single line text object and draws directly to the display. Blanks the selected area first to ensure nothing from previous text is left behind. 
+
| colspan="2" | The total number of touchable interactibe objects allowed on the screen at once e.g. Widgets and sliders. Sets the size of the RAM buffers used to track the various screen elements Each Widget requires 18 bytes of RAM to stores things like size, location, value and type. 
 
|-
 
|-
 +
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Touch Repeat Rate
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| colspan="2" | Sets the period for touch repeats in terms of calls of the CheckForTouch macro. Widgets will only register a repeat touch after x calls if continually held down. Sliders will always register a touch.  The touch count can be cleared using the NoTouch macro if no touch is detected. 
| width="90%" | ObjectID
 
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Slider Thumb Width
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| colspan="2" | Number of pixels wide to make a slider thumb marker, 
| width="90%" | Text
 
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Slider Center Line Thickness
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| colspan="2" | Number of pixels thick to draw the slider central line 
| width="90%" | Font
 
 
|-
 
|-
| colspan="2" |  
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Widget Theme Count
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| colspan="2" | Sets the number of themes available for drawng Widgets. Each Widget theme requires 12 bytes of RAM to store the colour channels. 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateObject'''
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Widget Theme 0
 
|-
 
|-
| colspan="2" | Define an object on the graphical LCD. Returns the Object ID. 
 
 
|-
 
|-
 +
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
 +
| width="90%" | Foreground
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| colspan="2" | Foreground colour of the theme 
| width="90%" | ObjectType
 
 
|-
 
|-
| colspan="2" | 0=TextBox, 1=Rect, 2=Line, 3=Ellipse, 4=FilledEllipse, 5=FilledRect 
+
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
 +
| width="90%" | Background
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| colspan="2" | Background colour of the theme 
| width="90%" | X
 
 
|-
 
|-
| colspan="2" | X Pixel Coordinate 
+
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
 +
| width="90%" | Highlight
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| colspan="2" | Highlight colour of the theme 
| width="90%" | Y
 
 
|-
 
|-
| colspan="2" | Y Pixel Coordinate 
+
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
 +
| width="90%" | Lowlight
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| colspan="2" | Lowlight colour of the theme 
| width="90%" | Width
 
 
|-
 
|-
| colspan="2" | Pixel Width or X Radius 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Widget Theme 1
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Height
 
 
|-
 
|-
| colspan="2" | Pixel Height or Y Radius 
+
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
 +
| width="90%" | Foreground
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
+
| colspan="2" | Foreground colour of the theme 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
 
 
 
 
 
 
==Property reference==
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
+
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
+
| width="90%" | Background
 
|-
 
|-
 +
| colspan="2" | Background colour of the theme 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
+
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | LinkTo
+
| width="90%" | Highlight
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | Highlight colour of the theme 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
+
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | Max Objects
+
| width="90%" | Lowlight
 
|-
 
|-
| colspan="2" | The total number of objects allowed on the screen. Sets the size of the RAM buffers used to track the various screen elements. 
+
| colspan="2" | Lowlight colour of the theme 
 
|}
 
|}
 +
 +
==Component Source Code==
 +
 +
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Lib_DisplayManager.fcfx FC_Comp_Source_Lib_DisplayManager.fcfx]
 +
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Lib_DisplayManager.fcfx FC_Comp_Source_Lib_DisplayManager.fcfx]

Latest revision as of 09:59, 12 August 2024

Author MatrixTSL
Version 2.1
Category Graphical Library


Display Manager component

A component designed to simplify the process of drawing primitives and text onto a graphical display. Keeps track of coordinates so you don't have to. Also works great as a base layer for gLCD based games as it will check for collisions and perform movement.

Version information

Library Version, Component Version, Date, Author, Info
13, 2.0, 22-05-24, BR, Added text alignment options
14, 2.1, 14-06-24, BR, Renamed Button to Widget to better include things like sliders
15, 2.1, 26-07-24, BR, Added SetTextFloat and AddTextNumber macros
16, 2.1, 29-07-24, BR, Renamed Themes to ObjectThemes and WidgetThemes
17, 2.1, 29-07-24, BR, Added CreateTextField macro which automates creating a simple textbox
18, 2.1, 06-08-24, BR, Fixed a problem with updating values, theme, text on IDs
19, 2.1, 06-08-24, BR, Textfield now uses hidden object type instead of rectangle
20, 2.1, 06-08-24, BR, Fixed a problem where slider value could be set with out of range value
21, 2.1, 06-08-24, BR, Fixed problem where SetTextNumber would reset an ESP32

Detailed description

Objects

The component can create the following objects.

  • Object_Hidden - 0 - A hidden area with no graphics.
  • Object_Rectangle - 1 - A simple rectangular box.
  • Object_Line - 2 - A simple straight line.
  • Object_Ellipse - 3 - A simple ellipse or circle.
  • Object_EllipseFilled - 4 - A filled ellipse or circle.
  • Object_RectangeFilled - 5 - A filled rectangular box.


TextField

There is also an additional TextField object which consists of an Object_Rectangle that is pre-populated with text.

Widgets

The component can also create the following interactive buttons and sliders.

  • Widget_Hidden - 0 - A hidden area with no graphics.
  • Widget_Rectangle - 1 - A rectangular box with a shadow.
  • Widget_RoundedRectangle - 2 - A rounded rectangular box with a shadow.
  • Widget_Ellipse - 3 - A simple ellipse or circle with a shadow.
  • Widget_VSlider - 4 - A vertical slider with a square thumb.
  • Widget_HSlider - 5 - A horizontal slider with a square thumb.
  • Widget_VSlider_Round - 6 - A vertical slider with a round thumb.
  • Widget_HSlider_Round - 7 - A horizontal slider with a round thumb.


The type can be entered by using the component's public constants. Begin with the Display Manager handle name followed by :: and the list of the public variables will be displayed.

For example... DisplayManager1::Object_Rectangle or DisplayManager1::Widget_VSlider


Touch Repeat Rate for Button Widgets

The Touch Repeat Rate property applies to button based widgets and sets the frequency that a valid touch will be detected for a held button. This is similar to holding down a single key on a keyboard and acts to reduce the frequency of positive button detections when touching the button. For example if you had a button that incremented a value, without the repeat rate the value would increment much faster then anticipated in an uncontrollable manner. When no touch is detected it is recommended to call the NoTouch macro to clear the touch counters and allow a more responsive user experience.

Example of implementing touch repeat rate

ButtonRepeatRate.jpg

Examples

An example showing how to use the display manager with a GLCd and a touch interface to create a full HMI.

The example shows how to create a simple menu system as well as a toggle switch and a slider used to control a PWM output.

FC6 Icon.png Display Manager Demo

Macro reference

CheckForTouch

Fc9-comp-macro.png CheckForTouch
Uses the X and Y coordinates from a touch sensor to check for Widget presses. Returns 0 for no Widgets pressed. Returns ID for a valid Widget press. Any touched slider Widgets will automatically move their thumb and value to the touch position.  
Fc9-u16-icon.png - UINT X
 
Fc9-u16-icon.png - UINT Y
 
Fc9-u16-icon.png - UINT Return


ClearAll

Fc9-comp-macro.png ClearAll
Removes all objects and Widgets from memory. Also clears the screen if required. 
Fc9-bool-icon.png - BOOL ClearScreen
0=Don't clear the screen, 1=Clear the screen 
Fc9-void-icon.png - VOID Return


CreateObject

Fc9-comp-macro.png CreateObject
Define a none touchable graphical object. Returns the Object ID. 
Fc9-u8-icon.png - BYTE ObjectType
0=Hidden, 1=Rect, 2=Line, 3=Ellipse, 4=FilledEllipse, 5=FilledRect 
Fc9-u16-icon.png - UINT X
X Pixel Coordinate 
Fc9-u16-icon.png - UINT Y
Y Pixel Coordinate 
Fc9-u16-icon.png - UINT Width
Pixel Width or X Radius 
Fc9-u16-icon.png - UINT Height
Pixel Height or Y Radius 
Fc9-u8-icon.png - BYTE ObjectTheme
Theme index to use to draw the object 
Fc9-bool-icon.png - BOOL DrawObject
0=Do not draw object yet, 1=Draw object now (Does not apply to hidden objects) 
Fc9-u16-icon.png - UINT Return


CreateTextField

Fc9-comp-macro.png CreateTextField
Creates a text field consisting of a rectangular border containing a single line of text 
Fc9-string-icon.png - STRING Text
Text string to set as the label 
Fc9-u16-icon.png - UINT X
X Pixel Coordinate 
Fc9-u16-icon.png - UINT Y
Y Pixel Coordinate 
Fc9-u16-icon.png - UINT Width
Pixel Width 
Fc9-u16-icon.png - UINT Height
Pixel Height 
Fc9-u8-icon.png - BYTE Font
GLCD Font Index to use 
Fc9-u8-icon.png - BYTE ObjectTheme
Theme index to use to draw the object 
Fc9-u8-icon.png - BYTE HAlignment
0=Left, 1=Center, 2=Right 
Fc9-u8-icon.png - BYTE VAlignment
0=Top, 1=Middle, 2=Bottom 
Fc9-u16-icon.png - UINT Return


CreateWidget

Fc9-comp-macro.png CreateWidget
Define an interactive Widget or slider. Returns the Widget ID. 
Fc9-u8-icon.png - BYTE WidgetType
0=WidgetHidden, 1=WidgetRect, 2=WidgetRoundedRect, 3=WidgetEllipse, 4=VSlider, 5=HSlider, 6=VSliderRound, 7=HSliderRound 
Fc9-u16-icon.png - UINT X
X Pixel Coordinate 
Fc9-u16-icon.png - UINT Y
Y Pixel Coordinate 
Fc9-u16-icon.png - UINT Width
Pixel Width or X Radius 
Fc9-u16-icon.png - UINT Height
Pixel Height or Y Radius 
Fc9-u8-icon.png - BYTE WidgetTheme
Theme index to use to draw the Widget 
Fc9-bool-icon.png - BOOL DrawWidget
0=Do not draw Widget yet, 1=Draw Widget now (Does not apply to hidden widgets) 
Fc9-u16-icon.png - UINT Return


DrawAll

Fc9-comp-macro.png DrawAll
Redraws all of the defined Objects and Widgets. Doesn't draw text, this is done using the SetText macros. 
Fc9-void-icon.png - VOID Return


DrawItem

Fc9-comp-macro.png DrawItem
Draws a single object or Widget onto the display without clearing the display. Doesn't draw text, this is done using the SetText macros. 
Fc9-u16-icon.png - UINT ID
Unique ID of the Object or Widget 
Fc9-void-icon.png - VOID Return


GetLastTouchID

Fc9-comp-macro.png GetLastTouchID
Gets the ID of the last Widget that returned a valid press via the CheckForTouch macro. Returns 0 for no valid touch recorded. 
Fc9-s16-icon.png - INT Return


GetSliderValue

Fc9-comp-macro.png GetSliderValue
Reads the value of one of the sliders ranging between 0 and 1. 
Fc9-u16-icon.png - UINT WidgetID
 
Fc9-f32-icon.png - FLOAT Return


Initialise

Fc9-comp-macro.png Initialise
Initialises the object and Widget control variables and sets up the default themes. 
Fc9-void-icon.png - VOID Return


ModifyPosition

Fc9-comp-macro.png ModifyPosition
Moves an existing object or Widget to absolute coordinates on the screen. 
Fc9-u16-icon.png - UINT ID
Unique ID of the object or Widget 
Fc9-s16-icon.png - INT X
 
Fc9-s16-icon.png - INT Y
 
Fc9-bool-icon.png - BOOL Relative
0=Absolute Positioning, 1=Relative Positioning 
Fc9-void-icon.png - VOID Return


ModifyScale

Fc9-comp-macro.png ModifyScale
Changes the width and height of the selected Object or Widget. 
Fc9-u16-icon.png - UINT ID
Unique ID of the object or Widget 
Fc9-u16-icon.png - UINT Width
 
Fc9-u16-icon.png - UINT Height
 
Fc9-void-icon.png - VOID Return


ModifyTheme

Fc9-comp-macro.png ModifyTheme
Changes the theme index of the selected Object or Widget. 
Fc9-u16-icon.png - UINT ID
Unique ID of the object or Widget 
Fc9-u8-icon.png - BYTE Theme
Theme index of the Widget or object 
Fc9-void-icon.png - VOID Return


NoTouch

Fc9-comp-macro.png NoTouch
Called when no touch is present, Allows the repeat rate counter to be cleared allowing for better responses to fast touches. 
Fc9-void-icon.png - VOID Return


OverrideObjectTheme

Fc9-comp-macro.png OverrideObjectTheme
Overrides the colour of an object theme, used by the draw object macro.  
Fc9-u8-icon.png - BYTE ThemeIndex
Index of the object colour theme 
Fc9-u8-icon.png - BYTE FG_R
Foreground colour channel value 
Fc9-u8-icon.png - BYTE FG_G
Foreground colour channel value 
Fc9-u8-icon.png - BYTE FG_B
Foreground colour channel value 
Fc9-u8-icon.png - BYTE BG_R
Background colour channel value 
Fc9-u8-icon.png - BYTE BG_G
Background colour channel value 
Fc9-u8-icon.png - BYTE BG_B
Background colour channel value 
Fc9-void-icon.png - VOID Return


OverrideWidgetTheme

Fc9-comp-macro.png OverrideWidgetTheme
Overrides the colour of a Widget theme, used by the draw Widget macro.  
Fc9-u8-icon.png - BYTE ThemeIndex
Index of the object colour theme 
Fc9-u8-icon.png - BYTE FG_R
Foreground colour channel value 
Fc9-u8-icon.png - BYTE FG_G
Foreground colour channel value 
Fc9-u8-icon.png - BYTE FG_B
Foreground colour channel value 
Fc9-u8-icon.png - BYTE BG_R
Background colour channel value 
Fc9-u8-icon.png - BYTE BG_G
Background colour channel value 
Fc9-u8-icon.png - BYTE BG_B
Background colour channel value 
Fc9-u8-icon.png - BYTE HL_R
Highlight colour channel value 
Fc9-u8-icon.png - BYTE HL_G
Highlight colour channel value 
Fc9-u8-icon.png - BYTE HL_B
Highlight colour channel value 
Fc9-u8-icon.png - BYTE LL_R
Lowlight colour channel value 
Fc9-u8-icon.png - BYTE LL_G
Lowlight colour channel value 
Fc9-u8-icon.png - BYTE LL_B
Lowlight colour channel value 
Fc9-void-icon.png - VOID Return


SetSliderValue

Fc9-comp-macro.png SetSliderValue
Sets the value of one of the sliders and optionally redraws the slider to reflect the value change. 
Fc9-u16-icon.png - UINT WidgetID
 
Fc9-f32-icon.png - FLOAT Value
Range: 0 to 1 
Fc9-bool-icon.png - BOOL RedrawSlider
0=Do not redraw, 1=Redraw 
Fc9-void-icon.png - VOID Return


SetTextFloat

Fc9-comp-macro.png SetTextFloat
Draws a numerical value onto an object or Widget location. Useful for displaying, value statistics. Drawn using the object themes. 
Fc9-u16-icon.png - UINT ID
Unique identifier of object or Widget. 
[[File:]] - Number
 
Fc9-u8-icon.png - BYTE NumDP
Number of decimal points to display 
Fc9-string-icon.png - STRING Unit
Unit string to add after the numeric value. e.g. "g" or "s" 
Fc9-u8-icon.png - BYTE Font
 
Fc9-u8-icon.png - BYTE HAlignment
0=Left, 1=Center, 2=Right 
Fc9-u8-icon.png - BYTE VAlignment
0=Top, 1=Middle, 2=Bottom 
Fc9-u8-icon.png - BYTE ObjectTheme
Object theme index to control the colour of the text 
Fc9-bool-icon.png - BOOL Transparent
0=Background Colour Drawn, 1=Don't Draw Background Colour 
Fc9-void-icon.png - VOID Return


SetTextLabel

Fc9-comp-macro.png SetTextLabel
Draws a single line of text onto an object or Widget location. Useful for labelling Widgets such as buttons or having name, value statistics. Drawn using the object themes. 
Fc9-u16-icon.png - UINT ID
Unique identifier of object or Widget. 
Fc9-string-icon.png - STRING Text
Text string to set as the label 
Fc9-u8-icon.png - BYTE Font
GLCD Font Index to use 
Fc9-u8-icon.png - BYTE HAlignment
0=Left, 1=Center, 2=Right 
Fc9-u8-icon.png - BYTE VAlignment
0=Top, 1=Middle, 2=Bottom 
Fc9-u8-icon.png - BYTE ObjectTheme
Object theme index to control the colour of the text 
Fc9-bool-icon.png - BOOL Transparent
0=Background Colour Drawn, 1=Don't Draw Background Colour 
Fc9-void-icon.png - VOID Return


SetTextNumber

Fc9-comp-macro.png SetTextNumber
Draws a numerical value onto an object or Widget location. Useful for displaying, value statistics. Drawn using the object themes. 
Fc9-u16-icon.png - UINT ID
Unique identifier of object or Widget. 
[[File:]] - Number
 
Fc9-string-icon.png - STRING Unit
Unit string to add after the numeric value. e.g. "g" or "s" 
Fc9-u8-icon.png - BYTE Font
 
Fc9-u8-icon.png - BYTE HAlignment
0=Left, 1=Center, 2=Right 
Fc9-u8-icon.png - BYTE VAlignment
0=Top, 1=Middle, 2=Bottom 
Fc9-u8-icon.png - BYTE ObjectTheme
Object theme index to control the colour of the text 
Fc9-bool-icon.png - BOOL Transparent
0=Background Colour Drawn, 1=Don't Draw Background Colour 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Graphical Display
Graphical Display to draw our objects on 
Fc9-type-16-icon.png DM Library
Display Manager compatible GLCD library component. e.g. Bitmap drawer components. 
Fc9-type-21-icon.png Ram Usage Bytes
The calculated number of bytes of RAM required by the display manager. 
Fc9-type-21-icon.png Text Align Offset
Number of pixels to move away from an edge when calling  
Fc9-conn-icon.png Objects
Fc9-type-21-icon.png Max Objects
The total number of primitive objects allowed on the screen at once. Sets the size of the RAM buffers used to track the various screen elements. Each object requires 10 bytes of RAM to stores things like size, location and type. 
Fc9-type-16-icon.png Object Theme Count
Sets the number of themes available when drawing primitive objects. Each object theme requires 6 bytes of RAM to store the colour channels. 
Fc9-conn-icon.png Object & Text Theme 0
Fc9-type-1-icon.png Foreground
Foreground colour of the theme 
Fc9-type-1-icon.png Background
Background colour of the theme 
Fc9-conn-icon.png Object & Text Theme 1
Fc9-type-1-icon.png Foreground
Foreground colour of the theme 
Fc9-type-1-icon.png Background
Background colour of the theme 
Fc9-conn-icon.png Widgets
Fc9-type-21-icon.png Max Widgets
The total number of touchable interactibe objects allowed on the screen at once e.g. Widgets and sliders. Sets the size of the RAM buffers used to track the various screen elements Each Widget requires 18 bytes of RAM to stores things like size, location, value and type. 
Fc9-type-21-icon.png Touch Repeat Rate
Sets the period for touch repeats in terms of calls of the CheckForTouch macro. Widgets will only register a repeat touch after x calls if continually held down. Sliders will always register a touch. The touch count can be cleared using the NoTouch macro if no touch is detected. 
Fc9-type-21-icon.png Slider Thumb Width
Number of pixels wide to make a slider thumb marker, 
Fc9-type-21-icon.png Slider Center Line Thickness
Number of pixels thick to draw the slider central line 
Fc9-type-16-icon.png Widget Theme Count
Sets the number of themes available for drawng Widgets. Each Widget theme requires 12 bytes of RAM to store the colour channels. 
Fc9-conn-icon.png Widget Theme 0
Fc9-type-1-icon.png Foreground
Foreground colour of the theme 
Fc9-type-1-icon.png Background
Background colour of the theme 
Fc9-type-1-icon.png Highlight
Highlight colour of the theme 
Fc9-type-1-icon.png Lowlight
Lowlight colour of the theme 
Fc9-conn-icon.png Widget Theme 1
Fc9-type-1-icon.png Foreground
Foreground colour of the theme 
Fc9-type-1-icon.png Background
Background colour of the theme 
Fc9-type-1-icon.png Highlight
Highlight colour of the theme 
Fc9-type-1-icon.png Lowlight
Lowlight colour of the theme 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_Lib_DisplayManager.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_Lib_DisplayManager.fcfx