Well, since the Yahoo! Widget Engine is just Konfabulator, you'd just be playing with XML and JavaScript (and images).
Imrik:
Take a look at the onContextMenu attribute for the widgets. You can use it to add items to the context menu, and I imagine you can suppress the default context menu and have onContextMenu show a custom one.
You'll also want to make use of the Filesystem object- specifically, check out filesystem.open(). It should come in handy.
Take a look at Butler for contextual menus. Its fully customizable in terms of its usability. The only thing its lacking is you can't alter the background graphic which just uses the default right click graphic.