diff --git a/docs/sphinx/_downloads/GridBagSizer.1.py b/docs/sphinx/_downloads/GridBagSizer.1.py new file mode 100644 index 00000000..3fb4e7ae --- /dev/null +++ b/docs/sphinx/_downloads/GridBagSizer.1.py @@ -0,0 +1,46 @@ +##Chris Barker +#!/usr/bin/env python + +""" +A simple test of the GridBagSizer + +http://wiki.wxpython.org/index.cgi/WriteItYourself + +""" + +import wx + +class MyFrame(wx.Frame): + def __init__(self, parent, ID, title): + wx.Frame.__init__(self, parent, ID, title, wx.DefaultPosition) + + Buttons = [] + for i in range(6): + Buttons.append(wx.Button(self,-1, "Button %i"%(i))) + + sizer = wx.GridBagSizer(9, 9) + sizer.Add(Buttons[0], (0, 0), wx.DefaultSpan, wx.ALL, 5) + sizer.Add(Buttons[1], (1, 1), (1,7), wx.EXPAND) + sizer.Add(Buttons[2], (6, 6), (3,3), wx.EXPAND) + sizer.Add(Buttons[3], (3, 0), (1,1), wx.ALIGN_CENTER) + sizer.Add(Buttons[4], (4, 0), (1,1), wx.ALIGN_LEFT) + sizer.Add(Buttons[5], (5, 0), (1,1), wx.ALIGN_RIGHT) + + sizer.AddGrowableRow(6) + sizer.AddGrowableCol(6) + + self.SetSizerAndFit(sizer) + self.Centre() + + +class MyApp(wx.App): + def OnInit(self): + frame = MyFrame(None, -1, "wx.gridbagsizer.py") + frame.Show(True) + self.SetTopWindow(frame) + return True + +if __name__ == "__main__": + app = MyApp(0) + app.MainLoop() + diff --git a/docs/sphinx/_downloads/GridBagSizer.2.py b/docs/sphinx/_downloads/GridBagSizer.2.py new file mode 100644 index 00000000..6442a0cc --- /dev/null +++ b/docs/sphinx/_downloads/GridBagSizer.2.py @@ -0,0 +1,43 @@ +##Chris Barker +#!/usr/bin/env python + +import wx + +class TestFrame(wx.Frame): + def __init__(self, *args, **kwargs): + wx.Frame.__init__(self, *args, **kwargs) + + t = wx.TextCtrl(self) + + b1 = wx.Button(self, label="Button1") + b2 = wx.Button(self, label="Button2") + + exitBut = wx.Button(self, label="Exit") + exitBut.Bind(wx.EVT_BUTTON, self.OnCloseWindow) + + sizer = wx.GridBagSizer(10, 10) + sizer.Add(t, (0,0), span=(2,1), flag=wx.ALIGN_CENTER_VERTICAL ) + sizer.Add(b1, (0,1), span=(2,1), flag=wx.ALIGN_CENTER) + sizer.Add(b2, (0,2), flag=wx.ALIGN_CENTER) + + sizer.Add(exitBut, (1,3)) + + self.SetSizerAndFit(sizer) + + wx.EVT_CLOSE(self, self.OnCloseWindow) + + def OnCloseWindow(self, event): + self.Destroy() + +class App(wx.App): + def OnInit(self): + frame = TestFrame(None, title="GridBagSizer Test") + self.SetTopWindow(frame) + frame.Show(True) + return True + +if __name__ == "__main__": + app = App(0) + app.MainLoop() + + diff --git a/docs/sphinx/_static/css/phoenix.css b/docs/sphinx/_static/css/phoenix.css index 9ae04ea7..f4229543 100644 --- a/docs/sphinx/_static/css/phoenix.css +++ b/docs/sphinx/_static/css/phoenix.css @@ -88,22 +88,30 @@ div.body h4 { */ body { - background-color: rgb(100,135,220); + background-color: rgb(230,230,230); } div.document { background-color: rgb(230,230,230); position: relative; + margin-left: 240px; z-index: 0; top: 30px; } div.sphinxsidebar { - background-color: rgb(230,230,230); - z-index: 1; - left: 0; - top: 30px; - bottom: 0; + background-color: rgb(230,230,230); + margin-left: 0; + float: none; + position: fixed; + overflow: auto; + width: 240px; + max-width: 240px; + height: auto; + z-index: 1; + left: 0; + top: 33px; + bottom: 0; } div.related { @@ -195,6 +203,16 @@ div.sphinxsidebar ul.want-points { text-align:center; } +div.bodywrapper { + margin: 0; +} + +div.headerfix :target { + /* compensate fixed header in link anchors */ + padding-top: {{ 30 }}; + margin-top: -{{ 30 }}; +} + /** * Extra admonitions */ @@ -637,4 +655,10 @@ tt { background-color: #EAEAF8; padding: 0 1px 0 1px; font-size: 0.95em; -} \ No newline at end of file +} + +.codeexpander p {padding-left: 25px; cursor:pointer; background: url("../images/sphinxdocs/arrows.png") no-repeat 0 -33px; text-decoration:none;} +.codeexpander p {border-bottom:1px solid #ccc; padding-bottom:4px;} +.codeexpander p a {text-decoration:none;} +.codeexpander p.myactive {background-position: 0 5px;} +.myactive {background-color: rgb(230, 230, 230); background-position: 0 5px;} \ No newline at end of file diff --git a/docs/sphinx/_static/images/sphinxdocs/arrows.png b/docs/sphinx/_static/images/sphinxdocs/arrows.png new file mode 100644 index 00000000..e1e9c9a5 Binary files /dev/null and b/docs/sphinx/_static/images/sphinxdocs/arrows.png differ diff --git a/docs/sphinx/_static/javascript/jquery.collapse.js b/docs/sphinx/_static/javascript/jquery.collapse.js new file mode 100644 index 00000000..c0776d12 --- /dev/null +++ b/docs/sphinx/_static/javascript/jquery.collapse.js @@ -0,0 +1,151 @@ +/*! + * Collapse plugin for jQuery + * http://github.com/danielstocks/jQuery-Collapse/ + * + * @author Daniel Stocks (http://webcloud.se) + * @version 0.9.1 + * @updated 17-AUG-2010 + * + * Copyright 2010, Daniel Stocks + * Released under the MIT, BSD, and GPL Licenses. + */ + +(function($) { + + // Use a cookie counter to allow multiple instances of the plugin + var cookieCounter = 0; + + $.fn.extend({ + collapse: function(options) { + + var defaults = { + head : "h3", + group : "div, ul", + cookieName : "collapse", + // Default function for showing content + show: function() { + this.show(); + }, + // Default function for hiding content + hide: function() { + this.hide(); + } + }; + var op = $.extend(defaults, options); + + // Default CSS classes + var active = "myactive", + inactive = "myinactive"; + + return this.each(function() { + + // Increment coookie counter to ensure cookie name integrity + cookieCounter++; + var obj = $(this), + // Find all headers and wrap them in for accessibility. + sections = obj.find(op.head).wrapInner(''), + l = sections.length, + cookie = op.cookieName + "_" + cookieCounter; + // Locate all panels directly following a header + var panel = obj.find(op.head).map(function() { + var head = $(this) + if(!head.hasClass(active)) { + return head.next(op.group).hide()[0]; + } + return head.next(op.group)[0]; + }); + + // Bind event for showing content + obj.bind("show", function(e, bypass) { + var obj = $(e.target); + // ARIA attribute + obj.attr('aria-hidden', false) + .prev() + .removeClass(inactive) + .addClass(active); + // Bypass method for instant display + if(bypass) { + obj.show(); + } else { + op.show.call(obj); + } + }); + + // Bind event for hiding content + obj.bind("hide", function(e, bypass) { + var obj = $(e.target); + obj.attr('aria-hidden', true) + .prev() + .removeClass(active) + .addClass(inactive); + if(bypass) { + obj.hide(); + } else { + op.hide.call(obj); + } + }); + + // Look for existing cookies + if(cookieSupport) { + for (var c=0;c<=l;c++) { + var val = $.cookie(cookie + c); + // Show content if associating cookie is found + if ( val == c + "open" ) { + panel.eq(c).trigger('show', [true]); + // Hide content + } else if ( val == c + "closed") { + panel.eq(c).trigger('hide', [true]); + } + } + } + + // Delegate click event to show/hide content. + obj.bind("click", function(e) { + var t = $(e.target); + // Check if header was clicked + if(!t.is(op.head)) { + // What about link inside header. + if ( t.parent().is(op.head) ) { + t = t.parent(); + } else { + return; + } + e.preventDefault(); + } + // Figure out what position the clicked header has. + var num = sections.index(t), + cookieName = cookie + num, + cookieVal = num, + content = t.next(op.group); + // If content is already active, hide it. + if(t.hasClass(active)) { + content.trigger('hide'); + cookieVal += 'closed'; + if(cookieSupport) { + $.cookie(cookieName, cookieVal, { path: '/', expires: 10 }); + } + return; + } + // Otherwise show it. + content.trigger('show'); + cookieVal += 'open'; + if(cookieSupport) { + $.cookie(cookieName, cookieVal, { path: '/', expires: 10 }); + } + }); + }); + } + }); + + // Make sure can we eat cookies without getting into trouble. + var cookieSupport = (function() { + try { + $.cookie('x', 'x', { path: '/', expires: 10 }); + $.cookie('x', null); + } + catch(e) { + return false; + } + return true; + })(); +})(jQuery); \ No newline at end of file diff --git a/docs/sphinx/_static/javascript/jquery.cookie.js b/docs/sphinx/_static/javascript/jquery.cookie.js new file mode 100644 index 00000000..6df1faca --- /dev/null +++ b/docs/sphinx/_static/javascript/jquery.cookie.js @@ -0,0 +1,96 @@ +/** + * Cookie plugin + * + * Copyright (c) 2006 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +/** + * Create a cookie with the given name and value and other optional parameters. + * + * @example $.cookie('the_cookie', 'the_value'); + * @desc Set the value of a cookie. + * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); + * @desc Create a cookie with all available options. + * @example $.cookie('the_cookie', 'the_value'); + * @desc Create a session cookie. + * @example $.cookie('the_cookie', null); + * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain + * used when the cookie was set. + * + * @param String name The name of the cookie. + * @param String value The value of the cookie. + * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. + * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. + * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. + * If set to null or omitted, the cookie will be a session cookie and will not be retained + * when the the browser exits. + * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). + * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). + * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will + * require a secure protocol (like HTTPS). + * @type undefined + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ + +/** + * Get the value of a cookie with the given name. + * + * @example $.cookie('the_cookie'); + * @desc Get the value of a cookie. + * + * @param String name The name of the cookie. + * @return The value of the cookie. + * @type String + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ +jQuery.cookie = function(name, value, options) { + if (typeof value != 'undefined') { // name and value given, set cookie + options = options || {}; + if (value === null) { + value = ''; + options.expires = -1; + } + var expires = ''; + if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { + var date; + if (typeof options.expires == 'number') { + date = new Date(); + date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); + } else { + date = options.expires; + } + expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE + } + // CAUTION: Needed to parenthesize options.path and options.domain + // in the following expressions, otherwise they evaluate to undefined + // in the packed version for some reason... + var path = options.path ? '; path=' + (options.path) : ''; + var domain = options.domain ? '; domain=' + (options.domain) : ''; + var secure = options.secure ? '; secure' : ''; + document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); + } else { // only name given, get cookie + var cookieValue = null; + if (document.cookie && document.cookie != '') { + var cookies = document.cookie.split(';'); + for (var i = 0; i < cookies.length; i++) { + var cookie = jQuery.trim(cookies[i]); + // Does this cookie string begin with the name we want? + if (cookie.substring(0, name.length + 1) == (name + '=')) { + cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); + break; + } + } + } + return cookieValue; + } +}; \ No newline at end of file diff --git a/docs/sphinx/_static/javascript/sidebar.js b/docs/sphinx/_static/javascript/sidebar.js index 057f741f..e618a4b1 100644 --- a/docs/sphinx/_static/javascript/sidebar.js +++ b/docs/sphinx/_static/javascript/sidebar.js @@ -29,7 +29,7 @@ $(function() { var sidebarbutton = $('
'); var sbw_width = sidebar.width(); var sbb_width = 9; - var dark_color = $('div.related').css('background-color'); + var dark_color = 'darkgrey'; var light_color = sidebarwrapper.css('color'); var opacity_factor = $.browser.msie ? 1 : 0.75; var collapsed = sidebarwrapper.is(':not(:visible)'); @@ -97,8 +97,8 @@ $(function() { 'color': light_color, 'font-size': 14, 'text-align': 'center', - 'border-left': '1px solid ' + dark_color, - 'border-right': '1px solid ' + dark_color, + 'border-left': '1px solid ' + 'white', + 'border-right': '1px solid ' + 'white', 'padding': '1px 0', 'margin': '0', 'width': sbb_width - 2, diff --git a/docs/sphinx/_templates/layout.html b/docs/sphinx/_templates/layout.html index 7e14c013..ff3e4e0d 100644 --- a/docs/sphinx/_templates/layout.html +++ b/docs/sphinx/_templates/layout.html @@ -1,11 +1,30 @@ - {% extends "!layout.html" %} {%- block relbaritems %}