int main() { simpleObject object1(100,100,100); simpleObject object2(50, 50, 50); display_object_info( "object1", object1 ); display_object_info( "object2", object2 ); printf("moving object2 by -20,10,0...\n"); object2.translate( -20, 10, 0 ); display_object_info( "object2", object2 ); return 0; }
int #ifndef __WATCOMC__ __FrCDECL #endif main(int argc, char **argv) { #ifdef __WATCOMC__ FrDestroyWindow() ; // for Watcom, run as raw console app #endif /* __WATCOMC__ */ if (argc > 1) cout << argv[0] << " does not require any arguments." << endl << endl ; cout << "\tFramepaC " FramepaC_Version_string " Test Program" << endl << "\t==========================" << endl << "Use \"* ?\" to list the available commands." << endl ; // deliberately start with a tiny symbol table, to force table expansion as // we use the test program (in fact, the first expansion will happen during // initialization) #if 0 //#ifdef FrMOTIF Widget main_window = XtVaAppInitialize( &app_context, "Framepac Test Program", NULL, 0, &argc, argv, NULL, NULL); FrInitializeMotif("FramepaC Messages",main_window,16) ; #else initialize_FramepaC(16) ; #endif /* FrMOTIF */ FramepaC_set_userinfo_dir(0) ; // set default location FrObject *obj = 0 ; FrSymbol *symbolEOF = FrSymbolTable::add("*EOF*") ; do { if (obj) { obj->freeObject() ; // free the object from prev pass thru the loop obj = 0 ; } FramepaC_bgproc() ; // handle any asynchronous operations cout << "\nEnter a FrObject, NIL to end: " ; cin >> obj ; FramepaC_bgproc() ; // handle any asynchronous operations if (obj && obj->symbolp() && obj == FrSymbolTable::add("*")) interpret_command(cout,cin,True) ; else display_object_info(cout,obj) ; FramepaC_bgproc() ; // handle any asynchronous operations } while (!NIL_symbol(obj) && obj != symbolEOF) ; #if 0 //#ifdef FrMOTIF FrShutdownMotif() ; #else FrShutdown() ; #endif return 0 ; }