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 |
|
|
/** Progress Bar Management (Radial 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_radial_progress_bar.h" |
32 |
|
|
|
33 |
|
|
/**************************************************************************/ |
34 |
|
|
/* */ |
35 |
|
|
/* FUNCTION RELEASE */ |
36 |
|
|
/* */ |
37 |
|
|
/* _gx_radial_progress_bar_draw PORTABLE C */ |
38 |
|
|
/* 6.1 */ |
39 |
|
|
/* AUTHOR */ |
40 |
|
|
/* */ |
41 |
|
|
/* Kenneth Maxwell, Microsoft Corporation */ |
42 |
|
|
/* */ |
43 |
|
|
/* DESCRIPTION */ |
44 |
|
|
/* */ |
45 |
|
|
/* This service draws a radial progress bar. */ |
46 |
|
|
/* */ |
47 |
|
|
/* INPUT */ |
48 |
|
|
/* */ |
49 |
|
|
/* progress_bar Radial Progress Bar control */ |
50 |
|
|
/* block */ |
51 |
|
|
/* */ |
52 |
|
|
/* OUTPUT */ |
53 |
|
|
/* */ |
54 |
|
|
/* None */ |
55 |
|
|
/* */ |
56 |
|
|
/* CALLS */ |
57 |
|
|
/* */ |
58 |
|
|
/* _gx_radial_progress_bar_background_draw */ |
59 |
|
|
/* _gx_radial_progress_bar_text_draw */ |
60 |
|
|
/* _gx_widget_children_draw */ |
61 |
|
|
/* */ |
62 |
|
|
/* CALLED BY */ |
63 |
|
|
/* */ |
64 |
|
|
/* Application Code */ |
65 |
|
|
/* GUIX Internal Code */ |
66 |
|
|
/* */ |
67 |
|
|
/**************************************************************************/ |
68 |
|
6180 |
VOID _gx_radial_progress_bar_draw(GX_RADIAL_PROGRESS_BAR *progress_bar) |
69 |
|
|
{ |
70 |
|
|
|
71 |
|
|
/* Draw progress bar background. */ |
72 |
|
6180 |
_gx_radial_progress_bar_background_draw(progress_bar); |
73 |
|
|
|
74 |
|
|
/* Draw progress bar text. */ |
75 |
✓✓ |
6180 |
if (progress_bar -> gx_widget_style & GX_STYLE_PROGRESS_TEXT_DRAW) |
76 |
|
|
{ |
77 |
|
4067 |
_gx_radial_progress_bar_text_draw(progress_bar); |
78 |
|
|
} |
79 |
|
|
|
80 |
|
|
/* Draw children widgets of progress bar widget. */ |
81 |
|
6180 |
_gx_widget_children_draw((GX_WIDGET *)progress_bar); |
82 |
|
6180 |
} |
83 |
|
|
|