Sie sind auf Seite 1von 15

Redatam+SP

REtrieval of DATa for Small Areas by Microcomputer

xPlanMain (Front Page Creation)

Redatam+SP

REDATAM+SP is a software system developed by the Latin American and Caribbean Demographic Center (CELADE), which is the Population Division of the Economic Commission for Latin America and the Caribbean (ECLAC), United Nations. www.eclac.cl/celade/Redatam

Redatam+SP xPlanMain

Table of Contents
I. II. III. IV. V. VI. VII. VIII. IX. Introduction .......................................................................................................................................... 2 Panels y Controls ................................................................................................................................. 2 Parameters File .................................................................................................................................... 4 General Configuration .................................................................................................................... 4 Panels.................................................................................................................................................... 5 Images ............................................................................................................................................. 6 Buttons ............................................................................................................................................ 7 Acciones.......................................................................................................................................... 8 Quick Guide for IML Construction ................................................................................................ 9 Preparation and copy of image files ....................................................................................................... 9 HEADER panel section ........................................................................................................................ 10 CENTER panel section. ....................................................................................................................... 11 BOTTOM panel section........................................................................................................................ 11 Buttons creation ................................................................................................................................... 12 Buttons actions..................................................................................................................................... 13

Redatam Development Center

ECLAC/CELADE

Redatam+SP xPlanMain

I.

Introduction

The purpose of this application is to fulfill the users necessity of presenting a cover/frontpage before entering the R+SP xPlan Application and/or R+SP Process Module which contains additional information, documentation, links to internet sites or the institutional logos and/or of sponsors. The xPlanMain program works through parameters contained in an instruction file text-type, with an .IML extension. This file organizes and defines the shape and position of the panels, images and the execution buttons to access the application. The information which may be presented in the front page could be of the following types: 1. 2. 3. 4. 5. 6. 7. One or more R+SP xPlan applications The Redatam databases dictionaries with R+SP Process Multiple R+SP xPlanMain (recurrent covers) HPL help files HTML pages PDF documents Exit button to exit the system

The access to the applications can be made through the buttons, which may point, for example, to a Redatam dictionary file (.dic) to start the R+Process Module or to a R+ xPlan Application (.inl), etc. This document contains a description of the panels and buttons, as well as the parameters used to make them work. It also adds at the end a quick guide to elaborate a IML file.

II.

Panels y Controls

The design of the screen is made of five panels, HEADERPANEL, CENTERPANEL, LEFTPANEL, BUTTON PANEL and BOTTOMPANEL, as shown in Figure 1:

Redatam Development Center

ECLAC/CELADE

Redatam+SP xPlanMain

Figure 1 - Panels y Controls Each panel has four images (referred as PICTURE) and up to five buttons (BUTTON) except the Header Panel which only has images. Not all the panels are compulsory, same as images and pictures; the figure shows the totality; the measures as well (height & width) can be modified according to the user. Three panels are generally utilized: HEADER, CENTER and BOTTOM, the rest are for exceptional cases which would need to add more buttons than those in the panel. The names of the panels do not represent a special rank regarding the position at the Cover/frontpage, it is just for differentiation purposes. Similar to the R+SPxPlan Application elaborated on the basis of a INL text file, R+SPxPlanMain needs a IML file text, whose sections are described below.

Redatam Development Center

ECLAC/CELADE

Redatam+SP xPlanMain

III.

Parameters File

The instruction file has the IML extension and may be created from any ASCII text editor. The information is structured in blocks that structure sections and groups, quite similar to the former INI Windows file. Each section is identified by a name in square brackets (i.e. [STRUCTURE] ), and the clauses within each section are marked UPPERCASE, followed by the signal = and the value which the clause should be given (i.e. HEIGHT=320) Those clause values are also identified as parameters. Blank lines may be used for more clearness and to separate sections and clauses. Non recognized clauses are ignored and therefore they may be used as comments for documentation. However, it is suggested that lines with comments are initiated with a special mark (i.e. /), to differentiate them from the real clauses. El orden de las SECTIONes en el archivo es irrelevante, aunque es recomendable que se siga ms o menos el orden de los paneles, por motivos meramente organizacionales. El orden de las clusulas dentro de una seccin tambin es irrelevante. Un bloque estndar en un archivo IML sera algo como: The sequence of the sections in a file is not relevant though it is suggested that the order of the panels should be pursued for organizational purposes. The sequence of the clause inside a section it is also irrelevant. A standard block in a file would look like:
/coment (blak line) [SECTION] CLAUSE=PARAMETER

