<commit_before>// ----- Requires ----- //

var gui = require('nw.gui');


// ----- Setup ----- //

var menu = new gui.Menu({ type: 'menubar' });


// ----- Functions ----- //

function buildMacMenu () {
	menu.createMacBuiltin('Didactylos');
}


// ----- Build ----- //

buildMacMenu();
gui.Window.get().menu = menu;<commit_msg>Added scaffolding for file menu.<commit_after>// ----- Requires ----- //

var gui = require('nw.gui');


// ----- Setup ----- //

var menu = new gui.Menu({ type: 'menubar' });


// ----- Functions ----- //

function buildMacMenu () {
	menu.createMacBuiltin('Didactylos');
}

function buildFileNew (fileMenu) {

	var fileNew = new gui.MenuItem({

		label: 'New',
		key: 'n',
		modifiers: 'cmd',
		click: function () {
			gui.Window.open('editor.html', { "toolbar": false });
		}

	});

	fileMenu.append(fileNew);

}

function buildFileOpen (fileMenu) {

	var fileOpen = new gui.MenuItem({

		label: 'Open',
		key: 'o',
		modifiers: 'cmd',
		click: function () {
			
		}

	});

	fileMenu.append(fileOpen);

}

function buildFileSave (fileMenu) {

	var fileSave = new gui.MenuItem({

		label: 'Save',
		key: 's',
		modifiers: 'cmd',
		click: function () {
			
		}

	});

	fileMenu.append(fileSave);

}

function buildFileMenu () {

	var fileMenu = new gui.Menu();

	buildFileNew(fileMenu);
	buildFileOpen(fileMenu);
	buildFileSave(fileMenu);

	return fileMenu;

}

function addFileMenu () {

	var fileMenuContent = buildFileMenu();

	var fileMenu = new gui.MenuItem({
		label: 'File',
		submenu: fileMenuContent
	});

	menu.insert(fileMenu, 1);

}


// ----- Build ----- //

buildMacMenu();
addFileMenu();
gui.Window.get().menu = menu;
{'fraction_non_alphanumeric': 0.2109704641350211, 'fraction_numerical': 0.0006027727546714888, 'mean_word_length': 2.705357142857143, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4275660', 'n_tokens_mistral': 632, 'n_tokens_neox': 575, 'n_words': 121}