home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 4611 / fw16d.ins / SAMPLES / TESTFONT.PRG < prev    next >
Text File  |  1994-02-16  |  3KB  |  96 lines

  1. //----------------------------------------------------------------------------//
  2. //  FiveWin 1.4 - Ejemplos
  3. //  (c) A.Linares, F.Pulpón 1993-4
  4. //
  5. //  Construir con BUILD TestFont
  6. //
  7. //----------------------------------------------------------------------------//
  8.  
  9. // Ejemplos de utilización de distintos Fonts en pantalla
  10. // Como estamos utilizando controles para dibujar, no se borrarán al
  11. // redibujar la ventana principal
  12.  
  13. // Examples of using different Font on the Window
  14. // As we are using controls to draw, the won't be deleted
  15. // when we repaint the main Window
  16.  
  17. // En este ejercicio estamos tambien combinando, por primera vez, la
  18. // capacidad de inicializar ventanas antes de ser mostradas ( Claúsula ON INIT )
  19.  
  20. // In this exercise we are showing how to init Windows
  21. // before beeing showed ( Clause ON INIT )
  22.  
  23. // Observa que en este ejercicio no hemos llegado a crear un menú principal,
  24. // y estamos situando controles en la ventana principal. Aunque esto último
  25. // no es una practica aconsejable, en determinados casos puede ser muy
  26. // práctico
  27.  
  28. // Observe that in this exercise we have not created a main menu,
  29. // and we are placing controls on the main Window. This techniques are
  30. // not recommended, but in same situations might be very usefull.
  31.  
  32. #include "FiveWin.ch"
  33.  
  34. static oWnd, fntArial, fntRoman
  35.  
  36. //----------------------------------------------------------------------------//
  37.  
  38. function Main()
  39.  
  40.    DEFINE WINDOW oWnd FROM 1, 1 TO 20, 80 ;
  41.       TITLE "Probando Fonts en Pantalla"
  42.  
  43.    DEFINE FONT fntArial NAME "Arial" SIZE 20, 20
  44.    DEFINE FONT fntRoman NAME "Roman" SIZE 10, 25
  45.  
  46.    SET MESSAGE OF oWnd ;
  47.       TO OemToAnsi( "FiveWin 1.4 - (c) A.Linares & F.Pulpón, 1993-4" )
  48.  
  49.    ACTIVATE WINDOW oWnd MAXIMIZED ;
  50.       ON INIT ShowControls( Self )
  51.  
  52.    RELEASE FONT fntArial, fntRoman
  53.  
  54. return
  55.  
  56. //----------------------------------------------------------------------------//
  57.  
  58. function ShowControls( Self )
  59.  
  60.    local lFiveWin := .t., lClipper5 := .t., lWindows := .t., lOOPS := .t.
  61.  
  62.    @ 2, 2 BUTTON "&OOPS" OF oWnd ;
  63.       FONT fntArial ;
  64.       ACTION ;
  65.          MsgInfo( OemToAnsi( "Adquiere en Soft>Mail nuestra librería" + Chr( 13 ) + ;
  66.                   "Objects para estudiar y comprender los" + Chr( 13 ) + ;
  67.                   "fundamentos teóricos del OOPS" + Chr( 13 ) + ;
  68.                   "y su aplicación práctica en Clipper 5." + Chr( 13 ) + Chr( 13 ) + ;
  69.                   "No te quedes atrás. ¡ El OOPS es formidable !" ) )
  70.  
  71.    @ 5, 2 SAY "Disfruta la potencia" OF oWnd FONT fntArial
  72.  
  73.    @ 6, 2 SAY OemToAnsi( "de la Programación Orientada" ) ;
  74.       OF oWnd FONT fntArial
  75.  
  76.    @ 7, 2 SAY "al Objeto" OF oWnd FONT fntArial
  77.  
  78.    // Observa que las coordenadas son proporcionales al FONT utilizado
  79.    // Por defecto se utiliza el font de Windows
  80.  
  81.    @ 5, 5 CHECKBOX lFiveWin  PROMPT "FiveWin" SIZE 200, 30 ;
  82.      OF oWnd FONT fntRoman
  83.  
  84.    @ 6, 8 CHECKBOX lClipper5 PROMPT "Es Clipper 5" SIZE 200, 30 ;
  85.       OF oWnd FONT fntRoman
  86.  
  87.    @ 7, 8 CHECKBOX lWindows  PROMPT "en Windows" SIZE 200, 30 ;
  88.       OF oWnd FONT fntRoman
  89.  
  90.    @ 8, 8 CHECKBOX lOOPS     PROMPT "y usando OOPS" SIZE 200, 30 ;
  91.       OF oWnd FONT fntRoman
  92.  
  93. return
  94.  
  95. //----------------------------------------------------------------------------//
  96.