Re: [AD] native menus

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


On 06/29/2011 03:41 PM, Matthew Leverton wrote:
> On Sun, Jun 19, 2011 at 3:42 PM, Matthew Leverton <meffer@xxxxxxxxxx> wrote:
>> Attached is a sample implementation of native system menus for
>> Windows. I put it in the native dialog addon and updated the
>> native_file_chooser example. The API is functional, but not complete:
>>
> I've written up a proposal at:
>
> http://wiki.allegro.cc/index.php?title=Native_Menu_Propsoal
>
> I'll implement it for Windows, which will take care of most of the
> dirty work. Linux and OS X would just have to fill in the specific OS
> functionality when a menu is created, updated, or deleted.

Implementation question: if you remove a menu do the existing indicies
remain valid?

m = create_menu();
append_item(m); // has index 0
append_item(m); // index 1
append_item(m); // index 2
remove_item(1);

Does the 3rd item added still have index 2 or is it reshuffled to item 1?

And what exactly are the semantics of insert_item?
a) insert before (thus all existing indicies are invalidated)
b) insert after (invalidate indicies)
c) replace whatever is at the current index




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