Version 3 of Meb

Updated 2012-06-17 07:02:03 by Stu

Meb - Menu Builder

Directions to find it at Stu


Stu 2012-06-17 Meb 0.1
Meb is a menu builder that employs the same philosophy as Gub:

  • Require learning the least amount of new syntax as possible.
  • Leverage Tk options.
  • Take care of the drudgery part of gui building.
  • Generate Tcl code.

Highlights:

  • Generates Tcl code to create menus.
  • Takes care of the less important aspects of menu creation.
  • Simple layout, one item per line.
  • Indent determines level, one space per level.
  • Tk options start at first '-' after label text.
  • Auto underline using '&'.
  • Cascades determined my indent (level).
  • Checkbuttons,radiobuttons determined by -variable option.
  • Auto command.
  • Namespace for commands and variables.
  • Separator is any string of '-' and/or '='
  • MebTool, a command-line and gui utility.

$ cat example3.mob             
# Meb example 3 - simple

&File
 &Load
 &Save
 &New
 -
 E&xit

&Help
 &About
 &Readme

$ mebtool example3.mob  
menu .m -tearoff 0
.m add cascade -label File -underline 0 -menu [menu .m.m0 -tearoff 0]
.m.m0 add command -label Load -underline 0 -command ::fileLoad
.m.m0 add command -label Save -underline 0 -command ::fileSave
.m.m0 add command -label New -underline 0 -command ::fileNew
.m.m0 add separator
.m.m0 add command -label Exit -underline 1 -command ::fileExit
.m add cascade -label Help -underline 0 -menu [menu .m.m1 -tearoff 0]
.m.m1 add command -label About -underline 0 -command ::helpAbout
.m.m1 add command -label Readme -underline 0 -command ::helpReadme