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

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| MatrixTSL
 
| MatrixTSL
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
+
| 1.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Graphical Library
 
| 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.
  
==[[File:Component Icon cbfb3c21_f13d_488d_9b90_400c8d4fc605.png|Image]] Display Manager component==
+
==Detailed description==
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.
+
''No detailed description exists yet for this component''
Also works great as a base layer for gLCD based games as it will check for collisions and
 
perform movement.
 
  
 
==Examples==
 
==Examples==
 +
 +
 
''<span style="color:red;">No additional examples</span>''
 
''<span style="color:red;">No additional examples</span>''
  
Line 27: Line 27:
 
==Downloadable macro reference==
 
==Downloadable macro reference==
  
===<span style="font-weight: normal;"><u><tt>MoveObject</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Moves an existing object to absolute coordinates on the screen.
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MoveObject'''
 +
|-
 +
| colspan="2" | Moves an existing object to absolute coordinates on the screen.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | ObjectID
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | X
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Y
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|UINT]] ''ObjectID''
+
{| 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;" | '''ShiftObject'''
 +
|-
 +
| colspan="2" | Shifts an existing object coordinates on the screen relative to the previous coordinates.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | ObjectID
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | X
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Y
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
:[[Variable Types|UINT]] ''X''
 
  
:[[Variable Types|UINT]] ''Y''
+
{| 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;" | '''DrawObject'''
 +
|-
 +
| 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.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | ObjectID
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
  
'''Return value'''
+
{| 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&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | ObjectID
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Width
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Height
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
:''This call does not return a value''
 
  
 +
{| 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;" | '''RedrawAll'''
 +
|-
 +
| colspan="2" | Clears the display and redraws all the content from the display manager objects. Doesn't draw textfield components, this is done using the SetObjectText macro.&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>ShiftObject</tt></u></span>===
 
Shifts an existing object coordinates on the screen relative to the previous coordinates.
 
  
'''Parameters'''
+
{| 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;" | '''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.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | ObjectID
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Text
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Font
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
:[[Variable Types|UINT]] ''ObjectID''
 
  
:[[Variable Types|INT]] ''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;" | '''CreateObject'''
 +
|-
 +
| colspan="2" | Define an object on the graphical LCD. Returns the Object ID.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | ObjectType
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | X
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Y
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Width
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Height
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
:[[Variable Types|INT]] ''Y''
 
  
 +
{| 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;" | '''ShowName'''
 +
|-
 +
| colspan="2" | Sets the label to show the target object's name&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
'''Return value'''
 
 
:''This call does not return a value''
 
 
 
===<span style="font-weight: normal;"><u><tt>DrawObject</tt></u></span>===
 
Draws a single object onto the display without clearing the display.
 
 
Doesn't draw a textfield component, this is done using the SetObjectText macro.
 
 
'''Parameters'''
 
 
:[[Variable Types|UINT]] ''ObjectID''
 
 
 
'''Return value'''
 
 
:''This call does not return a value''
 
 
 
===<span style="font-weight: normal;"><u><tt>ScaleObject</tt></u></span>===
 
Changes the width and height of the selected Object
 
 
'''Parameters'''
 
 
:[[Variable Types|UINT]] ''ObjectID''
 
 
:[[Variable Types|UINT]] ''Width''
 
 
:[[Variable Types|UINT]] ''Height''
 
 
 
'''Return value'''
 
 
:''This call does not return a value''
 
 
 
===<span style="font-weight: normal;"><u><tt>RedrawAll</tt></u></span>===
 
Clears the display and redraws all the content from the display manager objects.
 
 
Doesn't draw textfield components, this is done using the SetObjectText macro.
 
 
'''Parameters'''
 
 
:''This macro has no parameters''
 
 
 
'''Return value'''
 
 
:''This call does not return a value''
 
 
 
===<span style="font-weight: normal;"><u><tt>SetObjectText</tt></u></span>===
 
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.
 
 
'''Parameters'''
 
 
:[[Variable Types|UINT]] ''ObjectID''
 
 
:[[Variable Types|<- STRING]] ''Text''
 
::''This parameter may be returned back to the caller''
 
 
:[[Variable Types|BYTE]] ''Font''
 
 
 
'''Return value'''
 
 
:''This call does not return a value''
 
  
 
===<span style="font-weight: normal;"><u><tt>CreateObject</tt></u></span>===
 
Define an object on the graphical LCD.
 
 
Returns the Object ID.
 
 
'''Parameters'''
 
 
:[[Variable Types|UINT]] ''ObjectType''
 
 
:[[Variable Types|UINT]] ''X''
 
 
:[[Variable Types|UINT]] ''Y''
 
 
:[[Variable Types|UINT]] ''Width''
 
 
:[[Variable Types|UINT]] ''Height''
 
 
 
'''Return value'''
 
 
:[[Variable Types|UINT]]
 
 
 
 
==Simulation macro reference==
 
 
''This component does not contain any simulation macros''
 
  
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>GLCD Component</u></span>
 
  
This property is of type ''Panel object'' and can be referenced with the variable name ''GLCDComponent''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Selects the GLCD component to display all the objects
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
<span style="font-weight: normal;"><u>Max Objects</u></span>
+
|-
 
+
|-
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''MaxObjects''.
+
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
 
+
| width="90%" | GLCD Component
The total number of objects allowed on the screen.
+
|-
 
+
| colspan="2" | Selects the GLCD component to display all the objects&nbsp;
Sets the size of the RAM buffers used to track the various screen elements.
+
|-
 +
| 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.&nbsp;
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
 +
|-
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
 +
|-
 +
|}

Revision as of 21:01, 16 November 2021

Author MatrixTSL
Version 1.0
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.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png MoveObject
Moves an existing object to absolute coordinates on the screen. 
Fc9-u16-icon.png - UINT ObjectID
 
Fc9-u16-icon.png - UINT X
 
Fc9-u16-icon.png - UINT Y
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ShiftObject
Shifts an existing object coordinates on the screen relative to the previous coordinates. 
Fc9-u16-icon.png - UINT ObjectID
 
[[File:]] - X
 
[[File:]] - Y
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png DrawObject
Draws a single object onto the display without clearing the display. Doesn't draw a textfield component, this is done using the SetObjectText macro. 
Fc9-u16-icon.png - UINT ObjectID
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ScaleObject
Changes the width and height of the selected Object 
Fc9-u16-icon.png - UINT ObjectID
 
Fc9-u16-icon.png - UINT Width
 
Fc9-u16-icon.png - UINT Height
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png RedrawAll
Clears the display and redraws all the content from the display manager objects. Doesn't draw textfield components, this is done using the SetObjectText macro. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetObjectText
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. 
Fc9-u16-icon.png - UINT ObjectID
 
Fc9-string-icon.png - STRING Text
 
Fc9-u8-icon.png - BYTE Font
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png CreateObject
Define an object on the graphical LCD. Returns the Object ID. 
Fc9-u16-icon.png - UINT ObjectType
 
Fc9-u16-icon.png - UINT X
 
Fc9-u16-icon.png - UINT Y
 
Fc9-u16-icon.png - UINT Width
 
Fc9-u16-icon.png - UINT Height
 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png ShowName
Sets the label to show the target object's name 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-17-icon.png GLCD Component
Selects the GLCD component to display all the objects 
Fc9-type-21-icon.png Max Objects
The total number of objects allowed on the screen. Sets the size of the RAM buffers used to track the various screen elements. 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations