Choco OS
V.0.16.9.0
Join to the chocolate world
|
The file with interface for the GPIO driver. More...
#include <oc_tgui.h>
#include <oc_stdlib.h>
#include <oc_null.h>
#include <oc_object.h>
#include <oc_stdio.h>
#include <oc_kprint.h>
#include <string.h>
#include <oc_math.h>
#include <ctype.h>
#include <oc_struct.h>
#include <oc_string.h>
#include <oc_debug.h>
#include <oc_process.h>
Go to the source code of this file.
Data Structures | |
struct | ProgressBar_t |
Functions | |
bool | oC_TGUI_ResetDevice (void) |
function for reseting a terminal More... | |
bool | oC_TGUI_ClearPartOfScreen (oC_TGUI_Position_t StartPosition, oC_TGUI_Column_t Width, oC_TGUI_Line_t Height, oC_TGUI_Color_t Color) |
clears selected part of the screen More... | |
bool | oC_TGUI_DrawBox (const char *Title, const char *TextInside, oC_TGUI_Position_t TopLeft, oC_TGUI_Column_t Width, oC_TGUI_Line_t Height, const oC_TGUI_BoxStyle_t *Style) |
draws a box More... | |
oC_TGUI_EntryIndex_t | oC_TGUI_DrawMenu (oC_TGUI_Position_t TopLeft, oC_TGUI_Column_t Width, oC_TGUI_Line_t Height, const oC_TGUI_MenuEntry_t *MenuEntries, oC_TGUI_EntryIndex_t NumberOfEntries, const oC_TGUI_MenuStyle_t *Style) |
draws a menu More... | |
bool | oC_TGUI_DrawActiveObjects (oC_TGUI_ActiveObject_t *ActiveObjects, uint32_t NumberOfObjects) |
draws array of active objects and handles it More... | |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Definition in file oc_tgui.c.
bool oC_TGUI_ClearPartOfScreen | ( | oC_TGUI_Position_t | StartPosition, |
oC_TGUI_Column_t | Width, | ||
oC_TGUI_Line_t | Height, | ||
oC_TGUI_Color_t | Color | ||
) |
The function is for quickly clear part of the screen by using the given background color.
StartPosition | Position of the top left corner to clear |
Width | Width of part of screen to clear |
Height | Height of part of screen to clear |
Color | Background color to use for clearing |
bool oC_TGUI_DrawActiveObjects | ( | oC_TGUI_ActiveObject_t * | ActiveObjects, |
uint32_t | NumberOfObjects | ||
) |
The function is for drawing and handling array of active objects. The function ends, when the pressed key is ESCAPE or when function arguments are not correct.
ActiveObjects | Pointer to array with active objects |
NumberOfObjects | Number of elements in the ActiveObjects array |
bool oC_TGUI_DrawBox | ( | const char * | Title, |
const char * | TextInside, | ||
oC_TGUI_Position_t | TopLeft, | ||
oC_TGUI_Column_t | Width, | ||
oC_TGUI_Line_t | Height, | ||
const oC_TGUI_BoxStyle_t * | Style | ||
) |
The function is for drawing a box - it is a rectangle with title, text inside and shadow. The example you can see below:
Title | Pointer to the string with title |
TextInside | Pointer to the string with text that should be placed in the box, or NULL if it is not required |
TopLeft | Position of the top left box corner |
Width | Width of the box (including 1 column for the shadow) |
Height | Height of the box (including 1 line for the shadow) |
Style | Pointer to the style of the box. |
oC_TGUI_EntryIndex_t oC_TGUI_DrawMenu | ( | oC_TGUI_Position_t | TopLeft, |
oC_TGUI_Column_t | Width, | ||
oC_TGUI_Line_t | Height, | ||
const oC_TGUI_MenuEntry_t * | MenuEntries, | ||
oC_TGUI_EntryIndex_t | NumberOfEntries, | ||
const oC_TGUI_MenuStyle_t * | Style | ||
) |
The function is for drawing menu. It returns index of the lately selected entry or -1 if there was an error. The function ends, when the selected item has not assigned a correct Handler. If the selected item has a valid Handler pointer, the function calls it and waits for the press of the key. You can use it for example as the Exit menu entry.
TopLeft | Position of the top left menu corner |
Width | Width including shadow |
Height | Height including shadow |
MenuEntries | Array with menu entries |
NumberOfEntries | Number of menu entries in the array |
Style | Pointer to the menu style |