Re: how to add menus?

From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Sat Apr 27 2002 - 06:30:53 EDT

  • Next message: Andrew Dunbar: "Re: further notes on using Pango"

    OK,
            Well first you need edit the file:

    src/wp/ap/xp/ap_Menu_Id.h

    and invent a name for your menu entry. Choose something that fits in with
    an already existing group. This step defines an identification number for
    your menu item.

    Next edit the file

    src/wp/ap/xp/ap_Menu_LabelSet_en-US.h

    and put your new menu item in there. Give it an English name and a
    tooltip. See how the other menus are defined in the file. The name goes
    first, then the tooltip. This step defines the text associated with your
    menu item.

    Next edit the file

    src/wp/ap/xp/ap_Menu_Layouts_MainMenu.h

    and place your menu item in the location you like. This step puts your
    menu item in a place in the existing menu.

    OK the next steps define what operations your menu will do if selected.

    edit the file:

    src/wp/ap/xp/ap_Menu_ActionSet.cpp and associate your menu item with
    method defined in
    src/wp/ap/xp/ap_EditMethods.cpp. If you look through
    src/wp/ap/xp/ap_Menu_ActionSet.cpp you'll a lot of text inside
    " " marks. That text is the name of an executable function inside
    ap_EditMethods.cpp. To do something useful you'll need to write your own
    ap_EditMethod and put it there.

    Finally there is src/wp/ap/xp/ap_Menu_Functions.cpp. This method controls
    the look of of your item depending on the context of the editting session.
    So whether or not your menu entery is active or grey.

    After this do a make realclean and recompile! If you haven't made a
    mistake it should work.

    To get started you don't need to define a function in
    src/wp/ap/xp/ap_Menu_ActionSet.cpp. Or you could just map your new menu
    item to an existing method in ap_EditMethods.cpp.

    Good Luck!

    Martin

    On Fri, 26 Apr 2002, arvind kidambi wrote:

    > >
    > > Adding a new menu item permanently to the main
    > > abiword menu system is
    > > process which involves changing about 5 different
    > > files. If that is want
    > > you want, let me know and I'll write back to you.
    > >
    > > Keep in touch!
    > >
    > > Martin Sevior
    > >
    > >
    > Dear Martin,
    > I want to permanaently add menus to abiword.Can u tell
    > me how it is to e done?
    > Regards,
    > Arvind Kidambi
    >
    > __________________________________________________
    > Do You Yahoo!?
    > Yahoo! Health - your guide to health and wellness
    > http://health.yahoo.com
    >



    This archive was generated by hypermail 2.1.4 : Sat Apr 27 2002 - 06:33:37 EDT