Sha256: d95735a150fc23005cf0f1715762642538cb5ca9bcc30bc2294b7c341862e8e1

Contents?: true

Size: 1.67 KB

Versions: 23

Compression:

Stored size: 1.67 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            Portions ©2008-2011 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

sc_require('panes/pane');

/** @class

  Most SproutCore applications have a main pane, which dominates the 
  application page.  You can extend from this view to implement your own main 
  pane.  This class will automatically make itself main whenever you append it 
  to a document, removing any other main pane that might be currently in 
  place.  If you do have another already focused as the keyPane, this view 
  will also make itself key automatically.  The default way to use the main 
  pane is to simply add it to your page like this:
  
      SC.MainPane.create().append();
  
  This will cause your root view to display.  The default layout for a 
  MainPane is to cover the entire document window and to resize with the 
  window.

  @extends SC.Pane
  @since SproutCore 1.0
*/
SC.MainPane = SC.Pane.extend({
  /** @private */
  layout: { top: 0, left: 0, bottom: 0, right: 0, minHeight:200, minWidth:200 },
  
  /** @private - extends SC.Pane's method */
  paneDidAttach: function() {
    var ret = sc_super();
    var responder = this.rootResponder;
    responder.makeMainPane(this);
    if (!responder.get('keyRootView')) responder.makeKeyPane(this);
    return ret ;
  },
  
  /** @private */
  acceptsKeyPane: YES,

  /** @private */
  classNames: ['sc-main'],
  
  ariaRole: 'application'
  
});

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
sproutcore-1.7.1.beta-java lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.7.1.beta lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.1-java lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.1 lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0 lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0-java lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.rc.2-x86-mingw32 lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.rc.2 lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.rc.2-java lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.rc.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.rc.1 lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.rc.1-java lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.beta.3-x86-mingw32 lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.beta.3-java lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.beta.3 lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.beta.2-x86-mingw32 lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.beta.2-java lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.beta.2 lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js
sproutcore-1.6.0.beta.1 lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js