terminal/doc
Schuyler Rosefield cf97a9f772
Preliminary work to add Swap Panes functionality (GH Issues 1000, 4922) (#10638)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request
Add functionality to swap a pane with an adjacent (Up/Down/Left/Right) neighbor.

<!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
## References
This work potentially touches on: #1000 #2398 and #4922
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [x] Closes a component of #1000 (partially, comment), #4922 (partially, `SwapPanes` function is added but not hooked up, no detach functionality)
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [x] Tests added/passed
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* [x] Schema updated.
* [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

<!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

Its been a while since I've written C++ code, and it is my first time working on a Windows application. I hope that I have not made too many mistakes.

Work currently done:
- Add boilerplate/infrastructure for argument parsing, hotkeys, event handling
- Adds the `MovePane` function that finds the focused pane, and then tries to find
  a pane that is visually adjacent to according to direction.
- First pass at the `SwapPanes` function that swaps the tree location of two panes
- First working version of helpers `_FindFocusAndNeighbor` and `_FindNeighborFromFocus`
  that search the tree for the currently focused pane, and then climbs back up the tree
  to try to find a sibling pane that is adjacent to it. 
- An `_IsAdjacent' function that tests whether two panes, given their relative offsets, are adjacent to each other according to the direction.

Next steps:
- Once working these functions (`_FindFocusAndNeighbor`, etc) could be utilized to also solve #2398 by updating the `NavigateFocus` function.
- Do we want default hotkeys for the new actions?

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
At this point, compilation and manual testing of functionality (with hotkeys) by creating panes, adding distinguishers to each pane, and then swapping them around to confirm they went to the right location.
2021-07-22 12:53:03 +00:00
..
cascadia Preliminary work to add Swap Panes functionality (GH Issues 1000, 4922) (#10638) 2021-07-22 12:53:03 +00:00
images Run all images through ImgBot (#8169) 2020-11-05 18:03:40 -08:00
reference Fix the spellbot (#8259) 2020-11-13 09:45:08 -08:00
specs Spec for font features and axes of variation (#10457) 2021-07-09 21:01:04 +00:00
user-docs doc: add a link to MSYS2's WT profiles page (#8060) 2020-10-27 13:27:00 -07:00
AddASetting.md Minor grammatical fix (#8603) 2020-12-17 15:12:36 -08:00
bot.md Fix link to Fabric Bot (#9988) 2021-04-30 13:09:22 +00:00
building.md doc, tools: Improve docs around using clang-format with VS (#9782) 2021-04-21 10:51:58 -05:00
ConsoleCtrlEvent.md Fixed typo's and improved consistency. (#704) 2019-05-15 21:02:42 -07:00
ConsoleHostSettings.md Added information on WxH character (#2104) 2019-08-01 08:34:18 -05:00
creating_a_new_project.md Remove all our path antics; force native projects to bin/, obj/ (#8062) 2020-10-27 15:00:41 -07:00
Debugging.md doc: Add debugging notes on DebugBreak (#4163) 2020-01-09 17:56:05 -08:00
EXCEPTIONS.md Code highlighting and capitalization fix for doc/EXCEPTIONS.md (#1283) 2019-06-17 23:41:27 +00:00
feature_flags.md Add support for branch- and branding-based feature flagging (#10361) 2021-06-10 23:09:52 +00:00
Niksa.md Add a "shell vs terminal" section to Niksa.md (#7202) 2020-08-06 16:23:54 -05:00
ORGANIZATION.md Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
STYLE.md Converts Dispatcher().RunAsync to WinRT Coroutines (#4051) 2020-01-10 03:29:49 +00:00
submitting_code.md Prepare for the primary branch name to change to main (#7985) 2020-10-21 17:29:36 -07:00
TAEF.md doc: fix typo in TAEF.md (#10424) 2021-06-14 10:06:01 -07:00
terminal-v1-roadmap.md doc: update roadmap with proper v1 release date (#4860) 2020-03-09 17:04:54 -07:00
terminal-v2-roadmap.md doc/roadmap: add 1.9 Preview Release Blogpost Link (#10518) 2021-06-28 10:36:15 -05:00
UniversalTest.md Fixed typo's and improved consistency. (#704) 2019-05-15 21:02:42 -07:00
virtual-dtors.md Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
WIL.md Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
WindowsTestPasses.md Fixed typo's and improved consistency. (#704) 2019-05-15 21:02:42 -07:00