MPLABĀ® Harmony Graphics Suite  GFX v3.13.0
Legato API Documentation
legato_widget_groupbox.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries.
3 *
4 * Subject to your compliance with these terms, you may use Microchip software
5 * and any derivatives exclusively with Microchip products. It is your
6 * responsibility to comply with third party license terms applicable to your
7 * use of third party software (including open source software) that may
8 * accompany Microchip software.
9 *
10 * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
11 * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
12 * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
13 * PARTICULAR PURPOSE.
14 *
15 * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
16 * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
17 * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
18 * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
19 * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
20 * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
21 * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
22 *******************************************************************************/
23 
24 /*******************************************************************************
25  Module for Microchip Graphics Library - Legato User Interface Library
26 
27  Company:
28  Microchip Technology Inc.
29 
30  File Name:
31  legato_widget_groupbox.h
32 
33  Summary:
34 
35 
36  Description:
37  This module implements group box widget functions.
38 *******************************************************************************/
39 
46 #ifndef LEGATO_GROUPBOX_H
47 #define LEGATO_GROUPBOX_H
48 
50 
51 #if LE_GROUPBOX_WIDGET_ENABLED == 1
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
59 
60 // *****************************************************************************
61 // *****************************************************************************
62 // Section: Data Types and Constants
63 // *****************************************************************************
64 // *****************************************************************************
65 
66 /* internal use only */typedef struct leGroupBoxWidget leGroupBoxWidget;
71 
72 #define LE_GROUPBOXWIDGET_VTABLE(THIS_TYPE) \
73  LE_WIDGET_VTABLE(THIS_TYPE) \
74  \
75  leString* (*getString)(const THIS_TYPE* _this); \
76  leResult (*setString)(THIS_TYPE* _this, const leString* str); \
77 
78 typedef struct leGroupBoxWidgetVTable
79 {
80  LE_GROUPBOXWIDGET_VTABLE(leGroupBoxWidget)
81 } leGroupBoxWidgetVTable;
82 
88 // *****************************************************************************
89 /* Enumeration:
90  leGroupBoxWidget
91 
92  Summary:
93  Group box struct definition.
94 
95  Description:
96  A group box is a widget that is similar to a basic panel but provides
97  a line border and title text. Used for grouping and describing widgets
98  of similar function.
99 
100  Remarks:
101  None.
102 */
103 
110 typedef struct leGroupBoxWidget
111 {
112  leWidget widget; // widget base class
113 
114  const leGroupBoxWidgetVTable* fn;
115 
116  const leString* string; // group box title text
117 } leGroupBoxWidget;
118 
119 // *****************************************************************************
120 // *****************************************************************************
121 // Section: Routines
122 // *****************************************************************************
123 // *****************************************************************************
124 
136 leGroupBoxWidget* leGroupBoxWidget_New(void);
137 
148 void leGroupBoxWidget_Constructor(leGroupBoxWidget* box);
149 
150 #ifdef _DOXYGEN_
151 #define THIS_TYPE struct leWidget
152 
163 virtual leString* getString(const leGroupBoxWidget* _this);
164 
165 
179 virtual leResult setString(leGroupBoxWidget* _this,
180  const leString* str);
181 
182 #undef THIS_TYPE
183 #endif
184 
185 #ifdef __cplusplus
186 }
187 #endif
188 
189 #endif // LE_GROUPBOX_WIDGET_ENABLED
190 #endif /* LEGATO_GROUPBOX_H */
Common macros and definitions used by Legato.
This struct represents a string.
Definition: legato_string.h:107
leResult
This enum represents function call results.
Definition: legato_common.h:123
Used to define a widget.
Definition: legato_widget.h:624
Legato widget definitions.
Definition: widget.py:1
Fixed string functions and definitions.