Preparation of the sample graphic program

Issue #240 open
Patryk Kubiak created an issue

Target Description

Actually it is not possible to use the system without terminal access (UART or Telnet). It has to be possible to use the system at least at the basic level, also without access to a PC.

Interface

Drawer interface

// draws program icon
extern void cgraphic_DrawProgramIcon( oC_Program_t Program, const oC_Pixel_Position_t Position );
//  draws file icon
extern void cgraphic_DrawFileIcon( const char * Path, const oC_Pixel_Position_t Position );
// draws time box
extern void cgraphic_DrawTimeBox( const oC_Pixel_Position_t * Position );
// draws CPU load box
extern void cgraphic_DrawCPULoadBox( const oC_Pixel_Position_t * Position );
// draws box with text
extern void cgraphic_DrawButton( const oC_Pixel_Position_t * Position , const char * String );
// draws progress bar
extern void cgraphic_DrawProgressBar( const oC_Pixel_Position_t * Position, uint32_t Value, uint32_t Max );
// draws system logo
extern void cgraphic_DrawSystemLogo( const oC_Pixel_Position_t * Position, oC_Pixel_ResolutionUInt_t Width, oC_Pixel_ResolutionUInt_t Height );

Status bar interface

// draws status bar
extern void cgraphic_DrawStatusBar( void );

File manager

// Draws files from the given page
extern void cgraphic_DrawFilesFromPage( int PageIndex );

// Returns number of pages required for the path
extern uint32_t cgraphic_GetNumberOfPages( void );

Program Executor

// Executes a given program 
extern void cgraphic_ExecuteProgram( const char * ProgramPath );  

System Handler

// Main function for the system handler
extern void cgraphic_SystemHandlerMain( void );

General Description

The program is responsible for providing graphic interface for user, that allows for basic managing of the system, running programs and manage files.

Welcome message view:

cgraphics welcome2.png

System handler view:

cgraphics systemhandler2.png cgraphics contextmenu2.png

Attachement

Link to logo file

Architecture

cgraphics-architecture.png

Palette

#e69138
#783f04
#b45f06
#000000
#0c343d
#f6b26b
#f3f3f3
#ff0000
#783f04
#f1c232
#bf9000

List of requirements

  • [ #248 ] - The function oC_ColorMap_DrawImage allows for drawing .png images*
  • [ #248 ] - The function oC_ColorMap_DrawImage uses UPNG library for drawing images
  • [ #249 ] - The WidgetScreen supports Image widget
  • [ #249 ] - The Image widget supports strings
  • [ #249 ] - The Image widget supports *.png images
  • [ #249 ] - The Image widget uses uPNG to draw an image
  • [ #250 ] - Support of keyboard widget in the WidgetScreen module
  • [ #250 ] - Possibility of editing list of keys in the keyboard widget
  • [ #250 ] - Possibility of using default keys definition in the keyboard widget
  • [ #250 ] - Keyboard supports flexible number of keys pages
  • [ #251 ] - WidgetScreen supports EditBox widget
  • [ #251 ] - EditBox widget uses input keyboard device if it exist
  • [ #251 ] - EditBox widget uses graphic keyboard widget if it is set
  • [ #251 ] - EditBox prints string as * if the Password in the widget definition is set to true.
  • [ #252 ] - WidgetScreen supports FileBox widget
  • [ #252 ] - FileBox widget uses options as files
  • [ #252 ] - FileBox widget shows list of files
  • [ #252 ] - FileBox page can be changed by oC_WidgetScreen_ScrollUp and oC_WidgetScreen_ScrollDown
  • [ #252 ] - FileBox shows directories, console programs, graphic programs and other files in different way.
  • [ #254 ] - Program is named cgraphic
  • [ #254 ] - cgraphic program is part of the core space
  • [ #254 ] - Program has been added to programs list
  • [ #253 ] - cgraphic loading screen is implemented in file main.c
  • [ #253 ] - cgraphic loading screen prints progress bar updated with booting level
  • [ #253 ] - cgraphic loading screen shows ChocoOS logo
  • [ #253 ] - cgraphic loading screen has reserved place for stderr terminal
  • [ #260 ] - WidgetScreen handles refresh period
  • [ #260 ] - WidgetScreen supports setting handler for getting widget value
  • [ #261 ] - The program cgraphic allows for login
  • [ #261 ] - The login screen in cgraphic allows for using touch keyboard

  • [ #248 ] - Program is named cgraphic

  • [ #247 ] - Possibility to refactor it in easy way in future to move it to the user space
  • [ #250 ] - Shows a system logo and welcome message at the start
  • [ #251 ] - Allows for browsing file system
  • [ #252 ] - Allows for programs execution
  • [ #251 ] - Shows different icons for console and graphic programs
  • [ #253 ] - Shows status bar
  • [ #253 ] - Status bar contains current time
  • [ #253 ] - Status bar contains current CPU load
  • [ #253 ] - Refreshing period of CPU load on status bar is configurable in oc_dynamic_cfg.h
  • [ #254 ] - Shows context menu for files
  • [ #254 ] - Context menu allows for copy, paste and delete files

Point

  • [ #207 ] - Preparation of the sample graphic program

List of tasks

  • [ #246 ] - Prepare GUI concept for cgraphic
  • [ #247 ] - Prepare architecture for cgraphic
  • [ #248 ] - Prepare files for all program components with stubs for all interface functions
  • [ #249 ] - Implement main program function by using stubs
  • [ #250 ] - Implementation of module for showing welcome message
  • [ #251 ] - Implementation of file system browser
  • [ #252 ] - Implementation of module for program execution
  • [ #253 ] - Implementation of status bar
  • [ #254 ] - Implementation of context menu

Comments (31)

  1. Log in to comment