Re: Dynamic Menus


Subject: Re: Dynamic Menus
From: Joaquin Cuenca Abela (cuenca@pacaterie.u-psud.fr)
Date: Sat Sep 15 2001 - 10:02:28 CDT


Martin wrote:
>
> Sorry Joaquin, I don't quite understand you. Jeff explicitly allowed for
new
> methods to be added to the EV_EditMethodContainer using:
>
> UT_Bool EV_EditMethodContainer::addEditMethod(EV_EditMethod * pem)
> {
> UT_ASSERT(pem);
>
> int error = m_vecDynamicEditMethods.addItem(pem);
> return (error == 0);
> }
>
> These can be created on the fly within AbiWord. Why not use this?

That is a way to add a new EV_EditMethod to the container.

The problem is not adding a new EV_EditMethod to the container, but building
EV_EditMethods that do what we want to do (ie, call a function with the
signature

void scriptPlayFunction(const char*)

Of course, without knowing at compilation time what's the const char* that
we should pass).

Show me a way to call one such function from a menu bar in the current
framework, and you will do my day :-)

(btw, one way to do that will be to expand a bit EV_Menu_Action, to take &
store an additional string, and to pass this string in the field m_pData of
EV_EditMethodCallData, but it seems a bit hackier to me to add a new field
to EV_Menu_Action only due to this particular need. Comments?)

Cheers,

--
Joaquin Cuenca Abela
e98cuenc@yahoo.com



This archive was generated by hypermail 2b25 : Sat Sep 15 2001 - 10:01:57 CDT