diff --git a/webview-frontend.cpp b/webview-frontend.cpp
index ac2fc90..67c7b0a 100644
--- a/webview-frontend.cpp
+++ b/webview-frontend.cpp
@@ -1,8 +1,10 @@
 #include <iostream>
 #include <stdio.h>
+#include <string.h>
 #include "webview/webview.h"
 #include "nlohmann/json.hpp"
 #include "bundle-webview-js.h"
+#include "webview/menu.h"
 
 using json = nlohmann::json;
 
@@ -13,6 +15,7 @@
 extern char log_buffer[4096];
 extern char *log_buffer_ptr;
 
+webview::webview *wp;
 
 std::string convert(std::string arg) {
 	std::cout << "Params: " << arg << std::endl;
@@ -35,24 +38,72 @@
     return std::string("<div id=app></div><script>") + std::string((const char *)bundle_webview_js, bundle_webview_js_len) + std::string("</script>");
 }
 
-#ifdef WIN32
-int WINAPI WinMain(HINSTANCE hInt, HINSTANCE hPrevInst, LPSTR lpCmdLine,
-                   int nCmdShow) {
-#else
-int main() {
-#endif
+std::string copy(std::string j) {
+	std::cout << "copy called " << j << '\n';
+	return "undefined";
+}
+
+void callback(const char *ev) {
+	std::cout << "menu event " << ev << "\n";
+	std::string_view str = ev;
+
+    if (str == "copy") {
+		wp->eval("document.execCommand('copy');");
+	} else if (str == "cut") {
+		wp->eval("document.execCommand('cut');");
+	} else if (str == "paste") {
+		wp->eval("document.execCommand('paste');");
+	} else if (str == "close") {
+		exit(0);
+	} else if (str == "undo") {
+		wp->eval("document.execCommand('undo');");
+	} else if (str == "redo") {
+		wp->eval("document.execCommand('redo');");
+	} else if (str == "select_all") {
+		wp->eval("document.execCommand('selectAll');");
+	}
+}
+
+
+extern char g_argv_0[128];
+
+int main(int argc, char **argv) {
+    strlcpy(g_argv_0, argv[0], 128);
     // cookie_io_functions_t iofns = {NULL};
     // iofns.cookie_write_function_t = writer;
     //
     // stdout = fopencookie(NULL, "r", iofns);
     
     try {
-        webview::webview w(false, nullptr);
+        webview::webview w(true, nullptr);
+		wp = &w;
         w.set_title("Units");
-        w.set_size(480, 320, WEBVIEW_HINT_NONE);
+        w.set_size(480, 320, WEBVIEW_HINT_MIN);
         w.bind("convert", convert);
+		w.bind("copy", copy);
+		w.eval("window.webview = {};");
         w.set_html(get_html());
         // w.navigate("http://localhost:8000/index-webview.html");
+
+		webview_menu_item menu[] = {
+				{0, "File", "", ""},
+				{1, "Open", "C-o", "open"},
+				{1, "Save", "C-s", "save"},
+				{1, "New", "C-n", "new"},
+				{1, "-"},
+				{1, "Close Window", "C-w", "close"},
+				{0, "Edit", "", ""},
+                {1, "Undo", "C-z", "undo"},
+                {1, "Redo", "CS-z", "redo"},
+                {1, "-"},
+				{1, "Cut", "C-x", "cut"},
+				{1, "Copy", "C-c", "copy"},
+                {1, "Paste", "C-v", "paste"},
+                {1, "Select All", "C-a", "select_all"},
+		};
+
+		webview_set_menu(sizeof(menu) / sizeof(menu[0]), menu, callback);
+
         w.run();
     } catch (const webview::exception &e) {
         std::cerr << e.what() << std::endl;
