Documentation de la bibliothèque MLV-2.0.2

MLV_input_box.h
Aller à la documentation de ce fichier.
1 /*
2  * This file is part of the MLV Library.
3  *
4  * Copyright (C) 2010,2011,2012 Adrien Boussicault, Marc Zipstein
5  *
6  *
7  * This Library is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This Library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this Library. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
33 #ifndef __MLV__MLV_INPUT_BOX_H__
34 #define __MLV__MLV_INPUT_BOX_H__
35 
36 #include "MLV_color.h"
37 #include "MLV_text.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
47 typedef struct _MLV_Input_box MLV_Input_box;
48 
85  int sommetHautGaucheX, int sommetHautGaucheY,
86  int sommetBasDroitX, int sommetBasDroitY,
87  MLV_Color borderColor, MLV_Color textColor,
88  MLV_Color backgroundColor,
89  const char* informativeMessage,
90  char** text, ...
91 );
92 
120  int sommetHautGaucheX, int sommetHautGaucheY,
121  int sommetBasDroitX, int sommetBasDroitY,
122  MLV_Color borderColor, MLV_Color textColor,
123  MLV_Color backgroundColor,
124  const char* informativeMessage,
125  char** text,
126  const MLV_Font* font, ...
127 );
128 
129 
138 void MLV_wait_particular_input_box( MLV_Input_box* input_box, char** text);
139 
140 
169  int sommetHautGaucheX, int sommetHautGaucheY,
170  int width, int height,
171  MLV_Color borderColor, MLV_Color textColor,
172  MLV_Color backgroundColor,
173  const char* informativeMessage, ...
174 );
175 
190  int sommetHautGaucheX, int sommetHautGaucheY,
191  int width, int height,
192  MLV_Color borderColor, MLV_Color textColor,
193  MLV_Color backgroundColor,
194  const char* informativeMessage,
195  const MLV_Font* font, ...
196 );
197 
198 
206 void MLV_free_input_box( MLV_Input_box* input_box );
207 
215  MLV_Input_box* input_box, const char* message, ...
216 );
217 
223 void MLV_draw_input_box( MLV_Input_box* input_box );
224 
231 
237 void MLV_suppress_history( MLV_Input_box* input_box );
238 
251  MLV_Input_box* input_box, int sommetHautGaucheX, int sommetHautGaucheY,
252  int width, int height
253 );
254 
262 void MLV_change_input_box_size(MLV_Input_box* input_box, int width, int height);
263 
274  MLV_Input_box* input_box, int sommetHautGaucheX, int sommetHautGaucheY
275 );
276 
286  MLV_Input_box* input_box, MLV_Color borderColor, MLV_Color textColor,
287  MLV_Color backgroundColor
288 );
289 
304 void MLV_activate_input_box( MLV_Input_box* input_box );
305 
312 
313 #ifdef __cplusplus
314 }
315 #endif
316 
317 #endif
void MLV_activate_input_box(MLV_Input_box *input_box)
Cette fonction active une boîte de saisie.
void MLV_wait_input_box(int sommetHautGaucheX, int sommetHautGaucheY, int sommetBasDroitX, int sommetBasDroitY, MLV_Color borderColor, MLV_Color textColor, MLV_Color backgroundColor, const char *informativeMessage, char **text,...)
Cette fonction suspend l'exécution du programme, affiche une boîte de saisie et attends que l'utilisa...
void MLV_change_informative_message_of_input_box(MLV_Input_box *input_box, const char *message,...)
Cette fonction change le message d'entête d'une boîte de saisie.
void MLV_wait_particular_input_box(MLV_Input_box *input_box, char **text)
Cette fonction suspend l'exécution du programme jusqu'à ce que l'utilisateur écrive une phrase dans l...
void MLV_free_input_box(MLV_Input_box *input_box)
Cette fonction ferme une boîte de saisie précédement créée.
Définit toutes les couleurs disponibles dans la bibliothèque MLV.
void MLV_draw_all_input_boxes()
Cette fonction dessine tous les boîtes de saisies.
void MLV_desactivate_input_box()
Cette fonction désactive la boîte de saisie qui est active.
struct _MLV_Input_box MLV_Input_box
Définition du type des boîtes de saisies.
Definition: MLV_input_box.h:47
MLV_Input_box * MLV_create_input_box_with_font(int sommetHautGaucheX, int sommetHautGaucheY, int width, int height, MLV_Color borderColor, MLV_Color textColor, MLV_Color backgroundColor, const char *informativeMessage, const MLV_Font *font,...)
Cette fonction créé une boîte de saisie avec une font spécifique.
struct _MLV_Font MLV_Font
Definition: MLV_text.h:77
void MLV_change_input_box_geometry(MLV_Input_box *input_box, int sommetHautGaucheX, int sommetHautGaucheY, int width, int height)
Cette fonction change la taille et la position d'une boîte de saisie donnée en paramètre.
Uint32 MLV_Color
Définit un type couleur pour la bibliothèque MLV.
Definition: MLV_color.h:54
void MLV_draw_input_box(MLV_Input_box *input_box)
Cette fonction dessine une boîte de saisie particulière.
Ce fichier définit les différents prototypes des fonctions permmettant d'afficher du texte et des boî...
void MLV_suppress_history(MLV_Input_box *input_box)
Cette fonction supprime l'historique d'une boîte de saisie.
void MLV_change_input_box_colors(MLV_Input_box *input_box, MLV_Color borderColor, MLV_Color textColor, MLV_Color backgroundColor)
Cette fonction change les différentes couleurs d'une boîte de saisie donnée.
void MLV_wait_input_box_with_font(int sommetHautGaucheX, int sommetHautGaucheY, int sommetBasDroitX, int sommetBasDroitY, MLV_Color borderColor, MLV_Color textColor, MLV_Color backgroundColor, const char *informativeMessage, char **text, const MLV_Font *font,...)
Même chose que MLV_wait_input_box(), mais il est possible de changer la fonte du du texte...
MLV_Input_box * MLV_create_input_box(int sommetHautGaucheX, int sommetHautGaucheY, int width, int height, MLV_Color borderColor, MLV_Color textColor, MLV_Color backgroundColor, const char *informativeMessage,...)
Cette fonction créé une boîte de saisie.
void MLV_change_input_box_size(MLV_Input_box *input_box, int width, int height)
Cette fonction change la taille d'une boîte de saisie.
void MLV_change_input_box_position(MLV_Input_box *input_box, int sommetHautGaucheX, int sommetHautGaucheY)
Cette fonction change la position d'une boîte de saisie donnée en paramètre.