diff --git a/GUI/Electron/.gitignore b/GUI/Electron/.gitignore
new file mode 100644
index 0000000..b512c09
--- /dev/null
+++ b/GUI/Electron/.gitignore
@@ -0,0 +1 @@
+node_modules
\ No newline at end of file
diff --git a/GUI/Electron/index.html b/GUI/Electron/index.html
new file mode 100644
index 0000000..682a2da
--- /dev/null
+++ b/GUI/Electron/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ Hello World!
+
+
+ Title:
+
+
+
+
\ No newline at end of file
diff --git a/GUI/Electron/main.js b/GUI/Electron/main.js
new file mode 100644
index 0000000..8ebefed
--- /dev/null
+++ b/GUI/Electron/main.js
@@ -0,0 +1,62 @@
+const { app, BrowserWindow, ipcMain } = require('electron')
+const path = require('node:path')
+
+function createWindow () {
+ const mainWindow = new BrowserWindow({
+ webPreferences: {
+ preload: path.join(__dirname, 'preload.js')
+ }
+ })
+
+ ipcMain.on('set-title', (event, title) => {
+ const webContents = event.sender
+ const win = BrowserWindow.fromWebContents(webContents)
+ win.setTitle(title)
+ })
+
+ mainWindow.loadFile('index.html')
+}
+
+app.whenReady().then(() => {
+ createWindow()
+
+ app.on('activate', function () {
+ if (BrowserWindow.getAllWindows().length === 0) createWindow()
+ })
+})
+
+app.on('window-all-closed', function () {
+ if (process.platform !== 'darwin') app.quit()
+})
+
+
+// const { app, BrowserWindow, ipcMain, dialog } = require('electron')
+// const path = require('node:path')
+
+// async function handleFileOpen() {
+// const { canceled, filePaths } = await dialog.showOpenDialog()
+// if (!canceled) {
+// return filePaths[0]
+// }
+// }
+
+// function createWindow() {
+// const mainWindow = new BrowserWindow({
+// webPreferences: {
+// preload: path.join(__dirname, 'preload.js')
+// }
+// })
+// mainWindow.loadFile('index.html')
+// }
+
+// app.whenReady().then(() => {
+// ipcMain.handle('dialog:openFile', handleFileOpen)
+// createWindow()
+// app.on('activate', function () {
+// if (BrowserWindow.getAllWindows().length === 0) createWindow()
+// })
+// })
+
+// app.on('window-all-closed', function () {
+// if (process.platform !== 'darwin') app.quit()
+// })
\ No newline at end of file
diff --git a/GUI/Electron/package-lock.json b/GUI/Electron/package-lock.json
new file mode 100644
index 0000000..6e934a2
--- /dev/null
+++ b/GUI/Electron/package-lock.json
@@ -0,0 +1,904 @@
+{
+ "name": "gui",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "gui",
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "fs": "^0.0.1-security",
+ "path": "^0.12.7"
+ },
+ "devDependencies": {
+ "electron": "^27.0.4"
+ }
+ },
+ "node_modules/@electron/get": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.3.tgz",
+ "integrity": "sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^4.1.1",
+ "env-paths": "^2.2.0",
+ "fs-extra": "^8.1.0",
+ "got": "^11.8.5",
+ "progress": "^2.0.3",
+ "semver": "^6.2.0",
+ "sumchecker": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "global-agent": "^3.0.0"
+ }
+ },
+ "node_modules/@sindresorhus/is": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
+ "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/is?sponsor=1"
+ }
+ },
+ "node_modules/@szmarczak/http-timer": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz",
+ "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==",
+ "dev": true,
+ "dependencies": {
+ "defer-to-connect": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@types/cacheable-request": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz",
+ "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==",
+ "dev": true,
+ "dependencies": {
+ "@types/http-cache-semantics": "*",
+ "@types/keyv": "^3.1.4",
+ "@types/node": "*",
+ "@types/responselike": "^1.0.0"
+ }
+ },
+ "node_modules/@types/http-cache-semantics": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz",
+ "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==",
+ "dev": true
+ },
+ "node_modules/@types/keyv": {
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz",
+ "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "18.18.9",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.9.tgz",
+ "integrity": "sha512-0f5klcuImLnG4Qreu9hPj/rEfFq6YRc5n2mAjSsH+ec/mJL+3voBH0+8T7o8RpFjH7ovc+TRsL/c7OYIQsPTfQ==",
+ "dev": true,
+ "dependencies": {
+ "undici-types": "~5.26.4"
+ }
+ },
+ "node_modules/@types/responselike": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz",
+ "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/yauzl": {
+ "version": "2.10.3",
+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz",
+ "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/boolean": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz",
+ "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==",
+ "dev": true,
+ "optional": true
+ },
+ "node_modules/buffer-crc32": {
+ "version": "0.2.13",
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
+ "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/cacheable-lookup": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",
+ "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10.6.0"
+ }
+ },
+ "node_modules/cacheable-request": {
+ "version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz",
+ "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==",
+ "dev": true,
+ "dependencies": {
+ "clone-response": "^1.0.2",
+ "get-stream": "^5.1.0",
+ "http-cache-semantics": "^4.0.0",
+ "keyv": "^4.0.0",
+ "lowercase-keys": "^2.0.0",
+ "normalize-url": "^6.0.1",
+ "responselike": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/clone-response": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",
+ "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==",
+ "dev": true,
+ "dependencies": {
+ "mimic-response": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/decompress-response": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
+ "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
+ "dev": true,
+ "dependencies": {
+ "mimic-response": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/decompress-response/node_modules/mimic-response": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
+ "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/defer-to-connect": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
+ "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/define-data-property": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz",
+ "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "get-intrinsic": "^1.2.1",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/define-properties": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
+ "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "define-data-property": "^1.0.1",
+ "has-property-descriptors": "^1.0.0",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/detect-node": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",
+ "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==",
+ "dev": true,
+ "optional": true
+ },
+ "node_modules/electron": {
+ "version": "27.0.4",
+ "resolved": "https://registry.npmjs.org/electron/-/electron-27.0.4.tgz",
+ "integrity": "sha512-ob29rN1mtiyAXzF8HsHd5jh8bYKd9OQDakfdOExi0F7epU97gXPHaj6JPjbBJ/vpki5d32SyKVePW4vxeNZk1A==",
+ "dev": true,
+ "hasInstallScript": true,
+ "dependencies": {
+ "@electron/get": "^2.0.0",
+ "@types/node": "^18.11.18",
+ "extract-zip": "^2.0.1"
+ },
+ "bin": {
+ "electron": "cli.js"
+ },
+ "engines": {
+ "node": ">= 12.20.55"
+ }
+ },
+ "node_modules/end-of-stream": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
+ "dev": true,
+ "dependencies": {
+ "once": "^1.4.0"
+ }
+ },
+ "node_modules/env-paths": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
+ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/es6-error": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
+ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
+ "dev": true,
+ "optional": true
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "dev": true,
+ "optional": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/extract-zip": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^4.1.1",
+ "get-stream": "^5.1.0",
+ "yauzl": "^2.10.0"
+ },
+ "bin": {
+ "extract-zip": "cli.js"
+ },
+ "engines": {
+ "node": ">= 10.17.0"
+ },
+ "optionalDependencies": {
+ "@types/yauzl": "^2.9.1"
+ }
+ },
+ "node_modules/fd-slicer": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
+ "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
+ "dev": true,
+ "dependencies": {
+ "pend": "~1.2.0"
+ }
+ },
+ "node_modules/fs": {
+ "version": "0.0.1-security",
+ "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
+ "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w=="
+ },
+ "node_modules/fs-extra": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
+ "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=6 <7 || >=8"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "dev": true,
+ "optional": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz",
+ "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "function-bind": "^1.1.2",
+ "has-proto": "^1.0.1",
+ "has-symbols": "^1.0.3",
+ "hasown": "^2.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-stream": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
+ "dev": true,
+ "dependencies": {
+ "pump": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/global-agent": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz",
+ "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "boolean": "^3.0.1",
+ "es6-error": "^4.1.1",
+ "matcher": "^3.0.0",
+ "roarr": "^2.15.3",
+ "semver": "^7.3.2",
+ "serialize-error": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=10.0"
+ }
+ },
+ "node_modules/global-agent/node_modules/semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/globalthis": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz",
+ "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "define-properties": "^1.1.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
+ "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "get-intrinsic": "^1.1.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/got": {
+ "version": "11.8.6",
+ "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz",
+ "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==",
+ "dev": true,
+ "dependencies": {
+ "@sindresorhus/is": "^4.0.0",
+ "@szmarczak/http-timer": "^4.0.5",
+ "@types/cacheable-request": "^6.0.1",
+ "@types/responselike": "^1.0.0",
+ "cacheable-lookup": "^5.0.3",
+ "cacheable-request": "^7.0.2",
+ "decompress-response": "^6.0.0",
+ "http2-wrapper": "^1.0.0-beta.5.2",
+ "lowercase-keys": "^2.0.0",
+ "p-cancelable": "^2.0.0",
+ "responselike": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10.19.0"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/got?sponsor=1"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+ "dev": true
+ },
+ "node_modules/has-property-descriptors": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz",
+ "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "get-intrinsic": "^1.2.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
+ "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",
+ "dev": true,
+ "optional": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "dev": true,
+ "optional": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz",
+ "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/http-cache-semantics": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
+ "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
+ "dev": true
+ },
+ "node_modules/http2-wrapper": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz",
+ "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==",
+ "dev": true,
+ "dependencies": {
+ "quick-lru": "^5.1.1",
+ "resolve-alpn": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=10.19.0"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw=="
+ },
+ "node_modules/json-buffer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
+ "dev": true
+ },
+ "node_modules/json-stringify-safe": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
+ "dev": true,
+ "optional": true
+ },
+ "node_modules/jsonfile": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+ "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
+ "dev": true,
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/keyv": {
+ "version": "4.5.4",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
+ "dev": true,
+ "dependencies": {
+ "json-buffer": "3.0.1"
+ }
+ },
+ "node_modules/lowercase-keys": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
+ "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/matcher": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
+ "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "escape-string-regexp": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/mimic-response": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
+ "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "node_modules/normalize-url": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
+ "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "dev": true,
+ "optional": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/p-cancelable": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",
+ "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path": {
+ "version": "0.12.7",
+ "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
+ "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==",
+ "dependencies": {
+ "process": "^0.11.1",
+ "util": "^0.10.3"
+ }
+ },
+ "node_modules/pend": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
+ "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
+ "dev": true
+ },
+ "node_modules/process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
+ "engines": {
+ "node": ">= 0.6.0"
+ }
+ },
+ "node_modules/progress": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/pump": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+ "dev": true,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ }
+ },
+ "node_modules/quick-lru": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
+ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/resolve-alpn": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",
+ "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",
+ "dev": true
+ },
+ "node_modules/responselike": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz",
+ "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==",
+ "dev": true,
+ "dependencies": {
+ "lowercase-keys": "^2.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/roarr": {
+ "version": "2.15.4",
+ "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz",
+ "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "boolean": "^3.0.1",
+ "detect-node": "^2.0.4",
+ "globalthis": "^1.0.1",
+ "json-stringify-safe": "^5.0.1",
+ "semver-compare": "^1.0.0",
+ "sprintf-js": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/semver-compare": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
+ "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==",
+ "dev": true,
+ "optional": true
+ },
+ "node_modules/serialize-error": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",
+ "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "type-fest": "^0.13.1"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/sprintf-js": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
+ "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==",
+ "dev": true,
+ "optional": true
+ },
+ "node_modules/sumchecker": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",
+ "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^4.1.0"
+ },
+ "engines": {
+ "node": ">= 8.0"
+ }
+ },
+ "node_modules/type-fest": {
+ "version": "0.13.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
+ "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
+ "dev": true,
+ "optional": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "5.26.5",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
+ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
+ "dev": true
+ },
+ "node_modules/universalify": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
+ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/util": {
+ "version": "0.10.4",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
+ "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
+ "dependencies": {
+ "inherits": "2.0.3"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true,
+ "optional": true
+ },
+ "node_modules/yauzl": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
+ "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
+ "dev": true,
+ "dependencies": {
+ "buffer-crc32": "~0.2.3",
+ "fd-slicer": "~1.1.0"
+ }
+ }
+ }
+}
diff --git a/GUI/Electron/package.json b/GUI/Electron/package.json
new file mode 100644
index 0000000..6da0e9b
--- /dev/null
+++ b/GUI/Electron/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "gui",
+ "version": "1.0.0",
+ "description": "",
+ "main": "main.js",
+ "scripts": {
+ "start": "electron .",
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "",
+ "license": "ISC",
+ "devDependencies": {
+ "electron": "^27.0.4"
+ },
+ "dependencies": {
+ "fs": "^0.0.1-security",
+ "path": "^0.12.7"
+ }
+}
diff --git a/GUI/Electron/preload.js b/GUI/Electron/preload.js
new file mode 100644
index 0000000..e957e40
--- /dev/null
+++ b/GUI/Electron/preload.js
@@ -0,0 +1,12 @@
+const { contextBridge, ipcRenderer } = require('electron')
+
+contextBridge.exposeInMainWorld('electronAPI', {
+ setTitle: (title) => ipcRenderer.send('set-title', title)
+})
+
+
+// const { contextBridge, ipcRenderer } = require('electron')
+
+// contextBridge.exposeInMainWorld('electronAPI', {
+// openFile: () => ipcRenderer.invoke('dialog:openFile')
+// })
\ No newline at end of file
diff --git a/GUI/Electron/renderer.js b/GUI/Electron/renderer.js
new file mode 100644
index 0000000..94b99c0
--- /dev/null
+++ b/GUI/Electron/renderer.js
@@ -0,0 +1,14 @@
+const setButton = document.getElementById('btn')
+const titleInput = document.getElementById('title')
+setButton.addEventListener('click', () => {
+ const title = titleInput.value
+ window.electronAPI.setTitle(title)
+})
+
+// const btn = document.getElementById('btn')
+// const filePathElement = document.getElementById('filePath')
+
+// btn.addEventListener('click', async () => {
+// const filePath = await window.electronAPI.openFile()
+// filePathElement.innerText = filePath
+// })
\ No newline at end of file
diff --git a/GUI/nana.cpp b/GUI/nana.cpp
new file mode 100644
index 0000000..2443601
--- /dev/null
+++ b/GUI/nana.cpp
@@ -0,0 +1,14 @@
+#include
+#include
+
+int main()
+{
+ using namespace nana;
+ form fm;
+ fm.caption(L"Hello, World!");
+ button btn(fm, rectangle{20, 20, 150, 30});
+ btn.caption(L"Quit");
+ btn.events().click(API::exit);
+ fm.show();
+ exec();
+}
\ No newline at end of file
diff --git a/GUI/nana/any.hpp b/GUI/nana/any.hpp
new file mode 100644
index 0000000..a6e28ce
--- /dev/null
+++ b/GUI/nana/any.hpp
@@ -0,0 +1,160 @@
+/**
+ * Any
+ * Nana C++ Library(http://www.nanapro.org)
+ * Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com)
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * @file nana/any.hpp
+ *
+ * @brief An implementation of experimental library any of C++ standard(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4480.html#any)
+ */
+
+#ifndef NANA_ANY_HPP
+#define NANA_ANY_HPP
+#include
+#include
+#include
+
+#include "c++defines.hpp"
+
+namespace nana
+{
+
+ class bad_any_cast
+ : public std::bad_cast
+ {
+ };
+
+ class any
+ {
+ class content_interface
+ {
+ public:
+ virtual ~content_interface() = default;
+
+ virtual const std::type_info& type() const noexcept = 0;
+ virtual content_interface* clone() const = 0;
+ };
+
+ template
+ class holder : public content_interface
+ {
+ holder& operator=(const holder&) = delete;
+ public:
+ holder(const Value& other)
+ : value(other)
+ {}
+
+ holder(Value&& other)
+ : value(static_cast(other))
+ {}
+ public:
+ const std::type_info& type() const noexcept override
+ {
+ return typeid(Value);
+ }
+
+ content_interface* clone() const override
+ {
+ return new holder(value);
+ }
+ public:
+ Value value; //representation accessible for friend of any
+ };
+ public:
+ //constructors and destructor
+ any() noexcept;
+
+ any(const any& other);
+ any(any&& other) noexcept;
+
+ template
+ any(Value && value,
+ typename std::enable_if::value>::type * = nullptr,
+ typename std::enable_if::value>::type* = nullptr)
+ : content_(new holder::type>(std::forward(value)))
+ {
+ }
+
+ ~any();
+
+ //assignments
+ any& operator=(const any& other);
+ any& operator=(any&& other) noexcept;
+
+ template
+ any& operator=(Value&& other)
+ {
+ any(std::forward(other)).swap(*this);
+ return *this;
+ }
+
+ //modifiers
+ void clear() noexcept;
+ void swap(any& other) noexcept;
+
+ //observers
+ bool empty() const noexcept;
+ const std::type_info& type() const noexcept;
+ private:
+ template
+ friend Value* any_cast(any*) noexcept;
+ private:
+ content_interface * content_;
+ };
+
+ // Non-member functions
+ inline void swap(any& x, any& y) noexcept
+ {
+ x.swap(y);
+ }
+
+ template
+ Value any_cast(const any& operand)
+ {
+ using value_type = typename std::remove_reference::type;
+ return any_cast(const_cast(operand));
+ }
+
+ template
+ Value any_cast(any& operand)
+ {
+ using value_type = typename std::remove_reference::type;
+
+ auto value_ptr = any_cast(&operand);
+ if (!value_ptr)
+ throw bad_any_cast();
+
+ using ref_type = typename std::conditional::value, Value, typename std::add_lvalue_reference::type>::type;
+ return static_cast(*value_ptr);
+ }
+
+ template
+ Value any_cast(any && operand)
+ {
+ static_assert(std::is_rvalue_reference::value || std::is_const::type>::value, "nana::any_cast shall not be used for getting non-const reference to temporary objects");
+ return any_cast(operand);
+ }
+
+ template
+ const Value* any_cast(const any* operand) noexcept
+ {
+ return any_cast(const_cast(operand));
+ }
+
+ template
+ Value* any_cast(any* operand) noexcept
+ {
+ if (!operand)
+ return nullptr;
+
+ auto holder = dynamic_cast::type>*>(operand->content_);
+ return (holder ? &holder->value : nullptr);
+ }
+
+}//end namespace nana
+
+#endif
diff --git a/GUI/nana/audio/detail/audio_device.hpp b/GUI/nana/audio/detail/audio_device.hpp
new file mode 100644
index 0000000..768a957
--- /dev/null
+++ b/GUI/nana/audio/detail/audio_device.hpp
@@ -0,0 +1,64 @@
+#ifndef NANA_AUDIO_DETAIL_AUDIO_DEVICE_HPP
+#define NANA_AUDIO_DETAIL_AUDIO_DEVICE_HPP
+
+#include
+
+#ifdef NANA_ENABLE_AUDIO
+
+#include
+#include
+#if defined(NANA_WINDOWS)
+ #include
+#elif defined(NANA_LINUX)
+ #include
+#elif defined(NANA_POSIX)
+ #include
+#endif
+
+namespace nana{ namespace audio
+{
+ namespace detail
+ {
+ class audio_device
+ {
+ public:
+ audio_device();
+ ~audio_device();
+
+ bool empty() const;
+ bool open(std::size_t channels, std::size_t rate, std::size_t bits_per_sample);
+ void close();
+ void prepare(buffer_preparation & buf_prep);
+ void write(buffer_preparation::meta * m);
+ void wait_for_drain() const;
+ private:
+#if defined(NANA_WINDOWS)
+ static void __stdcall _m_dev_callback(HWAVEOUT handle, UINT msg, audio_device * self, DWORD_PTR, DWORD_PTR);
+#endif
+
+#if defined(NANA_WINDOWS)
+ HWAVEOUT handle_;
+ std::recursive_mutex queue_lock_;
+ std::vector done_queue_;
+#elif defined(NANA_LINUX)
+ snd_pcm_t * handle_;
+ std::size_t rate_;
+ std::size_t channels_;
+ std::size_t bytes_per_sample_;
+ std::size_t bytes_per_frame_;
+#elif defined(NANA_POSIX)
+ int handle_;
+ int rate_;
+ int channels_;
+ int bytes_per_sample_;
+ int bytes_per_frame_;
+#endif
+ buffer_preparation * buf_prep_;
+ };
+
+ }//end namespace detail
+}//end namespace audio
+}//end namespace nana
+
+#endif //NANA_ENABLE_AUDIO
+#endif
diff --git a/GUI/nana/audio/detail/audio_stream.hpp b/GUI/nana/audio/detail/audio_stream.hpp
new file mode 100644
index 0000000..6b0a56a
--- /dev/null
+++ b/GUI/nana/audio/detail/audio_stream.hpp
@@ -0,0 +1,86 @@
+#ifndef NANA_AUDIO_DETAIL_AUDIO_STREAM_HPP
+#define NANA_AUDIO_DETAIL_AUDIO_STREAM_HPP
+
+#include
+
+#ifdef NANA_ENABLE_AUDIO
+
+#include
+
+namespace nana{ namespace audio{
+ namespace detail
+ {
+ namespace wave_spec
+ {
+ #if defined(NANA_WINDOWS)
+ #pragma pack(1)
+ struct master_riff_chunk
+ {
+ unsigned ckID; //"RIFF"
+ unsigned cksize;
+ unsigned waveID; //"WAVE"
+ };
+
+ struct format_chunck
+ {
+ unsigned ckID; //"fmt "
+ unsigned cksize;
+ unsigned short wFormatTag;
+ unsigned short nChannels;
+ unsigned nSamplePerSec;
+ unsigned nAvgBytesPerSec;
+ unsigned short nBlockAlign;
+ unsigned short wBitsPerSample;
+ };
+ #pragma pack()
+ #elif defined(NANA_POSIX)
+ struct master_riff_chunk
+ {
+ unsigned ckID; //"RIFF"
+ unsigned cksize;
+ unsigned waveID; //"WAVE"
+ }__attribute__((packed));
+
+ struct format_chunck
+ {
+ unsigned ckID; //"fmt "
+ unsigned cksize;
+ unsigned short wFormatTag;
+ unsigned short nChannels;
+ unsigned nSamplePerSec;
+ unsigned nAvgBytesPerSec;
+ unsigned short nBlockAlign;
+ unsigned short wBitsPerSample;
+ }__attribute__((packed));
+ #endif
+ }
+
+ class audio_stream
+ {
+ struct chunck
+ {
+ unsigned ckID;
+ unsigned cksize;
+ };
+ public:
+ bool open(const std::string& file);
+ void close();
+ bool empty() const;
+ const wave_spec::format_chunck & format() const;
+ std::size_t data_length() const;
+ void locate();
+ std::size_t read(void * buf, std::size_t len);
+ private:
+ std::size_t _m_locate_chunck(unsigned ckID);
+ private:
+ std::ifstream fs_;
+ wave_spec::format_chunck ck_format_;
+ std::size_t pcm_data_pos_;
+ std::size_t pcm_data_size_;
+ std::size_t data_size_;
+ }; //end class audio_stream
+ }
+}//end namespace audio
+}//end namespace nana
+#endif //NANA_ENABLE_AUDIO
+#endif
diff --git a/GUI/nana/audio/detail/buffer_preparation.hpp b/GUI/nana/audio/detail/buffer_preparation.hpp
new file mode 100644
index 0000000..7272d9b
--- /dev/null
+++ b/GUI/nana/audio/detail/buffer_preparation.hpp
@@ -0,0 +1,71 @@
+#ifndef NANA_AUDIO_DETAIL_BUFFER_PREPARATION_HPP
+#define NANA_AUDIO_DETAIL_BUFFER_PREPARATION_HPP
+#include
+
+#ifdef NANA_ENABLE_AUDIO
+
+#include
+
+#if defined(STD_THREAD_NOT_SUPPORTED)
+ #include
+ #include
+ #include
+#else
+ #include
+ #include
+ #include
+#endif
+
+#include
+#include
+
+#if defined(NANA_WINDOWS)
+ #include
+#endif
+
+#include
+
+namespace nana{ namespace audio
+{
+ namespace detail
+ {
+ class buffer_preparation
+ {
+ public:
+#if defined(NANA_WINDOWS)
+ typedef WAVEHDR meta;
+#elif defined(NANA_POSIX)
+ struct meta
+ {
+ char * buf;
+ std::size_t bufsize;
+ };
+#endif
+
+ public:
+ buffer_preparation(audio_stream& as, std::size_t seconds);
+
+ ~buffer_preparation();
+
+ meta * read();
+ //Revert the meta that returned by read()
+ void revert(meta * m);
+ bool data_finished() const;
+ private:
+ void _m_prepare_routine();
+ private:
+ std::atomic running_;
+ std::atomic wait_for_buffer_;
+ std::thread thr_;
+ mutable std::mutex token_buffer_, token_prepared_;
+ mutable std::condition_variable cond_buffer_, cond_prepared_;
+
+ std::vector buffer_, prepared_;
+ std::size_t block_size_;
+ audio_stream & as_;
+ };
+ }//end namespace detail
+}//end namespace audio
+}//end namespace nana
+#endif //NANA_ENABLE_AUDIO
+#endif
diff --git a/GUI/nana/audio/player.hpp b/GUI/nana/audio/player.hpp
new file mode 100644
index 0000000..0dad445
--- /dev/null
+++ b/GUI/nana/audio/player.hpp
@@ -0,0 +1,37 @@
+#ifndef NANA_AUDIO_PLAYER_HPP
+#define NANA_AUDIO_PLAYER_HPP
+#include
+#include
+
+#ifdef NANA_ENABLE_AUDIO
+
+#include
+
+namespace nana{ namespace audio
+{ /// class player
+ /// \brief play an audio file in PCM Windows WAV format
+ ///
+ /// \include audio_player.cpp
+ class player
+ : private nana::noncopyable
+ {
+ struct implementation;
+ public:
+ player();
+ player(const std::string& file);
+ ~player();
+
+ bool open(const std::string& file);
+ void play();
+ void close();
+ private:
+ implementation* impl_;
+ };
+}//end namespace audio
+}//end namespace nana
+
+#endif //NANA_ENABLE_AUDIO
+
+#include
+
+#endif
diff --git a/GUI/nana/basic_types.hpp b/GUI/nana/basic_types.hpp
new file mode 100644
index 0000000..895f476
--- /dev/null
+++ b/GUI/nana/basic_types.hpp
@@ -0,0 +1,528 @@
+/**
+ * Basic Types definition
+ * Nana C++ Library(http://www.nanapro.org)
+ * Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com)
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * @file nana/basic_types.hpp
+ */
+
+#ifndef NANA_BASIC_TYPES_HPP
+#define NANA_BASIC_TYPES_HPP
+
+#include
+#include
+#include
+
+namespace nana
+{
+ /// A constant value for the invalid position.
+ const std::size_t npos = static_cast(-1);
+
+
+ template
+ struct casei_char_traits
+ : public std::char_traits
+ {
+ typedef CharT char_type;
+
+
+ //static constexpr bool eq(char_type c1, char_type c2) noexcept
+ //VC2012 does not support constexpr and noexcept keywords
+ static bool eq(char_type c1, char_type c2)
+ {
+ return std::toupper(c1) == std::toupper(c2);
+ }
+
+ //static constexpr bool lt(char_type c1, char_type c2) noexcept
+ //VC2012 does not support constexpr and noexcept keywords
+ static bool lt(char_type c1, char_type c2)
+ {
+ return std::toupper(c1) < std::toupper(c2);
+ }
+
+ static int compare(const char_type* s1, const char_type* s2, std::size_t n)
+ {
+ while(n--)
+ {
+ char_type c1 = std::toupper(*s1);
+ char_type c2 = std::toupper(*s2);
+ if(c1 < c2) return -1;
+ if(c1 > c2) return 1;
+ ++s1;
+ ++s2;
+ }
+ return 0;
+ }
+
+ static const char_type* find(const char_type* s, std::size_t n, const char_type& a)
+ {
+ char_type ua = std::toupper(a);
+ const char_type * end = s + n;
+ while((s != end) && (std::toupper(*s) != ua))
+ ++s;
+ return (s == end ? nullptr : s);
+ }
+ };
+
+ using cistring = std::basic_string>;
+ using ciwstring = std::basic_string>;
+
+
+ namespace detail
+ {
+ struct drawable_impl_type; //declaration, defined in platform_spec.hpp
+ }
+
+ namespace paint
+ {
+ typedef nana::detail::drawable_impl_type* drawable_type;
+ }
+
+ enum class mouse_action
+ {
+ begin, normal = begin, normal_captured, hovered, pressed, end
+ };
+
+ enum class element_state
+ {
+ normal,
+ hovered,
+ focus_normal,
+ focus_hovered,
+ pressed,
+ disabled
+ };
+
+ union pixel_argb_t
+ {
+ struct element_tag
+ {
+ unsigned char blue;
+ unsigned char green;
+ unsigned char red;
+ unsigned char alpha_channel;
+ }element;
+ unsigned value;
+ };
+
+ union pixel_rgba_t
+ {
+ struct element_tag
+ {
+ unsigned char alpha_channel;
+ unsigned char blue;
+ unsigned char green;
+ unsigned char red;
+ }element;
+ unsigned value;
+ };
+
+ using pixel_color_t = pixel_argb_t;
+
+ /// See extended CSS color keywords (4.3) in http://www.w3.org/TR/2011/REC-css3-color-20110607/
+ enum class colors
+ {
+ alice_blue = 0xf0f8ff,
+ antique_white = 0xfaebd7,
+ aqua = 0xFFFF,
+ aquamarine = 0x7fffd4,
+ azure = 0xf0ffff,
+ beige = 0xf5f5dc,
+ bisque = 0xffe4ce,
+ black = 0x0,
+ blanched_almond = 0xffebcd,
+ blue = 0x0000FF,
+ blue_violet = 0x8a2be2,
+ brown = 0xa52a2a,
+ burly_wood = 0xdeb887,
+ cadet_blue = 0x5f9ea0,
+ chartreuse = 0x7fff00,
+ chocolate = 0xd2691e,
+ coral = 0xff7f50,
+ cornflower_blue = 0x6495ed,
+ cornsilk = 0xfff8dc,
+ crimson = 0xdc143c,
+ cyan = 0xffff,
+ dark_blue = 0x8b,
+ dark_cyan = 0x8b8b,
+ dark_goldenrod = 0xb8860b,
+ dark_gray = 0xa9a9a9,
+ dark_green = 0x6400,
+ dark_grey = dark_gray,
+ dark_khaki = 0xbdb76b,
+ dark_magenta = 0x8b008b,
+ dark_olive_green = 0x556b2f,
+ dark_orange = 0xff8c00,
+ dark_orchid = 0x9932cc,
+ dark_red = 0x8b0000,
+ dark_salmon = 0xe9976a,
+ dark_sea_green = 0x8fbc8f,
+ dark_slate_blue = 0x483d8b,
+ dark_slate_gray = 0x2f4f4f,
+ dark_slate_grey = 0x2f4f4f,
+ dark_turquoise = 0xced1,
+ dark_violet = 0x9400d3,
+ deep_pink = 0xff1493,
+ deep_sky_blue = 0xbfff,
+ dim_gray = 0x696969,
+ dim_grey = dim_gray,
+ dodger_blue = 0x1e90ff,
+ firebrick = 0xb22222,
+ floral_white = 0xfffaf0,
+ forest_green = 0x228b22,
+ fuchsia = 0xFF00FF,
+ gainsboro = 0xdcdcdc,
+ ghost_white = 0xf8f8ff,
+ gold = 0xffd700,
+ goldenrod = 0xdaa520,
+ gray = 0x808080,
+ green = 0x008000,
+ green_yellow = 0xadff2f,
+ grey = gray,
+ honeydew = 0xf0fff0,
+ hot_pink = 0xff69b4,
+ indian_red = 0xcd5c5c,
+ indigo = 0x4b0082,
+ ivory = 0xfffff0,
+ khaki = 0xf0e68c,
+ lavendar = 0xe6e6fa,
+ lavender_blush = 0xfff0f5,
+ lawn_green = 0x7cfc00,
+ lemon_chiffon = 0xfffacd,
+ light_blue = 0xadd8e6,
+ light_coral = 0xf08080,
+ light_cyan = 0xe0ffff,
+ light_goldenrod_yellow = 0xfafad2,
+ light_gray = 0xd3d3d3,
+ light_green = 0x90ee90,
+ light_grey = light_gray,
+ light_pink = 0xffb6c1,
+ light_salmon = 0xffa07a,
+ light_sea_green = 0x20b2aa,
+ light_sky_blue = 0x87cefa,
+ light_slate_gray = 0x778899,
+ light_slate_grey = light_slate_gray,
+ light_steel_blue = 0xb0c4de,
+ light_yellow = 0xffffe0,
+ lime = 0x00FF00,
+ lime_green = 0x32cd32,
+ linen = 0xfaf0e6,
+ magenta = 0xff00ff,
+ maroon = 0x800000,
+ medium_aquamarine = 0x66cdaa,
+ medium_blue = 0xcd,
+ medium_orchid = 0xba55d3,
+ medium_purple = 0x9370db,
+ medium_sea_green = 0x3cb371,
+ medium_slate_blue = 0x7b68ee,
+ medium_spring_green = 0xfa9a,
+ medium_turquoise = 0x48d1cc,
+ medium_violet_red = 0xc71585,
+ midnight_blue = 0x191970,
+ mint_cream = 0xf5fffa,
+
+ misty_rose = 0xffe4e1,
+ moccasin = 0xffe4b5,
+ navajo_white = 0xffdead,
+ navy = 0x000080,
+ old_lace = 0xfdf5e6,
+ olive = 0x808000,
+ olive_drab = 0x6b8e23,
+ orange = 0xffa500,
+ orange_red = 0xff4500,
+ orchid = 0xda70d6,
+ pale_goldenrod = 0xeee8aa,
+ pale_green = 0x98fb98,
+ pale_turquoise = 0xafeeee,
+ pale_violet_red = 0xdb7093,
+ papaya_whip = 0xffefd5,
+ peach_puff = 0xffdab9,
+ peru = 0xcd853f,
+ pink = 0xffc0cb,
+ plum = 0xdda0dd,
+ powder_blue = 0xb0e0e6,
+ purple = 0x800080,
+ red = 0xFF0000,
+ rosy_brown = 0xbc8f8f,
+ royal_blue = 0x4169e1,
+ saddle_brown = 0x8b4513,
+ salmon = 0xfa8072,
+ sandy_brown = 0xf4a460,
+ sea_green = 0x2e8b57,
+ sea_shell = 0xfff5ee,
+ sienna = 0xa0522d,
+ silver = 0xc0c0c0,
+ sky_blue = 0x87ceeb,
+ slate_blue = 0x6a5acd,
+ slate_gray = 0x708090,
+ slate_grey = 0x708090,
+ snow = 0xfffafa,
+ spring_green = 0xff7f,
+ steel_blue = 0x4682b4,
+ tan = 0xd2b48c,
+ teal = 0x008080,
+ thistle = 0xd8bfd8,
+ tomato = 0xff6347,
+ turquoise = 0x40e0d0,
+ violet = 0xee82ee,
+ wheat = 0xf5deb3,
+ white = 0xFFFFFF,
+ white_smoke = 0xf5f5f5,
+ yellow = 0xFFFF00,
+ yellow_green = 0x9acd32,
+
+ //temporary definitions, these will be replaced by color schema
+ button_face_shadow_start = 0xF5F4F2,
+ button_face_shadow_end = 0xD5D2CA,
+ button_face = 0xD4D0C8 , //,light_cyan
+ dark_border = 0x404040,
+ gray_border = 0x808080,
+ highlight = 0x1CC4F7
+ };
+
+ //Some helper types to identify an integer as color.
+ enum class color_rgb : unsigned{};
+ enum class color_argb: unsigned{};
+ enum class color_rgba : unsigned{};
+
+ class color
+ {
+ public:
+ color() = default;
+ color(colors);
+ color(colors, double alpha);
+ color(color_rgb);
+ color(color_argb);
+ color(color_rgba);
+ color(unsigned red, unsigned green, unsigned blue, double alpha = 1.0);
+
+ /// Initializes the color with a CSS-like rgb string.
+ explicit color(std::string css_rgb);
+
+ color& alpha(double); ///< Sets alpha channel
+ color& from_rgb(unsigned red, unsigned green, unsigned blue); ///< immutable alpha channel
+
+ /// Sets color with a HSL value.
+ /// @param hue in range of [0, 360]
+ /// @param saturation in range of [0, 1]
+ /// @param lightness in range of [0, 1]
+ color& from_hsl(double hue, double saturation, double lightness); ///< immutable alpha channel
+
+ /// Blends color
+ /**
+ * Returns a color which is blended as this * (1 - fade_rate) + blending_color * fade_rate
+ * @param blending_color Color to blend
+ * @param fade_rate Blending rate for blending_color
+ * @return a blended color
+ */
+ color blend(const color& blending_color, double fade_rate) const;
+
+ /// Determines whether the color is completely transparent.
+ bool invisible() const;
+ pixel_color_t px_color() const;
+ pixel_argb_t argb() const;
+ pixel_rgba_t rgba() const;
+
+ const double& r() const;
+ const double& g() const;
+ const double& b() const;
+ const double& a() const;
+
+ bool operator==(const color& other) const;
+ bool operator!=(const color& other) const;
+
+ friend color operator+(const color&, const color&);
+ private:
+ double r_{ 0.0 };
+ double g_{ 0.0 };
+ double b_{ 0.0 };
+ double a_{ 0.0 }; //invisible
+ };
+
+ template
+ struct basic_point
+ {
+ //typedef-names
+ using value_type = T;
+
+ //data member
+ value_type x{};
+ value_type y{};
+
+ //member functions
+ basic_point() = default;
+
+ basic_point(value_type x, value_type y)
+ : x{ x }, y{y}
+ {}
+
+ bool operator==(const basic_point& other) const noexcept
+ {
+ return (x == other.x && y == other.y);
+ }
+
+ bool operator!=(const basic_point& other) const noexcept
+ {
+ return (x != other.x || y != other.y);
+ }
+
+ bool operator<(const basic_point& other) const noexcept
+ {
+ return ((y < other.y) || (y == other.y && x < other.x));
+ }
+
+ bool operator<=(const basic_point& other) const noexcept
+ {
+ return ((y < other.y) || (y == other.y && x <= other.x));
+ }
+
+ bool operator>(const basic_point& other) const noexcept
+ {
+ return ((y > other.y) || (y == other.y && x > other.x));
+ }
+
+ bool operator>=(const basic_point& other) const noexcept
+ {
+ return ((y > other.y) || (y == other.y && x >= other.x));
+ }
+
+ basic_point operator-(const basic_point& other) const noexcept
+ {
+ return{ x - other.x, y - other.y };
+ }
+
+ basic_point operator+(const basic_point& other) const noexcept
+ {
+ return{ x + other.x, y + other.y };
+ }
+
+ basic_point& operator-=(const basic_point& other) noexcept
+ {
+ x -= other.x;
+ y -= other.y;
+ return *this;
+ }
+
+ basic_point& operator+=(const basic_point& other) noexcept
+ {
+ x += other.x;
+ y += other.y;
+ return *this;
+ }
+ };
+
+ using point = basic_point;
+ using upoint = basic_point;
+
+ struct size
+ {
+ using value_type = unsigned;
+ size();
+ size(value_type width, value_type height);
+
+ bool empty() const; ///< true if width * height == 0
+ bool is_hit(const point&) const; ///< Assume it is a rectangle at (0,0), and check whether a specified position is in the rectangle.
+ size& shift();
+
+ bool operator==(const size& rhs) const;
+ bool operator!=(const size& rhs) const;
+ size operator+(const size&) const;
+
+ value_type width;
+ value_type height;
+ };
+
+ struct rectangle
+ {
+ rectangle(); ///< a zero-size rectangle at (0, 0).
+ rectangle(int x, int y, unsigned width, unsigned height);
+ explicit rectangle(const size &); ///< a rectangle with specified size at coordinate (0, 0).
+ explicit rectangle(const point&, const size& = size());
+
+ bool operator==(const rectangle& rhs) const;
+ bool operator!=(const rectangle& rhs) const;
+
+ point position() const noexcept;
+ rectangle& position(const point&) noexcept;
+
+ size dimension() const noexcept;
+ rectangle& dimension(const size&) noexcept;
+
+ /// Pares the specified pixels off the rectangle.
+ /**
+ * It's equal to x += pixels; y + pixels; width -= (pixels << 1); height -= (pixels << 1);
+ * @param pixels The number of pixels to be pared. If the number that multiples pixels twice is larger than width/height, the width/height will be zero. If the pixels is a negative number, the width/height is add the number that multiple pixels twice.
+ * @return The reference of *this.
+ */
+ rectangle& pare_off(int pixels);
+
+ int right() const noexcept;
+ int bottom() const noexcept;
+ bool is_hit(int x, int y) const;
+ bool is_hit(const point& pos) const;
+ bool empty() const; ///< true if width * height == 0.
+ rectangle& shift(); ///< Swap position x and y, size width and height.
+
+ int x;
+ int y;
+ unsigned width;
+ unsigned height;
+ };
+
+ class rectangle_rotator
+ {
+ public:
+ rectangle_rotator(bool rotated, const ::nana::rectangle& area);
+
+ int x() const;
+ int & x_ref();
+ int y() const;
+ int & y_ref();
+ unsigned w() const;
+ unsigned & w_ref();
+ unsigned h() const;
+ unsigned & h_ref();
+
+ int right() const;
+ int bottom() const;
+ const ::nana::rectangle& result() const;
+ private:
+ bool rotated_;
+ ::nana::rectangle area_;
+ };//end class rectangle_rotator
+
+ enum class arrange
+ {
+ unknown, horizontal, vertical, horizontal_vertical
+ };
+
+ ///The definition of horizontal alignment
+ enum class align
+ {
+ left, center, right
+ };
+
+ ///The definition of vertical alignment
+ enum class align_v
+ {
+ top, center, bottom
+ };
+
+ ///The definition of the four corners of the world
+ enum class direction
+ {
+ north,
+ south,
+ east,
+ west,
+ southeast
+ };
+}//end namespace nana
+#include
+#endif
+
+
diff --git a/GUI/nana/c++defines.hpp b/GUI/nana/c++defines.hpp
new file mode 100644
index 0000000..c7d5383
--- /dev/null
+++ b/GUI/nana/c++defines.hpp
@@ -0,0 +1,264 @@
+/**
+ * Predefined Symbols for C++
+ * Nana C++ Library(http://www.nanapro.org)
+ * Copyright(C) 2016-2019 Jinhao(cnjinhao@hotmail.com)
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * @file nana/c++defines.hpp
+ *
+ * @brief Provide switches to adapt to the target OS, use of external libraries or workarounds compiler errors or lack of std C++ support.
+ *
+ * To control target OS/compiler:
+ * - NANA_WINDOWS
+ * - NANA_MINGW
+ * - NANA_POSIX
+ * - NANA_LINUX
+ * - NANA_MACOS
+ * - NANA_X11
+ *
+ * External libraries:
+ * - NANA_LIBPNG, USE_LIBPNG_FROM_OS
+ * - NANA_LIBJPEG, USE_LIBJPEG_FROM_OS
+ *
+ * (see: Feature-testing recommendations for C++
+ * in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0096r0.html
+ * for example: __cpp_lib_experimental_filesystem = 201406 in is a known issue on libstdc++, it works on libc++)
+ * - STD_THREAD_NOT_SUPPORTED (GCC < 4.8.1)
+ * - STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED (MinGW with GCC < 4.8.1)
+ * - STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED (MinGW with GCC < 4.8.1)
+ * - STD_TO_STRING_NOT_SUPPORTED (MinGW with GCC < 4.8)
+ * - STD_FILESYSTEM_NOT_SUPPORTED (GCC < 5.3) ....
+ * - CXX_NO_INLINE_NAMESPACE (Visual C++ < 2015)
+ *
+ * There are two kinds of flags:
+ * * _nana_std_xxx indicates that nana provides a standard-like class for workaround of lack of C++ support.
+ * * _nana_std_has_xxx indicates that nana detects whether a C++ feature is supported. Nana doesn't provide a standard-like class for this missing feature.
+ *
+ * - _nana_std_make_unique (__cpluscplus < 201402)
+ * - _nana_std_put_time (GCC < 5)
+ * - _nana_std_clamp (Visual C++ < 2017)
+ */
+
+#ifndef NANA_CXX_DEFINES_INCLUDED
+#define NANA_CXX_DEFINES_INCLUDED
+// #define STD_FILESYSTEM_NOT_SUPPORTED
+
+//C++ language
+#if defined(_MSC_VER)
+# if (_MSC_VER < 1900) // VC2013
+# //About std.experimental.filesystem.
+# //Through VC2013 has provided , but all the names are given in namespace std. It's hard to alias these names into std::experimental,
+# //So Nana use nana.filesystem implement instead for VC2013
+# define STD_FILESYSTEM_NOT_SUPPORTED
+#
+# //Nana defines some macros for lack of support of keywords
+# define _ALLOW_KEYWORD_MACROS
+#
+# define CXX_NO_INLINE_NAMESPACE //no support of C++11 inline namespace until Visual C++ 2015
+# define noexcept //no support of noexcept until Visual C++ 2015
+
+# define constexpr //no support of constexpr until Visual C++ 2015 ? const ??
+# endif
+#elif defined(__GNUC__) && not defined(__clang__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ < 6)
+# define noexcept //no support of noexcept until GCC 4.6
+# endif
+#endif
+
+// Set this to "UTF-32" at the command-line for big endian.
+#ifndef NANA_UNICODE
+ // much of the world runs intel compatible processors so default to LE.
+ #define NANA_UNICODE "UTF-32LE"
+#endif
+
+// Select platform ......
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) //Microsoft Windows
+ #define NANA_WINDOWS
+ typedef unsigned long thread_t;
+
+ // MINGW ...
+ #if defined(__MINGW32__) || defined(__MINGW64__) || defined(MINGW)
+ #define NANA_MINGW
+ #endif // MINGW
+
+#elif defined(__APPLE__) || defined(APPLE) //Mac OS X
+ //Symbols for MACOS
+ #define NANA_MACOS
+ #define NANA_POSIX
+ #define NANA_X11
+ typedef unsigned long thread_t;
+#elif defined(__FreeBSD__)
+ #define NANA_POSIX
+ #define NANA_X11
+ typedef unsigned long thread_t;
+#elif (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC) //Linux
+ #define NANA_LINUX
+ #define NANA_POSIX
+ #define NANA_X11
+ typedef unsigned long thread_t;
+#else
+ static_assert(false, "Only Windows and Linux are supported now (Mac OS and BSD are experimental)");
+#endif
+
+// Select compiler ...
+#if defined(_MSC_VER) //Microsoft Visual C++
+ #define _SCL_SECURE_NO_WARNNGS
+ #define _CRT_SECURE_NO_DEPRECATE
+ #pragma warning(disable : 4996)
+
+# if (_MSC_VER >= 1900)
+ // google: break any code that tries to use codecvt or codecvt.
+ // google: It appears the C++ libs haven't been compiled with native char16_t/char32_t support.
+ // google: Those definitions are for codecvt::id, codecvt::id and codecvt::id respectively.
+ // However, the codecvt::id and codecvt::id definitions aren't there, and indeed, if you look at locale0.cpp in the CRT source code you'll see they're not defined at all.
+ // google: That's a known issue, tracked by an active bug (DevDiv#1060849). We were able to update the STL's headers in response to char16_t/char32_t, but we still need to update the separately compiled sources.
+# define STD_CODECVT_NOT_SUPPORTED
+# endif // _MSC_VER == 1900
+
+#elif defined(__clang__) //Clang
+
+ #include // Introduces some implement-specific flags of ISO C++ Library
+ #if defined(__GLIBCPP__) || defined(__GLIBCXX__)
+ // is a known issue on libstdc++, it works on libc++
+ #define STD_CODECVT_NOT_SUPPORTED
+ #endif
+#elif defined(__GNUC__) // GCC
+
+ #include // Introduces some implementation-specific flags of ISO C++ Library
+ #if defined(__GLIBCPP__) || defined(__GLIBCXX__)
+ // is a known issue on libstdc++, it works on libc++ todo review !
+ #define STD_CODECVT_NOT_SUPPORTED
+
+ //It's a known issue of libstdc++ on MinGW
+ //introduce to_string/to_wstring workarounds for disabled capacity of stdlib
+ #ifdef _GLIBCXX_HAVE_BROKEN_VSWPRINTF
+ #if (__GNUC__ < 5)
+ # define STD_TO_STRING_NOT_SUPPORTED
+ #endif
+
+ #define STD_TO_WSTRING_NOT_SUPPORTED
+ #endif
+ #endif
+
+
+# if ((__GNUC__ < 5) )
+# define _nana_std_put_time
+# endif
+
+# if ((__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3 ) ) )
+# undef STD_FILESYSTEM_NOT_SUPPORTED
+# else
+# define STD_FILESYSTEM_NOT_SUPPORTED
+# endif
+
+ #if (__GNUC__ == 4)
+ #if ((__GNUC_MINOR__ < 8) || (__GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ < 1))
+ #define STD_THREAD_NOT_SUPPORTED
+ #endif
+
+ #if defined(NANA_MINGW)
+ #ifndef __MINGW64_VERSION_MAJOR
+ //It's a known issue under MinGW(except MinGW-W64)
+ #define STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED
+ #endif
+ #endif
+
+ #if (__GNUC_MINOR__ < 8)
+ //introduce to_string/to_wstring workaround for lack of stdlib definitions
+ #ifndef STD_TO_STRING_NOT_SUPPORTED
+ # define STD_TO_STRING_NOT_SUPPORTED
+ #endif
+
+ #ifndef STD_TO_WSTRING_NOT_SUPPORTED
+ # define STD_TO_WSTRING_NOT_SUPPORTED
+ #endif
+ #endif
+ #endif
+#endif
+
+//Assume the std::thread is not implemented on MinGW,
+//unless it was compiled with POSIX threading support.
+//But some toolchains may implement std::thread.
+#ifdef NANA_MINGW
+# ifndef STD_THREAD_NOT_SUPPORTED
+# define STD_THREAD_NOT_SUPPORTED
+# endif
+#endif
+
+
+//Detects the feature std::make_unique
+//std::make_unique has been provided by Visual C++ 2013 and later
+#undef _nana_std_make_unique
+#if (defined(__clang__) && (__cplusplus < 201305L || (__cplusplus == 201305L && (__clang_major__ * 100 + __clang_minor__ < 304 )))) \
+ || ((!defined(__clang__)) && defined(__GNUC__) && __cplusplus < 201300L)
+# define _nana_std_make_unique
+#endif
+
+//Detects the feature std::clamp
+//Visual C++ 2017 with /std:c++latest provides the std::clamp
+#undef _nana_std_clamp
+#if (defined(_MSC_VER) && ((!defined(_MSVC_LANG)) || _MSVC_LANG < 201403L)) \
+ || (defined(__clang__) && (__cplusplus < 201406L)) \
+ || (defined(__GNUC__) && (!defined(__clang__)) && (__cplusplus < 201703))
+# define _nana_std_clamp
+#endif
+
+
+#undef _nana_std_optional
+#if ((defined(_MSC_VER) && ((!defined(_MSVC_LANG)) || _MSVC_LANG < 201703))) || \
+ ((!defined(_MSC_VER)) && ((__cplusplus < 201703L) || \
+ (defined(__clang__) && (__clang_major__ * 100 + __clang_minor__ < 400)) || \
+ (!defined(__clang__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 701))) \
+ )
+# define _nana_std_optional
+#endif
+
+#undef _nana_std_has_string_view
+#undef _nana_std_has_emplace_return_type
+#if ((defined(_MSC_VER) && (_MSC_VER >= 1912) && defined(_MSVC_LANG) && _MSVC_LANG >= 201703)) || \
+ ((__cplusplus >= 201703L) && \
+ (defined(__clang__) && (__clang_major__ * 100 + __clang_minor__ >= 400) || \
+ (!defined(__clang__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 701))) \
+ )
+# define _nana_std_has_string_view
+# define _nana_std_has_emplace_return_type
+#endif
+
+
+#if defined(NANA_WINDOWS)
+ #ifndef _UNICODE
+ #define _UNICODE
+ #endif
+
+ #ifndef UNICODE
+ #define UNICODE
+ #endif
+#endif
+
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0061r0.html
+
+#if defined(__cpp_lib_experimental_filesystem) && (__cpp_lib_experimental_filesystem == 201406)
+# undef STD_FILESYSTEM_NOT_SUPPORTED
+#endif
+
+
+#ifdef __has_include
+# if __has_include()
+# undef STD_FILESYSTEM_NOT_SUPPORTED
+# endif
+# if __has_include()
+# if !(defined(NANA_MINGW) && !defined(_GLIBCXX_HAS_GTHREADS))
+//See the comment above regarding MinGW's threading support
+# undef STD_THREAD_NOT_SUPPORTED
+# endif
+# endif
+#endif
+
+#endif // NANA_CXX_DEFINES_INCLUDED
diff --git a/GUI/nana/charset.hpp b/GUI/nana/charset.hpp
new file mode 100644
index 0000000..b26dbb6
--- /dev/null
+++ b/GUI/nana/charset.hpp
@@ -0,0 +1,98 @@
+/**
+ * The charset Implementation
+ * Nana C++ Library(http://www.nanapro.org)
+ * Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * @file: nana/charset.hpp
+ */
+
+#ifndef NANA_CHARSET_HPP
+#define NANA_CHARSET_HPP
+#include
+
+namespace nana
+{
+ namespace utf
+ {
+ /// Attempt to get a pointer to a character of UTF-8 string by a specified character index.
+ /// @param text_utf8 A string encoded as UTF-8.
+ /// @param pos The unicode character index.
+ /// @returns A pointer to the unicode character. It returns a null if pos is out of range.
+ const char* char_ptr(const char* text_utf8, unsigned pos);
+ const char* char_ptr(const ::std::string& text_utf8, unsigned pos);
+
+ /// Get the unicode character by a specified character index.
+ /// @param text_utf8 A string encoded as UTF-8.
+ /// @param pos The unicode character index.
+ /// @param len A unsigned pointer to receive the number of bytes it takes in UTF-8 encoded. If len is a nullptr, it is ignored.
+ /// @returns A unicode character. '\0' if pos is out of range.
+ wchar_t char_at(const char* text_utf8, unsigned pos, unsigned * len);
+ wchar_t char_at(const ::std::string& text_utf8, unsigned pos, unsigned * len);
+ }
+
+ enum class unicode
+ {
+ utf8, utf16, utf32
+ };
+
+ namespace detail
+ {
+ class charset_encoding_interface;
+ }
+
+ /*!\class charset
+ \brief An intelligent charset class for character code conversion.
+ Example:
+ 1. A UTF-8 string from the socket.
+
+ int len = ::recv(sd, buf, buflen, 0);
+ textbox.caption(nana::charset(std::string(buf, len), nana::unicode::utf8));
+
+ 2. Send the string in text to the socket as UTF-8.
+
+ std::string utf8str = nana::charset(textbox.caption()).to_bytes(nana::unicode::utf8);
+ ::send(sd, utf8str.c_str(), utf8str.size(), 0);
+
+ 3, Convert a string to the specified multi-byte character code.
+
+ // Convert to a multibytes string through default system language.
+ std::string mbstr = nana::charset(a_wstring);
+
+ // If the default system language is English and convert
+ // a Chinese unicode string to multibytes string through GB2312
+ std::setlocale(LC_CTYPE, "zh_CN.GB2312");
+ //set::setlocale(LC_CTYPE, ".936"); call it in Windows
+ std::string mbstr = nana::charset(a_wstring_with_chinese);
+
+ */
+ class charset
+ {
+ public:
+ charset(const charset&);
+ charset & operator=(const charset&);
+ charset(charset&&);
+ charset & operator=(charset&&);
+
+ charset(const std::string&); ///
+
+namespace nana
+{
+ namespace concepts
+ {
+ /// The Any Objective is an object that may attach to some other object.
+ template // no dep. on IndexType ??
+ class any_objective
+ {
+ public:
+ virtual ~any_objective() = default;
+
+ template
+ void anyobj(const Target& t)
+ {
+ nana::any * p = _m_anyobj(true);
+ if(nullptr == p)
+ throw std::runtime_error("Nana.any_objective: Object does not exist");
+ *p = t;
+ }
+
+ template
+ void anyobj(Target&& t)
+ {
+ nana::any * p = _m_anyobj(true);
+ if(nullptr == p)
+ throw std::runtime_error("Nana.any_objective: Object does not exist");
+
+ *p = std::move(t);
+ }
+
+ template
+ Target * anyobj() const ///< Retrieves the attached object. Returns a nullptr if empty or if the type not match.
+ {
+ return any_cast(_m_anyobj(false));
+ }
+ private:
+ virtual nana::any* _m_anyobj(bool allocate_if_empty) const = 0;
+ };
+
+ /// The Any Objective is an object that may attach to some other object.
+ template
+ class any_objective
+ {
+ public:
+ typedef IndexType anyobj_index_t; ///< The type of index. It is available if Dimension is greater than 0.
+
+ virtual ~any_objective() = default;
+
+ template
+ void anyobj(anyobj_index_t i, const Target& t)
+ {
+ nana::any * p = _m_anyobj(i, true);
+ if(nullptr == p)
+ throw std::runtime_error("Nana.any_objective: Object does not exist.");
+ *p = t;
+ }
+
+ template
+ void anyobj(anyobj_index_t i, Target&& t)
+ {
+ nana::any * p = _m_anyobj(i, true);
+ if(nullptr == p)
+ throw std::runtime_error("Nana.any_objective: Object does not exist");
+ *p = std::move(t);
+ }
+
+ template
+ Target * anyobj(anyobj_index_t i) const ///< Retrieves the attached object. Returns a nullptr if empty or if the type not match.
+ {
+ return any_cast(_m_anyobj(i, false));
+ }
+ private:
+ virtual nana::any* _m_anyobj(anyobj_index_t i, bool allocate_if_empty) const = 0;
+ };
+
+ /// The Any Objective is an object that may attach to some other object.
+ template
+ class any_objective
+ {
+ public:
+ typedef IndexType anyobj_index_t;
+
+ virtual ~any_objective(){}
+
+ template
+ void anyobj(anyobj_index_t i0, anyobj_index_t i1, const Target& t)
+ {
+ nana::any * p = _m_anyobj(i0, i1, true);
+ if(nullptr == p)
+ throw std::runtime_error("Nana.any_objective: Object does not exist");
+
+ *p = t;
+ }
+
+ template
+ void anyobj(anyobj_index_t i0, anyobj_index_t i1, Target&& t)
+ {
+ nana::any * p = _m_anyobj(i0, i1, true);
+ if(nullptr == p)
+ throw std::runtime_error("Nana.any_objective: Object does not exist");
+ *p = std::move(t);
+ }
+
+ template
+ Target * anyobj(anyobj_index_t i0, anyobj_index_t i1) const ///< Retrieves the attached object. Returns a nullptr if empty or if the type not match.
+ {
+ return any_cast(_m_anyobj(i0, i1, false));
+ }
+ private:
+ virtual nana::any* _m_anyobj(anyobj_index_t i0, anyobj_index_t i1, bool allocate_if_empty) const = 0;
+ };
+ }//end namespace concepts
+}//end namespace nana
+#endif
diff --git a/GUI/nana/config.hpp b/GUI/nana/config.hpp
new file mode 100644
index 0000000..aeabf1d
--- /dev/null
+++ b/GUI/nana/config.hpp
@@ -0,0 +1,115 @@
+/**
+ * Nana Configuration
+ * Nana C++ Library(http://www.nanapro.org)
+ * Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com)
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * @file nana/config.hpp
+ *
+ * @brief Provide switches to enable 3rd-party libraries for a certain feature.
+ *
+ * External libraries:
+ * - NANA_LIBPNG, USE_LIBPNG_FROM_OS
+ * - NANA_LIBJPEG, USE_LIBJPEG_FROM_OS
+ * - NANA_ENABLE_AUDIO
+ *
+ * messages:
+ * - VERBOSE_PREPROCESSOR, STOP_VERBOSE_PREPROCESSOR
+ */
+
+#ifndef NANA_CONFIG_HPP
+#define NANA_CONFIG_HPP
+
+#include "c++defines.hpp"
+
+//The following basic configurations are ignored when NANA_IGNORE_CONF is defined.
+//The NANA_IGNORE_CONF may be specified by CMake generated makefile.
+#ifndef NANA_IGNORE_CONF
+
+// Here defines some flags that tell Nana what features will be supported.
+
+///////////////////////////
+// Support of std::thread
+// Boost.Thread is preferred.
+// NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ is only available on MinGW when STD_THREAD_NOT_SUPPORTED is defined.
+// if NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ is enabled, Boost.Thread will be replaced with meganz's mingw-std-threads.
+// https://github.com/meganz/mingw-std-threads
+//#define NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ
+
+//# The ISO C++ File System Technical Specification(ISO - TS, or STD) is optional.
+//# http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf
+//# This is not a workaround, but an user option.
+//# The library maybe available in the std library in use or from Boost(almost compatible)
+//# http://www.boost.org/doc/libs/1_60_0/libs/filesystem/doc/index.htm
+//# or you can choose to use the(partial, but functional) implementation provided by nana.
+//# If you include the file
+//# the selected option will be set by nana into std::experimental::filesystem
+//# By default Nana will try to use the STD.If not available will try
+//# to use boost if available.Nana own implementation will be use only none of them are available.
+//# You can change that default if you change one of the following
+//# (please don't define more than one of the _XX_FORCE options):
+//
+//#define BOOST_FILESYSTEM_AVAILABLE // "Is Boost filesystem available?"
+//#define BOOST_FILESYSTEM_FORCE // "Force use of Boost filesystem if available (over ISO and nana)
+//#define STD_FILESYSTEM_FORCE // "Use of STD filesystem?(a compilation error will occur if not available)" OFF)
+//#define NANA_FILESYSTEM_FORCE // "Force nana filesystem over ISO and boost?" OFF)
+//
+// Make sure you (cmake?) provide the following where correspond (please find the correct values):
+// set CMAKE_BOOST_FILESYSTEM_INCLUDE_ROOT "Where to find ?" "../")
+// set CMAKE_BOOST_FILESYSTEM_LIB "Flag for the compiler to link: " "-lboost/fs")
+// include_directories CMAKE_BOOST_FILESYSTEM_INCLUDE_ROOT
+// APPEND flag LINKS CMAKE_BOOST_FILESYSTEM_LIB
+
+
+///////////////////
+// Support of PCM playback
+//
+//#define NANA_ENABLE_AUDIO
+
+///////////////////
+// Support for PNG
+// Define the NANA_ENABLE_PNG to enable the support of PNG.
+//
+//#define NANA_ENABLE_PNG //!
+//#define USE_LIBPNG_FROM_OS // Un-Comment it to use libpng from operating system.
+#if defined(NANA_ENABLE_PNG)
+ #if !defined(USE_LIBPNG_FROM_OS)
+ #define NANA_LIBPNG
+ #endif
+#endif
+
+///////////////////
+// Support for JPEG
+// Define the NANA_ENABLE_JPEG to enable the support of JPEG.
+//
+//#define NANA_ENABLE_JPEG //!
+//#define USE_LIBJPEG_FROM_OS // Un-Comment it to use libjpeg from operating system.
+#if defined(NANA_ENABLE_JPEG)
+ #if !defined(USE_LIBJPEG_FROM_OS)
+ #define NANA_LIBJPEG
+ #endif
+#endif
+
+///////////////////
+// Support for NANA_AUTOMATIC_GUI_TESTING
+// Will cause the program to self-test the GUI. A default automatic GUI test
+// will be added to all programs which don't have yet one defined. This default test will simple
+// wait 10 sec. (time to construct, show and execute the GUI) and then exit normally.
+//
+//#define NANA_AUTOMATIC_GUI_TESTING
+
+
+
+#if !defined(VERBOSE_PREPROCESSOR)
+//#define VERBOSE_PREPROCESSOR
+#endif
+
+#if !defined(STOP_VERBOSE_PREPROCESSOR)
+//#define STOP_VERBOSE_PREPROCESSOR
+#endif
+
+#endif // NANA_IGNORE_CONFIG
+#endif // NANA_CONFIG_HPP
diff --git a/GUI/nana/datetime.hpp b/GUI/nana/datetime.hpp
new file mode 100644
index 0000000..c87d58a
--- /dev/null
+++ b/GUI/nana/datetime.hpp
@@ -0,0 +1,77 @@
+/*
+ * A Date Time Implementation
+ * Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com)
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * @file: nana/datetime.hpp
+ */
+
+#ifndef NANA_DATETIME_HPP
+#define NANA_DATETIME_HPP
+#include
+
+namespace nana
+{
+ /// A date operation class. \see nana::date_chooser
+ class date
+ {
+ public:
+ struct value
+ {
+ unsigned year; ///< 1601 - 30827
+ unsigned month; ///< 1-12
+ unsigned day; ///< 1-31
+ };
+
+ date(); ///< the initialized date is today.
+ explicit date(const std::tm&);
+ date(int year, int month, int day);
+
+ date operator - (int off) const;
+ date operator + (int off) const;
+ bool operator==(const date&) const;
+ bool operator!=(const date&) const;
+ bool operator<(const date&) const;
+ bool operator>(const date&) const;
+ bool operator<=(const date&) const;
+ bool operator>=(const date&) const;
+
+ int day_of_week() const;
+ const value & read() const;
+ void set(const std::tm&);
+
+ static int day_of_week(int year, int month, int day);
+ static unsigned year_days(const unsigned year); ///< the number of days in the specified year.
+ static unsigned month_days(const unsigned year, const unsigned month); ///< the number of days in the specified month.
+ static unsigned day_in_year(unsigned y, unsigned m, unsigned d); ///< Returns the index of the specified day in this year, at range[1, 365] or [1, 366]
+ private:
+ date _m_add(unsigned x) const;
+ date _m_sub(unsigned x) const;
+ private:
+ value value_;
+ }; //end class date
+
+ class time
+ {
+ public:
+ struct value
+ {
+ unsigned hour; ///<[0-23]
+ unsigned minute; ///<[0-59]
+ unsigned second; ///<[0-61], the range of [60, 61] is used for leap seconds
+ };
+
+ time();
+ time(const std::tm&);
+ time(unsigned hour, unsigned minute, unsigned second);
+ const value& read() const;
+ void set(const std::tm&);
+ private:
+ value value_;
+ };//end class time
+}//end namespace nana
+
+#endif
diff --git a/GUI/nana/deploy.hpp b/GUI/nana/deploy.hpp
new file mode 100644
index 0000000..9550e9f
--- /dev/null
+++ b/GUI/nana/deploy.hpp
@@ -0,0 +1,122 @@
+/*
+ * The Deploy Implementation
+ * Nana C++ Library(http://www.nanapro.org)
+ * Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com)
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * @file: nana/deploy.hpp
+ *
+ * What follows is dependent on what defined in nana/config.hpp
+ */
+
+#ifndef NANA_DEPLOY_HPP
+#define NANA_DEPLOY_HPP
+#include
+
+#include
+#include
+
+#include
+
+#include
+
+#ifdef _nana_std_has_string_view
+#include
+#endif
+
+namespace nana
+{
+ /// move to *.h ??
+ struct utf8_Error : std::runtime_error
+ {
+ static bool use_throw; ///< def { true }; use carefully - it is a global variable !! \todo initialize from a #define ?
+
+ using std::runtime_error::runtime_error;
+
+#if defined(_MSC_VER)
+# if (_MSC_VER < 1900)
+ //A workaround for lack support of C++11 inheriting constructors for VC2013
+ explicit utf8_Error(const std::string& msg);
+# endif
+#endif
+
+ void emit();
+ };
+
+
+ /// Checks whether a specified text is utf8 encoding
+#ifdef _nana_std_has_string_view
+ bool is_utf8(std::string_view str);
+ void throw_not_utf8(std::string_view str);
+#else
+ bool is_utf8(const char* str, std::size_t len);
+ void throw_not_utf8(const std::string& text);
+ void throw_not_utf8(const char*, std::size_t len);
+ void throw_not_utf8(const char*);
+#endif
+
+ /// this text needed change, it needed review ??
+ bool review_utf8(const std::string& text);
+
+ /// this text needed change, it needed review ??
+ bool review_utf8(std::string& text);
+
+ const std::string& to_utf8(const std::string&);
+
+#ifdef _nana_std_has_string_view
+ std::string to_utf8(std::wstring_view sv);
+ std::wstring to_wstring(std::string_view utf8_str);
+#else
+ std::string to_utf8(const std::wstring&);
+ std::wstring to_wstring(const std::string& utf8_str);
+#endif
+
+ const std::wstring& to_wstring(const std::wstring& wstr);
+ std::wstring&& to_wstring(std::wstring&& wstr);
+
+#if defined(NANA_WINDOWS)
+ std::string to_osmbstr(const std::string& text_utf8);
+#else
+ std::string to_osmbstr(std::string text_utf8);
+#endif
+
+
+ namespace detail
+ {
+#if defined(NANA_WINDOWS)
+ using native_string_type = std::wstring;
+#else //POSIX
+ using native_string_type = std::string;
+#endif
+ }
+
+#if defined(NANA_WINDOWS)
+ const detail::native_string_type to_nstring(const std::string&);
+ const detail::native_string_type& to_nstring(const std::wstring&);
+ detail::native_string_type to_nstring(std::string&&);
+ detail::native_string_type&& to_nstring(std::wstring&&);
+#else //POSIX
+ const detail::native_string_type& to_nstring(const std::string&);
+ const detail::native_string_type to_nstring(const std::wstring&);
+ detail::native_string_type&& to_nstring(std::string&&);
+ detail::native_string_type to_nstring(std::wstring&&);
+#endif
+ detail::native_string_type to_nstring(int);
+ detail::native_string_type to_nstring(double);
+ detail::native_string_type to_nstring(std::size_t);
+}
+
+
+namespace nana
+{
+ inline unsigned make_rgb(unsigned char red, unsigned char green, unsigned char blue)
+ {
+ return ((unsigned(red) << 16)|((unsigned(green)<<8))|blue);
+ }
+}
+
+#include
+#endif //NANA_DEPLOY_HPP
diff --git a/GUI/nana/filesystem/filesystem.hpp b/GUI/nana/filesystem/filesystem.hpp
new file mode 100644
index 0000000..79bfdce
--- /dev/null
+++ b/GUI/nana/filesystem/filesystem.hpp
@@ -0,0 +1,627 @@
+/**
+ * A ISO C++ filesystem Implementation
+ * Nana C++ Library(http://www.nanapro.org)
+ * Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com)
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * @file nana/filesystem/filesystem.hpp
+ * @author Ariel Vina-Rodriguez, Jinhao
+ * @brief Mimic std::filesystem
+ * and need VC2015 or a C++11 compiler. With a few correction can be compiler by VC2013
+ */
+
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf --- pdf of std draft N4100 2014-07-04
+// http://en.cppreference.com/w/cpp/experimental/fs
+// http://cpprocks.com/introduction-to-tr2-filesystem-library-in-vs2012/ --- TR2 filesystem in VS2012
+// https://msdn.microsoft.com/en-us/library/hh874694%28v=vs.140%29.aspx --- C++ 14, the header VS2015
+// https://msdn.microsoft.com/en-us/library/hh874694%28v=vs.120%29.aspx --- header VS2013
+// http://cplusplus.github.io/filesystem-ts/working-draft.html --- in html format
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4099.html --- in html format
+// http://article.gmane.org/gmane.comp.lib.boost.devel/256220 --- The filesystem TS unanimously approved by ISO.
+// http://theboostcpplibraries.com/boost.filesystem --- Boost docs
+// http://www.boost.org/doc/libs/1_58_0/libs/filesystem/doc/index.htm ---
+// http://www.boost.org/doc/libs/1_34_0/libs/filesystem/doc/index.htm
+// http://www.boost.org/doc/libs/1_58_0/boost/filesystem.hpp
+// https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.200x --- Table 1.4. g++ C++ Technical Specifications Implementation Status
+
+#ifndef NANA_FILESYSTEM_HPP
+#define NANA_FILESYSTEM_HPP
+#include
+
+//Filesystem Selection
+#include
+
+#define NANA_USING_NANA_FILESYSTEM 0
+#define NANA_USING_STD_FILESYSTEM 0
+#define NANA_USING_BOOST_FILESYSTEM 0
+
+//#define NANA_FILESYSTEM_FORCE 1
+
+#if (defined(NANA_FILESYSTEM_FORCE) || ( (defined(STD_FILESYSTEM_NOT_SUPPORTED) && !defined(BOOST_FILESYSTEM_AVAILABLE)) && !(defined(BOOST_FILESYSTEM_FORCE) || defined(STD_FILESYSTEM_FORCE)) ) )
+#undef NANA_USING_NANA_FILESYSTEM
+#define NANA_USING_NANA_FILESYSTEM 1
+
+#elif (defined(BOOST_FILESYSTEM_AVAILABLE) && ( defined(BOOST_FILESYSTEM_FORCE) || ( defined(STD_FILESYSTEM_NOT_SUPPORTED) && !defined(STD_FILESYSTEM_FORCE) ) ))
+#undef NANA_USING_BOOST_FILESYSTEM
+#define NANA_USING_BOOST_FILESYSTEM 1
+# include
+# include
+
+// inline boost::filesystem into std::filesystem
+namespace std {
+ namespace filesystem {
+ inline namespace boost_filesystem {
+ using namespace boost::filesystem;
+ using file_time_type = std::chrono::time_point;
+
+ enum class file_type {
+ none = boost::filesystem::file_type::status_unknown,
+ not_found = boost::filesystem::file_type::file_not_found,
+ regular = boost::filesystem::file_type::regular_file,
+ directory = boost::filesystem::file_type::directory_file,
+ symlink = boost::filesystem::file_type::symlink_file,
+ block = boost::filesystem::file_type::block_file,
+ character = boost::filesystem::file_type::character_file,
+ fifo = boost::filesystem::file_type::fifo_file,
+ socket = boost::filesystem::file_type::socket_file,
+ unknown = boost::filesystem::file_type::type_unknown,
+ };
+ // Boost dont include generic_u8string
+ // http://www.boost.org/doc/libs/1_66_0/boost/filesystem/path.hpp
+ //
+ // Boost versions: 1.67.0, 1.66.0, ... 1.56.0 enable directory_iterator C++11 range-base for
+ // http://www.boost.org/doc/libs/1_66_0/boost/filesystem/operations.hpp
+ // but travis come with an oooold version of boost
+ // 1.55.0 NOT enable directory_iterator C++11 range-base for
+ // http://www.boost.org/doc/libs/1_54_0/boost/filesystem/operations.hpp
+ #if BOOST_VERSION < 105600
+ namespace boost { // todo ??
+ // enable directory_iterator C++11 range-base for statement use --------------------//
+
+ // begin() and end() are only used by a range-based for statement in the context of
+ // auto - thus the top-level const is stripped - so returning const is harmless and
+ // emphasizes begin() is just a pass through.
+ inline const directory_iterator& begin(const directory_iterator& iter) BOOST_NOEXCEPT
+ {
+ return iter;
+ }
+
+ inline directory_iterator end(const directory_iterator&) BOOST_NOEXCEPT
+ {
+ return directory_iterator();
+ }
+ }
+ #endif
+ } // boost_filesystem
+ } // filesystem
+} // std
+
+#else
+# undef NANA_USING_STD_FILESYSTEM
+# define NANA_USING_STD_FILESYSTEM 1
+ //Detects whether the compiler supports std::filesystem under current options
+# if ((defined(_MSC_VER) && (_MSC_VER >= 1912) && defined(_MSVC_LANG) && _MSVC_LANG >= 201703)) || \
+ ((__cplusplus >= 201703L) && \
+ (defined(__clang__) && (__clang_major__ >= 7) || \
+ (!defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 8))) )
+# include
+# else
+# include
+ namespace std{
+ namespace filesystem{
+ using namespace std::experimental::filesystem;
+ }
+ }
+# undef NANA_USING_STD_EXPERIMENTAL_FILESYSTEM
+# define NANA_USING_STD_EXPERIMENTAL_FILESYSTEM
+# endif
+#endif // BOOST_FILESYSTEM and NANA_FILESYSTEM
+
+#if NANA_USING_NANA_FILESYSTEM
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+namespace nana {
+ namespace filesystem {
+
+ enum class file_type
+ {
+ none = 0, ///< has not been determined or an error occurred while trying to determine
+ not_found = -1, ///< Pseudo-type: file was not found. Is not considered an error
+ regular = 1,
+ directory = 2,
+ symlink = 3, ///< Symbolic link file
+ block = 4, ///< Block special file
+ character = 5, ///< Character special file
+ fifo = 6, ///< FIFO or pipe file
+ socket = 7,
+ unknown = 8 ///< The file does exist, but is of an operating system dependent type not covered by any of the other
+ };
+
+ enum class perms
+ {
+ none = 0, ///< There are no permissions set for the file.
+ all = 0x1FF, ///< owner_all | group_all | others_all
+ mask = 0xFFF, ///< all | set_uid | set_gid | sticky_bit.
+ unknown = 0xFFFF ///< not known, such as when a file_status object is created without specifying the permissions
+ };
+ //enum class copy_options;
+
+ enum class directory_options
+ {
+ none,
+ follow_directory_symlink,
+ skip_permission_denied
+ };
+
+ struct space_info
+ {
+ uintmax_t capacity;
+ uintmax_t free;
+ uintmax_t available;
+ };
+
+ using file_time_type = std::chrono::time_point; ///< trivial-clock> ;
+
+ class file_status
+ {
+ file_type m_ft = file_type::none;
+ perms m_prms = perms::unknown;
+
+ public:
+ explicit file_status(file_type ft = file_type::none, perms prms = perms::unknown);
+
+ // observers
+ file_type type() const;
+
+ perms permissions() const;
+
+ // modifiers
+ void type(file_type ft);
+
+ void permissions(perms prms);
+
+ private:
+ file_type value_;
+ perms perms_;
+ };
+
+ /// concerned only with lexical and syntactic aspects and does not necessarily exist in
+ /// external storage, and the pathname is not necessarily valid for the current operating system
+ /// or for a particular file system
+ /// A sequence of elements that identify the location of a file within a filesystem.
+ /// The elements are the:
+ /// rootname (opt), root-directory (opt), and an optional sequence of filenames.
+ /// The maximum number of elements in the sequence is operating system dependent.
+ class path
+ {
+ public:
+#if defined(NANA_WINDOWS)
+ using value_type = wchar_t;
+ const static value_type preferred_separator = L'\\';
+#else
+ using value_type = char;
+ const static value_type preferred_separator = '/';
+#endif
+ using string_type = std::basic_string;
+
+ path() = default;
+
+ template
+ path(const Source &source)
+ {
+ _m_assign(source);
+ }
+
+ // modifiers
+ void clear() noexcept;
+
+ path &make_preferred();
+
+ path &remove_filename();
+ //path& replace_filename(const path& replacement);
+ //path& replace_extension(const path& replacement = path());
+ //void swap(path& rhs) noexcept;
+
+ // decomposition
+ path root_name() const;
+
+ path root_directory() const;
+
+ path root_path() const;
+
+ path relative_path() const;
+
+ path parent_path() const;
+
+ path filename() const;
+
+ path stem() const;
+
+ path extension() const;
+
+ // query
+ bool empty() const noexcept;
+
+ bool has_root_name() const
+ { return !root_name().empty(); }
+
+ bool has_root_directory() const
+ { return !root_directory().empty(); }
+
+ bool has_root_path() const
+ { return !root_path().empty(); }
+
+ bool has_relative_path() const
+ { return !relative_path().empty(); }
+
+ bool has_parent_path() const
+ { return !parent_path().empty(); }; // temp;;
+ bool has_filename() const
+ { return !filename().empty(); }; // temp;
+ //bool has_stem() const;
+ bool has_extension() const
+ { return !extension().empty(); }; // temp
+ bool is_absolute() const;
+
+ bool is_relative() const;
+
+ int compare(const path &other) const;
+
+ file_type what() const;
+
+ const value_type *c_str() const;
+
+ const string_type &native() const;
+
+ operator string_type() const;
+
+ std::string string() const;
+
+ std::wstring wstring() const;
+
+ // std::string u8string() const;
+ // std::u16string u16string() const;
+ // std::u32string u32string() const;
+
+ std::string generic_string() const;
+
+ std::wstring generic_wstring() const;
+
+ // std::string generic_u8string() const;
+ // std::u16string generic_u16string() const;
+ // std::u32string generic_u32string() const;
+
+ path lexically_normal() const;
+
+ //appends
+ path &operator/=(const path &other);
+
+ template
+ path &operator/=(const Source &source)
+ {
+ path other(source);
+ return this->operator/=(other);
+ }
+
+ template
+ path &append(const Source &source)
+ {
+ path other(source);
+ return this->operator/=(other);
+ }
+
+ private:
+ void _m_assign(const std::string &source_utf8);
+
+ void _m_assign(const std::wstring &source);
+
+ private:
+ string_type pathstr_;
+ };
+
+ bool operator==(const path &lhs, const path &rhs);
+
+ bool operator!=(const path &lhs, const path &rhs);
+
+ bool operator<(const path &lhs, const path &rhs);
+
+ bool operator>(const path &lhs, const path &rhs);
+
+ path operator/(const path &lhs, const path &rhs);
+
+
+ class filesystem_error
+ : public std::system_error
+ {
+ public:
+ explicit filesystem_error(const std::string &msg, std::error_code);
+
+ filesystem_error(const std::string &msg, const path &path1, std::error_code err);
+
+ filesystem_error(const std::string &msg, const path &path1, const path &path2, std::error_code err);
+
+ const path &path1() const noexcept;
+
+ const path &path2() const noexcept;
+ // const char* what() const noexcept;
+ private:
+ path path1_;
+ path path2_;
+ };
+
+
+ class directory_entry
+ {
+ public:
+ directory_entry() = default;
+
+ explicit directory_entry(const filesystem::path &);
+
+ //modifiers
+ void assign(const filesystem::path &);
+
+ void replace_filename(const filesystem::path &);
+
+ //observers
+ file_status status() const;
+
+ operator const filesystem::path &() const
+ { return path_; };
+
+ const filesystem::path &path() const;
+
+ private:
+ filesystem::path path_;
+ };
+
+ /// InputIterator that iterate over the sequence of directory_entry elements representing the files in a directory, not an recursive_directory_iterator
+ class directory_iterator : public std::iterator
+ {
+ using find_handle = void *;
+ public:
+
+ directory_iterator() noexcept;
+
+ explicit directory_iterator(const path &p);
+
+ directory_iterator(const path &p, directory_options opt);
+
+ const value_type &operator*() const;
+
+ const value_type *operator->() const;
+
+ directory_iterator &operator++();
+
+ directory_iterator operator++(int); ///< extention
+
+ bool equal(const directory_iterator &x) const;
+
+ private:
+ template
+ static bool _m_ignore(const Char *p)
+ {
+ while (*p == '.')
+ ++p;
+ return (*p == 0);
+ }
+
+ void _m_prepare(const path &file_path);
+
+ void _m_read();
+
+ private:
+ bool end_{false};
+ path::string_type path_;
+ directory_options option_{directory_options::none};
+
+ std::shared_ptr find_ptr_;
+ find_handle handle_{nullptr};
+ value_type value_;
+ };
+
+ /// enable directory_iterator range-based for statements
+ inline directory_iterator begin(directory_iterator iter) noexcept
+ {
+ return iter;
+ }
+
+ inline directory_iterator end(const directory_iterator &) noexcept
+ {
+ return {};
+ }
+
+
+ //class recursive_directory_iterator;
+ //// enable recursive_directory_iterator range-based for statements
+ //recursive_directory_iterator begin(recursive_directory_iterator iter) noexcept;
+ //recursive_directory_iterator end(const recursive_directory_iterator&) noexcept;
+
+ //template
+ inline bool operator==(const directory_iterator/**/ &x, const directory_iterator/**/ &y)
+ {
+ return x.equal(y);
+ }
+
+ //template
+ inline bool operator!=(const directory_iterator/**/ &x, const directory_iterator/**/ &y)
+ {
+ return !x.equal(y);
+ }
+
+
+ file_status status(const path &p);
+
+ file_status status(const path &p, std::error_code &);
+
+ std::uintmax_t file_size(const path &p);
+
+ std::uintmax_t file_size(const path &p, std::error_code &ec) noexcept;
+
+ inline bool is_directory(file_status s) noexcept
+ { return s.type() == file_type::directory; }
+
+ bool is_directory(const path &p);
+
+ bool is_directory(const path &p, std::error_code &ec) noexcept;
+
+ inline bool is_regular_file(file_status s) noexcept
+ {
+ return s.type() == file_type::regular;
+ }
+
+ inline bool is_regular_file(const path &p)
+ {
+ return is_regular_file(status(p));
+ }
+ // bool is_regular_file(const path& p, error_code& ec) noexcept; // todo:
+ // Returns: is_regular_file(status(p, ec)).Returns false if an error occurs. // todo:
+
+ inline bool is_empty(const path &p)
+ {
+ auto fs = status(p);
+
+ if (is_directory(fs))
+ return (directory_iterator() == directory_iterator(p));
+
+ return (file_size(p) == 0);
+ }
+ // bool is_empty(const path& p, error_code& ec) noexcept;
+
+
+ bool create_directories(const path &p);
+
+ //bool create_directories(const path& p, error_code& ec) noexcept;
+ bool create_directory(const path &p);
+
+ //bool create_directory(const path& p, error_code& ec) noexcept;
+ bool create_directory(const path &p, const path &attributes);
+ //bool create_directory(const path& p, const path& attributes, error_code& ec) noexcept;
+
+
+ /// The time of last data modification of p, determined as if by the value of the POSIX
+ /// stat structure member st_mtime obtained as if by POSIX stat().
+ file_time_type last_write_time(const path &p);
+ /// returns file_time_type::min() if an error occurs
+ //file_time_type last_write_time(const path& p, error_code& ec) noexcept;
+
+
+ path current_path();
+
+ //path current_path(error_code& ec);
+ void current_path(const path &p); ///< chdir
+ //void current_path(const path& p, error_code& ec) noexcept;
+
+ bool remove(const path &p);
+
+ bool remove(const path &p, std::error_code &ec); // noexcept;
+
+ //uintmax_t remove_all(const path& p);
+ //uintmax_t remove_all(const path& p, error_code& ec) noexcept;
+
+ template
+ std::basic_string parent_path(const std::basic_string &path)
+ {
+ auto index = path.size();
+
+ if (index)
+ {
+ auto str = path.c_str();
+
+ for (--index; index > 0; --index)
+ {
+ auto c = str[index];
+ if (c != '\\' && c != '/')
+ break;
+ }
+
+ for (--index; index > 0; --index)
+ {
+ auto c = str[index];
+ if (c == '\\' || c == '/')
+ break;
+ }
+ }
+
+ return index ? path.substr(0, index + 1) : std::basic_string();
+ }
+
+ path absolute(const path& p);
+ path absolute(const path& p, std::error_code& err);
+
+ path canonical(const path& p);
+ path canonical(const path& p, std::error_code& err);
+
+ path weakly_canonical(const path& p);
+ path weakly_canonical(const path& p, std::error_code& err);
+
+ bool exists( file_status s ) noexcept;
+ bool exists( const path& p );
+ bool exists( const path& p, std::error_code& ec ) noexcept;
+ } //end namespace filesystem
+} //end namespace nana
+
+namespace std
+{
+ namespace filesystem
+ {
+#if defined(_MSC_VER) && ((!defined(_MSVC_LANG)) || _MSVC_LANG < 201703)
+ using namespace ::nana::filesystem;
+#else
+ inline namespace nana_filesystem
+ {
+ using namespace ::nana::filesystem;
+ }
+#endif
+ }
+}
+
+
+#else // not #if NANA_USING_NANA_FILESYSTEM and not BOOST_FILESYSTEM, also incomplete STD_FILESYSTEM
+//Implements the missing functions for various version of experimental/filesystem
+ namespace std
+ {
+ namespace filesystem
+ {
+#if defined(_MSC_VER) && ((!defined(_MSVC_LANG)) || (_MSVC_LANG < 201703))
+ path absolute(const path& p);
+ path absolute(const path& p, std::error_code& err);
+
+ path canonical(const path& p);
+ path canonical(const path& p, std::error_code& err);
+
+ path weakly_canonical(const path& p);
+ path weakly_canonical(const path& p, std::error_code& err);
+#endif
+/*
+#if defined(NANA_MINGW) // todo ??
+ bool exists( std::filesystem::file_status s ) noexcept;
+ bool exists( const std::filesystem::path& p );
+ bool exists( const std::filesystem::path& p, std::error_code& ec ) noexcept;
+#endif
+*/
+ //Visual Studio 2017
+#if (defined(NANA_USING_STD_EXPERIMENTAL_FILESYSTEM) && defined(_MSC_VER) && (_MSC_VER > 1912)) || \
+ (!defined(__clang__) && defined(__GNUC__) && (__cplusplus < 201603 || (__GNUC__* 100 + __GNUC_MINOR__ < 801)))
+ path weakly_canonical(const path& p);
+ path weakly_canonical(const path& p, std::error_code& err);
+#endif
+ } // namespace filesystem
+ } // namespace std
+
+#endif // incomplete STD_FILESYSTEM
+
+#include
+#endif //NANA_FILESYSTEM_HPP
diff --git a/GUI/nana/filesystem/filesystem_ext.hpp b/GUI/nana/filesystem/filesystem_ext.hpp
new file mode 100644
index 0000000..3eca8f9
--- /dev/null
+++ b/GUI/nana/filesystem/filesystem_ext.hpp
@@ -0,0 +1,130 @@
+/**
+* Nana C++ Library(http://www.nanapro.org)
+* Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com)
+*
+* Distributed under the Boost Software License, Version 1.0.
+* (See accompanying file LICENSE_1_0.txt or copy at
+* http://www.boost.org/LICENSE_1_0.txt)
+*
+* @file nana\filesystem\filesystem_ext.hpp
+* @autor Ariel Vina-Rodriguez:
+* @brief Some convenient extensions to the filesystem library.
+*
+*/
+
+#ifndef NANA_FILESYSTEM_EXT_HPP
+#define NANA_FILESYSTEM_EXT_HPP
+
+#include
+#include
+
+namespace nana
+{
+namespace filesystem_ext
+{
+
+#if defined(NANA_WINDOWS)
+ constexpr auto const def_root = "C:";
+ constexpr auto const def_rootstr = "C:\\";
+ constexpr auto const def_rootname = "Local Drive(C:)";
+#elif defined(NANA_POSIX)
+ constexpr auto const def_root = "/";
+ constexpr auto const def_rootstr = "/";
+ constexpr auto const def_rootname = "Root/";
+#endif
+
+std::filesystem::path path_user(); ///< extention ?
+
+inline bool is_directory(const std::filesystem::directory_entry& dir) noexcept
+{
+ return is_directory(dir.status());
+}
+
+//template // DI = directory_iterator from std, boost, or nana : return directory_entry
+class directory_only_iterator : public std::filesystem::directory_iterator
+{
+ using directory_iterator = std::filesystem::directory_iterator;
+
+ directory_only_iterator& find_first()
+ {
+ directory_only_iterator end{};
+ while (*this != end)
+ {
+ if (is_directory((*(*this)).status()))
+ return *this;
+ this->directory_iterator::operator++();
+ }
+ return *this;
+ }
+public:
+ directory_only_iterator() = default;
+
+ template
+ directory_only_iterator(Arg&& arg, Args&&... args) : directory_iterator(arg, std::forward(args)...)
+ {
+ find_first();
+ }
+
+ directory_only_iterator& operator++()
+ {
+ this->directory_iterator::operator++();
+ return find_first();
+ }
+};
+
+inline directory_only_iterator begin(directory_only_iterator iter) noexcept
+{
+ return iter;
+}
+
+inline directory_only_iterator end(const directory_only_iterator&) noexcept
+{
+ return{};
+}
+
+//template // DI = directory_iterator from std, boost, or nana : value_type directory_entry
+class regular_file_only_iterator : public std::filesystem::directory_iterator
+{
+ using directory_iterator = std::filesystem::directory_iterator;
+ regular_file_only_iterator& find_first()
+ {
+ while (((*this) != directory_iterator{}) && !is_regular_file((**this).status()))
+ this->directory_iterator::operator++();
+ return (*this);
+ }
+public:
+ regular_file_only_iterator() = default;
+
+ template
+ regular_file_only_iterator(Arg&& arg, Args&&... args) : directory_iterator(std::forward(arg), std::forward(args)...)
+ {
+ find_first();
+ }
+
+ regular_file_only_iterator& operator++()
+ {
+ this->directory_iterator::operator++();
+ return find_first();
+ }
+};
+
+inline regular_file_only_iterator begin(regular_file_only_iterator iter) noexcept
+{
+ return iter;
+}
+
+inline regular_file_only_iterator end(const regular_file_only_iterator&) noexcept
+{
+ return{};
+}
+
+std::string pretty_file_size(const std::filesystem::path& path);
+
+std::string pretty_file_date(const std::filesystem::path& path);
+
+bool modified_file_time(const std::filesystem::path& p, struct tm&); ///< extention ?
+
+} // filesystem_ext
+} // nana
+
+#endif //NANA_FILESYSTEM_EXT_HPP
diff --git a/GUI/nana/fwd.hpp b/GUI/nana/fwd.hpp
new file mode 100644
index 0000000..c3795e3
--- /dev/null
+++ b/GUI/nana/fwd.hpp
@@ -0,0 +1,22 @@
+/*
+ * Forward Declarations
+ * Nana C++ Library(http://www.nanapro.org)
+ * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * @file: nana/fwd.hpp
+ *
+ */
+
+#ifndef NANA_FWD_HPP
+#define NANA_FWD_HPP
+
+namespace nana
+{
+ class filebox;
+ class msgbox;
+}//end namespace nana
+#endif //NANA_FWD_HPP
diff --git a/GUI/nana/gui.hpp b/GUI/nana/gui.hpp
new file mode 100644
index 0000000..09c2f7b
--- /dev/null
+++ b/GUI/nana/gui.hpp
@@ -0,0 +1,54 @@
+/**
+ * Nana GUI Header
+ * Nana C++ Library(http://www.nanapro.org)
+ * Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com)
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * @file nana/gui.hpp
+ * @description
+ * the header file contains the files required for running of Nana.GUI
+ */
+
+#ifndef NANA_GUI_HPP
+#define NANA_GUI_HPP
+
+#include "gui/compact.hpp"
+#include "gui/screen.hpp"
+#include "gui/widgets/form.hpp"
+#include "gui/drawing.hpp"
+#include "gui/msgbox.hpp"
+#include "gui/place.hpp"
+
+
+namespace nana
+{
+#ifdef NANA_AUTOMATIC_GUI_TESTING
+
+ /// @brief Take control of the GUI and optionally automatically tests it.
+ ///
+ /// @detail It transfers to nana the program flow control, which begin pumping messages
+ /// from the underlying OS, interpreting and sending it with suitable arguments
+ /// to the nana widgets that registered a response in the corresponding event.
+ /// It also accept arguments to be used in case of automatic GUI testing.
+ /// Other Way the arguments are ignored.
+ void exec(
+ unsigned wait = 1, ///< for the GUI to be constructed, in seconds
+ unsigned wait_end = 1, ///< for the GUI to be destructed, in seconds
+ std::function = {} ///< emit events to mimics user actions and may assert results
+ );
+
+ /// send a click message to this widget - useful in GUI testing
+ void click(widget& w);
+
+ /// in seconds
+ void Wait(unsigned wait = 0);
+#else
+ void exec();
+#endif
+
+
+}//end namespace nana
+#endif
diff --git a/GUI/nana/gui/animation.hpp b/GUI/nana/gui/animation.hpp
new file mode 100644
index 0000000..f908344
--- /dev/null
+++ b/GUI/nana/gui/animation.hpp
@@ -0,0 +1,88 @@
+/*
+ * An Animation Implementation
+ * Nana C++ Library(http://www.nanapro.org)
+ * Copyright(C) 2003-2020 Jinhao(cnjinhao@hotmail.com)
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * @file: nana/gui/animation.hpp
+ */
+
+#ifndef NANA_GUI_ANIMATION_HPP
+#define NANA_GUI_ANIMATION_HPP
+#include
+#include
+
+#include
+#include
+
+
+namespace nana
+{
+ class animation;
+ /// Holds the frames and frame builders. Have reference semantics for efficiency.
+ class frameset
+ {
+ friend class animation;
+ public:
+ /// function which builds frames.
+ using framebuilder = std::function;
+ public:
+ frameset();
+ void push_back(paint::image); ///< Inserts frames at the end.
+ void push_back(framebuilder fb, std::size_t length); ///< Inserts a framebuilder and the number of frames that it generates.
+ private:
+ struct impl;
+ std::shared_ptr impl_;
+ };
+ /// Easy way to display an animation or create an animated GUI
+ class animation
+ {
+ struct branch_t
+ {
+ frameset frames;
+ std::function condition;
+ };
+
+ struct impl;
+ class performance_manager;
+
+ /// Non-copyable
+ animation(const animation&) = delete;
+ animation& operator=(const animation&) = delete;
+ public:
+ animation(std::size_t fps = 23);
+ ~animation();
+
+ animation(animation&&);
+ animation& operator=(animation&&);
+
+ void push_back(frameset frms);
+
+ void looped(bool enable); ///< Enables or disables the animation repeating playback.
+
+ void play();
+
+ void pause();
+
+ /// Renders the animation at a fixed position
+ void output(window wd, const nana::point& pos);
+
+ /// Renders the animation at a rectangle
+ /**
+ * If the size of rectangle is not equal to the size of frame, it stretches the frame for the size of rectangle.
+ * @param wd Output window.
+ * @param r Generator of the rectangle. The generator gets called every time rendering occurs.
+ */
+ void output(window wd, std::function r);
+
+ void fps(std::size_t n);
+ std::size_t fps() const;
+ private:
+ std::unique_ptr impl_;
+ };
+} //end namespace nana
+#include
+#endif //NANA_GUI_ANIMATION_HPP
diff --git a/GUI/nana/gui/basis.hpp b/GUI/nana/gui/basis.hpp
new file mode 100644
index 0000000..d9b94de
--- /dev/null
+++ b/GUI/nana/gui/basis.hpp
@@ -0,0 +1,337 @@
+/**
+ * \file basis.hpp
+ * \brief This file provides basis class and data structures required by the GUI
+ *
+ * Basis Implementation
+ * Nana C++ Library(http://www.nanapro.org)
+ * Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com)
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+#ifndef NANA_GUI_BASIS_HPP
+#define NANA_GUI_BASIS_HPP
+
+#include
+
+#include "../basic_types.hpp"
+#include "../traits.hpp" //metacomp::fixed_type_set
+
+namespace nana
+{
+ namespace detail
+ {
+ struct basic_window;
+
+ struct native_window_handle_impl;
+ struct native_drawable_impl;
+ struct event_handle_impl;
+ }
+
+ struct accel_key
+ {
+ char key{ '\0' };
+ bool case_sensitive{ false };
+ bool alt{ false };
+ bool ctrl{ false };
+ bool shift{ false };
+ };
+
+ enum class checkstate
+ {
+ unchecked, checked, partial
+ };
+
+ enum class window_border
+ {
+ none,
+ left, right, top, bottom,
+ top_left, top_right, bottom_left, bottom_right
+ };
+
+ enum class window_relationship
+ {
+ owner, ///< Owner window.
+ parent, ///< Parent window.
+ either_po ///< One between owner and parent.
+ };
+
+ enum class bground_mode
+ {
+ none,
+ basic,
+ blend
+ };
+
+ enum class dragdrop_status
+ {
+ not_ready,
+ ready,
+ in_progress
+ };
+
+ namespace category
+ {
+ enum class flags
+ {
+ super,
+ widget = 0x1,
+ lite_widget = 0x3,
+ root = 0x5
+ };
+ //wait for constexpr
+ struct widget_tag{ static const flags value = flags::widget; };
+ struct lite_widget_tag : public widget_tag{ static const flags value = flags::lite_widget; };
+ struct root_tag : public widget_tag{ static const flags value = flags::root; };
+ }// end namespace category
+
+ using window = detail::basic_window*; ///< The window handle type representing nana window objects
+ using native_window_type = detail::native_window_handle_impl*; ///< The native window handle type representing system native windows. E.g, HWND in windows, Window in X11
+
+ using event_handle = detail::event_handle_impl*; ///< The event handle type representing nana window events
+ using native_drawable_type = detail::native_drawable_impl*; ///< The drawable handle type representing system native drawable objects. E.g. HDC in windows, Drawable in X11
+
+
+ struct keyboard
+ {
+ enum{
+ //Control Code for ASCII
+ start_of_headline = 0x1, //Ctrl+A
+ end_of_text = 0x3, //Ctrl+C
+ backspace = 0x8, tab = 0x9,
+ alt = 0x12,
+ enter_n = 0xA, enter = 0xD, enter_r = 0xD,
+ sync_idel = 0x16, //Ctrl+V
+ cancel = 0x18, //Ctrl+X
+ end_of_medium = 0x19, //Ctrl+Y
+ substitute = 0x1A, //Ctrl+Z
+ escape = 0x1B,
+ space = 0x20, //Space
+ del = 0x7F, //Delete
+ os_del = del, //Deprecated
+
+ //The following names are intuitive name of ASCII control codes
+ select_all = start_of_headline,
+ copy = end_of_text,
+ paste = sync_idel,
+ cut = cancel,
+ redo = end_of_medium,
+ undo = substitute,
+
+ //System Code for OS
+ os_tab = 0x09,
+ os_shift = 0x10,
+ os_ctrl = 0x11,
+ os_pageup = 0x21, os_pagedown,
+ os_arrow_left = 0x25, os_arrow_up, os_arrow_right, os_arrow_down,
+ os_insert = 0x2D,
+ os_end = 0x23, os_home //Pos 1
+ };
+ };
+
+ enum class cursor
+ {
+ hand = 60, ///< displays a hand to indicate a text or an element is clickable
+ arrow = 68, ///< the default shape
+ wait = 150, ///< indicates the system is currently busy
+ iterm = 152, ///< A text caret. Displays a caret to indicate the UI is input able
+ size_we = 108,
+ size_ns = 116,
+ size_top_left = 134,
+ size_top_right = 136,
+ size_bottom_left = 12,
+ size_bottom_right = 14
+ };
+
+ enum class mouse
+ {
+ any_button,
+ left_button,
+ middle_button,
+ right_button
+ };
+
+ enum class z_order_action
+ {
+ none,
+ bottom, ///< brings a window at the bottom of z-order.
+ top, ///< brings a widget at the top of the z-order.
+ topmost, ///< brings a window at the top of the z-order and stays here.
+ foreground ///< brings a window to the foreground.
+ };
+
+ /// Window appearance structure defined to specify the appearance of a form
+ struct appearance
+ {
+ bool taskbar;
+ bool floating;
+ bool no_activate;
+
+ bool minimize;
+ bool maximize;
+ bool sizable;
+
+ bool decoration;
+
+ appearance();
+ appearance(bool has_decoration, bool taskbar, bool floating, bool no_activate, bool min, bool max, bool sizable);
+ };
+
+
+/** @brief Provided to generate an appearance object with better readability and understandability
+
+A window has an appearance. This appearance can be specified when a window is being created.
+To determine the appearance of a window there is a structure named nana::appearance with
+a bool member for each feature with can be included or excluded in the "appearance" of the windows form.
+But in practical development is hard to describe the style of the appearance using the struct nana::appearance.
+If a form would to be defined without min/max button and sizable border, then
+
+\code{.CPP}
+ nana::form form(x, y, width, height, nana::appearance(false, false, false, true, false));
+\endcode
+
+This piece of code may be confusing because of the 5 parameters of the constructor of `nana::form`. So the library provides a helper class for making it easy.
+For better readability and understandability Nana provides three templates classes to generate an appearance object:
+nana::appear::decorate, nana::appear::bald and nana::appear::optional. Each provide an operator
+that return a corresponding nana::appearance with predefined values.
+*/
+ struct appear
+ {
+ struct minimize{};
+ struct maximize{};
+ struct sizable{};
+ struct taskbar{};
+ struct floating{};
+ struct no_activate{};
+
+ /** @brief Create an appearance of a window with "decoration" in non-client area, such as title bar
+ *
+ * We can create a form without min/max button and sizable border like this:
+ * \code{.CPP}
+ * using nana::appear;
+ * nana::form form(x, y, width, height, appear::decorate());
+ * \endcode
+ * The appearance created by appear::decorate<>() has a titlebar and borders that are draw by the
+ * platform- window manager. If a window needs a minimize button, it should be:
+ * \code{.CPP}
+ * appear::decorate()
+ * \endcode
+ */
+ template< typename Minimize = null_type,
+ typename Maximize = null_type,
+ typename Sizable = null_type,
+ typename Floating = null_type,
+ typename NoActive = null_type>
+ struct decorate
+ {
+ typedef meta::fixed_type_set set_type;
+
+ operator appearance() const
+ {
+ return appearance( true, true,
+ set_type::template count::value,
+ set_type::template count::value,
+ set_type::template count::value,
+ set_type::template count::value,
+ set_type::template count::value
+ );
+ }
+ };
+
+ /// Create an appearance of a window without "decoration" with no titlebar and no 3D-look borders.
+ template < typename Taskbar = null_type,
+ typename Floating = null_type,
+ typename NoActive = null_type,
+ typename Minimize = null_type,
+ typename Maximize = null_type,
+ typename Sizable = null_type>
+ struct bald
+ {
+ typedef meta::fixed_type_set set_type;
+
+ operator appearance() const
+ {
+ return appearance( false,
+ set_type::template count::value,
+ set_type::template count::value,
+ set_type::template count::value,
+ set_type::template count::value,
+ set_type::template count::value,
+ set_type::template count::value
+ );
+ }
+ };
+ /// Create a window with decoration depending on the first non-type template parameter
+ template < bool HasDecoration = true,
+ typename Sizable = null_type,
+ typename Taskbar = null_type,
+ typename Floating = null_type,
+ typename NoActive = null_type>
+ struct optional
+ {
+ typedef meta::fixed_type_set set_type;
+
+ operator appearance() const
+ {
+ return appearance(HasDecoration,
+ set_type::template count::value,
+ set_type::template count::value,
+ set_type::template count::value,
+ true, true,
+ set_type::template count::value);
+ }
+ };
+ };//end namespace appear
+
+ /// Interface for caret operations
+ class caret_interface
+ {
+ public:
+ virtual ~caret_interface() = default;
+
+ virtual bool activated() const = 0;
+ virtual void disable_throw() noexcept = 0;
+
+ virtual void effective_range(const rectangle& range) = 0;
+
+ virtual void position(const point& pos) = 0;
+ virtual point position() const = 0;
+
+ virtual void dimension(const size& size) = 0;
+ virtual size dimension() const = 0;
+
+ virtual void visible(bool visibility) = 0;
+ virtual bool visible() const = 0;
+ };//end class caret_interface
+
+ /// Interface for scroll operations
+ /**
+ * This interface provides methods to operate the scrollbars that are contained
+ * in a specific widget, such as listbox and treebox
+ */
+ class scroll_operation_interface
+ {
+ public:
+ virtual ~scroll_operation_interface() = default;
+
+ virtual bool visible(bool vert) const = 0;
+ };
+
+ namespace parameters
+ {
+ /// The system-wide parameters for mouse wheel
+ struct mouse_wheel
+ {
+ unsigned lines; ///< The number of lines to scroll when the vertical mouse wheel is moved.
+ unsigned characters; ///< The number of characters to scroll when the horizontal mouse wheel is moved.
+
+ mouse_wheel();
+ };
+ }
+}//end namespace nana
+
+#include
+#endif
diff --git a/GUI/nana/gui/compact.hpp b/GUI/nana/gui/compact.hpp
new file mode 100644
index 0000000..c4a9789
--- /dev/null
+++ b/GUI/nana/gui/compact.hpp
@@ -0,0 +1,57 @@
+/**
+ * Nana GUI Library Definition
+ * Nana C++ Library(http://www.nanapro.org)
+ * Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com)
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * @file nana/gui/compact.hpp
+ * @description
+ * the header file contains the files required for running of Nana.GUI
+ */
+
+#ifndef NANA_GUI_WVL_HPP
+#define NANA_GUI_WVL_HPP
+
+#include "programming_interface.hpp"
+
+namespace nana
+{
+ namespace detail
+ {
+ struct form_loader_private
+ {
+ template friend class form_loader;
+ private:
+ static void insert_form(::nana::widget*);
+ };
+
+ template
+ class form_loader
+ {
+ public:
+ template
+ Form & operator()(Args &&... args) const
+ {
+ auto p = new Form(std::forward(args)...);
+
+ if (p->empty())
+ throw std::runtime_error("form_loader failed to create the form");
+
+
+ detail::form_loader_private::insert_form(p);
+ if (IsVisible)
+ p->show();
+
+ return *p;
+ }
+
+ };
+ }
+
+ template
+ using form_loader = detail::form_loader