37 unsigned _shadowStyle;
39 BOOL _shouldUpdateContentRect;
40 BOOL _hasInitializeInstanceWithWindow;
45 DOMElement _DOMBodyElement;
46 DOMElement _DOMFocusElement;
47 DOMElement _DOMEventGuard;
48 DOMElement _DOMScrollingElement;
49 id _hideDOMScrollingElementTimeout;
51 CPArray _windowLevels;
55 BOOL _mouseDownIsRightClick;
56 CGPoint _lastMouseEventLocation;
58 CPTimeInterval _lastMouseUp;
59 CPTimeInterval _lastMouseDown;
68 CPPlatformPasteboard _platformPasteboard;
104 - (id)initWithContentRect:(CGRect)aRect
110 _contentRect = CGRectMakeCopy(aRect);
118 _platformPasteboard = [CPPlatformPasteboard new];
129 _hasInitializeInstanceWithWindow = YES;
143 return CGRectMakeCopy(_contentRect);
159 frame.origin = CGPointMakeZero();
163 var menuBarHeight = [[CPApp mainMenu] menuBarHeight];
165 frame.origin.y += menuBarHeight;
166 frame.size.height -= menuBarHeight;
177 - (void)setContentRect:(CGRect)aRect
179 if (!aRect || CGRectEqualToRect(_contentRect, aRect))
182 _contentRect = CGRectMakeCopy(aRect);
185 [
self updateNativeContentRect];
194 - (CGPoint)convertBaseToScreen:(CGPoint)aPoint
201 - (CGPoint)convertScreenToBase:(CGPoint)aPoint
211 return _DOMWindow !== NULL && _DOMWindow !== undefined;
217 - (void)deminiaturize:(
id)sender
220 if (_DOMWindow && typeof _DOMWindow[
"cpDeminiaturize"] ===
"function")
221 _DOMWindow.cpDeminiaturize();
225 - (void)miniaturize:(
id)sender
228 if (_DOMWindow && typeof _DOMWindow[
"cpMiniaturize"] ===
"function")
229 _DOMWindow.cpMiniaturize();
233 - (void)moveWindow:(
CPWindow)aWindow fromLevel:(
int)fromLevel toLevel:(
int)toLevel
236 if (!aWindow._isVisible)
239 var fromLayer = [
self layerAtLevel:fromLevel create:NO],
240 toLayer = [
self layerAtLevel:toLevel create:YES];
242 [fromLayer removeWindow:aWindow];
243 [toLayer insertWindow:aWindow atIndex:CPNotFound];
247 - (void)setLevel:(CPInteger)aLevel
252 if (_DOMWindow && _DOMWindow.cpSetLevel)
253 _DOMWindow.cpSetLevel(aLevel);
257 - (void)setHasShadow:(BOOL)shouldHaveShadow
259 _hasShadow = shouldHaveShadow;
262 if (_DOMWindow && _DOMWindow.cpSetHasShadow)
263 _DOMWindow.cpSetHasShadow(shouldHaveShadow);
267 - (void)setShadowStyle:(
int)aStyle
269 _shadowStyle = aStyle;
272 if (_DOMWindow && _DOMWindow.cpSetShadowStyle)
273 _shadowStyle.cpSetShadowStyle(aStyle);
288 _DOMWindow.document &&
289 ([aWindow isFullPlatformWindow]))
291 _DOMWindow.document.title = _title;
301 - (BOOL)_canUpdateContentRect
304 return _shouldUpdateContentRect && _hasInitializeInstanceWithWindow;
307 - (BOOL)_hasInitializeInstanceWithWindow
309 return _hasInitializeInstanceWithWindow;
312 - (void)_setShouldUpdateContentRect:(BOOL)aBoolean
314 _shouldUpdateContentRect = aBoolean;
319 #if PLATFORM(BROWSER)
void setPlatformWindow:(CPPlatformWindow aPlatformWindow)
A mutable key-value pair collection.
An immutable string (collection of characters).
CPInternetExplorerBrowserEngine
void setFullPlatformWindow:(BOOL shouldBeFullPlatformWindow)
function CPBrowserIsEngine(anEngine)