From 9719a1dd0e9f7e2653b9cf358a864082c29d1cf7 Mon Sep 17 00:00:00 2001 From: Adam NAILI Date: Thu, 4 Jan 2018 01:04:55 +0100 Subject: Updating report : adding precisions and rephrasing --- doc/project-report.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/project-report.md b/doc/project-report.md index 3851150..3af62c2 100644 --- a/doc/project-report.md +++ b/doc/project-report.md @@ -131,18 +131,19 @@ RBGa vectors from the two base images: each component is square-rooted back to i ### GUI The Graphical User Interface is designed with a modular component-based architecture. That architecture implies an -Object-Oriented Programming's vision. Thanks to that, the application is very flexible for adding components and +Object-Oriented Programming's vision that makes the application very flexible for adding components and placing them. The components created are groups, buttons, and picture frames that are all based on a common structure called Component. Groups federate Components of any type and place them by a margin management. -Thanks to a click handler and a printing function stored inside Components, it is possible to perform the actions on +Click handlers and printing functions stored inside Components make possible to perform the actions on click or to paint the component without knowing what is stored inside the group. The group is a component that handles clicks and is able to paint itself by using the click handler and the painter function of the Component contained inside -its list. In other words, it delegates to the Components the action to perform. +its list. In other words, it delegates to the Components the action to perform. It also wraps some libMLV low level functions to create basic application features that can be used to create coherent state for the application and components. The rendering process is done by computing intermediate morphing between each -frame combined with a time. By this implementation, the application is not using MLV_Animation. +frame combined with a time. This implementation replaces the usage of MLV_Animation which implies higher memory usage +and lower fluidity due to the needed pre-calculation. \newpage -- cgit v1.2.3 From a4aebd76d86745698ce89e8fa9a5160cddd290ac Mon Sep 17 00:00:00 2001 From: Adam NAILI Date: Thu, 4 Jan 2018 14:04:50 +0100 Subject: Updating documentation and explanation about some implementations --- include/gui/component.h | 23 ++++++++++++++++------- include/gui/gui.h | 1 + include/gui/pictureframe.h | 1 + 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/include/gui/component.h b/include/gui/component.h index 9700dfe..97a23fe 100644 --- a/include/gui/component.h +++ b/include/gui/component.h @@ -1,5 +1,9 @@ #ifndef UPEM_C_COMPONENT_H #define UPEM_C_COMPONENT_H +/** + * File: component.h + * Components implementation. + */ /** * Enum: Mode @@ -17,16 +21,21 @@ typedef enum { WAITING_BUTTON_SHOW, WAITING_BUTTON_HIDE, INSERT_ORIGIN, INSERT_TARGET, PRINTING, EXITING, PRINTING_BUTTONS, RENDERING } Mode; +/** + * Mode is used for application status rotation. It is shared between our components. In OOP, this could have been a + * static attribute of the class. + **/ extern Mode mode; -extern int frame; -extern char labelFrame[20]; /** - * File: component.h - * Windows and components handling. - * - * See also: - * The famous OS + * Components have no access to exterior. They can access only to themselves due to the generic implementation. These + * variables are the easiest way to share memory between components. + * frame and labelFrame is used to frame management and printing this number of frame on one of the button. Button are + * not designed to have a dynamic label, so this implementation is the fastest without breaking the code or creating + * another type of components. */ +extern int frame; +extern char labelFrame[20]; + struct Component; /** diff --git a/include/gui/gui.h b/include/gui/gui.h index 10f59e8..745d3e1 100644 --- a/include/gui/gui.h +++ b/include/gui/gui.h @@ -5,6 +5,7 @@ /** * File: gui.h + * Graphical user interface handling */ diff --git a/include/gui/pictureframe.h b/include/gui/pictureframe.h index a070190..d679b6b 100644 --- a/include/gui/pictureframe.h +++ b/include/gui/pictureframe.h @@ -7,6 +7,7 @@ /** * File: pictureframe.h + * Pictures handling. */ /*Needed storage point to share memory between the origin PictureFrame and the target PictureFrame. It ables to cancel the Add constraint functionality*/ -- cgit v1.2.3