I am using x
/motif
for the GUI. I have context menus which pop up when right-clicking a certain area.
When the right-click is too close to the right edge of the display, and therefore the menu itself is too close to the display edge, the sub-menus do not have enough room to pull out next to the primary menu. In this situation, when the sub-menus do not have any more room to the right, they start taking up the same space as the primary menu. This makes the menu system difficult to use close to the right edge of the display.
I have seen people ask this question for other UI systems, such as for web design, but I cannot find anything about it for x
/motif
. I am experimenting right now to see if it is possible or reasonable to display the menu somewhere other than the location clicked (ex: you click near the edge of display, the menu shows up X number of pixels to the left of where it normally would, so there's still space), but I am not sure if that will work out, and making the cascade menus cascade out to the left in this situation would be preferable to such a workaround.
I have checked many places on the web and have checked in the Motif Programming Manual and the Motif Reference Manual. If it's there, I haven't found it.
I am hoping for a resource to set with XtVaSetValues
, or something similar, so that I can do something like the following:
XtVaSetValues(menu, XmNsomething, please_go_left, NULL);
Is this something that is reasonable, or even possible at all, to do with the resources available (ie: without creating an entirely custom menu system to reinvent the wheel)?
The question: How do I cascade a context menu's sub-menus to the left instead of having them attempt to pop out to the right when too close to the edge of the display?