contrib/brl/bseg/segv/segv_misc_menus.cxx
Go to the documentation of this file.
00001 #include "segv_misc_menus.h"
00002 //:
00003 // \file
00004 #include <vgui/vgui.h>
00005 #include <vgui/vgui_key.h>
00006 #include <vgui/vgui_menu.h>
00007 #include "segv_misc_manager.h"
00008 
00009 // Static menu callback functions
00010 
00011 void segv_misc_menus::quit_callback()
00012 {
00013   segv_misc_manager::instance()->quit();
00014 }
00015 
00016 
00017 void segv_misc_menus::load_image_callback()
00018 {
00019   segv_misc_manager::instance()->load_image();
00020 }
00021 
00022 void segv_misc_menus::save_image_callback()
00023 {
00024   segv_misc_manager::instance()->save_image();
00025 }
00026 
00027 
00028 void segv_misc_menus::project_on_subm_callback()
00029 {
00030   segv_misc_manager::instance()->project_on_subm();
00031 }
00032 
00033 void segv_misc_menus::project_on_articulation_callback()
00034 {
00035   segv_misc_manager::instance()->project_on_articulation();
00036 }
00037 
00038 //segv_misc_menus definition
00039 vgui_menu segv_misc_menus::get_menu()
00040 {
00041   vgui_menu menubar;
00042   vgui_menu menufile;
00043   vgui_menu menuview;
00044   vgui_menu menuedit;
00045   vgui_menu menuops;
00046   //file menu entries
00047   menufile.add( "Quit", quit_callback,(vgui_key)'q', vgui_CTRL);
00048   menufile.add( "Load Image", load_image_callback,(vgui_key)'l', vgui_CTRL);
00049   menufile.add( "Save Image", save_image_callback);
00050 
00051   //view menu entries
00052   menuview.add("Project On Rotation/Scale  Submanifold", project_on_subm_callback);
00053   menuview.add("Project On Articulation Submanifold", project_on_articulation_callback);
00054 
00055   //edit menu entries
00056 
00057   //operation menu entries
00058 
00059   //Top level menu layout
00060   menubar.add( "File", menufile);
00061   menubar.add( "View", menuview);
00062   menubar.add( "Edit", menuedit);
00063   menubar.add( "Image Ops", menuops);
00064   return menubar;
00065 }
00066