While most properties defined in the core layer and layout layers are used only by the layers themselves, the values of certain properties influence the engine that supplies the S2 data structures. Those influencial properties are listed in the reference below.
The prop_init() function is the initial entry point called by the system, and it's called before the influential properties are examined. This gives you a place to conditionally setup the influential properties, if you don't want your layout layer to directly expose them to the user.
Example B.1. Setting $*gallery_max_page_size
For example, if you wanted to allow the user to specify a grid layout of the displayed thumbnails on a gallery page, you could create two properties: rows and cols, and then calculate $*gallery_max_page_size from those properties. By using this technique, the formula you write that calculates how many pictures to display will be fed an appropriate number of pictures.
property int rows {
des = "Number of rows of pictures";
min = 1;
}
set rows = 5;
property int cols {
des = "Number of cols of pictures";
min = 1;
}
set cols = 5;
function prop_init ()
{
$*gallery_page_max_size = $*rows * $*cols;
}A string that defines thumbnail styles for a layer. The structure of this string is similar to a HTTP query string, in that it is an amphersand (&) delimited string of key=val pairs; the key being the style identifier, and the value being thumbnail size (intxint) followed by an optional comma and display style keyword.
For example, the following string defines two thumbnail styles, one called userdef that will display cropped region thumbnails up to 150x150, and another called preview that will display a standard 100x100 thumb.
userdef=150x150,crop&preview=100x100
The minimum number of thumbnails to display on a gallery page.
The maximum number of thumbnails to display on a gallery page.