C H A P T E R 7
Controls and Other Protos
7-22
Summary
Button and Box Protos
7
protoTextButton
7
aProtoTextButton := {
_proto: protoTextButton,
viewBounds:
boundsFrame
,
viewFlags:
integer
,
// viewFlags constants
text:
string,
// text inside the button
viewFont:
fontFlags
,
viewFormat:
formatFlags
,
viewJustify:
justificationFlags
,
viewTransferMode:
integer
,
// view transfer constants
ButtonClickScript:
function
,
// when button is tapped
ButtonPressedScript:
function
,
// while button is pressed
...
}
protoPictureButton
7
aProtoTextButton := {
_proto: protoPictureButton,
viewBounds:
boundsFrame
,
viewFlags:
integer
,
// viewFlags constants
icon:
bitmap
,
// bitmap to use for button
viewFormat:
formatFlags
,
viewJustify:
justificationFlags
,
ButtonClickScript:
function
,
// when button is tapped
ButtonPressedScript:
function
,
// while button is pressed
...
}
protoInfoButton
7
aProtoInfoButton := {
_proto: protoInfoButton,
viewFlags:
integer
,
// viewFlags constants
viewBounds:
boundsFrame
,
viewJustify:
justificationFlags
,
...
}