Building a more windowy experience

In the previous recipe, we added the possibility of using any and all of the functions provided by Node. In this recipe, let's now focus on making our app more window-like, with icons, menus, and so on. We want the user to really believe that they're using a native app, with all the features that they would be accustomed to. The following list of interesting subjects from https://electronjs.org/docs/api is just a short list of highlights, but there are many more available options:

clipboard To do copy and paste operations using the system's clipboard
dialog To show native system dialogs for messages, alerts, opening and saving files, and so on
globalShortcut To detect keyboard shortcuts
Menu, MenuItem To create a menu bar with menus and submenus
Notification To add desktop notifications
powerMonitor, powerSaveBlocker To monitor power state changes, and to disable entering sleep mode
screen To get information about the screen, displays, and so on
Tray To add icons and context menus to the system's tray

 

Let's add a few of these functions so that we can get a better-looking app that is more integrated to the desktop.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset