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

Provide curses ui components and support menu config #155

Closed
waruqi opened this Issue Jan 26, 2018 · 3 comments

Comments

Projects
None yet
1 participant
@waruqi
Member

waruqi commented Jan 26, 2018

I'm implementing menu config based on curses terminal. for example:

$ xmake [f|config] --menu

It automatically gets the options in the project to generate the menu configuration interface to implement the interactive configuration, like make menuconfig based Kconfig

Sources:

Roadmap:

  • cui views
    • core.ui.view
    • core.ui.button
    • core.ui.label
    • core.ui.textarea
    • core.ui.textedit
    • core.ui.menuconf
    • core.ui.choicebox
    • core.ui.window
    • core.ui.statusbar
    • core.ui.menubar
    • core.ui.desktop
  • cui dialogs
    • core.ui.dialog
    • core.ui.textdialog
    • core.ui.inputdialog
    • core.ui.choicedialog
    • core.ui.mconfdialog
  • cui program and applications
    • core.ui.program
    • core.ui.application
    • ui.app.version ($xmake l ui.app.version)
    • ui.app.showfile ($xmake l ui.app.showfile /xxx/file)
  • cui tests
    • $xmake l tests/ui/destop.lua
    • $xmake l tests/ui/window.lua
    • $xmake l tests/ui/dialog.lua
    • $xmake l tests/ui/mconfdialog.lua
  • menu config
    • xmake f --menu
    • project/option api
      • set_category("root menu/sub menu")
      • set_values()
    • search config
    • get config line position in xmake.lua

References:

mconfdialog

@waruqi waruqi added the new feature label Jan 26, 2018

@waruqi waruqi added this to the v2.1.9 milestone Jan 26, 2018

@waruqi waruqi added the in progress label Jan 26, 2018

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi Feb 2, 2018

Member

example:

$ git clone https://github.com/tboox/tbox.git
$ cd tbox
$ xmake f --menu
$ xmake

video

Member

waruqi commented Feb 2, 2018

example:

$ git clone https://github.com/tboox/tbox.git
$ cd tbox
$ xmake f --menu
$ xmake

video

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi Feb 2, 2018

Member

Add config options in menu (xmake.lua):

-- 'boolean' option
option("test1")
    set_default(true)
    set_showmenu(true)
    set_category("root menu/test1")

-- 'choice' option with values: "a", "b", "c"
option("test2")
    set_default("a")
    set_values("a", "b", "c")
    set_showmenu(true)
    set_category("root menu/test2")

-- 'string' option
option("test3")
    set_default("xx")
    set_showmenu(true)
    set_category("root menu/test3/test3")

-- 'number' option
option("test4")
    set_default(6)
    set_showmenu(true)
    set_category("root menu/test4")

configuration menu:

  • root menu
    • test1
    • test2
    • test3
      • test3
    • test4

video3

Member

waruqi commented Feb 2, 2018

Add config options in menu (xmake.lua):

-- 'boolean' option
option("test1")
    set_default(true)
    set_showmenu(true)
    set_category("root menu/test1")

-- 'choice' option with values: "a", "b", "c"
option("test2")
    set_default("a")
    set_values("a", "b", "c")
    set_showmenu(true)
    set_category("root menu/test2")

-- 'string' option
option("test3")
    set_default("xx")
    set_showmenu(true)
    set_category("root menu/test3/test3")

-- 'number' option
option("test4")
    set_default(6)
    set_showmenu(true)
    set_category("root menu/test4")

configuration menu:

  • root menu
    • test1
    • test2
    • test3
      • test3
    • test4

video3

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi Feb 3, 2018

Member

Search configuration:

video2

Member

waruqi commented Feb 3, 2018

Search configuration:

video2

@waruqi waruqi removed the in progress label Feb 3, 2018

@waruqi waruqi closed this Feb 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment