44 lines
1.5 KiB
Python
Executable File
44 lines
1.5 KiB
Python
Executable File
#+BEGIN_COMMENT
|
|
.. title: Adding progress bars & spinners
|
|
.. slug: 05-adding-progress-bars-and-spinners
|
|
.. date: 2014-01-20 12:00:00 UTC
|
|
.. tags: GTK-3, python, widgets
|
|
.. category: python
|
|
.. description: GTK example of some combo / slecet drop down boxesfor user interaction.
|
|
.. type: text
|
|
#+END_COMMENT
|
|
|
|
|
|
#+CAPTION: Adding dropdown & spin widgets
|
|
[[../../../images/gtk/tut04-text-dropdown-spin.png]]
|
|
|
|
#append this to module path so we can load from the parent directory
|
|
import sys, os
|
|
from scaffold import web
|
|
from scaffold.loaders import load, load_partial
|
|
|
|
|
|
class page:
|
|
name=__name__
|
|
title = 'GTK3 progress bar and spinner'
|
|
tags = 'GTK3', 'Python', 'progress', 'spinner'
|
|
intro = 'Load a progress bar widget and spinner to demonstrate updating and retriving values.'
|
|
date = '2014-01-20'
|
|
path = os.path.abspath('./')
|
|
image = web.template.path_image + '/gtk/tut05-progress-spinners.png'
|
|
|
|
def create_content(self):
|
|
web.images.create(self.image, title='GTK Window')
|
|
web.page.section(
|
|
web.div.create(
|
|
web.images.render()
|
|
).set_classes('sources').render()
|
|
)
|
|
web.paragraph.create(
|
|
"""This sample demonstrates two progress bar styles and how to update them too show progress, it also demonstrates starting and stopping a spinning graphic.""")
|
|
web.page.section(web.paragraph.render())
|
|
|
|
web.pre.create(load(os.path.abspath('./content/gtk3/tut05/tut05-progress-spinners.py')))
|
|
web.page.section(web.pre.render())
|
|
|