The IML should consist of one general configuration section, named STRUCTURE, and one section per panel, with the name of the panel, i.e. CENTER PANEL

IV.

General Configuration

These sections allow defining general parameters and default options for all Cover/frontpage elements. The section declaration is the following: [STRUCTURE] Parameter PLANID Options Default values Description

Main Application for Redatam+SP Application title: shown in Windows Tool Bar xPlan 1, 2, 3 o 4 2 Spanish Predefined language for system messages 1 English 3 Portuguese 2 Spanish 4 French

LANGUAGE

Redatam Development Center

ECLAC/CELADE

Redatam+SP xPlanMain

Parameter ALLOWRESTART

Options YES/NO

Default values NO

Description When doubling click on the first image of HEADERPANEL, this parameter allows updating the changes in the IML file (while the developing the cover). Default font for texts Default size for texts General Height of the Cover (pixels) General Width of the Cover (pixels) Show/Hide HEADERPANEL Show/Hide CENTERPANEL Show/Hide LEFTPANEL Show/Hide BUTTONPANEL Show/Hide BOTTOMPANEL Cover/frontpage background color, in RGB format, or any of the following AQUA, BLACK, BLUE, DARKGRAY, FUCHSIA, GRAY, GREEN LIME, MAROON, NAVY, OLIVE, PURPLE, RED, SILVER, SILVERLITE, TEAL, WHITE, YELLOW, AGUA, AMARILLO, AZUL, BLANCO, FUCCIA, LIMA, NEGRO, OLIVA, PLATA, PURPURA , ROJO, VERDE

FONTNAME FONTSIZE HEIGHT WIDTH HEADERPANEL CENTERPANEL LEFTPANEL BUTTONPANEL BOTTOMPANEL COLOR YES/NO YES/NO YES/NO YES/NO YES/NO

MS Sans Serif 8 570 780 YES YES NO NO YES GRAY

V.

Panels

The five panels have similar options, as shown below. It is very important that the declaration of each panel be executed as one section, i.e. square brackets at the beginning and at the end. [HEADERPANEL] [CENTERPANEL] [LEFTPANEL] [BOTTOMPANEL] [BUTTONPANEL]

Redatam Development Center

ECLAC/CELADE

Redatam+SP xPlanMain

Parameter CAPTION

Options

Default value (panel name)

Description Text shown by the Panel image. It can also be used in the case that there is no intention of linking the image to the panel Panel height, in pixels. If value is 0, this is a different way to hide the panel position Width of panel, in pixels Upright placement of the panel at the Cover/frontpage (from above) Horizontal placement of panel in Cover/frontpage (from the left) Panel background color, in RGB format, or any previously enumerated list. It is not obligatory; if an image is inserted, it will hide the color. Total number of images to be included in the panel. Total number of buttons to be included in the panel, beware that HEADERPANEL does not include this feature.

HEIGHT WIDTH TOP LEFT COLOR

60 772 0 0 WHITE

PICTURES BUTTONS

0..4 0..5

0 0

VI.

Images

Images are shown at any panel, depending on the Cover/frontpage design. Whereas it is possible to have several images for each panel, it is basically easier to show only one image for the panel (instead of separating several segments, according to buttons position) and superimpose the buttons. Following, parameters representing an image en the IML file are shown. Image number matches with the / sign in the Panel. Parameter PICTUREFILEi Options Default value Description Image file in BMP, JPG or GIF format. It is worth to mention that absolute paths should not be used; if the Application is to be disseminated it is likewise that the PC may not have such location or path. It is suggested to use the option %INPATH in order to surrogate the directory where the IML file is located. YES/NO NO YES: indicates that the image will be re-adjusted exactly to the HEIGHT WIDTH size definition, disconnected from its original size. Horizontal placement of the image in panel

