home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / atari / st / tech / 6342 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.4 KB  |  36 lines

  1. Newsgroups: comp.sys.atari.st.tech
  2. Path: sparky!uunet!mcsun!sun4nl!ruuinf!plato.phil.ruu.nl!hjv
  3. From: hjv@phil.ruu.nl (Hendrik Jan Veenstra)
  4. Subject: Re: drop down menus in GEM
  5. Message-ID: <hjv.724704709@groucho.phil.ruu.nl>
  6. Sender: news@phil.ruu.nl
  7. Nntp-Posting-Host: groucho.phil.ruu.nl
  8. Organization: Department of Philosophy, University of Utrecht, The Netherlands
  9. References: <1992Dec18.120356.2386@infodev.cam.ac.uk>
  10. Date: Fri, 18 Dec 1992 18:51:49 GMT
  11. Lines: 23
  12.  
  13. rpj12@cus.cam.ac.uk (R.P. Jones) writes:
  14.  
  15. >Rather a simple question, but its giving me some stick!!!
  16.  
  17. >When using drop down menus how do you get the chech marks to work?
  18.  
  19.  
  20. I use the following (can be either a #define or a function), and have never had
  21. any problems.  Be sure you #include "aes.h" and be sure the menubar is drawn
  22. and 'active' (i.e. not removed with menu_bar(..)).
  23.  
  24. #define CHECK(ob,tree)        ((tree)[ob].ob_state |= CHECKED)
  25. #define UNCHECK(ob,tree)    ((tree)[ob].ob_state &= ~CHECKED)
  26. #define CHECK_FLIP(ob,tree)    ((tree)[ob].ob_state ^= CHECKED)
  27.  
  28. Of course, 'ob' is an integer, and is the index of the object (menu-item in 
  29. this case).  'Tree' is the address of the menu-tree (i.e an OBJECT * ).
  30.  
  31. --
  32. Hendrik Jan Veenstra    hjv@phil.ruu.nl  *  How can I save my dreams
  33. Dept. of Philosophy                      *  in the nightmare, in the flood
  34. University of Utrecht                    *  But I try.
  35. The Netherlands                          *
  36.