Comments (7)
Maybe I understand. Currently ncurses-st-menu doesn't share any logic with application, and implementation of check boxes or options are implemented outside like in post_menu https://github.com/okbob/pspg/blob/master/src/menu.c. It is designed to be minimalistic.
Probably it should not be too hard to implement new option ST_MENU_OPTION_MARKED_REF
and function st_menu_set_option_ref(menu, cmd_BoldLabelsToggle, ST_MENU_OPTION_MARKED_REF, int *ref);
I have little bit problem with triple state values - because for every state I have to know drawing style.
from ncurses-st-menu.
Probably it should not be too hard to implement new option
ST_MENU_OPTION_MARKED_REF
and functionst_menu_set_option_ref(menu, cmd_BoldLabelsToggle, ST_MENU_OPTION_MARKED_REF, int *ref);
Sounds very nice!
I have little bit problem with triple state values - because for every state I have to know drawing style.
For option fields the triple state would just mean to draw no option as chosen (I suggest to always allow this initially and optionally provide a way to toggle to the third state by choosing the the chosen option again).
For checkboxes: yes, you'd need to know the drawing style, the default could be [x]
for marked, [ ]
for unchecked and something like[o]
for triple state.
Thank you for considering this FR.
from ncurses-st-menu.
Currently checks or switch are printed with same style with "✔". Because it is a menu, I am not sure if some wider image is good idea. I try to keep st-menu be minimalistic with very small overhead. Used symbol like "✔" can be changed by style configuration, but I prefer one char only - it can be UNICODE wide char, but only one char.
from ncurses-st-menu.
you can look on branch https://github.com/okbob/ncurses-st-menu/tree/external_states
from ncurses-st-menu.
I changed default symbols in style file - the boxes are not well readable.
from ncurses-st-menu.
Looks nice; a little space between those options and its text would be good.
I guess the options can have a shortcut, too.
I suggest to add the new control types in the demo + screenshots (ideally also for the popup).
from ncurses-st-menu.
from ncurses-st-menu.
Related Issues (9)
- reserved identifier violation HOT 13
- Selections not working from mouse HOT 3
- NetBSD failure to build HOT 9
- SDL2 support? HOT 1
- Remove unnecessary null pointer checks HOT 3
- compiling demo HOT 1
- Use as popup-menu (context-menu) HOT 6
- remove autogen + configure-generated files HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ncurses-st-menu.