The IDL template shown in source 1 is a minimal skeleton for a new tool. For more sophisticated applications, additional functionality must be implemented. In this case, a user should take a closer look at the available source code. The template covers only the implementation of a simple tool. For example, the PSF star tool is based completely on this template.
FUNCTION <MYTOOL>::Init, view IF NOT self-><SUPERCLASS>::Init(view) THEN RETURN, 0 self.dlgTitle = '<MYTITLE>' self.cfgPlace = '<MYCFG>' self.objClass = '<MYOBJCLASS>' self.labelPrefix = '<MYPREFIX>' ; Additional initialization code ... RETURN, 1 END PRO <MYTOOL>::InitObject, obj, x, y self-><SUPERCLASS>::InitObject, obj, x, y ; object specific extensions ... END PRO <MYTOOL>::ReadDynamicContent self-><SUPERCLASS>::ReadDynamicContent ; update additional dialog elements (depends on the current object) ... END PRO <MYTOOL>::WriteDynamicContent self-><SUPERCLASS>::WriteDynamicContent ; store additional dialog content in the current object ... END PRO <MYTOOL>::CreateContent self-><SUPERCLASS>::CreateContent row = self->GetFreeRow() ; create additional dialog window elements ... END PRO <MYTOOL>__define struct = { <MYTOOL>, $ INHERITS <SUPERCLASS>, $ ; tool specific extensions ... } END |
Placeholder | Description |
---|---|
<MYTOOL> | The IDL class name of the tool (CLASS element in the configuration file, for example ldrsPSFTOOL). |
<SUPERCLASS> | (for example ldrsAREATOOL) |
<MYTITLE> | The dialog title (for example Psf). |
<MYCFG> | The place in the parameter file (for example PSFSTAR). |
<MYOBJCLASS> | The tool specific graphic object (for example ldrsPSFSTAR). |
<MYPREFIX> | The prefix used in the graphical representation (for example Psf ) |
Each tool is described in a section of the configuration file ldrs.cfg (see source 2). These sections must follow the subsequent rules:
TOOL4.TAG = "targetBox" TOOL4.LABEL = "Target" TOOL4.CLASS = "ldrsTARGETTOOL" TOOL4.BM1 = "........................" TOOL4.BM2 = ".**.**.**.**.**.**.**.*." TOOL4.BM3 = "......................*." TOOL4.BM4 = ".........******.......*." TOOL4.BM5 = ".*.....**......*........" TOOL4.BM6 = ".*....*.........*.....*." TOOL4.BM7 = ".................*....*." TOOL4.BM8 = ".*...............*......" TOOL4.BM9 = ".*........****...*....*." TOOL4.BM10 = ".........*....*.*.....*." TOOL4.BM11 = ".*......*......**......." TOOL4.BM12 = ".*......*......*......*." TOOL4.BM13 = "........*......*......*." TOOL4.BM14 = ".*.....**......*........" TOOL4.BM15 = ".*.....*.*....*.......*." TOOL4.BM16 = "......*...****........*." TOOL4.BM17 = ".*....*................." TOOL4.BM18 = ".*....*...............*." TOOL4.BM19 = ".......*.........*....*." TOOL4.BM20 = ".*......*......**......." TOOL4.BM21 = ".*.......******.......*." TOOL4.BM22 = ".*......................" TOOL4.BM23 = ".*.**.**.**.**.**.**.**." TOOL4.BM24 = "........................" |