Example #1
0
File: Test.C Project: juddy/edcde
void TestWindow::Initialize()
{
   MenuBar *mbar;
   Menu *menu;

   mbar = new MenuBar(this);
   container = new Container("PrinterSubSystem", this, "Printers");
   container->WidthHeight(600, 400);
   container->ContainerView(TREE);
   SetWorkWindow(container);

   // File menu
   menu = new Menu(mbar, "File", "F");
     new Button(menu, "Exit", PUSH_BUTTON, ExitCB, this, "x", "ALT+F4");

   // Edit menu
   menu = new Menu(mbar, "Edit", "E");
     new Button(menu, "Cut", PUSH_BUTTON, NULL, NULL, "t", "Shift+Del");
     new Button(menu, "Copy", PUSH_BUTTON, NULL, NULL, "C", "Ctrl+Ins");
     new Button(menu, "Paste", PUSH_BUTTON, NULL, NULL, "P", "Shift+Ins");
     new Button(menu, "Delete", PUSH_BUTTON, NULL, NULL, "D");

   // View menu
   menu = new Menu(mbar, "View", "V");
     new Button(menu, "New", PUSH_BUTTON, NULL, NULL, "N");
     new Sep(menu);
     new Button(menu, "Select All", PUSH_BUTTON, NULL, NULL, "S", "Ctrl+/");
     new Button(menu, "Unselect All", PUSH_BUTTON, NULL, NULL, "U", "Ctrl+\\");
     new Sep(menu);
     new Button(menu, "Set Preferences...", PUSH_BUTTON, NULL, NULL, "P");
     new Sep(menu);
     new Button(menu, "Save Settings...", PUSH_BUTTON, NULL, NULL, "t");

   // Actions Menu
   menu = new Menu(mbar, "Actions", "A");
     new Button(menu, "Monitor", PUSH_BUTTON, NULL, NULL, "M");
     new Button(menu, "Cancel Job", PUSH_BUTTON, NULL, NULL, "C");

   // Help Menu
   menu = new Menu(mbar, "Help", "H");
     new Button(menu, "Introduction", PUSH_BUTTON, NULL, NULL, "I");
     new Sep(menu);
     new Button(menu, "Tasks", PUSH_BUTTON, NULL, NULL, "T");
     new Button(menu, "Reference", PUSH_BUTTON, NULL, NULL, "R");
     new Button(menu, "On Item", PUSH_BUTTON, NULL, NULL, "O");
     new Sep(menu);
     new Button(menu, "Using Help", PUSH_BUTTON, NULL, NULL, "U");
     new Sep(menu);
     new Button(menu, "Version", PUSH_BUTTON, NULL, NULL, "V");
   mbar->SetHelpMenu(menu);

   // Debug menu
   menu = new Menu(mbar, "Debug", "G");
     new Button(menu, "Print Objects", PUSH_BUTTON, PrintObjectsCB, Parent());
     new Button(menu, "Print UI", PUSH_BUTTON, PrintUICB, Parent());

}