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 /** Multi Line Text View Management (Multi Line Text View) */
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_multi_line_text_view.h"
30 #include "gx_scrollbar.h"
31 #include "gx_window.h"
32
33 /**************************************************************************/
34 /* */
35 /* FUNCTION RELEASE */
36 /* */
37 /* _gx_multi_line_text_view_font_set PORTABLE C */
38 /* 6.1 */
39 /* AUTHOR */
40 /* */
41 /* Kenneth Maxwell, Microsoft Corporation */
42 /* */
43 /* DESCRIPTION */
44 /* */
45 /* This service sets the font of a multi-line text view widget. */
46 /* */
47 /* */
48 /* INPUT */
49 /* */
50 /* text_view Multi-line text view widget */
51 /* control block */
52 /* font_id Resource ID for the font */
53 /* */
54 /* OUTPUT */
55 /* */
56 /* status Completion status */
57 /* */
58 /* CALLS */
59 /* */
60 /* _gx_window_scrollbar_find Find scrollbar for a window */
61 /* _gx_scrollbar_reset Reset scrollbar information */
62 /* _gx_multi_line_text_view_line_cache_update */
63 /* Update line cache */
64 /* _gx_system_dirty_mark Mark a widget as dirty */
65 /* */
66 /* CALLED BY */
67 /* */
68 /* Application Code */
69 /* */
70 /* RELEASE HISTORY */
71 /* */
72 /* DATE NAME DESCRIPTION */
73 /* */
74 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
75 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
76 /* resulting in version 6.1 */
77 /* */
78 /**************************************************************************/
_gx_multi_line_text_view_font_set(GX_MULTI_LINE_TEXT_VIEW * text_view,GX_RESOURCE_ID font_id)79 UINT _gx_multi_line_text_view_font_set(GX_MULTI_LINE_TEXT_VIEW *text_view, GX_RESOURCE_ID font_id)
80 {
81 text_view -> gx_multi_line_text_view_font_id = font_id;
82 text_view -> gx_multi_line_text_view_line_index_old = GX_TRUE;
83
84 if (text_view -> gx_widget_status & GX_STATUS_VISIBLE)
85 {
86 _gx_system_dirty_mark((GX_WIDGET *)text_view);
87 }
88 return(GX_SUCCESS);
89 }
90
91