Algorithmic Solutions > LEDA > LEDA Guide > Windows and Panels > Panel Buttons > Example Menu Bar

Example Menu Bar

The following program generates a window with menu buttons in default style (if W.make_menu_bar() is not used) or in menu bar style (with W.make_menu_bar()).

Below there are screenshots of the program. Clicking on the pictures shows the windows in original size.

Picture of Convex Hull

Default Style

Picture of Convex Hull

Menu Bar Style

#include <LEDA/graphics/window.h>
#include <LEDA/graphics/menu.h>

using namespace leda;

int main() 
{
  menu M;
  M.button("button 1"); M.button("button 2"); M.button("button 3");
  M.button("button 4"); M.button("button 5");

  window W(300,100,"Menu Demo");
  W.button("File",M); W.button("Edit",M); W.button("Help",M);
  W.button("exit");

  //W.make_menu_bar();
		
  W.display();

  W.screenshot("menu_bar_default");

  W.read_mouse();

  return 0;
}

See also:

Panel Buttons

Windows and Panels

Panel Items


Manual Pages:

Manual Page Windows




Please send any suggestions, comments or questions to leda@algorithmic-solutions.com
© Copyright 2001-2003, Algorithmic Solutions Software GmbH