PICTURESTRETCHi

PICTUREALIGNi

LEFT RIGHT

Redatam Development Center

ECLAC/CELADE

Redatam+SP xPlanMain

CENTER PICTUREWIDTHi PICTUREHEIGHTi PICTURELEFTi PICTURETOPi 0 0 0 0 Width of the image in pixels Height of the image in pixels Horizontal placement of the image at the panel (from the left) Vertical placement of the image at the panel (from above)

VII.

Buttons

They represent actions or trigger programs and/or documents, according to the different types previously mentioned at the Introduction Next, parameters are shown to represent an IMLFile button where I matches with button number in the panel. Parameter BUTTONiFILE Options Default value Description File image in BMP, JPG or GIF format, associated to the button. Same as with images, absolute paths should not be used (PATH), it is recommended to use %INLPATH option in order to substitute the directory where the IML file is placed 0 0 0 0 Width of the Button, in pixels Height of the button in pixels Horizotal placement of the button at the panel (from the left) Vertical placement of the button at the panel (from above) Text which comes up when the user moves the Mouse over the button. The text that is presented close to the image of the button. It can be used as well in case there is no need to link images to button. BLACK TOP LEFT RIGHT BOTTOM
Redatam Development Center

BUTTONiWIDTH BUTTONiHEIGHT BUTTONiLEFT BUTTONiTOP BUTTONiHINT BUTTONiCAPTION

BUTTONiFONTCOLOR BUTTONiSTYLE

Source color for text introduced in CAPTION parameter Placement of CAPTION text with respect to image, in case image and text are to be shown jointly.

RIGHT

ECLAC/CELADE

Redatam+SP xPlanMain

BUTTONiTYPE

CLOSE GENERIC HELP HTML IML INL PROCESS

CLOSE

Action type to be executed when the user press the button

BUTTONiFILE

Name of the file to be linked to the button. All types of buttons, except CLOSE type, need information on this parameter

VIII.

Acciones

In the following table file types are shown in order to be linked to each type of action of the buttons. Accin CLOSE GENERIC HELP HTML (.exe) (.hlp) (.html) o (.pdf) Tipo de Archivo Description Allows to Exit the cover/frontpage, parameter. To produce any kind of application Help file call in HLP format. %INLPATH or %CDPATH options may be used (if Help is at a CD/DVD) Call to HTML page or PDF File. %INLPATH, %CDPATH may be used (if the page is in a CD/DVD) or in an Internet address. http://www.eclac.cl/celade/redatam/ Link to other cover/frontpage designed with R+SP xPlanMain. %INLPATH option may be used. Link to other application (INL) elaborated with R+SP xPlan. %INLPATH option may be use. Link to R+SP Process, by directly opening the Dictionary stated at the parameter. %INLPATH option may be used. no need to define any additional

IML INL PROCESS

(.iml) (.inl) (.dic)

Redatam Development Center

ECLAC/CELADE

Redatam+SP xPlanMain

IX.

Quick Guide for IML Construction

As an example, on the basis of Nueva Miranda data base we will build up an application in R+SP xPlanMain to execute R+SP Process and R+SP xPlan. Each of these actions will need a button to be performed. We will also place two extra buttons, one to imitate a Help call and other to exit the application. A very simple and efficient way to elaborate a cover/frontpage, is to create only one image per panel, striving to use very few panels. The number of panels is given by the quantity of buttons at the cover or frontpage, with a maximum of four per panel, so if we have 6 buttons we should then use three panels since the HEADER PANEL has no buttons and only images--. In such a case if we had four buttons only two panels could be used: HEADERPANEL and CENTERPANEL, however, as an example we will also use the BOTTONPANEL. The HEADERPANEL will only have one image, the header_main.bmp. The CENTERPANEL will contain one image and two buttons, one to perform Process and other for xPlan. The BOTTONPANEL will have one image, botton_main_ESP.bmp and two buttons, one for information and other for exit the application. Next, step by step we describe the elaboration of an IML file for that application. The complete file for this tutorial is called NMIRANDACENSOMAIN_ESP.iml and should be installed with REDATAM+SP under NMIR folder.

