mergButton is an iOS external that enables you to add a native button to your app so that it can be layered above other native views
command mergButtonCreate pName,pType
Create a button
Parameters:
- pName - A name to be used to reference the button
- pType - The type of button to create
- custom
- system
- detail disclosure
- info light
- info dark
- contact add
- rounded rect
command mergButtonDelete pName
Delete a button
Parameters:
- pName - A name to be used to reference the button
command mergButtonSet pName,pProperty,pValue,[pState]
Set a button property
Parameters:
- pName - A name to be used to reference the button
- pProperty - The property to set
- reverses title shadow when highlighted
- adjusts image when highlighted
- adjusts image when disabled
- shows touch when highlighted
- tint color - R,G,B. The tint color to apply to the button title and image.
- content edge insets - Use this property to resize and reposition the effective drawing rectangle for the button content. The content comprises the button image and button title. You can specify a different value for each of the four insets (top, left, bottom, right). A positive value shrinks, or insets, that edge—moving it closer to the center of the button. A negative value expands, or outsets, that edge.
- title edge insets - Use this property to resize and reposition the effective drawing rectangle for the button title. You can specify a different value for each of the four insets (top, left, bottom, right). A positive value shrinks, or insets, that edge—moving it closer to the center of the button. A negative value expands, or outsets, that edge. The insets you specify are applied to the title rectangle after that rectangle has been sized to fit the button’s text. Thus, positive inset values may actually clip the title text.
- image edge insets - Use this property to resize and reposition the effective drawing rectangle for the button image. You can specify a different value for each of the four insets (top, left, bottom, right). A positive value shrinks, or insets, that edge—moving it closer to the center of the button. A negative value expands, or outsets, that edge.
- visible - Show or hide the button.
- rect - left, top, right, bottom. Set the location and size of the button.
- title - Sets the title of the button for a particular state
- font - In the form fontname,fontsize
- title color
- image - Sets the image of the button for a particular state
- background image - Sets the background image of the button for a particular state
- border color
- border width
- corner radius
- background color
- enabled
- pValue - The value to set the property to
- pState - (optional with "normal" default) The state with which to use the title, image or background image. At a minimum, you should set the value for the normal state. If a title, image or background image is not specified for a state, the default behavior is to use the title, image or background image associated with the normal state.
- normal
- highlighted
- disabled
- selected
function mergButtonGet pName,pProperty,[pState]
Get a button property
Parameters:
- pName - A name to be used to reference the button
- pProperty - The property to set
- reverses title shadow when highlighted
- adjusts image when highlighted
- adjusts image when disabled
- shows touch when highlighted
- tint color - R,G,B. The tint color to apply to the button title and image.
- content edge insets - Use this property to resize and reposition the effective drawing rectangle for the button content. The content comprises the button image and button title. You can specify a different value for each of the four insets (top, left, bottom, right). A positive value shrinks, or insets, that edge—moving it closer to the center of the button. A negative value expands, or outsets, that edge.
- title edge insets - Use this property to resize and reposition the effective drawing rectangle for the button title. You can specify a different value for each of the four insets (top, left, bottom, right). A positive value shrinks, or insets, that edge—moving it closer to the center of the button. A negative value expands, or outsets, that edge. The insets you specify are applied to the title rectangle after that rectangle has been sized to fit the button’s text. Thus, positive inset values may actually clip the title text.
- image edge insets - Use this property to resize and reposition the effective drawing rectangle for the button image. You can specify a different value for each of the four insets (top, left, bottom, right). A positive value shrinks, or insets, that edge—moving it closer to the center of the button. A negative value expands, or outsets, that edge.
- visible - Show or hide the button.
- rect - left, top, right, bottom. Set the location and size of the button.
- title - Sets the title of the button for a particular state
- font - In the form fontname,fontsize
- title color
- image - Sets the image of the button for a particular state
- background image - Sets the background image of the button for a particular state
- border color
- border width
- corner radius
- background color
- enabled
- pState - (optional with "normal" default) The state with which to use the title, image or background image. At a minimum, you should set the value for the normal state. If a title, image or background image is not specified for a state, the default behavior is to use the title, image or background image associated with the normal state.
- normal
- highlighted
- disabled
- selected
Returns The value of the property
function mergButtonFontNames
Required because the fontNames funtion in LiveCode doesn't return actual font names...
Returns List of font names that can be used
message mergButtonTouchDown pName
Sent to the control that called mergButtonCreate when the user touches down
Parameters:
- pName - The name of the button.
message mergButtonTouchDownRepeat pName
Sent to the control that called mergButtonCreate when the user touches down multiple times in rapid scucession
Parameters:
- pName - The name of the button.
message mergButtonTouchUpInside pName
Sent to the control that called mergButtonCreate when the user releases the touch while still on the button
Parameters:
- pName - The name of the button.
message mergButtonTouchUpOutside pName
Sent to the control that called mergButtonCreate when the user releases the touch when no longer on the button
Parameters:
- pName - The name of the button.
message mergButtonTouchCancel pName
Sent to the control that called mergButtonCreate when the touch is cancelled by the system
Parameters:
- pName - The name of the button.