home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Frameworks / PennyWise™ Framework / PennyWise Includes / PWDialogUtils.h < prev    next >
Encoding:
Text File  |  1994-08-09  |  2.9 KB  |  70 lines  |  [TEXT/KAHL]

  1. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  2. //                                                                                //
  3. //                                                                                //
  4. //                    Copyright PennyWise Software, 1994.                            //
  5. //                                                                                //
  6. //            Part of the PennyWise Software Application Framework                //
  7. //                                                                                //
  8. //                                                                                //
  9. //            DialogUtils.h            Written by Peter Kaplan                        //
  10. //                                                                                //
  11. //                                                                                //
  12. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  13. //                                                                                //
  14. //        This file relies on WindowUtils for some if its drawing functions.        //
  15. //                                                                                //
  16. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  17. #ifndef _DIALOG_UTILITIES_
  18. #define _DIALOG_UTILITIES_
  19.  
  20.     // We need WindowUtils.h
  21. #include <PWWindowUtils.h>
  22.  
  23.     // This is used by Popupmenus
  24. typedef struct    PopupPrivateData {
  25.     MenuHandle    menuHandle;
  26.     long        menuID;
  27.     }PopupPrivateData, *PopupPrivatePtr, **PopupPrivateHandle;
  28.  
  29.     // These are Apple Supplied routines that were not in the headers that symantec supplied
  30.     // They are in later versions of the Apple Headers
  31.     pascal OSErr SetDialogDefaultItem (DialogPtr theDialog, short newItem) = {0x303C,0x0304,0xAA68};
  32.     pascal OSErr SetDialogCancelItem (DialogPtr theDialog,short newItem) = {0x303C,0x0305,0xAA68};
  33.  
  34.     // Routines to get the info on a DITL item
  35.     extern short     GetDItemType(WindowPtr theDialog, short theItem);
  36.     extern Handle     GetDItemHandle(WindowPtr theDialog, short theItem);
  37.     extern Rect     GetDItemRect(WindowPtr theDialog, short theItem);
  38.     
  39.     // Routines to check DITL item for a type of Control
  40.     extern Boolean    IsButton(WindowPtr theDialog, short theItem);
  41.     extern Boolean    IsRadio(WindowPtr theDialog, short theItem);
  42.     extern Boolean    IsCheckBox(WindowPtr theDialog, short theItem);
  43.     extern Boolean    IsOtherControl(WindowPtr theDialog, short theItem);
  44.     
  45.     // Toggling items
  46.     extern void FlashButton(WindowPtr theDialog, short    theItem);
  47.     extern void HiliteDItem(WindowPtr    theDialog, short    theItem, short    value);
  48.     
  49.     extern void FrameItem(WindowPtr theDialog, short    theItem, long color);
  50.     
  51.     // Outline Button Drawing
  52.     extern void DrawButtonOutlineItem(WindowPtr theDialog, short theItem, long color);
  53.     extern void EraseButtonOutlineItem(WindowPtr theDialog, short theItem);
  54.     
  55.     // Item Focus Drawing
  56.     extern void DrawFocusItem(WindowPtr    theDialog, short theItem, long color);
  57.     extern void EraseFocusItem(WindowPtr    theDialog, short theItem);
  58.     
  59.     // Text in text items
  60.     extern void GetDText(DialogPtr theDialog, short    theItem, unsigned char * theString);
  61.     extern void SetDText(DialogPtr theDialog, short    theItem, unsigned char * theString);
  62.     
  63.     // Values in control Items
  64.     extern void SetDValue(DialogPtr theDialog, short    theItem, short theValue);
  65.     extern short GetDValue(DialogPtr theDialog, short    theItem);
  66.     
  67.     // Strings in popup items
  68.     extern void GetPopUpItemString(WindowPtr theDialog, short    theItem, unsigned char * theString);
  69.  
  70. #endif