Add from objects and elements

Top  Previous  Next

/* Add from objects and elements */

/ * =================================*/

#include "moskito.h"/* is everything in it */

#include <string.h>

 

/*

The following routine adds to the open plan an object and a text.

*/

long int EXPORTENTRY MakeObject (

int argc,

char * argv [],

PROOT root)

{

PPLANS flat;

POBJECT obj;

PELEMENT el;

KEY objektschluessel [3];

 

flat = DBgetOpenPlan (root);

objektschluessel [0] =1200;

obj = DBaddObject (flat, objektschluessel, 1);

if (! obj) {

return 1;

}

el = DBaddText (obj, 9, 100, 200, 0, 0, 0, 0, 1, 500, 0, "Hello",

ZERO, FALSE, TEXT_MODE_LEFT);

if (! el) {

return 1;

}

return 0;

}

 

/*---------------------------------------------------------------------------*/