1 /***************************************************************************
2  * Copyright (c) 2024 Microsoft Corporation
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the MIT License which is available at
6  * https://opensource.org/licenses/MIT.
7  *
8  * SPDX-License-Identifier: MIT
9  **************************************************************************/
10 
11 
12 /**************************************************************************/
13 /**************************************************************************/
14 /**                                                                       */
15 /** GUIX Component                                                        */
16 /**                                                                       */
17 /**   Progress Bar Management (Radial Progress Bar)                       */
18 /**                                                                       */
19 /**************************************************************************/
20 
21 #define GX_SOURCE_CODE
22 
23 /* Include necessary system files.  */
24 
25 #include "gx_api.h"
26 #include "gx_context.h"
27 #include "gx_widget.h"
28 #include "gx_canvas.h"
29 #include "gx_utility.h"
30 #include "gx_radial_progress_bar.h"
31 
32 /**************************************************************************/
33 /*                                                                        */
34 /*  FUNCTION                                               RELEASE        */
35 /*                                                                        */
36 /*    _gx_radial_progress_bar_draw                        PORTABLE C      */
37 /*                                                           6.1          */
38 /*  AUTHOR                                                                */
39 /*                                                                        */
40 /*    Kenneth Maxwell, Microsoft Corporation                              */
41 /*                                                                        */
42 /*  DESCRIPTION                                                           */
43 /*                                                                        */
44 /*    This service draws a radial progress bar.                           */
45 /*                                                                        */
46 /*  INPUT                                                                 */
47 /*                                                                        */
48 /*    progress_bar                          Radial Progress Bar control   */
49 /*                                            block                       */
50 /*                                                                        */
51 /*  OUTPUT                                                                */
52 /*                                                                        */
53 /*    None                                                                */
54 /*                                                                        */
55 /*  CALLS                                                                 */
56 /*                                                                        */
57 /*    _gx_radial_progress_bar_background_draw                             */
58 /*    _gx_radial_progress_bar_text_draw                                   */
59 /*    _gx_widget_children_draw                                            */
60 /*                                                                        */
61 /*  CALLED BY                                                             */
62 /*                                                                        */
63 /*    Application Code                                                    */
64 /*    GUIX Internal Code                                                  */
65 /*                                                                        */
66 /*  RELEASE HISTORY                                                       */
67 /*                                                                        */
68 /*    DATE              NAME                      DESCRIPTION             */
69 /*                                                                        */
70 /*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
71 /*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
72 /*                                            resulting in version 6.1    */
73 /*                                                                        */
74 /**************************************************************************/
_gx_radial_progress_bar_draw(GX_RADIAL_PROGRESS_BAR * progress_bar)75 VOID  _gx_radial_progress_bar_draw(GX_RADIAL_PROGRESS_BAR *progress_bar)
76 {
77 
78     /* Draw progress bar background.  */
79     _gx_radial_progress_bar_background_draw(progress_bar);
80 
81     /* Draw progress bar text. */
82     if (progress_bar -> gx_widget_style & GX_STYLE_PROGRESS_TEXT_DRAW)
83     {
84         _gx_radial_progress_bar_text_draw(progress_bar);
85     }
86 
87     /* Draw children widgets of progress bar widget.  */
88     _gx_widget_children_draw((GX_WIDGET *)progress_bar);
89 }
90 
91