A simple text editor

In this section:

  • INC
  • INTERNET_HYPERLINK
  • MINIMISE, MAXIMISE & RESTORE
  • PRINT_ABORT
  • PRINTER_OPEN
  • PRINTER_OPEN1
  • PRINTER_SELECT
  • PRINTER_SETUP
  • SELECT_ALL
  • SET
  • SETF
  • SOUND
  • STOP
  • SUPER_MAXIMISE
  • TEXT
  • TEXT_HISTORY
  • TILE_HORIZONTALLY
  • TILE_VERTICALLY
  • TOGGLE
  • +
  • A simple text editor
  • The following example uses a number of the above call-back functions. It implements a simple editor.

    WINAPP
    INTEGER i,winio@
    CHARACTER*129 file,new_file,help_file
    help_file='myhelp.hlp'
    i=winio@('%mn[&File[&Open]]&','EDIT_FILE_OPEN','*.*',file)
    i=winio@('%mn[[&Save]]&', 'EDIT_FILE_SAVE','*.*',new_file)
    i=winio@('%mn[[Save &As]]&',EDIT_FILE_SAVE_AS','*.*',new_file)
    i=winio@('%mn[[E&xit]]&', 'EXIT')
    i=winio@('%mn[&Edit[&Copy]]&','COPY')
    i=winio@('%mn[[Cu&t]]&', 'CUT')
    i=winio@('%mn[[&Paste]]&', 'PASTE')
    i=winio@('%mn[&Help[&Contents]]&','HELP_CONTENTS',help_file)
    i=winio@('%mn[[&Help on help]]&', 'HELP_ON_HELP', help_file)
    i=winio@('%60.20eb','*',0)
    END

     

     

    Basket
    Empty
     
    Copyright © 1999-2020 Silverfrost Limited