comparison mac/dw.m @ 766:82cde14ec084

Enable recalculating the key view loop (keyboard focus list) automatically. Also implemented dw_window_default() to set the initial focus to a view.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 18 Mar 2011 03:17:28 +0000
parents 2cace4e6e69a
children 9b0c22b58447
comparison
equal deleted inserted replaced
765:acbc44e6e11a 766:82cde14ec084
5727 5727
5728 DWView *view = [[DWView alloc] init]; 5728 DWView *view = [[DWView alloc] init];
5729 5729
5730 [window setContentView:view]; 5730 [window setContentView:view];
5731 [window setDelegate:view]; 5731 [window setDelegate:view];
5732 [window setAutorecalculatesKeyViewLoop:YES];
5732 [view release]; 5733 [view release];
5733 5734
5734 /* If it isn't a toplevel window... */ 5735 /* If it isn't a toplevel window... */
5735 if(hwndOwner) 5736 if(hwndOwner)
5736 { 5737 {
5948 * Sets the default focus item for a window/dialog. 5949 * Sets the default focus item for a window/dialog.
5949 * Parameters: 5950 * Parameters:
5950 * window: Toplevel window or dialog. 5951 * window: Toplevel window or dialog.
5951 * defaultitem: Handle to the dialog item to be default. 5952 * defaultitem: Handle to the dialog item to be default.
5952 */ 5953 */
5953 void API dw_window_default(HWND window, HWND defaultitem) 5954 void API dw_window_default(HWND handle, HWND defaultitem)
5954 { 5955 {
5955 NSLog(@"dw_window_default() unimplemented\n"); 5956 NSWindow *window = handle;
5957
5958 [window setInitialFirstResponder:defaultitem];
5956 } 5959 }
5957 5960
5958 /* 5961 /*
5959 * Sets window to click the default dialog item when an ENTER is pressed. 5962 * Sets window to click the default dialog item when an ENTER is pressed.
5960 * Parameters: 5963 * Parameters: