1 /**************************************************************************/
2 /*                                                                        */
3 /*       Copyright (c) Microsoft Corporation. All rights reserved.        */
4 /*                                                                        */
5 /*       This software is licensed under the Microsoft Software License   */
6 /*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
7 /*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
8 /*       and in the root directory of this software.                      */
9 /*                                                                        */
10 /**************************************************************************/
11 
12 
13 /**************************************************************************/
14 /**************************************************************************/
15 /**                                                                       */
16 /** GUIX Component                                                        */
17 /**                                                                       */
18 /**   Prompt Management (Prompt)                                          */
19 /**                                                                       */
20 /**************************************************************************/
21 
22 #define GX_SOURCE_CODE
23 
24 
25 /* Include necessary system files.  */
26 
27 #include "gx_api.h"
28 #include "gx_system.h"
29 #include "gx_canvas.h"
30 #include "gx_context.h"
31 #include "gx_widget.h"
32 #include "gx_prompt.h"
33 #include "gx_pixelmap_prompt.h"
34 
35 
36 /**************************************************************************/
37 /*                                                                        */
38 /*  FUNCTION                                               RELEASE        */
39 /*                                                                        */
40 /*    _gx_pixelmap_prompt_draw                            PORTABLE C      */
41 /*                                                           6.1          */
42 /*  AUTHOR                                                                */
43 /*                                                                        */
44 /*    Kenneth Maxwell, Microsoft Corporation                              */
45 /*                                                                        */
46 /*  DESCRIPTION                                                           */
47 /*                                                                        */
48 /*    This function draws the specified pixelmap prompt, which is a       */
49 /*      special type of widget.                                           */
50 /*                                                                        */
51 /*  INPUT                                                                 */
52 /*                                                                        */
53 /*    widget                                Widget control block          */
54 /*                                                                        */
55 /*  OUTPUT                                                                */
56 /*                                                                        */
57 /*    None                                                                */
58 /*                                                                        */
59 /*  CALLS                                                                 */
60 /*                                                                        */
61 /*    _gx_widget_children_draw              Draw children widgets         */
62 /*    _gx_prompt_text_draw                  Draw prompt text              */
63 /*    _gx_context_pixelmap_get              Retrieve pixelmap image       */
64 /*    _gx_canvas_pixelmap_draw              Draw a pixelmap               */
65 /*    _gx_canvas_pixelmap_tile              Tile a pixelmap               */
66 /*    _gx_prompt_text_draw                  Draw a text prompt            */
67 /*                                                                        */
68 /*  CALLED BY                                                             */
69 /*                                                                        */
70 /*    Application Code                                                    */
71 /*    GUIX Internal Code                                                  */
72 /*                                                                        */
73 /*  RELEASE HISTORY                                                       */
74 /*                                                                        */
75 /*    DATE              NAME                      DESCRIPTION             */
76 /*                                                                        */
77 /*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
78 /*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
79 /*                                            resulting in version 6.1    */
80 /*                                                                        */
81 /**************************************************************************/
_gx_pixelmap_prompt_draw(GX_PIXELMAP_PROMPT * prompt)82 VOID  _gx_pixelmap_prompt_draw(GX_PIXELMAP_PROMPT *prompt)
83 {
84     /* Draw pixelmap prompt's background. */
85     _gx_pixelmap_prompt_background_draw(prompt);
86 
87     /* Draw the text */
88     _gx_prompt_text_draw((GX_PROMPT *)prompt);
89 
90     /* Draw children widgets of prompt widget.  */
91     _gx_widget_children_draw((GX_WIDGET *)prompt);
92 }
93 
94