示例#1
0
    def init(self, sx, sy, deviceName):
        pyui2.init(sx, sy, deviceName, 0, "Test Window")

        self.themes = { "Standard" : Theme,
                        "Windows 2000" : Win2kTheme,
                        "Windows XP" : WinXPTheme,
                        "Mac OSX" : OSXTheme,
                        "Comic" : ComicTheme,
                      }

        self.themeTitle = "Standard Theme"
示例#2
0
    def __init__(self):
        parser = OptionParser()
        parser.add_option("-D", action="store", type="string", dest="deviceName", default="2d")
        parser.add_option("-F", action="store_true", dest="fullscreen", default=False)
        (options, args) = parser.parse_args()

        pyui2.init(800, 600, options.deviceName, options.fullscreen, "Widget Demo")

        self.themes = { "Standard" : Theme,
                        "Windows 2000" : Win2kTheme,
                        "Windows XP" : WinXPTheme,
                        "Mac OSX" : OSXTheme,
                        "Comic" : ComicTheme,
                      }
示例#3
0
def setupTestTheme(sx, sy):
	pyui2.init(sx, sy, "2d", 0, "Test Window")
	pyui2.desktop.setTheme(pyui2.themes._testtheme.TestTheme())
示例#4
0
def setupTestTheme(sx, sy):
    pyui2.init(sx, sy, "2d", 0, "Test Window")

    pyui2.desktop.setTheme(Theme())
示例#5
0
 def init(self, sx, sy):
     pyui2.init(sx, sy, "2d", 0, "DCX Test Window")
示例#6
0
# Permission is hereby granted, free of charge, to any person obtaining 
# a copy of this software and associated documentation files (the "Software"), 
# to deal in the Software without restriction, including without limitation 
# the rights to use, copy, modify, merge, publish, distribute, sublicense, 
# and/or sell copies of the Software, and to permit persons to whom the 
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included 
# in all copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
# THE SOFTWARE.
###################################################################################



import pyui2


pyui2.init(400, 300, "2d")

frame = pyui2.widgets.Frame(50, 50, 300, 200, "Say it")
label = pyui2.widgets.Label("Hello World!")
frame.addChild(label)
pyui2.run()