Results 1 to 3 of 3

Thread: creation and manage of push down and pull up menus in open GL application

  1. #1
    Guest

    creation and manage of push down and pull up menus in open GL application

    sir,
    I am developing a GUI based open-GL editor based application for displaying of plots with text. In this application, I would like to know how to create pull down menus and dialogue boxes in a application. Please let me know the source code or procedure to construct.
    bhasker.
    Please mail me at : "bhaskart@isac.ernet.in"

  2. #2
    Member Contributor
    Join Date
    Jun 2003
    Location
    Blacksburg, VA 24060, USA
    Posts
    59

    Re: creation and manage of push down and pull up menus in open GL application


  3. #3
    Senior Member Regular Contributor
    Join Date
    Oct 2002
    Location
    San Diego, CA, USA
    Posts
    209

    Re: creation and manage of push down and pull up menus in open GL application

    Please, the forum is here not only to answer your question for you, but to also make the answer available to the rest of the world (which may be very interested).

    As to the answer to your question, I use glRect()s in an ortho view. For a pull down menu, you need a menu bar up top. When a user clicks, you know where that user clicked, so if it is on the menu bar, you "show" a menu. Here it may be useful for you to know a decent mechanism for "showing". Suppose you have a "window manager" class with a linked list of "components" being drawn. These components may be windows with their own components in them, or may be strange things like pulled-down menus or menubars. When a menu is clicked, it just sticks it's "pulled down menu" component into that list. When an item is selected or somehow the menu is "shut up" then you remove the item from the list.

    An alternative technique would be to have the window manager draw the menubar. The menubar "draws" each menu. If the menu is pulled down (by virtue of a boolean variable in the menu class) then it draws the entire menu in its pulled down state.

    After a bit of head scratching, Im sure you'll be good at creating window components in OpenGL. It didn't take long for me to understand the Tao of Window components :P

Similar Threads

  1. push and pull
    By Hengasch in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-25-2013, 11:57 AM
  2. Pop up menus in open GL
    By havyck in forum OpenGL: Windows
    Replies: 0
    Last Post: 11-04-2005, 06:58 PM
  3. sample open max application
    By vineeth in forum OpenMAX
    Replies: 0
    Last Post: 06-22-2005, 03:55 AM
  4. application creation
    By alf in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 05-14-2004, 10:02 PM
  5. Why I need pop and push in open gl
    By MOON-GIRL in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-16-2002, 08:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean