summaryrefslogtreecommitdiff
path: root/textscreen/txt_strut.h
diff options
context:
space:
mode:
Diffstat (limited to 'textscreen/txt_strut.h')
-rw-r--r--textscreen/txt_strut.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/textscreen/txt_strut.h b/textscreen/txt_strut.h
index 7d9e7650..8436aa9c 100644
--- a/textscreen/txt_strut.h
+++ b/textscreen/txt_strut.h
@@ -22,15 +22,18 @@
#ifndef TXT_STRUT_H
#define TXT_STRUT_H
+/**
+ * Strut widget.
+ *
+ * A strut is a widget that takes up a fixed amount of space. It can
+ * be visualised as a transparent box. Struts are used to provide
+ * spacing between widgets.
+ */
+
typedef struct txt_strut_s txt_strut_t;
#include "txt_widget.h"
-//
-// A strut is used to force a table to a minimum width/height. It is not
-// visible but it takes up space.
-//
-
struct txt_strut_s
{
txt_widget_t widget;
@@ -38,6 +41,13 @@ struct txt_strut_s
int height;
};
+/**
+ * Create a new strut.
+ *
+ * @param width Width of the strut, in characters.
+ * @param height Height of the strut, in characters.
+ */
+
txt_strut_t *TXT_NewStrut(int width, int height);
#endif /* #ifndef TXT_STRUT_H */