summaryrefslogtreecommitdiff
path: root/include/ui.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ui.h')
-rw-r--r--include/ui.h50
1 files changed, 10 insertions, 40 deletions
diff --git a/include/ui.h b/include/ui.h
index 8570552..d8df105 100644
--- a/include/ui.h
+++ b/include/ui.h
@@ -139,12 +139,7 @@ typedef struct uiWidgetEvent {
139// ----------------------------------------------------------------------------- 139// -----------------------------------------------------------------------------
140// Library. 140// Library.
141 141
142/// Initialize the UI library.
143/// This should be called once during application startup.
144bool uiInit(void); 142bool uiInit(void);
145
146/// Shutdown the UI library.
147/// This should be called once during application shutdown.
148void uiShutdown(void); 143void uiShutdown(void);
149 144
150// ----------------------------------------------------------------------------- 145// -----------------------------------------------------------------------------
@@ -164,65 +159,40 @@ uiTable* uiGetTablePtr(uiPtr ptr);
164// Widget. 159// Widget.
165 160
166uiWidgetType uiWidgetGetType(const uiWidget*); 161uiWidgetType uiWidgetGetType(const uiWidget*);
167 162void uiWidgetSetParent(uiPtr child, uiPtr parent);
168void uiWidgetSetParent(uiPtr child, uiPtr parent);
169 163
170// ----------------------------------------------------------------------------- 164// -----------------------------------------------------------------------------
171// Button. 165// Button.
172 166
173/// Create a button.
174uiButton* uiMakeButton(const char* text); 167uiButton* uiMakeButton(const char* text);
175 168
176// ----------------------------------------------------------------------------- 169// -----------------------------------------------------------------------------
177// Frame. 170// Frame.
178 171
179/// Create a frame.
180uiFrame* uiMakeFrame(void); 172uiFrame* uiMakeFrame(void);
181 173void uiDestroyFrame(uiFrame**);
182/// Destroy the frame. 174void uiResizeFrame(uiFrame*, int width, int height);
183void uiDestroyFrame(uiFrame**); 175uiSize uiGetFrameSize(const uiFrame*);
184
185/// Resize the frame.
186void uiResizeFrame(uiFrame*, int width, int height);
187
188/// Get the frame's dimensions.
189uiSize uiGetFrameSize(const uiFrame*);
190 176
191// ----------------------------------------------------------------------------- 177// -----------------------------------------------------------------------------
192// Label. 178// Label.
193 179
194/// Create a label. 180uiLabel* uiMakeLabel(const char* text);
195uiLabel* uiMakeLabel(const char* text);
196
197/// Return the label's text.
198const char* uiLabelGetText(const uiLabel*); 181const char* uiLabelGetText(const uiLabel*);
199 182
200// ----------------------------------------------------------------------------- 183// -----------------------------------------------------------------------------
201// Table. 184// Table.
202 185
203/// Create a table. 186uiTable* uiMakeTable(int rows, int cols, const char** header);
204uiTable* uiMakeTable(int rows, int cols, const char** header); 187void uiTableClear(uiTable*);
205 188void uiTableAddRow(uiTable*, const char** row);
206/// Clear the table. 189void uiTableSet(uiTable*, int row, int col, uiPtr widget);
207/// This clears the contents, but not the header.
208void uiTableClear(uiTable*);
209
210/// Add a row.
211void uiTableAddRow(uiTable*, const char** row);
212
213/// Set the table's cell.
214void uiTableSet(uiTable*, int row, int col, uiPtr widget);
215
216/// Get the table's cell.
217const uiWidget* uiTableGet(const uiTable*, int row, int col); 190const uiWidget* uiTableGet(const uiTable*, int row, int col);
218 191uiWidget* uiTableGetMut(uiTable*, int row, int col);
219/// Get the table's cell.
220uiWidget* uiTableGetMut(uiTable*, int row, int col);
221 192
222// ----------------------------------------------------------------------------- 193// -----------------------------------------------------------------------------
223// Rendering. 194// Rendering.
224 195
225/// Render the frame.
226void uiRender(const uiFrame*, uiSurface*); 196void uiRender(const uiFrame*, uiSurface*);
227 197
228// ----------------------------------------------------------------------------- 198// -----------------------------------------------------------------------------