I made a spike solution for alternative action for contextmenu. Look at the
attachment.
I don't want keyboard to be involved.
On mouse left click, it shows contextmenu icon for short time (200ms seems fine
for me), then disappears. When you move mouse over, contextmenu appears.
Any comments, suggestions and ideas are welcome.
Ian Horst
Philippe Poulard wrote:
> Ian Horst a �crit :
>> I use "CTRL + MOUSE LEFT CLICK" as alternative for mouse right click for
>> contextmenu.
>
> Good suggestion.
> Thanks !
>
>> I'm still looking for better solution.
>>
>> Ian Horst
>>
>
/* ************************************************************************
Copyright:
License:
Authors:
************************************************************************ */
/* ************************************************************************
#asset(qtest3/*)
************************************************************************ */
/**
* This is the main application class of your custom application "qtest3"
*/
qx.Class.define("qtest3.Application",
{
extend : qx.application.Standalone,
/*
*****************************************************************************
MEMBERS
*****************************************************************************
*/
members :
{
/**
* This method contains the initial application code and gets called
* during startup of the application
*/
main : function()
{
// Call super class
this.base(arguments);
// Enable logging in debug variant
if (qx.core.Variant.isSet("qx.debug", "on"))
{
// support native logging capabilities, e.g. Firebug for Firefox
qx.log.appender.Native;
// support additional cross-browser console. Press F7 to toggle
visibility
qx.log.appender.Console;
}
var root = this.getRoot();
var menu = new qx.ui.menu.Menu;
for (var i = 0; i < 5; i++)
menu.add(new qx.ui.menu.Button(new String(i)));
root.add(menu);
var menuIcon = new qx.ui.popup.Popup(new qx.ui.layout.Grow);
menuIcon.add(new qx.ui.basic.Atom("M"));
var hideIcon = function (e)
{
qx.event.Timer.once(menuIcon.hide, menuIcon, 200);
}
menuIcon.addListener("appear", hideIcon);
var showMenu = function (e)
{
menu.placeToWidget(menuIcon);
menuIcon.hide();
menu.show();
}
menuIcon.addListener("mouseover", showMenu);
var alternative2 = function (e)
{
menuIcon.moveTo(e.getDocumentLeft()+5,
e.getDocumentTop()-5);
menuIcon.show();
}
var container = new qx.ui.container.Composite(new
qx.ui.layout.HBox);
var layer2 = new qx.ui.basic.Atom("Alternate contextmenu");
layer2.setWidth(200);
layer2.setHeight(200);
layer2.setBackgroundColor("white");
layer2.setContextMenu(menu);
layer2.addListener("click", alternative2);
container.add(layer2);
root.add(container);
}
}
});
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel