ArtProviderExample.py :  » IDE » Boa-Constructor » boa-constructor-0.6.1 » Examples » images » ArtProvider » Python Open Source

Home
Python Open Source
1.3.1.2 Python
2.Ajax
3.Aspect Oriented
4.Blog
5.Build
6.Business Application
7.Chart Report
8.Content Management Systems
9.Cryptographic
10.Database
11.Development
12.Editor
13.Email
14.ERP
15.Game 2D 3D
16.GIS
17.GUI
18.IDE
19.Installer
20.IRC
21.Issue Tracker
22.Language Interface
23.Log
24.Math
25.Media Sound Audio
26.Mobile
27.Network
28.Parser
29.PDF
30.Project Management
31.RSS
32.Search
33.Security
34.Template Engines
35.Test
36.UML
37.USB Serial
38.Web Frameworks
39.Web Server
40.Web Services
41.Web Unit
42.Wiki
43.Windows
44.XML
Python Open Source » IDE » Boa Constructor 
Boa Constructor » boa constructor 0.6.1 » Examples » images » ArtProvider » ArtProviderExample.py
# Important: This file should be placed in the site-packages directory or an
#            equivalent place, so that both the plug-in and your code can import it

import cStringIO

import wx

ART_IDS = ['wxART_BOA_ICON']

def getBoaBitmapSmall():
    return wx.BitmapFromImage(wx.ImageFromStream(cStringIO.StringIO(
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\
\x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\
\x00\x01\x95IDATx\x9c}\x93}\x91\x1b1\x0c\xc5\x7f{\x13\x00\x86`\x08b\xb0\n\
\x82.\x04\x97A\x8a \x1b\x04g\x08\x86P\x06\xabE\xd0\x85\xa000\x03\xf7\x8f\xfd\
\xc8%\x97\xf6\xcdhF\xf6\xf8=\xe9\xd9r\xd7Zkl8\x9fo\x00\x98\x81*L\xd3\x95\xff\
\xe1~\xbf\xd3\xb5\xd6\xda<\xcf\x94R\x80r\x90K1R*\xa4\x94\xfe)`f\x9c\xf6\x85\
\xbbo\xc4U@\xd5\xa8\xb5\xe2\xee\xdf\x88"B\xad\x15\xe0Y\xc0\x1dRRR2JQ\xc0\x08\
\xc1\x10\x11D\xe4\x10\x08!\x1c\x02\x9d\x995U\x03\xde\xf8\xd5\x19l\xaf\xfa\
\x9b\x9c\x07\x00b\x8c\xb8;f\xc6\xc7JV`\xfeBd%N=\x8c\x06\xf4,\xcb\xe7vO\xcf\
\xf8@\x01\xed\xb7\xd8\x88\xe3\x0c\xe3\xf9I\x13\xa0\x94\xf8M\xe0\xa4\n\xa6_v\
\xc6\xf3\xd6\xc5\xb4\xe6:\xc1\xc8\x1ao\xf01]\xaf\xa0\x1d\xa6\x1d\xaa\xdd\xda\
\xff8!\xf5\x17)\xc6GW\x80H}ca\xef\xda\x0c\xb3\x06\n\xa9\xfcD\xaaPbZ+\x1b\xc0\
LJo,p\xbbQE\x089\x93BAD(\xcb\xc0\xf2\xe7\x07\x9c\x1f\xe4\x9c\x97\xa7\xa7\x84\
\xf5\xe9O\\\xaf\xc4\x10\x18B \xe7\x85\xe2\x02\xb9\x87n?6#r\x01\x12\x00\xa5\
\x14\x86a\xc0\xdd)\xc5\xa1\xb5\xd6\xcc\xac].\x97\x86Y\xa3\xb5\x06{\xd8\x16k.\
ry\xd9\x1f\xdb1\x89\xcb\xb2@\xf8|q\xd8?\xe5\xcb\xd2\x03\xf3z\xb1@\x8a\xfe\
\x18\xe5a\x18\xb0:\x83\xf5\xabo\x03l?\xbc\t\x8d7r\x0e\x87d\xad\x91\xce\xdd\
\xdb>a\xeeN\x89\x11\x0cb\xf4\xbd\xd0\xf1\xa1T\x95W\xfc\x05\x9b8\xd9j\xa1\xaa\
\x82\x9a\x00\x00\x00\x00IEND\xaeB`\x82')))

# Note, the real wx.NullBitmap must be saved at import time, because at 
# design time wx.NullBitmap is aliased to a placeholder bitmap.
_NULL_BMP = wx.NullBitmap
class ArtProviderExample(wx.ArtProvider):
    def CreateBitmap(self, artId, artClient, size):
        if artId == 'wxART_BOA_ICON':
            return getBoaBitmapSmall()
        else:
            return _NULL_BMP
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.