On Mon, 04 Feb 2019 16:02:08 GMT, Ron Tarrant wrote:
Here's the boiled down code:
Okay, that really wasn't boiled down, but this is:
import std.stdio;
import gtk.MainWindow;
import gtk.Box;
import gtk.Main;
import gtk.Menu;
import gtk.MenuBar;
import gtk.MenuItem;
import gtk.Widget;
import gdk.Event;
void main(string[] args)
{
Main.init(args);
MainWindow testRig = new MainWindow("Title");
Box appBox = new Box(Orientation.VERTICAL, 5);
testRig.add(appBox);
MenuBar menuBar = new MenuBar();
appBox.packStart(menuBar, false, false, 0);
MenuItem header = new MenuItem("File");
menuBar.append(header);
Menu fileMenu = new Menu();
header.setSubmenu(fileMenu);
MenuItem newFileItem = new MenuItem("New");
fileMenu.append(newFileItem);
Menu newFileSubmenu = new Menu();
newFileItem.setSubmenu(newFileSubmenu);
MenuItem dNewFileItem = new MenuItem("D File");
newFileSubmenu.append(dNewFileItem);
testRig.showAll();
Main.run();
} // main()
Also, I'm running this on Windows 10, if that matters.