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 /** Progress Bar Management (Progress Bar) */
19 /** */
20 /**************************************************************************/
21
22 #define GX_SOURCE_CODE
23
24 /* Include necessary system files. */
25
26 #include "gx_api.h"
27 #include "gx_context.h"
28 #include "gx_widget.h"
29 #include "gx_canvas.h"
30 #include "gx_utility.h"
31 #include "gx_progress_bar.h"
32
33 /**************************************************************************/
34 /* */
35 /* FUNCTION RELEASE */
36 /* */
37 /* _gx_progress_bar_draw PORTABLE C */
38 /* 6.1 */
39 /* AUTHOR */
40 /* */
41 /* Kenneth Maxwell, Microsoft Corporation */
42 /* */
43 /* DESCRIPTION */
44 /* */
45 /* This service draws the specified progress bar. */
46 /* */
47 /* INPUT */
48 /* */
49 /* progress_bar Progress Bar control block */
50 /* */
51 /* OUTPUT */
52 /* */
53 /* None */
54 /* */
55 /* CALLS */
56 /* */
57 /* _gx_widget_border_draw Draw border */
58 /* _gx_context_pixelmap_get Retrieve pixelmap image */
59 /* _gx_widget_client_get Find the client area of a */
60 /* widget */
61 /* _gx_canvas_pixelmap_tile Tile a pixelmap */
62 /* _gx_widget_width_get Find width of a widget */
63 /* _gx_context_fill_color_set Set the draw context fill */
64 /* color */
65 /* _gx_widget_children_draw Draw children widgets */
66 /* */
67 /* CALLED BY */
68 /* */
69 /* Application Code */
70 /* GUIX Internal Code */
71 /* */
72 /* RELEASE HISTORY */
73 /* */
74 /* DATE NAME DESCRIPTION */
75 /* */
76 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
77 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
78 /* resulting in version 6.1 */
79 /* */
80 /**************************************************************************/
_gx_progress_bar_draw(GX_PROGRESS_BAR * progress_bar)81 VOID _gx_progress_bar_draw(GX_PROGRESS_BAR *progress_bar)
82 {
83 /* Draw progress bar background. */
84 _gx_progress_bar_background_draw(progress_bar);
85
86 /* Draw text on the progress bar widget. */
87 if (progress_bar -> gx_widget_style & GX_STYLE_PROGRESS_TEXT_DRAW)
88 {
89 _gx_progress_bar_text_draw(progress_bar);
90 }
91
92 /* Draw children widgets of progress bar widget. */
93 _gx_widget_children_draw((GX_WIDGET *)progress_bar);
94 }
95
96