Preparation and copy of image files


1.1 In organizational terms the best thing would be to work with a new directory but in order to facilitate the comprehension and to avoid problems of file addressing, it is recommended to make it in NMIR Directory of a REDATAM+SP installation 1.2 To edit a file in text format with any given name (i.e. NMIR_MAIN_EJ), with IML.extension. Write down the following entries in this file:
[STRUCTURE] PLANID=Main example //Spanish LANGUAGE=2 //Development mode to see changes ALLOWRESTART=YES //for the time being to eliminate Center and Bottom panels CENTERPANEL=NO BOTTOMPANEL=NO

Save it in NMIR directory 1.3 Generate a shortcut for xPlanMain execution. This shortcut could be at the Desktop Windows or at the Directory created in 1.1. For that purpose one way to do this is to go to Start button>Programs> Redatam+SP> xPlanMain then make a right click and choose Copy . Finally use right click at the Desktop or at the illustration Directory, and choose paste shorcut.
Redatam Development Center

ECLAC/CELADE

Redatam+SP xPlanMain

1.4 The previous step will let us have access to xPlanMain Program, but we need to link it with IML.file, just created in 1.2. With a right click in shortcut of previous step, choose Properties and at the editing box Target, then at the end of program name add a blank space and write down the name of the file created in 1.2, with full path and the extension.IML, as shown in the following figure. Then press OK button to save the changes of shortcut.

Figure 2 - Shortcut para xPlanMain 1.5 Make double click in shortcut created in previous step. At the Execution Bar an icon of the xPlanMain named Main Example should come up and the system should then show an all grey screen, with the default panel names of xPlanMain. Now close the application.

HEADER panel section


This panel should contain a sole image (header_main.bmp). By having only one image --from the Windows Explorer in Properties/Summary-- we can view the size of the header_main.bmp file (72x780). This file should be used as the size of the panel and of the image. 1. Edit IML file and enter the following clauses:
[HEADERPANEL] 1 HEIGHT=72 WIDTH=780 //El panel consta de una sola imagen PICTURES=1 //Utilizando el acceso directo %INLPATH 2 PICTUREFILE1=%INLPATH\header_main.bmp //Repetimos los tamaos para esta imagen PICTUREHEIGHT1=72
1 2

To separate the sections, could write a blank line before The %INLPATH parameter is used instead of the whole path for NMIR under REDATAM+SP ECLAC/CELADE
Redatam Development Center

10

Redatam+SP xPlanMain PICTUREWIDTH1=780

2. Save the file and re execute the application. The same grey screen should come up, but with an upper bar with de file image header_main.bmp.

CENTER panel section.


This panel should contain an image and two buttons. See Properties/Summary from the center_main_ENG.bmp file in order to get its size (328 x 780). 1. Edit IML file and eliminate the CENTERPANEL=NO structure line section in order to fit out this panel. Then enter the following clauses:
[CENTERPANEL] TOP=72 HEIGHT=328 WIDTH=780 PICTURES=1 PICTUREFILE1=%INLPATH\ESP\center_main_ESP.bmp PICTUREHEIGHT1=328 PICTUREWIDTH1=780

BOTTOM panel section


