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 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'include/gui/component.h') 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; /** -- cgit v1.2.3