commit | 622c8d5de12f264e496e8d4664a2eea9333922d0 | [log] [tgz] |
---|---|---|
author | brianosman <brianosman@google.com> | Tue May 10 06:50:49 2016 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Tue May 10 06:50:49 2016 -0700 |
tree | 6c548356f43ad6675d944c85d729200687e73261 | |
parent | 3622a17291ccddcb073275e50a8711bf61b7bf27 [diff] |
Add flexible keybinding/command system to sk_app. Viewer demonstrates use: Just create an instance of CommandSet, register with the window, and add commands. Hopefully, we can keep all commands in one place, and get some nice side-benefits. With this framework, if you want to add a new command, you are only required to add code in ONE place. And you get added to the help screen, for free. CommandSet automatically binds 'h' to cycle through the help modes. (Functional grouping is most useful for general use, but the other mode is nice to know what a key does, or to find an unused key for a new feature). Grouped by function: https://screenshot.googleplex.com/G5h3f52wFKu.png Alphabetical by key: https://screenshot.googleplex.com/nZiopabLKJ6.png BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955293002 Review-Url: https://codereview.chromium.org/1955293002