basictypes.wx.pen
index
p:\properties\basictypes\wx\pen.py

wxPython colour data-type definition

 
Modules
       
basicproperty.basic
clip_dndc
cmndlgsc
controls2c
controlsc
basictypes.datatypedefinition
basictypes.enumeration
eventsc
filesysc
fontsc
framesc
gdic
imagec
mdic
misc2c
miscc
printfwc
basictypes.registry
sizersc
stattoolc
streamsc
sys
types
utilsc
windows2c
windows3c
windowsc
wxPython.wx
wxPython.wxc

 
Classes
       
Enumeration(Propertied)
PenCap
PenJoin
PenStyle
wxPyPen(wxPyPenPtr)
wxPen

 
class PenCap(Enumeration)
    Enumeration representing a pen-cap style
 
 
Method resolution order:
PenCap
Enumeration
Propertied
object

Data and other attributes defined here:
dataType = 'enumeration.pencap'
set = {u'wxCAP_ROUND': EnumerationChoice( name=u'wxCAP...JECTING', value=131, friendlyName=u'Projecting')}

Methods inherited from Enumeration:
__cmp__(self, other)
Compare this value to another value
__init__(self, name='', *arguments, **named)
__repr__(self)
Return a code-like representation of this object
choice(self)
Get the choice object associated with this value or None
value(self)
Get the value associated with this choice

Class methods inherited from Enumeration:
allInstances(cls) from type
Return cls instances for each of this class's set
check(cls, value) from type
Check whether value is of cls type, and has the same set
coerce(cls, value) from type
Coerce a value into an Enumeration value
 
