Product: Application Framework
          Type: changed
         Title: Extended UNO AWT menu API
     Posted by: [email protected]
      Affected: toolkit framework svtools
         TaskId: i96390
<http://www.openoffice.org/issues/show_bug.cgi?id=96390>
Effective from: CWS fwk95
           CWS:
<http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300/fwk95>
    CWS status: ready for QA


*Flags*
-------
API/ BASIC [ ]
Configuration [ ]
File format change [ ]
Help/ Guide [ ]
Performance test [ ]
Translation [ ]
UI relevant [ ]


*Description*
-------------
The current UNO AWT menu API lacks of several features available by
VCL, which are important from an extension developer's point of view.
With the following we work have been enhanced this API, by extending
it with new interfaces. Special thanks to Ariel Constenla Haile for
the effort and work.

+ com.sun.star.awt.XPopupMenuExtended

interface XPopupMenuExtended
{
    interface ::com::sun::star::awt::XPopupMenu;
    interface ::com::sun::star::awt::XMenuExtended2;

    boolean isInExecute();
    void endExecute();
    
    void setLogo( [in] ::com::sun::star::awt::MenuLogo aMenuLogo );
    ::com::sun::star::awt::MenuLogo getLogo();
    
    void enableAutoMnemotics( [in] boolean bEnable );
    
    void setAcceleratorKeyEvent( [in] short nItemId, [in]
::com::sun::star::awt::KeyEvent aKeyEvent )
        raises ( ::com::sun::star::container::NoSuchElementException );
    ::com::sun::star::awt::KeyEvent getAcceleratorKeyEvent( [in] short
nItemId         raises (
::com::sun::star::container::NoSuchElementException );

    void setHelpText( [in] short nItemId, [in] string sHelpText )
        raises ( ::com::sun::star::container::NoSuchElementException );
    string getHelpText( [in] short nItemId )
        raises ( ::com::sun::star::container::NoSuchElementException );
    
    void setTipHelpText( [in] short nItemId, [in] string sTipHelpText )
        raises ( ::com::sun::star::container::NoSuchElementException );
    string getTipHelpText( [in] short nItemId )
        raises ( ::com::sun::star::container::NoSuchElementException );

    void setItemImage(      [in] short nItemId,
                            [in] ::com::sun::star::graphic::XGraphic
xGraphic,
                            [in] boolean bScale )
        raises ( ::com::sun::star::container::NoSuchElementException );
    ::com::sun::star::graphic::XGraphic getItemImage( [in] short nItemId )
        raises ( ::com::sun::star::container::NoSuchElementException );

    void setItemImageAngle( [in] short nItemId, [in] long nAngle )
        raises ( ::com::sun::star::container::NoSuchElementException );
    long getItemImageAngle( [in] short nItemId )
        raises ( ::com::sun::star::container::NoSuchElementException );

    void setItemImageMirrorMode( [in] short nItemId, [in] boolean
bMirror )
        raises ( ::com::sun::star::container::NoSuchElementException );
    boolean isItemImageInMirrorMode( [in] short nItemId )
        raises ( ::com::sun::star::container::NoSuchElementException );
};

+com.sun.star.awt.XMenuExtended2 

interface XMenuExtended2
{
    interface com::sun::star::awt::XMenuExtended;
    interface com::sun::star::awt::XMenu;

    boolean isPopupMenu();
    void clear();
    ::com::sun::star::awt::MenuItemType getItemType( [in] short nItemPos )
        raises ( ::com::sun::star::container::NoSuchElementException );
    void hideDisabledEntries( [in] boolean bHide );
};

+ com.sun.star.awt.XMenuBarExtended

interface XMenuBarExtended
{
    interface com::sun::star::awt::XMenuExtended2;
    interface com::sun::star::awt::XMenuBar;
};

+ com.sun.star.awt.MenuItemType

enum MenuItemType
{
    DONTKNOW,
    STRING,
    IMAGE,
    STRINGIMAGE,
    SEPARATOR
};

+ com.sun.star.awt.MenuLogo

struct MenuLogo
{
    ::com::sun::star::graphic::XGraphic Graphic;
    ::com::sun::star::util::Color StartColor;
    ::com::sun::star::util::Color EndColor;
};

You can find a detailed description about the methods and interfaces
via the specification URL and the IDL files.

*Specification URL*
-------------------
http://wiki.services.openoffice.org/wiki/User:Arielch/Menu_API_Enhancement


Send feedback to [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to