/*************************************************************************** * Copyright (c) 2024 Microsoft Corporation * * This program and the accompanying materials are made available under the * terms of the MIT License which is available at * https://opensource.org/licenses/MIT. * * SPDX-License-Identifier: MIT **************************************************************************/ /**************************************************************************/ /**************************************************************************/ /** */ /** GUIX Component */ /** */ /** Widget Management (Widget) */ /** */ /**************************************************************************/ #define GX_SOURCE_CODE /* Include necessary system files. */ #include "gx_api.h" #include "gx_context.h" #include "gx_widget.h" /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _gx_widget_text_id_draw PORTABLE C */ /* 6.1 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This function draws text over a widget given a text id. */ /* */ /* INPUT */ /* */ /* widget Widget control block */ /* tColor Text Color */ /* fColor Text fill color */ /* font_id Font Id */ /* text_id Text Id */ /* x_offset Drawing position adjustment */ /* y_offset Drawing position adjustment */ /* */ /* OUTPUT */ /* */ /* None */ /* */ /* CALLS */ /* */ /* _gx_context_string_get Retrieve the text string */ /* _gx_widget_text_draw Draw text on canvas */ /* */ /* CALLED BY */ /* */ /* GUIX Internal Code */ /* */ /* RELEASE HISTORY */ /* */ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ /* */ /**************************************************************************/ VOID _gx_widget_text_id_draw(GX_WIDGET *widget, UINT tColor, UINT font_id, UINT text_id, INT x_offset, INT y_offset) { GX_STRING string; /* Get string. */ _gx_context_string_get_ext(text_id, &string); if (string.gx_string_ptr) { /* Draw text. */ _gx_widget_text_draw_ext(widget, tColor, font_id, &string, x_offset, y_offset); } }