core/vgui/impl/glut/vgui_glut_popup_impl.h
Go to the documentation of this file.
00001 // This is core/vgui/impl/glut/vgui_glut_popup_impl.h
00002 #ifndef vgui_glut_popup_impl_h_
00003 #define vgui_glut_popup_impl_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 // .NAME vgui_glut_popup_impl
00008 // .LIBRARY vgui-glut
00009 // .INCLUDE vgui/impl/glut/vgui_glut_popup_impl.h
00010 // .FILE vgui_glut_popup_impl.cxx
00011 // @author fsm
00012 
00013 #include <vgui/vgui_menu.h>
00014 
00015 struct vgui_glut_popup_impl
00016 {
00017   int menu_id;  // GLUT menu id of this popup_impl.
00018 
00019   vgui_glut_popup_impl();
00020   ~vgui_glut_popup_impl();
00021 
00022   // clear the popup_impl. why is this public?
00023   void clear();
00024 
00025   // build a glut menu from a vgui_menu.
00026   // does not affect which menu is current.
00027   void build(vgui_menu const &m);
00028 
00029  private:
00030   static void command_func(int value);
00031 
00032   vcl_vector<void*> subs; // list of pointers to popup_impls allocated by this popup_impl.
00033   vgui_menu tmp_menu;     // see build_internal().
00034 
00035   void build_internal(vgui_menu const &m);
00036 };
00037 
00038 #endif // vgui_glut_popup_impl_h_