home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / Level 1 Extensions 29Sep94 / RadioButton.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  1.7 KB  |  54 lines  |  [TEXT/KAHL]

  1. /* RadioButton.h */
  2.  
  3. #ifndef Included_RadioButton_h
  4. #define Included_RadioButton_h
  5.  
  6. /* RadioButton module depends on: */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Memory */
  12. /* Screen */
  13. /* DataMunging */
  14. /* EventLoop */
  15.  
  16. #include "Screen.h"
  17.  
  18. struct RadioButtonRec;
  19. typedef struct RadioButtonRec RadioButtonRec;
  20.  
  21. /* allocate a new radio button.  Name is null terminated */
  22. RadioButtonRec*            NewRadioButton(WinType* Window, char* Name,
  23.                                             OrdType X, OrdType Y, OrdType Width, OrdType Height);
  24.  
  25. /* dispose of radio button and any internal data structures. */
  26. void                                DisposeRadioButton(RadioButtonRec* TheButton);
  27.  
  28. /* find out where the radio button is located */
  29. OrdType                            GetRadioButtonXLoc(RadioButtonRec* TheButton);
  30. OrdType                            GetRadioButtonYLoc(RadioButtonRec* TheButton);
  31. OrdType                            GetRadioButtonWidth(RadioButtonRec* TheButton);
  32. OrdType                            GetRadioButtonHeight(RadioButtonRec* TheButton);
  33.  
  34. /* change the location of the radio button */
  35. void                                SetRadioButtonLocation(RadioButtonRec* TheButton,
  36.                                             OrdType X, OrdType Y, OrdType Width, OrdType Height);
  37.  
  38. /* do a full redraw of the button */
  39. void                                RedrawRadioButton(RadioButtonRec* TheButton);
  40.  
  41. /* handle a mouse down in the button.  returns True if the state changed. */
  42. MyBoolean                        RadioButtonMouseDown(RadioButtonRec* TheButton, OrdType X, OrdType Y);
  43.  
  44. /* force the state of the button to be a certain value */
  45. void                                SetRadioButtonState(RadioButtonRec* TheButton, MyBoolean TheState);
  46.  
  47. /* get the state of the button */
  48. MyBoolean                        GetRadioButtonState(RadioButtonRec* TheButton);
  49.  
  50. /* see if the location is in the radio button's box */
  51. MyBoolean                        RadioButtonHitTest(RadioButtonRec* TheButton, OrdType X, OrdType Y);
  52.  
  53. #endif
  54.