]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
1) added padding and anchors for grids
authorewt <ewt>
Thu, 11 Sep 1997 18:53:06 +0000 (18:53 +0000)
committerewt <ewt>
Thu, 11 Sep 1997 18:53:06 +0000 (18:53 +0000)
2) added newtComponentTakesFocus()

newt.h

diff --git a/newt.h b/newt.h
index cb844d95f87aad04ff6228a5f3d5f5fc6ac9609f..567353b5b11eac7b314746e1151916fbe85c6601 100644 (file)
--- a/newt.h
+++ b/newt.h
@@ -181,6 +181,7 @@ newtComponent newtScale(int left, int top, int width, long long fullValue);
 void newtScaleSet(newtComponent co, unsigned long long amount);
 
 void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
+void newtComponentTakesFocus(newtComponent co, int val);
 
 /* this also destroys all of the components (including other forms) on the 
    form */
@@ -219,13 +220,23 @@ void newtFormDestroy(newtComponent form);
 #define NEWT_KEY_F11                   NEWT_KEY_EXTRA_BASE + 111
 #define NEWT_KEY_F12                   NEWT_KEY_EXTRA_BASE + 112
 
+#define NEWT_ANCHOR_LEFT               (1 << 0)
+#define NEWT_ANCHOR_RIGHT              (1 << 1)
+#define NEWT_ANCHOR_TOP                        (1 << 2)
+#define NEWT_ANCHOR_BOTTOM             (1 << 3)
+
+#define NEWT_GRID_FLAG_GROWX           (1 << 0)
+#define NEWT_GRID_FLAG_GROWY           (1 << 1)
+
 typedef struct grid_s * newtGrid;
 enum newtGridElement { NEWT_GRID_EMPTY = 0,
                       NEWT_GRID_COMPONENT, NEWT_GRID_SUBGRID };
 
 newtGrid newtCreateGrid(int cols, int rows);
 void newtGridSetField(newtGrid grid, int col, int row, 
-                     enum newtGridElement type, void * val);
+                     enum newtGridElement type, void * val, int padLeft,
+                     int padTop, int padRight, int padBottom, int anchor,
+                     int flags);
 void newtGridPlace(newtGrid grid, int left, int top);
 void newtGridFree(newtGrid grid, int recurse);