Hello,
This a question for those with better knowledge of gschem internals.
I see where system-gschemrc defines all of the menus, but what I'm
wondering is if it is possible to write a callback entirely within
scheme. In other words I want to have my gschemrc load my own scheme
file which will have something like:
(define my:menu-items
;;
;; menu item name menu action menu hotkey action
;;
'( ("About..." my-about my-about)
("Manual..." my-manual my-manual)
("MyMenuItem..." my-menuitem my-menuitem)
)
)
(add-menu "MyMenu" my:menu-items)
but I want to write the my-about, my-manual, my-menuitem actions in
scheme.
Anyone know if this is possible with the current gschem or what it might
take to be able to do this?
I'm thinking it might be useful to link in with guile-gtk too so users
could hook in gui stuff into their own menu choices.
Any suggestions?
Where I'm going with this is I want to have a standalone scheme file
which if loaded, puts gschem into "pcb mode" where you get an extra menu
with things like "run gsch2pcb" or "launch pcb" or (eventually)
"backannotate". By adding some hooks into gschem I've been able to
actually have a gschem session talk to a pcb session and do some cross
probing (i.e. select an element in the schematic and have it
automatically be selected in layout) but for it to work smoothly I
really could use the customizable menu stuff I'm asking about here.
By isolating all pcb related stuff into a pcb scheme file, I'm hoping we
could support other modes like "spice mode" where you'd have a menu for
spice stuff or "cascade mode" where you'd have a menu for cascade designs.
-Dan