# Ui Template

## Revision History <a href="#toc212628598" id="toc212628598"></a>

<table data-header-hidden><thead><tr><th></th><th></th><th width="149"></th><th></th></tr></thead><tbody><tr><td>VERSION</td><td>AUTHOR</td><td>CHANGE</td><td>DATE</td></tr><tr><td>1.0</td><td>Burçin Büyükçakıroğlu</td><td>Ui </td><td>06.11.2014</td></tr></tbody></table>

## 1. Description

The document explains the usage of our interface functions with examples for developers creating a banking application.

## **2.  Settings Qt Creater**

The settings in the 'Build Settings' tab should be as follows. The step order specified in 'Build steps' must be in the same sequence.

<figure><img src="/files/5ogLHOt0nEbDQ7n429Lw" alt="" width="563"><figcaption></figcaption></figure>

## **2.  Menu Structor**

The menu consists of three sections:

• Header\
• Body\
• Footer

The body section of the menu can be used for three different purposes:

• List\
• Edit\
• Pop-up\
• Status

### 2.1 List Menu

The list menu allows the listing of submenus. Additionally, three buttons can be defined at the bottom.

To create a list menu, the following steps must be defined:

```cpp
menu->bodyItemEnable(menu->ListMenu);  

menu->headerSetText("Title");  
menu->bodyMenuAddItemToList("1st Item", "", 1);  
menu->bodyMenuAddItemToList("2nd Item", "", 2);  
…..  
…..  
menu->bodyMenuCreateItemList(); 
```

<div align="left"><figure><img src="/files/6PGw7xMpxJXhnA3fibUC" alt="" width="183"><figcaption></figcaption></figure></div>

### 2.2 Pop-up Menu

The **Pop-up menu** is a type of menu that appears over the active menu and is used for purposes such as warnings, errors, information, and asking questions.

```cpp
menu->bodyPopUpSetHeader(CBody_PopUp::Confirmation, "POPUP Header");
menu->bodyPopUpSetButtons(CBody_PopUp::Ok_Cancel, "   OKEY", "   CANCEL");
menu->bodyPopUpSetText("Warning Message", 2);
menu->bodyPopUpShow();
int ret = 0;
menu->bodyPopUpGetRet(&ret);
if(ret == 0)
{
	// press Okey
}
else
{
	// press Cancel
}

```

<div align="left"><figure><img src="/files/Mt5yguIQft0Q0tUuAShx" alt=""><figcaption></figcaption></figure></div>

### **2.3 Status Notification Menu**

This menu type is used to provide status notifications related to performed operations.

```
menu->bodyItemEnable(menu->TextLine);
menu->footerClearButtonContents();
menu->bodyTextWrite("State Message", 2 /*Line No*/);

```

<div align="left"><figure><img src="/files/zGTJlRimKTmajG33SKQ6" alt=""><figcaption></figcaption></figure></div>

### **2.4 Edit Menu**

The **Edit Menu** allows data entry using the keypad.

```cpp
menu->bodyItemEnable(menu->EditLine);
menu->bodyEditLineSetFormat(CBody_EditLine::Amount, 10);
menu->headerSet("Header");
menu->bodyEditLineSetTitle("EditBox Message");

```

<div align="left"><figure><img src="/files/0M3blaMx69c93bx1Kzl8" alt=""><figcaption></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.tokeninc.com/token-developer-portal-1/okc-platform-linux/devices/300tr/ui-template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
