{"push_id":1046631677,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"431b7a970c66d9aff45e8ce00a1d0dfdbe897909","before":"e94b8a95696001768854f5b0e71a9d3a358c02a9","commits":[{"sha":"431b7a970c66d9aff45e8ce00a1d0dfdbe897909","author":{"email":"8e8d53a40ebcc30f7db1178aeb2b8d0827d789ab@gmail.com","name":"Without Boats"},"message":"Subdividable screens.\n\nIntroduce a layer of indirection between `Terminal` and `CharGrid`,\nusing the `Screen` type, which allows a `Terminal` to contain multiple\n`CharGrids` in different sections of the visible screen.\n\nPrior to this commit, a single `Terminal` contained a stack of\n`CharGrid`s, which each filled the entire size of the `Terminal` window.\n\nNow, a single `Terminal` contains a single `Screen`, which is divided\ninto `ScreenSection`s. Each `ScreenSection` is a rectangular section of\nthe screen. They are formed by splitting an existing section into two\nalong a horizontal or vertical axis. This means that the relationship\nbetween sections that exist is always a binary tree. Each\n`ScreenSection` has an unsigned 64-bit tag. One section is identified as\nthe 'active section' - commands that apply to the `CharGrid` are applied\nto the grid contained in this section.\n\nEach section contains a non-empty stack of `Panel`s. A `Panel` can take\none of two forms: either it contains a `CharGrid`, or it is split into\ntwo parts, each of which contains a `ScreenSection`. As a result, there\nis a mutually recursive relationship between the definition of\n`ScreenSection` and `Panel`, which allows for considerable flexibility\nin adjusting the layout screen, while still maintaining a certain level\nof restraint.\n\nThis commit and its associated commit to notty-encoding add or modify\nseveral commands to the notty protocol:\n\n* __PUSH BUFFER__ is now __PUSH PANEL__, and takes as an argument the\ntag of the screen section being pushed to. If no argument is passed, a\npanel is pushed to the active section. The panel that is pushed always\ncontains a single character grid. It also takes a boolean argument,\nwhich determines whether or not the grid retains offscreen data as it\nscrolls.\n* __POP BUFFER__ is now __POP PANEL__, and also takes as an argument the\ntag of screen section to pop from. If no argument is passed, the top\npanel of the active section is popped. A stack with 1 member cannot be\npopped from.\n* __SPLIT PANEL__ describes splitting a panel into two. It takes\narguments defining the axis and position of the split, which panel the\ncontents should be saved to, how resizing of child sections should be\nhandled, and whether or not the grid in the new panel should retain\noffscreen data as it scrolls. Panels which are already split *can* be\nsplit again; the existing split sections are resized into the\nidentified saved sections.\n* __UNSPLIT PANEL__ describes removing the split from a panel. It takes\nan argument identifying which of the two sections in this panel should\nbe saved. The stack of the saved section will be pushed to the top of\nthe section this panel is on top of; the stack of the unsaved section\nwill be destroyed.\n* __ADJUST PANEL SPLIT__ allows an existing split panel's split to be\nmoved or adjusted. It takes arguments defining the axis and position of\nthe split, and how resizing of the child sections should be handled. It\nperforms no action it the section's top is a unsplit panel.\n* __ROTATE SECTION DOWN__ rotates down the stack, putting the top of\nthe stack on the bottom.\n* __ROTATE SECTION UP__ rotates up the stack, putting the bottom of the\nstack on the top.\n* __SWITCH ACTIVE SECTION__ switches which section is active. It will\nonly perform a switch if the top panel of the target section is a single\ncharacter grid.","distinct":true,"url":"https://api.github.com/repos/withoutboats/notty/commits/431b7a970c66d9aff45e8ce00a1d0dfdbe897909"}]}