GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gx_menu_draw.c Lines: 5 5 100.0 %
Date: 2026-03-06 19:21:09 Branches: 0 0 - %

Line Branch Exec Source
1
/***************************************************************************
2
 * Copyright (c) 2024 Microsoft Corporation
3
 * Copyright (c) 2026-present Eclipse ThreadX contributors
4
 *
5
 * This program and the accompanying materials are made available under the
6
 * terms of the MIT License which is available at
7
 * https://opensource.org/licenses/MIT.
8
 *
9
 * SPDX-License-Identifier: MIT
10
 **************************************************************************/
11
12
13
/**************************************************************************/
14
/**************************************************************************/
15
/**                                                                       */
16
/** GUIX Component                                                        */
17
/**                                                                       */
18
/**   Menu Management (Menu)                                              */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_menu.h"
29
#include "gx_pixelmap_prompt.h"
30
#include "gx_widget.h"
31
32
/**************************************************************************/
33
/*                                                                        */
34
/*  FUNCTION                                               RELEASE        */
35
/*                                                                        */
36
/*    _gx_menu_draw                                       PORTABLE C      */
37
/*                                                           6.1          */
38
/*  AUTHOR                                                                */
39
/*                                                                        */
40
/*    Kenneth Maxwell, Microsoft Corporation                              */
41
/*                                                                        */
42
/*  DESCRIPTION                                                           */
43
/*                                                                        */
44
/*    This function draws the specified menu, which is a special type of  */
45
/*    widget.                                                             */
46
/*                                                                        */
47
/*  INPUT                                                                 */
48
/*                                                                        */
49
/*    menu                                  Pointer the to menu control   */
50
/*                                            block                       */
51
/*                                                                        */
52
/*  OUTPUT                                                                */
53
/*                                                                        */
54
/*    None                                                                */
55
/*                                                                        */
56
/*  CALLS                                                                 */
57
/*                                                                        */
58
/*    _gx_pixelmap_prompt_background_draw   Draw pixelmap prompt backgrond*/
59
/*    _gx_menu_text_draw                    Draw menu text                */
60
/*    _gx_widget_children_draw              Draw children widgets         */
61
/*                                                                        */
62
/*  CALLED BY                                                             */
63
/*                                                                        */
64
/*    Application Code                                                    */
65
/*    GUIX Internal Code                                                  */
66
/*                                                                        */
67
/**************************************************************************/
68
3948
VOID  _gx_menu_draw(GX_MENU *menu)
69
{
70
    /* Draw menu's background. */
71
3948
    _gx_pixelmap_prompt_background_draw((GX_PIXELMAP_PROMPT *)menu);
72
73
    /* Draw Menu Text. */
74
3948
    _gx_menu_text_draw(menu);
75
76
    /* Draw children widgets of the menu widget.  */
77
3948
    _gx_widget_children_draw((GX_WIDGET *)menu);
78
3948
}
79