HR Molecule

Add a horizontal rule separator

Summary
HR Molecule
Preference Dialog
Properties
typestring, ( r )
pref.namestring, ( r )
pref.enableWhenstring, ( r, w )
pref.disableWhenstring, ( r, w )
pref.widthstring, ( r, w )
pref.heightstring, ( r, w )
pref.floatstring, ( r, w )
pref.clearstring, ( r, w )
pref.rint [0, 255], ( r, w )
pref.gint [0, 255], ( r, w )
pref.bint [0, 255], ( r, w )
Functions
attach
detach
delete
rename
show
hide
refresh
clone
serialize

Preference Dialog

Properties

type

string, ( r )

Type of this molecule, hr.

pref.name

string, ( r )

The scriptable name for this molecule.  This name can be set using rename function dynamically.

pref.enableWhen

string, ( r, w )

Specifies the event that activates this molecule.  Default is load.

pref.disableWhen

string, ( r, w )

Specifies the event that deactivates this molecule.  Default is none.

pref.width

string, ( r, w )

Specifies the width of the horizontal rule.

autoDefault.  The molecule calculates the actual width.
%Defines the width in % of the droplet’s width.
lengthDefines the width in px, cm, etc.

pref.height

string, ( r, w )

Specifies the height of the horizontal rule.

autoDefault.  The molecule calculates the actual height.
%Defines the height in % of the droplet’s height.
lengthDefines the height in px, cm, etc.

pref.float

string, ( r, w )

Specifies where the horizontal rule appears in the droplet.

leftThe image floats to the left of the droplet.
rightThe image floats to the right of the droplet.
noneDefault.  The image is displayed just where it occurs in the text.

pref.clear

string, ( r, w )

Specifies the sides of the horizontal rule where other floating elements are not allowed.

leftNo floating elements allowed on the left side.
rightNo floating elements allowed on the right side.
bothNo floating elements allowed on either the left or the right side.
noneDefault.  Allows floating elements on both sides.

pref.r

int [0, 255], ( r, w )

Specifies the RED component of the color.

pref.g

int [0, 255], ( r, w )

Specifies the GREEN component of the color.

pref.b

int [0, 255], ( r, w )

Specifies the BLUE component of the color.

Functions

attach

attach(droplet);

Attach this molecule to the given droplet.

Parameters

droplet(object) a droplet.

Returns

N/A

detach

detach();

Remove this molecule from its droplet.

Parameters

N/A

Returns

N/A

delete

delete();

Delete this molecule.

Parameters

N/A

Returns

N/A

rename

rename(name);

Rename this molecule.

Parameters

name(string) a new name.

Returns

N/A

show

show();

Shows the effects of this molecule.

Parameters

N/A

Returns

N/A

hide

hide();

Hides the effects of this molecule.

Parameters

N/A

Returns

N/A

refresh

refresh();

Forces molecule to redraw with the current set of preferences.

Parameters

N/A

Returns

N/A

clone

clone();

Create a clone of this molecule.

Parameters

N/A

Returns

(object) a molecule.

serialize

serialize();

Serialize this molecule into its JSON representation.

Parameters

N/A

Returns

(string) JSON representation of a molecule.

Close