summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacien2018-01-09 02:18:44 +0100
committerpacien2018-01-09 02:18:44 +0100
commit4efbfe206290ed847ea45c07c4968a74b265ba00 (patch)
tree32798591c665a3d82fd6df813ece0ff5215be230
parent5beabe1a69e6dda3e139e95d24c3e9c8e027990a (diff)
parenta4aebd76d86745698ce89e8fa9a5160cddd290ac (diff)
downloadmorpher-4efbfe206290ed847ea45c07c4968a74b265ba00.tar.gz
Merge branch 'master' of https://git-etud.u-pem.fr/upem-c-morphing
Signed-off-by: pacien <pacien.trangirard@pacien.net> # Conflicts: # include/gui/component.h # include/gui/gui.h # include/gui/pictureframe.h
-rw-r--r--doc/project-report.md9
-rw-r--r--include/gui/component.h21
-rw-r--r--include/gui/gui.h1
-rw-r--r--include/gui/pictureframe.h1
4 files changed, 21 insertions, 11 deletions
diff --git a/doc/project-report.md b/doc/project-report.md
index 376eda4..f9a95ef 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
131### GUI 131### GUI
132 132
133The Graphical User Interface is designed with a modular component-based architecture. That architecture implies an 133The Graphical User Interface is designed with a modular component-based architecture. That architecture implies an
134Object-Oriented Programming's vision. Thanks to that, the application is very flexible for adding components and 134Object-Oriented Programming's vision that makes the application very flexible for adding components and
135placing them. The components created are groups, buttons, and picture frames that are all based on a common structure 135placing them. The components created are groups, buttons, and picture frames that are all based on a common structure
136called Component. Groups federate Components of any type and place them by a margin management. 136called Component. Groups federate Components of any type and place them by a margin management.
137 137
138Thanks to a click handler and a printing function stored inside Components, it is possible to perform the actions on 138Click handlers and printing functions stored inside Components make possible to perform the actions on
139click or to paint the component without knowing what is stored inside the group. The group is a component that handles 139click or to paint the component without knowing what is stored inside the group. The group is a component that handles
140clicks and is able to paint itself by using the click handler and the painter function of the Component contained inside 140clicks and is able to paint itself by using the click handler and the painter function of the Component contained inside
141its list. In other words, it delegates to the Components the action to perform. 141its list. In other words, it delegates to the Components the action to perform.
142 142
143It also wraps some libMLV low level functions to create basic application features that can be used to create coherent 143It also wraps some libMLV low level functions to create basic application features that can be used to create coherent
144state for the application and components. The rendering process is done by computing intermediate morphing between each 144state for the application and components. The rendering process is done by computing intermediate morphing between each
145frame combined with a time. By this implementation, the application is not using MLV_Animation. 145frame combined with a time. This implementation replaces the usage of MLV_Animation which implies higher memory usage
146and lower fluidity due to the needed pre-calculation.
146 147
147\newpage 148\newpage
148 149
diff --git a/include/gui/component.h b/include/gui/component.h
index 895e9ba..1a255e2 100644
--- a/include/gui/component.h
+++ b/include/gui/component.h
@@ -3,6 +3,7 @@
3 3
4/** 4/**
5 * File: component.h 5 * File: component.h
6 * Components implementation.
6 * 7 *
7 * Author: 8 * Author:
8 * Adam NAILI 9 * Adam NAILI
@@ -24,16 +25,22 @@ typedef enum {
24 WAITING_BUTTON_SHOW, WAITING_BUTTON_HIDE, INSERT_ORIGIN, INSERT_TARGET, PRINTING, EXITING, PRINTING_BUTTONS, RENDERING 25 WAITING_BUTTON_SHOW, WAITING_BUTTON_HIDE, INSERT_ORIGIN, INSERT_TARGET, PRINTING, EXITING, PRINTING_BUTTONS, RENDERING
25} Mode; 26} Mode;
26 27
28/**
29 * Mode is used for application status rotation. It is shared between our components. In OOP, this could have been a
30 * static attribute of the class.
31 **/
27extern Mode mode; 32extern Mode mode;
28extern int frame; 33
29extern char labelFrame[20];
30/** 34/**
31 * File: component.h 35 * Components have no access to exterior. They can access only to themselves due to the generic implementation. These
32 * Windows and components handling. 36 * variables are the easiest way to share memory between components.
33 * 37 * frame and labelFrame is used to frame management and printing this number of frame on one of the button. Button are
34 * See also: 38 * not designed to have a dynamic label, so this implementation is the fastest without breaking the code or creating
35 * The famous OS 39 * another type of components.
36 */ 40 */
41extern int frame;
42extern char labelFrame[20];
43
37struct Component; 44struct Component;
38 45
39/** 46/**
diff --git a/include/gui/gui.h b/include/gui/gui.h
index a8b7bd0..1e205ce 100644
--- a/include/gui/gui.h
+++ b/include/gui/gui.h
@@ -3,6 +3,7 @@
3 3
4/** 4/**
5 * File: gui.h 5 * File: gui.h
6 * Graphical user interface handling
6 * 7 *
7 * Author: 8 * Author:
8 * Adam NAILI 9 * Adam NAILI
diff --git a/include/gui/pictureframe.h b/include/gui/pictureframe.h
index 0432b1c..11eaf90 100644
--- a/include/gui/pictureframe.h
+++ b/include/gui/pictureframe.h
@@ -3,6 +3,7 @@
3 3
4/** 4/**
5 * File: pictureframe.h 5 * File: pictureframe.h
6 * Pictures handling.
6 * 7 *
7 * Author: 8 * Author:
8 * Adam NAILI 9 * Adam NAILI