Accepted types:
        Enumeration objects
        integers/longs
        ([name,name,name],remainder) tuples
        [name,name,name,value] lists (values are |'d together)
fromValue(cls, value) from type
Create from an integer value
parse(cls, value) from type
Create from a string value
 
Possible formats:
        "coreName"
        "23"
        "friendlyName"

Data and other attributes inherited from Enumeration:
name = <BasicProperty 'name'>
Data-value choice within one of our sets

Methods inherited from Propertied:
__str__(self)
Get a friendly representation of the object
clone(self, **newValues)
Clone this object, with optional new property values
 
This method calls the __init__ method of your class with
the current property values of your class.  Providing newValues
(a dictionary) overrides property settings with new values.
getCloneProperties(self)
Get properties dictionary (key:value) for use in cloning of the instance
 
By default you get getProperties()' values, with an
attempt made to use the property's name, then the property's
direct "__get__" method.
toString(self, indentation='', alreadyDone=None, indentString=' ')
Get a nicely formatted representation of this object
 
This version assumes that getProperties returns
the list of properties which should be presented,
it recursively calls it's children with greater
indents to get their representations.
 
indentation -- current string indentation level
alreadyDone -- set of object ids which are already finished
 
XXX Needs a far better API, likely a stand-alone class
        without the automatic inheritance problems here :(

Class methods inherited from Propertied:
getProperties(cls) from type
Get the BasicProperty properties for a particular object's class

Data and other attributes inherited from Propertied:
__dict__ = <dictproxy object at 0x01B26FF0>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'Propertied' objects>
list of weak references to the object (if defined)

 
class PenJoin(Enumeration)
    Enumeration representing a pen-join style
 
 
Method resolution order:
PenJoin
Enumeration
Propertied
object

Data and other attributes defined here:
dataType = 'enumeration.penjoin'
set = {u'wxJOIN_BEVEL': EnumerationChoice( name=u'wxJO...wxJOIN_ROUND', value=122, friendlyName=u'Round')}

Methods inherited from Enumeration:
__cmp__(self, other)
Compare this value to another value
__init__(self, name='', *arguments, **named)
__repr__(self)
Return a code-like representation of this object
choice(self)
Get the choice object associated with this value or None
value(self)
Get the value associated with this choice

Class methods inherited from Enumeration:
allInstances(cls) from type
Return cls instances for each of this class's set
check(cls, value) from type
Check whether value is of cls type, and has the same set
coerce(cls, value) from type
Coerce a value into an Enumeration value
 
Accepted types:
        Enumeration objects
        integers/longs
        ([name,name,name],remainder) tuples
        [name,name,name,value] lists (values are |'d together)
fromValue(cls, value) from type
Create from an integer value
parse(cls, value) from type
Create from a string value
 
Possible formats:
        "coreName"
        "23"
        "friendlyName"

Data and other attributes inherited from Enumeration:
name = <BasicProperty 'name'>
Data-value choice within one of our sets

Methods inherited from Propertied:
__str__(self)
Get a friendly representation of the object
clone(self, **newValues)
Clone this object, with optional new property values
 
This method calls the __init__ method of your class with
the current property values of your class.  Providing newValues
(a dictionary) overrides property settings with new values.
getCloneProperties(self)
Get properties dictionary (key:value) for use in cloning of the instance
 
By default you get getProperties()' values, with an
attempt made to use the property's name, then the property's
direct "__get__" method.
toString(self, indentation='', alreadyDone=None, indentString=' ')
Get a nicely formatted representation of this object
 
This version assumes that getProperties returns
the list of properties which should be presented,
it recursively calls it's children with greater
indents to get their representations.
 
indentation -- current string indentation level
alreadyDone -- set of object ids which are already finished
 
XXX Needs a far better API, likely a stand-alone class
        without the automatic inheritance problems here :(

Class methods inherited from Propertied:
getProperties(cls) from type
Get the BasicProperty properties for a particular object's class

Data and other attributes inherited from Propertied:
__dict__ = <dictproxy object at 0x01B26D30>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'Propertied' objects>
list of weak references to the object (if defined)

 
class PenStyle(Enumeration)
    Enumeration representing a pen-drawing style
 
 
Method resolution order:
PenStyle
Enumeration
Propertied
object

Data and other attributes defined here:
dataType = 'enumeration.penstyle'
set = {u'wxVERTICAL_HATCH': EnumerationChoice( name=u'...PARENT', value=106, friendlyName=u'Transparent')}

Methods inherited from Enumeration:
__cmp__(self, other)
Compare this value to another value
__init__(self, name='', *arguments, **named)
__repr__(self)
Return a code-like representation of this object
choice(self)
Get the choice object associated with this value or None
value(self)
Get the value associated with this choice

Class methods inherited from Enumeration:
allInstances(cls) from type
Return cls instances for each of this class's set
check(cls, value) from type
Check whether value is of cls type, and has the same set
coerce(cls, value) from type
Coerce a value into an Enumeration value
 
Accepted types:
        Enumeration objects
        integers/longs
        ([name,name,name],remainder) tuples
        [name,name,name,value] lists (values are |'d together)
fromValue(cls, value) from type
Create from an integer value
parse(cls, value) from type
Create from a string value
 
Possible formats:
        "coreName"
        "23"
        "friendlyName"

Data and other attributes inherited from Enumeration:
name = <BasicProperty 'name'>
Data-value choice within one of our sets

Methods inherited from Propertied:
__str__(self)
Get a friendly representation of the object
clone(self, **newValues)
Clone this object, with optional new property values
 
This method calls the __init__ method of your class with
the current property values of your class.  Providing newValues
(a dictionary) overrides property settings with new values.
getCloneProperties(self)
Get properties dictionary (key:value) for use in cloning of the instance
 
By default you get getProperties()' values, with an
attempt made to use the property's name, then the property's
direct "__get__" method.
toString(self, indentation='', alreadyDone=None, indentString=' ')
Get a nicely formatted representation of this object
 
This version assumes that getProperties returns
the list of properties which should be presented,
it recursively calls it's children with greater
indents to get their representations.
 
indentation -- current string indentation level
alreadyDone -- set of object ids which are already finished
 
XXX Needs a far better API, likely a stand-alone class
        without the automatic inheritance problems here :(

Class methods inherited from Propertied:
getProperties(cls) from type
Get the BasicProperty properties for a particular object's class

Data and other attributes inherited from Propertied:
__dict__ = <dictproxy object at 0x01B26A10>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'Propertied' objects>
list of weak references to the object (if defined)

 
class wxPen(wxPyPen)
    A somewhat easier-to-use Pen class for use with basictypes
 
 
Method resolution order:
wxPen
wxPyPen
wxPyPenPtr
wxPenPtr
wxGDIObjectPtr
wxObjectPtr

Methods defined here:
__eq__(self, other)
Compare our core values to pen defined in other
__init__(self, colour='BLACK', width=1, style=100, cap=130, join=122, stipple=None, dashes=None)
Initialize the wxPen object
 
colour -- wxColour specifier, a wxColour, a named colour
        or a #ffffff formatted string value
width -- pen-width in pixels
style -- one of the wxPen style constants
        wxSOLID
        wxVERTICAL_HATCH
        wxUSER_DASH
        wxCROSSDIAG_HATCH
        wxHORIZONTAL_HATCH
        wxSTIPPLE
        wxBDIAGONAL_HATCH
        wxFDIAGONAL_HATCH
        wxDOT_DASH
        wxSHORT_DASH
        wxLONG_DASH
        wxCROSS_HATCH
        wxTRANSPARENT
cap -- one of the wxPen cap constants
        wxCAP_ROUND
        wxCAP_BUTT
        wxCAP_PROJECTING
join -- one of the wxPen join constants
        wxJOIN_BEVEL
        wxJOIN_MITER
        wxJOIN_ROUND
stipple -- when style == wxSTIPPLE, a bitmap used to
        control the drawing style
dashes -- when style == wxUSER_DASH, an array used to
        control the drawing style
        XXX what is the array of? lengths? I assume it's
                just a python list of something, but I don't
                know what.
__repr__(self)
Get a nice debugging representation of this object
coreValues(self)
Get the core values for this instance

Class methods defined here:
check(cls, value) from __builtin__.classobj
Check that value is a wxPen instance
coerce(cls, value) from __builtin__.classobj
Coerce value to an instance of baseType
 
Accepted:
        object: w/ style, colour and width props (cap, join, and stipple optional)
        tuple (colour,width,style,cap,join,stipple)
        dict w/ names

Data and other attributes defined here:
coreAttributes = ('colour', 'width', 'style', 'cap', 'join')
dataType = 'wx.pen'
extraAttributes = ('stipple', 'dashes')

Methods inherited from wxPyPenPtr:
SetDashes(self, *_args, **_kwargs)
__del__(self, delfunc=<built-in function delete_wxPyPen>)
__getstate__ = wxPenOut(value)
__setstate__ = wxPyPenIn(self, (colour, init, props))

Methods inherited from wxPenPtr:
GetCap(self, *_args, **_kwargs)
GetColour(self, *_args, **_kwargs)
GetDashes(self, *_args, **_kwargs)
GetJoin(self, *_args, **_kwargs)
GetStipple(self, *_args, **_kwargs)
GetStyle(self, *_args, **_kwargs)
GetWidth(self, *_args, **_kwargs)
Ok(self, *_args, **_kwargs)
SetCap(self, *_args, **_kwargs)
SetColour(self, *_args, **_kwargs)
SetJoin(self, *_args, **_kwargs)
SetStipple(self, *_args, **_kwargs)
SetStyle(self, *_args, **_kwargs)
SetWidth(self, *_args, **_kwargs)
__nonzero__(self)

Methods inherited from wxGDIObjectPtr:
GetVisible(self, *_args, **_kwargs)
IsNull(self, *_args, **_kwargs)
SetVisible(self, *_args, **_kwargs)

Methods inherited from wxObjectPtr:
Destroy(self, *_args, **_kwargs)
GetClassName(self, *_args, **_kwargs)

 
Functions
       
defaultPen()

 
Data
        PenCapSet = {u'wxCAP_ROUND': EnumerationChoice( name=u'wxCAP...JECTING', value=131, friendlyName=u'Projecting')}
PenJoinSet = {u'wxJOIN_BEVEL': EnumerationChoice( name=u'wxJO...wxJOIN_ROUND', value=122, friendlyName=u'Round')}
PenStyleSet = {u'wxVERTICAL_HATCH': EnumerationChoice( name=u'...PARENT', value=106, friendlyName=u'Transparent')}
__all__ = ('wxPen_DT', 'PenStyleProperty', 'PenCapProperty')