home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cl-lib07.zip / pm.zip / usr / include / pm / presentationspace.h < prev    next >
C/C++ Source or Header  |  1995-06-27  |  1KB  |  61 lines

  1. #ifndef _PRESENTATIONSPACE_H_
  2. #define _PRESENTATIONSPACE_H_
  3.  
  4. #ifndef _OS2EMX_H
  5. #define INCL_PM
  6. #include <objc/os2.h>
  7. #endif
  8.  
  9. #include <objc/Object.h>
  10.  
  11. @interface PresentationSpace : Object
  12. {
  13.   HPS   hps;
  14.   float spacing;
  15.   LONG  xResolution;
  16.   LONG  yResolution;
  17.   LONG  textHeight;
  18. }
  19.  
  20. - init;
  21.  
  22. - setHPS: (HPS) aHPS;
  23. - (HPS) hps;
  24.  
  25. // form definition
  26. - (LONG) widthInPels;
  27. - (LONG) widthInMm;
  28. - (LONG) heightInPels;
  29. - (LONG) heightInMm;
  30.  
  31. - (LONG) xResolution;
  32. - (LONG) yResolution;
  33.  
  34. - (LONG) textHeight;
  35.  
  36. // font settings
  37. - setSpacing: (float) ratio;
  38. - (float) spacing;
  39.  
  40. - setFont: (char *) fontName;
  41. - setFont: (char *) fontName at: (LONG) pointSize;
  42. - setFontSize: (LONG) pointSize;
  43.  
  44. // methods for drawing characters & strings
  45. - (LONG) stringWidth: (char *) aString;
  46. - (LONG) stringBoxWidth: (char *) stringBox;
  47. - (LONG) stringBoxHeight: (char *) stringBox;
  48.  
  49. - string: (char *) aString;
  50. - string: (char *) aString at: (LONG) x : (LONG) y;
  51. - stringBox: (char *) stringBox;
  52. - stringBox: (char *) stringBox at: (LONG) x : (LONG) y;
  53.  
  54. // methods for putting graphics to HPS
  55. - lineTo: (LONG) x : (LONG) y;
  56. - lineFrom: (LONG) x0 : (LONG) y0 to: (LONG) x : (LONG) y;
  57.  
  58. @end
  59.  
  60. #endif
  61.