Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Using Actions in CB: a discussion

<< < (3/4) > >>

takeshimiya:
If ActionsManager handles the add menu/toolbar items, how one could add another binding such as mouse gestures?
Will it be a way to add new bindings to actions provided by plugins?

thomas:
Do you have code which recognizes mouse gestures?

Urxae:

--- Quote from: Takeshi Miya on December 19, 2005, 09:06:21 pm ---If ActionsManager handles the add menu/toolbar items, how one could add another binding such as mouse gestures?
Will it be a way to add new bindings to actions provided by plugins?

--- End quote ---

Well, given the availability of this:

--- Quote from: mandrav on December 17, 2005, 08:44:47 pm ---Now that actions are registered, you can "launch" an action at any time using ActionsManager::Get()->Launch(action_name).

--- End quote ---
I'd say adding a mouse gestures plugin wouldn't be much harder than:

* Providing a config dialog to allow the user to bind gestures to actions. This assumes of course that plugins are able to obtain a list of the names of currently registered actions from the action manager. Mandrav's post didn't provide examples of this, but if he hasn't implemented it yet it should be fairly trivial to do so, I think
* Detecting when mouse gestures are performed (probably the hardest part).
* Launching the appropriate actions using the action manager, as in above quote.

thomas:
That's why I asked... the rest is really trivial.

Urxae:

--- Quote from: thomas on December 19, 2005, 10:01:34 pm ---That's why I asked... the rest is really trivial.

--- End quote ---

You posted while I was still composing my post, but I didn't want to throw away the entire post just because you beat me ;).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version