diff options
Diffstat (limited to 'src/saffron_layout.c')
| -rw-r--r-- | src/saffron_layout.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/saffron_layout.c b/src/saffron_layout.c index cc91246..c714bfa 100644 --- a/src/saffron_layout.c +++ b/src/saffron_layout.c @@ -23,4 +23,19 @@ SaffronBox* saffron_box_new(SaffronOrientation orientation, SaffronHorizontalAli return box; } +void saffron_box_layout(SaffronBox* box) { + if (!box || ((SaffronWidget*)box)->child_count == 0) return; + int content_x = ((SaffronWidget*)box)->x + box->margin; + int content_y = ((SaffronWidget*)box)->y + box->margin; + int content_w = ((SaffronWidget*)box)->w - (box->margin * 2); + int content_h = ((SaffronWidget*)box)->h - (box->margin * 2); + + int inner_x = content_x + box->padding; + int inner_y = content_y + box->padding; + int inner_w = content_w - (box->padding * 2); + int inner_h = content_h - (box->padding * 2); + + /* TODO actually make it layout */ + return; +} |
