From c8ac7ffaf50c1d0daa8a4c339e7e05c7b7a84c0b Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 31 Jul 2015 14:06:48 -0400 Subject: [PATCH] Added planning for new auto layout-based uiBoxes for OS X. --- redo/alboxplan | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 redo/alboxplan diff --git a/redo/alboxplan b/redo/alboxplan new file mode 100644 index 00000000..3561051a --- /dev/null +++ b/redo/alboxplan @@ -0,0 +1,35 @@ +Layout: + + 0123456789ABCDEF0123456789ABCDEF + [edit0 ] + [button0 ][button1 ] + [button2 ][button3 ] + [checkbox0 ][b][b][b] (4, 5, 6) + [l] (label0) + (stretchy space )+-------+ + (stretchy space )| | + (space )[b](space )| area0 | (7) + (stretchy space )| | + (stretchy space )+-------+ + +The visual layout has to be + + H:|[edit0]| + H:|[button0(>=0)][button1(==button0)]| + H:|[button2(>=0)][button3(==button2)]| + H:|[checkbox0(>=0)][button4][button5][button6]| + H:|[label0] (note the lack of trailing |) + H:|->=0-[button7]->=0-[area0]| + V:|[edit0][button0][button2][checkbox0][label0]->=0-[button7]->=0-| + V:|[edit0][button0][button2][checkbox0][label0][area0(>=0)]| (TODO is this one necessary?) + +The problem now is that an empty box has to be represented by something. In the above hand-made example (which I have to test; TODO) we worked around the spaces. How do we do the same in code? + +The lower part of the box above is itself a single box laid out like so + + hbox0: [stretchy vbox0][area0] + vbox0: [stretchy xbox0][hbox2][stretchy xbox1] + hbox2: [stretchy xbox2][button7][stretchy xbox3] + xbox*: [empty box] + +Do we need to start representing empty boxes using NSViews?