[Plib-users] PUI Menubar functionality extensions
Brought to you by:
sjbaker
From: <ra...@EE...> - 2004-08-03 22:55:43
|
Hi, I would like to use such features as menu tabs that have entries which expand rightwards, ie the puPopupMenu's puOneshot will call another puPopupMenu with more options. For example, in internet explorer, the View->Text Size expands rightwards to enable you to select more options. I am having trouble getting the x and y coordinates of the puOneshot which I want to expand rightwards. What I am doing now is calling the GetFirstChild() of the puMenuBar, then searching through the list: while (next!=NULL) { next = next->getNextObject(); ... more code ... } After finding the appropriate object (I check by comparing the legend field to what I want to search for, ie if (strcmp(next->getLegend(), search_legend)==0) break; then I call the next->getPosition() and next->getSize() and calculate the appropriate place to set the puPopupMenu, ie using popup_menu->setPosition(...) Right now the coordinates I am getting back are x=246 and y=-24, I am not sure what kind of coordinate system the PUI lib uses, but the popUpMenu is not appearing in the right place. I am completely new to GLUT, OpenGL, so maybe I have missed something obvious. Any suggestions on what I can do or change to get this functionality? Thanks alot for any help! Rach Liu |