Exemple #1
0
def create_atom():
    val = struct.Atom()
    val.index = 1000
    val.selected = True
    val.atom_mode = 1  # BALLSTICK
    val.labeled = True
    val.atom_rendering = True
    val.atom_color = Color.White()
    val.surface_rendering = True
    val.surface_color = Color.White()
    val.surface_opacity = 1
    val.symbol = "Carbon"
    val.serial = 0
    val.name = "default"
    val.position = Vector3()
    return val
Exemple #2
0
 def __init__(self):
     super(_Image, self).__init__()
     self._file_path = ""
     self._color = Color.White()
     self._scaling_option = _Image.ScalingOptions.stretch
     self._pressed_callback = lambda self, x, y: None
     self._held_callback = lambda self, x, y: None
     self._released_callback = lambda self, x, y: None
Exemple #3
0
 def __init__(self):
     self._active = False
     self._value = _Button._MultiStateVariable._create("")
     self._color = _Button._MultiStateVariable._create(Color.White())
     self._sharpness = 0.5
     self._size = 1.0
     self._ratio = 0.5
     self._position = Vector3()
     self._rotation = Vector3()
Exemple #4
0
 def __init__(self):
     self._active = True
     self._size = _Button._MultiStateVariable._create(.3)
     self._color = _Button._MultiStateVariable._create()
     self._color._idle = Color.White()
     self._color._highlighted = Color(whole_num=0x2fdbbfff)
     self._color._selected = Color(whole_num=0x00e5bfff)
     self._color._selected_highlighted = Color(whole_num=0x00f9d0ff)
     self._color._unusable = Color.Grey()
Exemple #5
0
def create_residue():
    val = struct.Residue()
    val.index = 1000
    val._atoms = [struct.Atom(), create_atom(), struct.Atom(), create_atom()]
    val._bonds = [create_bond(), create_bond(), create_bond(), create_bond()]
    val.ribboned = True
    val.ribbon_size = 1
    val.ribbon_mode = struct.Residue.RibbonMode.Coil 
    val.ribbon_color = Color.White() 
    val.type = "asdf" #RESIDUEDATA
    val.serial = 1
    val.name = "asdf1234"
    val.secondary_structure = struct.Residue.SecondaryStructure.Sheet
    return val
Exemple #6
0
 def __init__(self):
     self._active = True
     self._value = _Button._MultiStateVariable._create("text")
     self._auto_size = True
     self._min_size = 0.0
     self._max_size = .3
     self._size = 0.2
     self._underlined = False
     self._ellipsis = True
     self._bold = _Button._MultiStateVariable._create(True)
     self._color = _Button._MultiStateVariable._create(Color.White())
     self._padding_top = 0
     self._padding_bottom = 0
     self._padding_left = 0
     self._padding_right = 0
     self._line_spacing = 0
     self._vertical_align = _Button.VertAlignOptions.Middle
     self._horizontal_align = _Button.HorizAlignOptions.Middle