]> khamidou — GitHub mirrors - electron.git/commitdiff
:memo: BrowserWindow.setThumbarButton API.
authorHaojian Wu <hokein.wu@gmail.com>
Sun, 2 Aug 2015 05:07:55 +0000 (13:07 +0800)
committerHaojian Wu <hokein.wu@gmail.com>
Wed, 5 Aug 2015 05:55:04 +0000 (13:55 +0800)
docs/api/browser-window.md

index add5cfff8ba9b24dfbcd40ca899f176431ced6f1..73f9c97de58dbd64085ce1df5109e43071d4329b 100644 (file)
@@ -643,6 +643,35 @@ Sets a 16px overlay onto the current taskbar icon, usually used to convey some s
 
 __Note:__ This API is only available on Windows (Windows 7 and above)
 
+
+### BrowserWindow.setThumbarButtons(buttons)
+
+* `buttons` Array of `button` objects
+  * `button` Object
+     * `icon` [NativeImage](native-image.md) - The icon showing in thumbnail toolbar.
+     * `tooltip` String - (Option) - The text of the button's tooltip.
+     * `flags` Array of Strings - (Option) Control specific states and behaviors
+          of the button. By default, it uses `enabled`.
+       *  `enabled` - The button is active and available to the user.
+       *  `disabled` - The button is disabled. It is present, but has a visual state
+          that indicates that it will not respond to user action.
+       *  `dismissonclick` - When the button is clicked, the taskbar button's flyout
+          closes immediately.
+       *  `nobackground` - Do not draw a button border, use only the image.
+       *  `hidden` - The button is not shown to the user.
+       *  `noninteractive` - The button is enabled but not interactive; no pressed
+          button state is drawn. This value is intended for instances where the button
+          is used in a notification.
+     * `click` - Function
+
+Add a thumbnail toolbar with a specified set of buttons to the thumbnail image of
+a window in a taskbar button layout.
+
+__Note:__ This API is only available on Windows (Windows 7 and above).
+Once you setup the thumbnail toolbar, the toolbar cannot be removed due to the
+platform's limitation. But you can call the API with an empty array to clean the
+buttons.
+
 ### BrowserWindow.showDefinitionForSelection()
 
 Shows pop-up dictionary that searches the selected word on the page.