This panel should contain as well an image and two buttons. See Proterties/Summary from bottom_main_ENG.bmp file to get the size (181 x 780). 1. Edit IML file and eliminate the BOTTOMPANEL=NO structure section line to fit out this panel. Then copy the CENTERPANEL definition and paste under the file, changing the name of the section (BOTTOMPLANEL). Change TOP by 400, which corresponds to the addition of the width of previous panels. Then change the file name to bottom_main_ENG.bmp, and change clauses of HEIGHT panel and of figure 181, corresponding to the figure height. The section should remain like this:
[BOTTOMPANEL] TOP=400 HEIGHT=181 WIDTH=780 PICTURES=1 PICTUREFILE1=%INLPATH\ESP\bottom_main_ESP.bmp PICTUREHEIGHT1=1818 PICTUREWIDTH1=780

2. Save the file and re execute the application. Now the screen should come up with all background figures, as shown below:

Redatam Development Center

ECLAC/CELADE

11

Redatam+SP xPlanMain

Figure 3 - Figures de fondo

Buttons creation
Once the image is ready, we Hill proceed to settle the buttons. We should prepare two buttons en each of the panels CENTER y BOTTON, which means to have an entrance with such information in each panel (BUTTONS=2). For each one of the buttons the content clauses should be reported (FILE) and placement (HEIGHT, WITDH, TOP and LEFT). 1. Edit IML file and find out the Section (CENTERPANEL). Then enter the following entries:
//Dos botones (Process y xPlan) BUTTONS=2 //Imgen del boton BUTTON1FILE=%INLPATH\boton_main_xplan.bmp BUTTON1HEIGHT=38 BUTTON1WIDTH=125 BUTTON1TOP=270 BUTTON1LEFT=200

2. Repeat the process for second button, just by changing LEFT and the image:
//Imagen del botn BUTTON2FILE=%INLPATH\boton_main_process.bmp BUTTON2HEIGHT=38 BUTTON2WIDTH=125 BUTTON2TOP=270 BUTTON2LEFT=450

3. For BOTTONPANEL, copy the buttons definitions of CENTERPANEL and change the names of the files for boton_info_main_ESP and boton_exit_main_ESP.
//Dos botones (Info y Salir) BUTTONS=2 //Imagen del boton BUTTON1FILE=%INLPATH\ESP\boton_info_ESP.bmp
Redatam Development Center

ECLAC/CELADE

12

Redatam+SP xPlanMain BUTTON1HEIGHT=25 BUTTON1WIDTH=110 BUTTON1TOP=60 BUTTON1LEFT=600

Repeat the process for second button, just changing LEFT and image
//Imagen del botn BUTTON2FILE=%INLPATH\ESP\boton_exit_ESP.bmp BUTTON2HEIGHT=25 BUTTON2WIDTH=110 BUTTON2TOP=110 BUTTON2LEFT=600

Buttons actions
Actions associated to buttons are: xPlan Process Informacin Salir Calls a RP+SP xPlan with NMIRANDACENSO_ESP.inl Calls a RP+SP Process with NmirESP.dic Calls web of Redatam http://www.eclac.cl/celade/redatam Exit the System

For xPlan (CENTERPANEL button). Enter following entries at CENTERPANEL section.


//button type BUTTON1TYPE=INL BUTTON1INL=%INLPATH\NMIRANDACENSO_ESP.inl BUTTON1HINT=Execute Application R+SP xPlan

For CENTERPANEL button 2 process:

//button type BUTTON2TYPE=PROCESS BUTTON2DIC=%INLPATH\BASER\ NmirEsp.dic BUTTON2HINT= Execute R+SP Process

For Information (button 1 of BOTTOMPANEL). Enter following entries in BOTTOMPANEL section:


//button type BUTTON1TYPE=HTML BUTTON1HTML=http://www.eclac.cl/celade/redatam BUTTON1HINT=More info about REDATAM

For Exit (button 2 of BOTTOMPANEL):


//button type, by default not necessary BUTTON2TYPE=CLOSE BUTTON2HINT=Exit

Save file and re execute the application. Recall that the re execution should be done with double click on HEADERPANEL. The application should look like the next image, all complete and performing with all buttons:
Redatam Development Center

ECLAC/CELADE

13

Redatam+SP xPlanMain

Figure 4 - Final Application

Redatam Development Center

ECLAC/CELADE

14

Das könnte Ihnen auch gefallen