NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Matrix Gui Version 1

From Texas Instruments Wiki
Jump to: navigation, search

Content is no longer maintained and is being kept for reference only!

How to Customize the Matrix GUI[edit]

The C++ source code for the Matrix GUI application is provided with the SDK package but it is not necessary to edit or recompile this to customize the application menus. All that is usually required is to edit the HTML files that define the menus.

It is important to understand that Matrix is basically a specialized web browser built upon the Qt SDK and WebKit. Each menu is an HTML page that is displayed by this browser. The HTML pages define the buttons that are displayed to compose each menu. Each button can either launch an example application, open a submenu, close a submenu or display a general webpage from the internet.

Each menu file for Matrix contains a 4 x 3 table and each cell in these tables contain a special object tag named "application/x-matrix". This object tag will not be recognized by general purpose web browsers because it requires a custom plug-in which is built into the Matrix browser. Each occurance of this object tag causes Matrix to generate an active button complete with a displayed icon, text label and a path to a corresponding executable application that will be used if/when that button is pressed.

To create a new menu page, simply copy one of the existing files with a new name and edit the HTML table cells. To launch your new menu from an existing menu, edit a table cell in the existing menu file so that its “appName” parameter is “Submenu” and its “appParameter” has the name of your new menu page.

HTML Table Header[edit]

Here is an example of the start of an HTML table used in all of the Matrix menu files. The title of the menu page and/or the background color can be edited here:

<syntaxhighlight lang="html"> <html>

<body text="#FFFFFF" bgcolor="#000000">
</syntaxhighlight> This is followed by 12 table cells organized in a 4 x 3 array that correspond to the buttons on the menu page. Each cell defines one button on the menu. A blank line separates each cell in the table. There are 5 parameters that define each object tag which will be used if/when the button is pressed. When editing these parameters, only the quoted string following the "value=" keyword, should be altered.

Object Tag Parameters[edit]

  • iconName - Path and name of the image file for the icon for this button. This can be a PNG or BMP format file.
  • iconLabel - Text label that will appear below the icon for this button. Maximum length is about 12 characters when using a 4 x 3 table. Use leading spaces to center the text to the icon.
  • appName - This parameter can be one of the following:
    • The path and name of an executable application to launch.
    • The keyword "Submenu" which indicates to launch the menu named by appParameters.
    • The keyword "Browser" which indicates to display the webpage at the URL named by appParameters using the internal browser.
    • The keyword "Close" which indicates this button will close this menu.
  • appParameters - This can define optional parameters for the executable application or menu file name or URL of webpage, depending on appName. This entire line can be deleted if no parameters are needed.
  • appText - This flag parameter controls whether a text window will be displayed when the application is launched to display the stdout text generated by the application. The value for this flag can be set to either “Enable” or “Disable”. If this parameter is not defined, the default configuration is to enable the text window, but only if the application actually generates stdout text during its execution. This window will have a close button in the bottom right corner which must be pressed to close it. Setting this parameter to “Disable” prevents the text window from being created and it causes the parent menu to be disabled before the application is launched. This is important for non-Qt applications because they may otherwise assume control of the display without knowledge of the Matrix menu that launched it. This could allow the buttons on the obscured menu to still be active even though they are not visible. Setting this parameter to “Disable” prevents this problem.

Object Tag Examples[edit]

There are 4 types of object tag entries that can be selected by the “appName” parameter; “Submenu”, “Browser”, “Close” or a named external application executable. The “appParameters” parameter should define any parameter(s) that are required for the application.

Submenu Button[edit]

Here is an example of a table cell complete with an object tag that generates a button labeled “ARM”. This button will launch a submenu for the ARM benchmarks defined by the file named “menu_benchmarks.html” when it is pressed.

<syntaxhighlight lang="html">

</syntaxhighlight>

Application Launch Button[edit]

Here is an example of a table cell that generates a button labeled "Vase" which will launch an OpenGL ES demo application named "OGLESVase" when it is pressed.

<syntaxhighlight lang="html">

</syntaxhighlight> Note that the "appText" parameter is used to disable any text window that might otherwise be displayed. This also ensures that the parent menu is disabled before the external OGLESVase application takes control of the display.

Browser Button[edit]

There are two ways to display a general HTML web page with Matrix. To use the Matrix internal browser to display the page, set the "appName" parameter to "Browser" and "appParameters" to the URL on either the web or a local file.

<syntaxhighlight lang="html">

</syntaxhighlight> Alternatively, a browser external to Matrix can be used instead: <syntaxhighlight lang="html"> </syntaxhighlight>

Close Button[edit]

This example generates a close button labeled “Main” which will close this menu and return control to the parent menu when it is pressed. If this is the top menu in the menu hierarchy, Matrix will exit to Linux when this button is pressed. Every menu must have a close button or it will be impossible to exit the menu using the touchscreen.

<syntaxhighlight lang="html">

</syntaxhighlight>

Blank Cell[edit]

To leave a table cell blank, it is best to delete the object tag completely so that no button will be created. But leave the HTML table cell tags so that the alignment of the other cells will be maintained.

<syntaxhighlight lang="html">

</syntaxhighlight>
Matrix Application Launcher
<object type="application/x-matrix" width="96px" height="96px">
<param name="iconName" value="images/arm.bmp" />
<param name="iconLabel" value="ARM" />
<param name="appName" value="Submenu" />
<param name="appParameters" value="menu_benchmarks.html" />
</object>
<object type="application/x-matrix" width="96px" height="96px">
<param name="iconName" value="images/3d.bmp" />
<param name="iconLabel" value="Vase" />
<param name="appName" value="./bin/OGLESVase" />
<param name="appText" value="Disable" />
</object>
<object type="application/x-matrix" width="96px" height="96px">
<param name="iconName" value="images/web.bmp" />
<param name="iconLabel" value="Vist TI.com" />
<param name="appName" value="Browser" />
<param name="appParameters" value="http://ti.com" />
</object>
<object type="application/x-matrix" width="96px" height="96px">
<param name="iconName" value="images/web.bmp" />
<param name="iconLabel" value="Vist TI.com" />
<param name="appName" value="./bin/browser" />
<param name="appParameters" value="http://ti.com" />
</object>
<object type="application/x-matrix" width="96px" height="96px">
<param name="iconName" value="images/main.bmp" />
<param name="iconLabel" value="Main" />
<param name="appName" value="Close" />
</object>
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Matrix Gui Version 1 here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Matrix Gui Version 1 here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Matrix Gui Version 1 here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Matrix Gui Version 1 here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Matrix Gui Version 1 here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Matrix Gui Version 1 here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Matrix Gui Version 1 here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Matrix Gui Version 1 here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Matrix Gui Version 1 here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity