home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / desklib / Libraries / Menu / c / MakeWrite < prev    next >
Encoding:
Text File  |  1993-04-30  |  1.2 KB  |  35 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Menu.MakeWrite.c
  12.     Author:  Copyright © 1993 Shaun Blackmore and Jason Williams
  13.     Version: 1.00 (30 Apr 1993)
  14.     Purpose: Makes a menu item writable
  15. */
  16.  
  17.  
  18. #include "Core.h"
  19. #include "Wimp.h"
  20.  
  21.  
  22. void Menu_MakeWritable(menu_ptr menu, int entry,
  23.                        char *buffer, int size, char *valid)
  24. {
  25.   menu_item *item = (menu_item *) (((int) menu) + sizeof(menu_block));
  26.  
  27.   item = &item[entry];
  28.   item->menuflags.data.writable   = TRUE;
  29.   item->iconflags.data.indirected = TRUE;
  30.  
  31.   item->icondata.indirecttext.buffer      = buffer;
  32.   item->icondata.indirecttext.bufflen     = size;
  33.   item->icondata.indirecttext.validstring = valid;
  34. }
  35.