-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow proposing a move in cli #26
Comments
…ich does nothing and cannot be dismissed. Part of #26.
Next step: create modeProposingMove, with various keybindings. Get rid of controller.proposingMove. |
…ine. Removed controller.proposingMove. Part of #26.
Use the Widget pattern? https://github.com/jroimartin/gocui/blob/master/_examples/widgets.go |
InputMode grows a overlayVisible() method, which controller.layout() uses to decide if oerlay is visible (and a overlayName()) Modes also have an overlayContent. Modes need a connection to controller to do this, which implies that they can no longer be global. We also have a set of inputWidgets that are created. We have IntInputs, StringInputs, BoolInputs. They are all separate views. When in that mode, they are created and positioned over top of the proper points in lines(). That way we can handle selecting them and moving between them. |
Have modes instantiae and return a new mode object with the right stuff burned in if it's time to transitition: http://gameprogrammingpatterns.com/state.html |
Next step: disentagle the weird bit where the up/down state has numLines stored in controller. Seems like it should be mode that handles that? It kind of feels like the current mode should just get all events. But gocui doesn't make it easy to register those... Looks like we might have to horrendously hackily use Editor, which gets all key presses. :-/ But then we can't use actual selection of views in gocui and will need to do all of it ourselves. ... Then we're mostly just not using gocui. :-/ |
So the plan is to have the main view have Editor = true and an Editor that really just forwards all key presses to c.mode.handleInput(). Then we never set any other view to be Current, because then the keypresses wouldn't be routed to us. the mode input handles handle getting hte keypresses to do the right thing. |
…structed with a ref to the controller (in the future they will maintain state). InputModes grow a showOverlay(), overlayContent(), and overlayTitle() method. No user-visible change from the refactoring. Part of #26.
…. Quitting is (currently) done via just a panic. Part of #26.
|
…sed to power InputMode.overlayContent(). Part of #26.
… a string with rows delimited by \n. Part of #26.
Use overlayContent.columnWidths in the other overlayContent methods |
…verlaySelectedCell enumeration. Part of #26.
Now the question is how to allow editing of the live cells. Does it operate on a string buffer? How often is that committed back into the model? What key commands move between lines? The easiest way seems to be to always have the value be to burn the value in immediately, and blow away m.Content, forcing it to be re-generated afresh. Another option:
Edit-cell-mode:
|
Obsolete now that #58 is done. Good riddance. |
No description provided.
The text was updated successfully, but these errors were encountered: