Cheng Zhao
61bca04dfd
Add the App.commandLine API to control Chromium's command line.
2013-05-17 15:39:44 +08:00
Cheng Zhao
394bf0a8d9
Add BrowserWindow.getFocusedWindow() API.
2013-05-16 23:00:43 +08:00
Cheng Zhao
5c3857790c
Add BrowserWindow.isFocused() API.
2013-05-16 22:56:52 +08:00
Cheng Zhao
eec8abf397
Add Menu.buildFromTemplate API to greatly simplify building menu.
2013-05-16 22:43:58 +08:00
Cheng Zhao
e58f115b43
Make MenuItem's type default to 'submenu' if it has submenu property.
2013-05-16 22:22:33 +08:00
Cheng Zhao
c2f6676c62
Add 'selector' property for MenuItem, which automatically calls first reponder's selector.
2013-05-16 20:53:10 +08:00
Cheng Zhao
fae3137463
Automatically convert menu with tile of 'Window' to Window menu in application menu.
2013-05-16 20:48:09 +08:00
Cheng Zhao
84c320ea7f
setApplicationMenu and sendActionToFirstResponder are Mac only.
2013-05-16 20:31:58 +08:00
Cheng Zhao
c5884bf273
Build application menu with the new menu API in default app.
2013-05-16 20:29:13 +08:00
Cheng Zhao
4984f30e48
Read menu item's properties in menu's delegate.
2013-05-16 20:06:25 +08:00
Cheng Zhao
84e721188b
Build node-webkit style Menu API arounding the delegate-style Menu API.
2013-05-16 19:34:23 +08:00
Cheng Zhao
faf7280d1f
Add API to SendActionToFirstResponder.
...
It's important to bind application menu items to curtain actions of
first responder, like 'quit', 'minimize', 'copy' etc. This API gives
developers ability to do most of them in javascript.
2013-05-16 17:25:02 +08:00
Cheng Zhao
5d985aae09
Calling delegate methods should pass command id of menu item.
2013-05-16 15:32:37 +08:00
Cheng Zhao
b16c19ce32
Convert generic accelerator to platform accelerator.
...
When creating menus, the accelerators must be converted to platform
accelerators before they can be used.
2013-05-16 15:24:18 +08:00
Cheng Zhao
995b9dacc9
Fix titles of submenus in application menu.
2013-05-16 14:39:12 +08:00
Cheng Zhao
937b811c8d
Add Menu.setApplicationMenu API to set main menu of NSApp.
2013-05-16 10:54:37 +08:00
Cheng Zhao
64a8664ffe
Fix places where Window should be BrowserWindow.
2013-05-15 22:17:27 +08:00
Cheng Zhao
06142aa2e8
Add 'Reload' in application menu. Fixes atom/atom-shell#4 .
2013-05-15 20:24:51 +08:00
Cheng Zhao
072ac8ba0b
Rename 'window' module to 'browser_window' module. Fix #3 .
2013-05-15 19:19:53 +08:00
Cheng Zhao
f477ec09c0
Implement some common web contents overrides.
2013-05-15 19:11:30 +08:00
Cheng Zhao
349ed4fd73
Implement window.moveTo and window.ResizeTo. Fix #2 .
2013-05-15 13:56:25 +08:00
Cheng Zhao
bfea9775a0
Fix typo in the comment.
2013-05-15 13:47:15 +08:00
Cheng Zhao
65c1ec4e94
Prevent submenu from getting destroyed bebore the container menu.
2013-05-14 22:17:25 +08:00
Cheng Zhao
fc9135d335
Add a context menu for the initial default app.
2013-05-14 21:39:00 +08:00
Cheng Zhao
3bcb5b11a4
Set accelerator for menu item by string in delegate.
2013-05-14 21:37:59 +08:00
Cheng Zhao
014b0a9a38
Add StringToAccelerator to parse a string as an accelerator.
2013-05-14 21:12:27 +08:00
Cheng Zhao
46c882f0ba
Emit 'execute' event when menu item is clicked.
2013-05-14 20:24:53 +08:00
Cheng Zhao
1bace4abb6
Improve error reporting in RPC by printing stack trace.
2013-05-14 20:00:44 +08:00
Cheng Zhao
d8a6c68bf9
Expose Menu's delegate methods in javascript.
2013-05-14 19:26:16 +08:00
Cheng Zhao
9ef9f6bf95
Fix the menu popup on OS X.
2013-05-14 19:25:14 +08:00
Cheng Zhao
d6103dd639
Expose Menu API in javascript.
2013-05-14 19:24:52 +08:00
Cheng Zhao
13c0a05fdd
Add popup method for Menu.
2013-05-14 16:50:56 +08:00
Cheng Zhao
667384ef74
Use Atom's icon.
2013-05-14 15:50:33 +08:00
Cheng Zhao
85e22c0709
Expose dialog.showMessageBox API.
2013-05-10 21:19:13 +08:00
Cheng Zhao
a5459da717
💄
2013-05-10 20:54:55 +08:00
Cheng Zhao
34e9132b68
Modify Window API to be more consistent.
...
* '_' becomes '-'
* removes 'position' field
* adds 'center' method.
2013-05-10 20:34:05 +08:00
Cheng Zhao
e6a9add691
Rename atom module to atom_delegate to avoid conflicts with Atom.
2013-05-07 20:33:50 +08:00
Cheng Zhao
1900ad4cb9
Make sure the 'closed' event is emitted before 'window-all-closed'.
2013-05-07 16:20:52 +08:00
Cheng Zhao
ffc0d4f516
Fix whitespace/line_length warnings of cpplint.
2013-05-07 11:43:21 +08:00
Cheng Zhao
dae98fa43f
Expose MenuModel's methods in js.
2013-05-07 00:03:34 +08:00
Cheng Zhao
7cc04035c4
Add Menu API. (WIP)
2013-05-06 20:27:09 +08:00
Cheng Zhao
5915591592
Pass the native window object directly in native dialog API.
2013-05-05 20:36:46 +08:00
Cheng Zhao
67f998357c
Make the CallbacksRegistry a separate module, though rather small.
2013-05-05 20:30:38 +08:00
Cheng Zhao
f725927c44
Use cross-platform callbacks in the dialog API.
2013-05-05 20:24:20 +08:00
Cheng Zhao
35441ad8fb
The unwrapArgs relies on the valueToMeta function.
2013-05-04 22:59:32 +08:00
Cheng Zhao
e7547363e2
Check whether id is valid when adding to weak map.
...
It's possible that the object has been added to weak map before and then
erased, so having an id property doesn't mean it's added in the weak map.
2013-05-04 22:57:17 +08:00
Cheng Zhao
6bf0d5d798
Modify funtion's names to make RPC code more easy to understand.
2013-05-04 21:38:25 +08:00
Cheng Zhao
36c260f4d5
Resupport cross-process callback.
...
It seems that it's avoidable to make callback cross-process when we
start to emitting events for GUI elements, without this feature our
implementation will be much more complicated. I will find a way to warn
about resources leak in browser.
2013-05-04 17:01:28 +08:00
Cheng Zhao
188bb5e225
Pass remote objects from renderer to browser by ID.
2013-05-03 21:51:06 +08:00
Cheng Zhao
ec43f740a7
Add the generialized showMessageBox API.
2013-05-03 21:03:26 +08:00