On Mon, 17 Apr 2006, bulia byak wrote:
Absolutely. The test is simple: if a user may ever want to assign a key to the command or have it in the menu, it should be a verb. Also, if any other vector editor has a key for a similar action or has it in a menu, make it a verb as well.
I like this. What functions aren't verbs that should be? Seems we have a ton of verbs...
They extract it from the action itself in one of the *::perform functions in verb.cpp. For example:
void EditVerb::perform(SPAction *action, void *data, void *pdata) {
I'd like to mention here that I really don't like that we have a few subclasses of Verb with case statements in the perform functions. I did this (so I can bitch about it) mostly so that the diff when I changed everything to C++ would be understandable. But, with new verbs, I would strongly encourage them getting their own subclass of Verb if possible.
As and interesting side note (I've been meaning to mention, but keep forgetting, so I might as well now) all Effects have verbs. So, if someone is editing the menus or keybindings you should be able to just use the extension ID (ie org.inkscape.effect.bluredge) as the Verb ID to put it somewhere. I imagine this might be most useful for emulating other apps, where their standard functionality or keypress is implemented as an effect.
--Ted