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