1. Stewart Mackenzie
  2. cappuccino-docs

Source

cappuccino-docs / cappuccino docs / cappuccino.org / learn / documentation / _c_p_platform_window_8j_source.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<!-- Mirrored from cappuccino.org/learn/documentation/_c_p_platform_window_8j_source.html by HTTrack Website Copier/3.x [XR&CO'2006], Mon, 20 Sep 2010 02:19:30 GMT -->
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Cappuccino API: AppKit/Platform/CPPlatformWindow.j Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>AppKit/Platform/CPPlatformWindow.j</h1><a href="_c_p_platform_window_8j.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * CPPlatformWindow.j</span>
<a name="l00003"></a>00003 <span class="comment"> * AppKit</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * Created by Francisco Tolmasky.</span>
<a name="l00006"></a>00006 <span class="comment"> * Copyright 2010, 280 North, Inc.</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
<a name="l00009"></a>00009 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span>
<a name="l00010"></a>00010 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00011"></a>00011 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00012"></a>00012 <span class="comment"> *</span>
<a name="l00013"></a>00013 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
<a name="l00014"></a>00014 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00015"></a>00015 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
<a name="l00016"></a>00016 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span>
<a name="l00019"></a>00019 <span class="comment"> * License along with this library; if not, write to the Free Software</span>
<a name="l00020"></a>00020 <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</span>
<a name="l00021"></a>00021 <span class="comment"> */</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 @<span class="keyword">import</span> &lt;Foundation/<a class="code" href="class_c_p_object.html" title="The root class from which most classes are subclassed.">CPObject</a>.j&gt;
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#import &quot;<a class="code" href="_platform_8h.html">Platform.h</a>&quot;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#import &quot;../CoreGraphics/CGGeometry.h&quot;</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 
<a name="l00029"></a><a class="code" href="_c_p_platform_window_8j.html#a1d934abcc8fc2fcb1736799c8ad7b022">00029</a> var <a class="code" href="_c_p_platform_window_8j.html#a1d934abcc8fc2fcb1736799c8ad7b022">PrimaryPlatformWindow</a>   = NULL;
<a name="l00030"></a>00030 
<a name="l00031"></a><a class="code" href="class_c_p_platform_window.html">00031</a> <span class="keyword">@implementation </span><a class="code" href="class_c_p_platform_window.html">CPPlatformWindow</a> : <a class="code" href="class_c_p_object.html" title="The root class from which most classes are subclassed.">CPObject</a>
<a name="l00032"></a>00032 {
<a name="l00033"></a>00033     CGRect          _contentRect;
<a name="l00034"></a>00034 
<a name="l00035"></a>00035     CPInteger       _level;
<a name="l00036"></a>00036     BOOL            _hasShadow;
<a name="l00037"></a>00037     <span class="keywordtype">unsigned</span>        _shadowStyle;
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 <span class="preprocessor">#if PLATFORM(DOM)</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>    DOMWindow       _DOMWindow;
<a name="l00041"></a>00041 
<a name="l00042"></a>00042     DOMElement      _DOMBodyElement;
<a name="l00043"></a>00043     DOMElement      _DOMFocusElement;
<a name="l00044"></a>00044 
<a name="l00045"></a>00045     <a class="code" href="class_c_p_array.html" title="A mutable array backed by a JavaScript Array.A mutable array class backed by a JavaScript...">CPArray</a>         _windowLevels;
<a name="l00046"></a>00046     <a class="code" href="class_c_p_dictionary.html" title="A mutable key-value pair collection.">CPDictionary</a>    _windowLayers;
<a name="l00047"></a>00047 
<a name="l00048"></a>00048     BOOL            _mouseIsDown;
<a name="l00049"></a>00049     <a class="code" href="class_c_p_window.html">CPWindow</a>        _mouseDownWindow;
<a name="l00050"></a>00050     CPTimeInterval  _lastMouseUp;
<a name="l00051"></a>00051     CPTimeInterval  _lastMouseDown;
<a name="l00052"></a>00052 
<a name="l00053"></a>00053     Object          _charCodes;
<a name="l00054"></a>00054     <span class="keywordtype">unsigned</span>        _keyCode;
<a name="l00055"></a>00055     <span class="keywordtype">unsigned</span>        _lastKey;
<a name="l00056"></a>00056     BOOL            _capsLockActive;
<a name="l00057"></a>00057     BOOL            _ignoreNativeCopyOrCutEvent;
<a name="l00058"></a>00058     BOOL            _ignoreNativePastePreparation;
<a name="l00059"></a>00059 
<a name="l00060"></a>00060     BOOL            _DOMEventMode;
<a name="l00061"></a>00061 
<a name="l00062"></a>00062     <span class="comment">// Native Pasteboard Support</span>
<a name="l00063"></a>00063     DOMElement      _DOMPasteboardElement;
<a name="l00064"></a>00064     <a class="code" href="class_c_p_event.html">CPEvent</a>         _pasteboardKeyDownEvent;
<a name="l00065"></a>00065 
<a name="l00066"></a>00066     <a class="code" href="class_c_p_string.html" title="An immutable string (collection of characters).">CPString</a>        _overriddenEventType;
<a name="l00067"></a>00067 <span class="preprocessor">#endif</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span>}
<a name="l00069"></a>00069 
<a name="l00070"></a><a class="code" href="class_c_p_platform_window.html#a79df3b107d63d994576fdf3f77bbbdaf">00070</a> + (<a class="code" href="class_c_p_set.html" title="An unordered collection of objects.">CPSet</a>)visiblePlatformWindows
<a name="l00071"></a>00071 {
<a name="l00072"></a>00072     <span class="keywordflow">return</span> [<a class="code" href="class_c_p_set.html" title="An unordered collection of objects.">CPSet</a> <a class="code" href="class_c_p_set.html#a89623be28c3a0913db1967b667874d39">set</a>];
<a name="l00073"></a>00073 }
<a name="l00074"></a>00074 
<a name="l00075"></a><a class="code" href="class_c_p_platform_window.html#a5b0f6e7fb5ccfe5a7a4b4423ba65691a">00075</a> + (<a class="code" href="class_c_p_platform_window.html">CPPlatformWindow</a>)primaryPlatformWindow
<a name="l00076"></a>00076 {
<a name="l00077"></a>00077     <span class="keywordflow">return</span> <a class="code" href="_c_p_platform_window_8j.html#a1d934abcc8fc2fcb1736799c8ad7b022">PrimaryPlatformWindow</a>;
<a name="l00078"></a>00078 }
<a name="l00079"></a>00079 
<a name="l00080"></a><a class="code" href="class_c_p_platform_window.html#a642e11c999d55b1e66ed402fc8253623">00080</a> + (void)setPrimaryPlatformWindow:(<a class="code" href="class_c_p_platform_window.html">CPPlatformWindow</a>)aPlatformWindow
<a name="l00081"></a>00081 {
<a name="l00082"></a>00082     <a class="code" href="_c_p_platform_window_8j.html#a1d934abcc8fc2fcb1736799c8ad7b022">PrimaryPlatformWindow</a> = aPlatformWindow;
<a name="l00083"></a>00083 }
<a name="l00084"></a>00084 
<a name="l00085"></a><a class="code" href="class_c_p_platform_window.html#a6f4aa275aac46337677dedebf12e2885">00085</a> - (id)initWithContentRect:(CGRect)aRect
<a name="l00086"></a>00086 {
<a name="l00087"></a>00087     <span class="keyword">self</span> = [<span class="keyword">super</span> init];
<a name="l00088"></a>00088 
<a name="l00089"></a>00089     <span class="keywordflow">if</span> (<span class="keyword">self</span>)
<a name="l00090"></a>00090     {
<a name="l00091"></a>00091         _contentRect = _CGRectMakeCopy(aRect);
<a name="l00092"></a>00092 
<a name="l00093"></a>00093 <span class="preprocessor">#if PLATFORM(DOM)</span>
<a name="l00094"></a>00094 <span class="preprocessor"></span>        _windowLevels = [];
<a name="l00095"></a>00095         _windowLayers = [<a class="code" href="class_c_p_dictionary.html" title="A mutable key-value pair collection.">CPDictionary</a> <a class="code" href="class_c_p_dictionary.html#af9820df885270d5200f27f9a539aca28">dictionary</a>];
<a name="l00096"></a>00096         
<a name="l00097"></a>00097         _charCodes = {};
<a name="l00098"></a>00098 <span class="preprocessor">#endif</span>
<a name="l00099"></a>00099 <span class="preprocessor"></span>    }
<a name="l00100"></a>00100 
<a name="l00101"></a>00101     <span class="keywordflow">return</span> <span class="keyword">self</span>;
<a name="l00102"></a>00102 }
<a name="l00103"></a>00103 
<a name="l00104"></a><a class="code" href="class_c_p_platform_window.html#a46f36600987fa66f0a0b7f8c830c0522">00104</a> - (id)init
<a name="l00105"></a>00105 {
<a name="l00106"></a>00106     <span class="keywordflow">return</span> [<span class="keyword">self</span> <a class="code" href="class_c_p_platform_window.html#a6f4aa275aac46337677dedebf12e2885">initWithContentRect</a>:_CGRectMake(0.0, 0.0, 400.0, 500.0)];
<a name="l00107"></a>00107 }
<a name="l00108"></a>00108 
<a name="l00109"></a><a class="code" href="class_c_p_platform_window.html#a54a1df574df2e689ba9629b691886b14">00109</a> - (CGRect)contentRect
<a name="l00110"></a>00110 {
<a name="l00111"></a>00111     <span class="keywordflow">return</span> _CGRectMakeCopy(_contentRect);
<a name="l00112"></a>00112 }
<a name="l00113"></a>00113 
<a name="l00114"></a><a class="code" href="class_c_p_platform_window.html#a8a9d11800bee1bbc907d14b138855db1">00114</a> - (CGRect)contentBounds
<a name="l00115"></a>00115 {
<a name="l00116"></a>00116     var contentBounds = [<span class="keyword">self</span> <a class="code" href="class_c_p_platform_window.html#a54a1df574df2e689ba9629b691886b14">contentRect</a>];
<a name="l00117"></a>00117 
<a name="l00118"></a>00118     contentBounds.origin = _CGPointMakeZero();
<a name="l00119"></a>00119 
<a name="l00120"></a>00120     <span class="keywordflow">return</span> contentBounds;
<a name="l00121"></a>00121 }
<a name="l00122"></a>00122 
<a name="l00123"></a><a class="code" href="class_c_p_platform_window.html#a29e1c5e54d8454ab90f1cfc79ad38b66">00123</a> - (CGRect)visibleFrame
<a name="l00124"></a>00124 {
<a name="l00125"></a>00125     var <a class="code" href="_c_p_segmented_control_8j.html#a63fcc9e0dd97e8502cce685e88234e16">frame</a> = [<span class="keyword">self</span> <a class="code" href="class_c_p_platform_window.html#a8a9d11800bee1bbc907d14b138855db1">contentBounds</a>];
<a name="l00126"></a>00126 
<a name="l00127"></a>00127     <a class="code" href="_c_p_segmented_control_8j.html#a63fcc9e0dd97e8502cce685e88234e16">frame</a>.origin = <a class="code" href="_c_g_geometry_8j.html#a708f763d0feefd3056965f041c3c2cb2">CGPointMakeZero</a>();
<a name="l00128"></a>00128 
<a name="l00129"></a>00129     <span class="keywordflow">if</span> ([<a class="code" href="class_c_p_menu.html">CPMenu</a> menuBarVisible] &amp;&amp; [<a class="code" href="class_c_p_platform_window.html">CPPlatformWindow</a> primaryPlatformWindow] === <span class="keyword">self</span>)
<a name="l00130"></a>00130     {
<a name="l00131"></a>00131         var menuBarHeight = [[CPApp mainMenu] menuBarHeight];
<a name="l00132"></a>00132 
<a name="l00133"></a>00133         <a class="code" href="_c_p_segmented_control_8j.html#a63fcc9e0dd97e8502cce685e88234e16">frame</a>.origin.y += menuBarHeight;
<a name="l00134"></a>00134         <a class="code" href="_c_p_segmented_control_8j.html#a63fcc9e0dd97e8502cce685e88234e16">frame</a>.size.height -= menuBarHeight;
<a name="l00135"></a>00135     }
<a name="l00136"></a>00136 
<a name="l00137"></a>00137     <span class="keywordflow">return</span> <a class="code" href="_c_p_segmented_control_8j.html#a63fcc9e0dd97e8502cce685e88234e16">frame</a>;
<a name="l00138"></a>00138 }
<a name="l00139"></a>00139 
<a name="l00140"></a><a class="code" href="class_c_p_platform_window.html#a0543f42cc4ab43b416ac5efd8a4dff52">00140</a> - (CGRect)usableContentFrame
<a name="l00141"></a>00141 {
<a name="l00142"></a>00142     <span class="keywordflow">return</span> [<span class="keyword">self</span> <a class="code" href="class_c_p_platform_window.html#a29e1c5e54d8454ab90f1cfc79ad38b66">visibleFrame</a>];
<a name="l00143"></a>00143 }
<a name="l00144"></a>00144 
<a name="l00145"></a><a class="code" href="class_c_p_platform_window.html#ac0dae068310c2609323f2c73df5748a2">00145</a> - (void)setContentRect:(CGRect)aRect
<a name="l00146"></a>00146 {
<a name="l00147"></a>00147     <span class="keywordflow">if</span> (!aRect || _CGRectEqualToRect(_contentRect, aRect))
<a name="l00148"></a>00148         <span class="keywordflow">return</span>;
<a name="l00149"></a>00149 
<a name="l00150"></a>00150     _contentRect = _CGRectMakeCopy(aRect);
<a name="l00151"></a>00151 
<a name="l00152"></a>00152     [<span class="keyword">self</span> <a class="code" href="class_c_p_platform_window.html#ac5fb3ff962d4172f447959202e25c932">updateNativeContentRect</a>];
<a name="l00153"></a>00153 }
<a name="l00154"></a>00154 
<a name="l00155"></a><a class="code" href="class_c_p_platform_window.html#a11552efce0f2e5962034a1e426caf06f">00155</a> - (void)updateFromNativeContentRect
<a name="l00156"></a>00156 {
<a name="l00157"></a>00157     [<span class="keyword">self</span> <a class="code" href="class_c_p_platform_window.html#ac0dae068310c2609323f2c73df5748a2">setContentRect</a>:[<span class="keyword">self</span> <a class="code" href="class_c_p_platform_window.html#a95382dc9b7d69495e32a49c40d575ccb">nativeContentRect</a>]];
<a name="l00158"></a>00158 }
<a name="l00159"></a>00159 
<a name="l00160"></a><a class="code" href="class_c_p_platform_window.html#a7920250c11712198d99004ad7f718924">00160</a> - (CGPoint)convertBaseToScreen:(CGPoint)aPoint
<a name="l00161"></a>00161 {
<a name="l00162"></a>00162     var contentRect = [<span class="keyword">self</span> <a class="code" href="class_c_p_platform_window.html#a54a1df574df2e689ba9629b691886b14">contentRect</a>];
<a name="l00163"></a>00163 
<a name="l00164"></a>00164     <span class="keywordflow">return</span> _CGPointMake(aPoint.x + _CGRectGetMinX(contentRect), aPoint.y + _CGRectGetMinY(contentRect));
<a name="l00165"></a>00165 }
<a name="l00166"></a>00166 
<a name="l00167"></a><a class="code" href="class_c_p_platform_window.html#a91363161810fe35d59bc40a4067969d8">00167</a> - (CGPoint)convertScreenToBase:(CGPoint)aPoint
<a name="l00168"></a>00168 {
<a name="l00169"></a>00169     var contentRect = [<span class="keyword">self</span> <a class="code" href="class_c_p_platform_window.html#a54a1df574df2e689ba9629b691886b14">contentRect</a>];
<a name="l00170"></a>00170 
<a name="l00171"></a>00171     <span class="keywordflow">return</span> _CGPointMake(aPoint.x - _CGRectGetMinX(contentRect), aPoint.y - _CGRectGetMinY(contentRect));
<a name="l00172"></a>00172 }
<a name="l00173"></a>00173 
<a name="l00174"></a><a class="code" href="class_c_p_platform_window.html#a756d72c227aeb4caa68c78efe8c80f30">00174</a> - (BOOL)isVisible
<a name="l00175"></a>00175 {
<a name="l00176"></a>00176 <span class="preprocessor">#if PLATFORM(DOM)</span>
<a name="l00177"></a>00177 <span class="preprocessor"></span>    <span class="keywordflow">return</span> _DOMWindow !== NULL;
<a name="l00178"></a>00178 <span class="preprocessor">#else</span>
<a name="l00179"></a>00179 <span class="preprocessor"></span>    <span class="keywordflow">return</span> NO;
<a name="l00180"></a>00180 <span class="preprocessor">#endif</span>
<a name="l00181"></a>00181 <span class="preprocessor"></span>}
<a name="l00182"></a>00182 
<a name="l00183"></a><a class="code" href="class_c_p_platform_window.html#ad0619409513f515a8aba8703bc281064">00183</a> - (void)deminiaturize:(<span class="keywordtype">id</span>)sender
<a name="l00184"></a>00184 {
<a name="l00185"></a>00185 <span class="preprocessor">#if PLATFORM(DOM)</span>
<a name="l00186"></a>00186 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (_DOMWindow &amp;&amp; typeof _DOMWindow[<span class="stringliteral">&quot;cpDeminiaturize&quot;</span>] === <span class="stringliteral">&quot;function&quot;</span>)
<a name="l00187"></a>00187         _DOMWindow.cpDeminiaturize();
<a name="l00188"></a>00188 <span class="preprocessor">#endif</span>
<a name="l00189"></a>00189 <span class="preprocessor"></span>}
<a name="l00190"></a>00190 
<a name="l00191"></a><a class="code" href="class_c_p_platform_window.html#adb41d8972e36b0d18a8a8936648f4157">00191</a> - (void)miniaturize:(<span class="keywordtype">id</span>)sender
<a name="l00192"></a>00192 {
<a name="l00193"></a>00193 <span class="preprocessor">#if PLATFORM(DOM)</span>
<a name="l00194"></a>00194 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (_DOMWindow &amp;&amp; typeof _DOMWindow[<span class="stringliteral">&quot;cpMiniaturize&quot;</span>] === <span class="stringliteral">&quot;function&quot;</span>)
<a name="l00195"></a>00195         _DOMWindow.cpMiniaturize();
<a name="l00196"></a>00196 <span class="preprocessor">#endif</span>
<a name="l00197"></a>00197 <span class="preprocessor"></span>}
<a name="l00198"></a>00198 
<a name="l00199"></a><a class="code" href="class_c_p_platform_window.html#a3f3e8f697d7563b29f297804001a01de">00199</a> - (void)moveWindow:(<a class="code" href="class_c_p_window.html">CPWindow</a>)aWindow fromLevel:(<span class="keywordtype">int</span>)fromLevel toLevel:(<span class="keywordtype">int</span>)toLevel
<a name="l00200"></a>00200 {
<a name="l00201"></a>00201 <span class="preprocessor">#if PLATFORM(DOM)</span>
<a name="l00202"></a>00202 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (!aWindow._isVisible)
<a name="l00203"></a>00203         <span class="keywordflow">return</span>;
<a name="l00204"></a>00204 
<a name="l00205"></a>00205     var fromLayer = [<span class="keyword">self</span> <a class="code" href="class_c_p_platform_window.html#affae6b7d4065d718186dcf28c06f1334">layerAtLevel</a>:fromLevel <a class="code" href="class_c_p_platform_window.html#affae6b7d4065d718186dcf28c06f1334">create</a>:NO],
<a name="l00206"></a>00206         toLayer = [<span class="keyword">self</span> <a class="code" href="class_c_p_platform_window.html#affae6b7d4065d718186dcf28c06f1334">layerAtLevel</a>:toLevel <a class="code" href="class_c_p_platform_window.html#affae6b7d4065d718186dcf28c06f1334">create</a>:YES];
<a name="l00207"></a>00207 
<a name="l00208"></a>00208     [fromLayer removeWindow:aWindow];
<a name="l00209"></a>00209     [toLayer insertWindow:aWindow atIndex:CPNotFound];
<a name="l00210"></a>00210 <span class="preprocessor">#endif</span>
<a name="l00211"></a>00211 <span class="preprocessor"></span>}
<a name="l00212"></a>00212 
<a name="l00213"></a><a class="code" href="class_c_p_platform_window.html#a299b32b1135de337c10540a9a75a94d0">00213</a> - (void)setLevel:(CPInteger)aLevel
<a name="l00214"></a>00214 {
<a name="l00215"></a>00215     _level = aLevel;
<a name="l00216"></a>00216 
<a name="l00217"></a>00217 <span class="preprocessor">#if PLATFORM(DOM)</span>
<a name="l00218"></a>00218 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (_DOMWindow &amp;&amp; _DOMWindow.cpSetLevel)
<a name="l00219"></a>00219         _DOMWindow.cpSetLevel(aLevel);
<a name="l00220"></a>00220 <span class="preprocessor">#endif</span>
<a name="l00221"></a>00221 <span class="preprocessor"></span>}
<a name="l00222"></a>00222 
<a name="l00223"></a><a class="code" href="class_c_p_platform_window.html#a0769864bc2a1d753fdb8780293987af0">00223</a> - (void)setHasShadow:(BOOL)shouldHaveShadow
<a name="l00224"></a>00224 {
<a name="l00225"></a>00225     _hasShadow = shouldHaveShadow;
<a name="l00226"></a>00226 
<a name="l00227"></a>00227 <span class="preprocessor">#if PLATFORM(DOM)</span>
<a name="l00228"></a>00228 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (_DOMWindow &amp;&amp; _DOMWindow.cpSetHasShadow)
<a name="l00229"></a>00229         _DOMWindow.cpSetHasShadow(shouldHaveShadow);
<a name="l00230"></a>00230 <span class="preprocessor">#endif</span>
<a name="l00231"></a>00231 <span class="preprocessor"></span>}
<a name="l00232"></a>00232 
<a name="l00233"></a><a class="code" href="class_c_p_platform_window.html#ab281d7a4c1dc8b6312020e0afb28c211">00233</a> - (void)setShadowStyle:(<span class="keywordtype">int</span>)aStyle
<a name="l00234"></a>00234 {
<a name="l00235"></a>00235     _shadowStyle = aStyle;
<a name="l00236"></a>00236 
<a name="l00237"></a>00237 <span class="preprocessor">#if PLATFORM(DOM)</span>
<a name="l00238"></a>00238 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (_DOMWindow &amp;&amp; _DOMWindow.cpSetShadowStyle)
<a name="l00239"></a>00239         _shadowStyle.cpSetShadowStyle(aStyle);
<a name="l00240"></a>00240 <span class="preprocessor">#endif</span>
<a name="l00241"></a>00241 <span class="preprocessor"></span>}
<a name="l00242"></a>00242 
<a name="l00243"></a><a class="code" href="class_c_p_platform_window.html#a54cdf64b8d630755393419ee869ec877">00243</a> - (BOOL)supportsFullPlatformWindows
<a name="l00244"></a>00244 {
<a name="l00245"></a>00245     <span class="keywordflow">return</span> [<a class="code" href="class_c_p_platform.html">CPPlatform</a> <a class="code" href="class_c_p_platform.html#add8d61d0f32ef6cac1102f1e1c70db78">isBrowser</a>];
<a name="l00246"></a>00246 }
<a name="l00247"></a>00247 
<a name="l00248"></a>00248 <span class="keyword">@end</span>
<a name="l00249"></a>00249 
<a name="l00250"></a>00250 <span class="preprocessor">#if PLATFORM(BROWSER)</span>
<a name="l00251"></a>00251 <span class="preprocessor"></span>@<span class="keyword">import</span> <span class="stringliteral">&quot;CPPlatformWindow+DOM.j&quot;</span>
<a name="l00252"></a>00252 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 10:32:56 2010 for Cappuccino API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>

<!-- Mirrored from cappuccino.org/learn/documentation/_c_p_platform_window_8j_source.html by HTTrack Website Copier/3.x [XR&CO'2006], Mon, 20 Sep 2010 02:19:30 GMT -->
</html>