1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2005 by Kevin Ferrare
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef _GUI_TEXTAREA_H_
21 #define _GUI_TEXTAREA_H_
22 #include "screen_access.h"
24 #include "statusbar.h"
28 const char **message_lines
;
33 * Clears the area in the screen in which text can be displayed
34 * and sets the y margin properly
35 * - display : the screen structure
37 extern void gui_textarea_clear(struct screen
* display
);
40 * Updates the area in the screen in which text can be displayed
41 * - display : the screen structure
43 extern void gui_textarea_update(struct screen
* display
);
46 * Compute the number of text lines the display can draw with the current font
47 * Also updates the char height and width
48 * - display : the screen structure
50 extern void gui_textarea_update_nblines(struct screen
* display
);
53 * Speak a text_message. The message's lines may be virtual pointers
54 * representing language / voicefont IDs (see settings.h).
56 extern void talk_text_message(const struct text_message
* message
, bool enqueue
);
58 #ifdef HAVE_LCD_BITMAP
60 * Compute the number of pixels from which text can be displayed
61 * - display : the screen structure
62 * Returns the number of pixels
64 #define gui_textarea_get_ystart(display) \
65 ( (global_settings.statusbar)? STATUSBAR_HEIGHT : 0)
68 * Compute the number of pixels below which text can't be displayed
69 * - display : the screen structure
70 * Returns the number of pixels
73 #define gui_textarea_get_yend(display) \
74 ( (display)->height - ( (global_settings.buttonbar && \
75 (display)->has_buttonbar)? \
76 BUTTONBAR_HEIGHT : 0) )
78 #define gui_textarea_get_yend(display) \
80 #endif /* HAS_BUTTONBAR */
82 #endif /* HAVE_LCD_BITMAP */
84 #endif /* _GUI_TEXTAREA_H_ */