Re: [AD] native menus

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Wed, Jul 13, 2011 at 6:03 AM, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> I gave some thought to that. Essentially, I think the functions for updating the menus should be part of our view delegate (so in the core), but exposed in a public api to the user through the addon. That way the system menu can be updated when an Allegro window gains focus automatically and we keep our book-keeping in one place. This seems the easiest way to organise things.
>
Would you add core public functions that the addon would make use of
like al_set_osx_app_menu(NSMenu *menu) along with perhaps something
like al_add_osx_menu_callback( func_callback ), or just keep that
private? It seems like the core would have to know a little something
about the addon in order to query which menu to use on display change,
although that too could be via some private callback hook.

For Windows, I was able to keep all knowledge of the addon outside of
core by adding a public function (al_add_win_window_callback) that
intercepts all Windows messages. But that does have a larger use case
outside just setting menus.

--
Matthew Leverton




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/