home *** CD-ROM | disk | FTP | other *** search
/ Chip: 25 Years Anniversary / CHIP_25Jahre_Jubilaeum.iso / downloads / 400616 / data1.cab / _lohnauskunft-Formulare / DruckNT.int < prev    next >
Text File  |  2003-04-01  |  11KB  |  270 lines

  1. ' ------------------------------------------------------------------------
  2. ' DruckNT.int - LexVM Compiler Include File
  3. '
  4. ' Interface-Deklarationen der DruckNT-Bibliothek
  5. '
  6. ' Datum: 20.12.2000
  7. '
  8. ' Bemerkungen:
  9. '        Hier werden alle Variablen und Funktionen deklariert, die von 
  10. '        DruckNT zur Verfⁿgung gestellt oder verwendet werden.
  11. '
  12. ' Copyright 2000-2001 Lexware GmbH & Co KG.
  13. ' ------------------------------------------------------------------------
  14.  
  15. ' Interface der LexVM einbinden
  16. Include "LexVM.int"
  17.  
  18. ' ------------------------------------------------------------------------
  19. ' Konstanten
  20. ' ------------------------------------------------------------------------
  21.  
  22. ' Allgemeine Konstanten
  23. Const NULL    as 0
  24.  
  25. ' Events
  26. Const EVENT_START_PAGE        as 0
  27. Const EVENT_END_PAGE            as 1
  28. Const EVENT_PRINT_HEADER    as 3
  29. Const EVENT_PRINT_FOOTER    as 4
  30. Const EVENT_BREAK_TABLE        as 5
  31. Const EVENT_END_TABLE        as 6
  32.  
  33. ' Fonts
  34. Const FontType as Numeric
  35.  
  36. Const FONT_NORMAL            as 0
  37. Const FONT_BOLD            as 1
  38. Const FONT_ITALIC            as 2
  39. Const FONT_BOLD_ITALIC    as 3 
  40.  
  41. ' Farben
  42. Const COLOR_TRANSPARENT    as -1
  43. Const COLOR_BLACK            as 0
  44. Const COLOR_WHITE            as 16777215
  45. Const COLOR_RED            as 255
  46. Const COLOR_GREEN            as 65280
  47. Const COLOR_BLUE            as 16711680
  48. Const COLOR_LIGHTGREY    as 12632256
  49.  
  50. ' Pen Typen (Stifte)
  51. Const PenType as Numeric
  52.  
  53. Const PEN_SOLID    as 0
  54. Const PEN_DOT        as 1
  55. Const PEN_DASH        as 2
  56. Const PEN_NULL        as 3
  57.  
  58. ' ZielgerΣte
  59. const TARGET_FILE as "File"
  60. const TARGET_PRINTER as "Printer"
  61.  
  62. ' FormatNumeric Konstanten
  63. Const FN_DEFAULT    as 0
  64. Const FN_CUSTOM    as 1
  65. Const FN_LOCALE    as 2
  66.  
  67. ' Seitenkonstanten
  68. Const PAGE_PORTRAIT as "Portrait"
  69. Const PAGE_LANDSCAPE as "Landscape"
  70. Const PAGE_STANDARD as "Standard"
  71.  
  72. ' Ausrichtungen
  73. Const LINE_BOTTOM as TRUE
  74. Const LINE_TOP as FALSE
  75.  
  76. ' Tabellen und Zellen
  77.  
  78. ' Datentyp einer Zelle
  79. Const CellType                as Numeric
  80. Const CellTemplateType    as Numeric
  81.  
  82. ' Zelle am Anfang der Hierarchie
  83. Const CELL_ROOT        as 0
  84.  
  85. ' RΣnder der Zelle
  86. Const CELL_BORDER_TOP        as 1
  87. Const CELL_BORDER_BOTTOM    as 2
  88. Const CELL_BORDER_LEFT        as 4
  89. Const CELL_BORDER_RIGHT        as 8
  90. Const CELL_BORDER_ALL        as 31
  91.  
  92. ' Parameter einer Zelle zur Verwendung mit CreateCell
  93. Const CELL_TYPE_DYNHORZ        as 1
  94. Const CELL_TYPE_DYNVERT        as 2
  95. Const CELL_TYPE_HORZ            as 4
  96. Const CELL_TYPE_VERT            as 0
  97. Const CELL_TYPE_CLIP            as 8
  98. Const CELL_LINE_SEPARATOR    as 16
  99. Const CELL_WORD_WRAP            as 32
  100.  
  101. ' Ausrichtungen des Textes innerhalb einer Zelle
  102. Const CELL_TEXT_LEFT            as 0
  103. Const CELL_TEXT_RIGHT        as 1
  104. Const CELL_TEXT_CENTER        as 2
  105.  
  106. ' ------------------------------------------------------------------------
  107. ' allgemeine Funktionen
  108. ' ------------------------------------------------------------------------
  109.  
  110. ' Position
  111. Declare external SetPos(x as Numeric, y as Numeric)
  112. Declare external GetPos(x ref Numeric, y ref Numeric)
  113. Declare external GetPosX() as Numeric
  114. Declare external GetPosY() as Numeric
  115.  
  116. ' Schriftart
  117. Declare external SetFont(font as String, size as Numeric, type as Numeric, color as Numeric)
  118. Declare external SetFontName(font as String)
  119. Declare external SetFontSize(size as Numeric)
  120. Declare external SetFontType(type as Numeric)
  121. Declare external SetFontColor(color as Numeric)
  122.  
  123. Declare external CreateFont(font as String, size as Numeric, type as Numeric, color as Numeric) as FontType
  124. Declare external SelectFont(id as FontType)
  125.  
  126. ' Stifte
  127. Declare external SetPen(width as Numeric, type as Numeric, color as Numeric)
  128. Declare external SetPenWidth(width as Numeric)
  129. Declare external SetPenType(type as Numeric)
  130. Declare external SetPenColor(color as Numeric)
  131.  
  132. Declare external CreatePen(width as Numeric, type as Numeric, color as Numeric) as PenType
  133. Declare external SelectPen(id as PenType)
  134.  
  135. ' Seitenattribute inkl. RΣnder
  136. Declare external SetBodyMargin(left as Numeric, top as Numeric, right as Numeric, bottom as Numeric)
  137. Declare external SetHeaderMargin(left as Numeric, top as Numeric, right as Numeric, height as Numeric)
  138. Declare external SetFooterMargin(left as Numeric, top as Numeric, right as Numeric, height as Numeric)
  139.  
  140. ' Tabulatoren
  141. Declare external SetTabs(tabs as String)
  142. Declare external RemoveTab(tab as Numeric)
  143. Declare external RemoveAllTabs()
  144.  
  145. ' Druckstatus
  146. Const PAGENUMBER as FormatNumeric("%.0f", GetPageNumber())
  147. Declare external GetPageNumber() as Numeric
  148. Declare external GetAreaLength() as Numeric
  149. Declare external GetAreaWidth() as Numeric
  150. Declare external GetLineHeight() as Numeric
  151.  
  152. Const PRINTDATE as FormatDate("%d.%m.%Y", Now())
  153. Declare external Now() as Numeric
  154.  
  155. ' Programmname, Version und Formularname
  156. Declare external GetProgramName() as String
  157. Declare external GetProgramVersion() as String
  158. Declare external GetFormFileName() as String
  159.  
  160. ' Formatierungen von Ausgaben
  161. Declare external FormatNumeric(format as String, n as Numeric) as String
  162. Declare external FormatString(format as String, s as String) as String
  163. Declare external FormatDate(format as String, d as Numeric) as String
  164. Declare external SetFormatNumericOptions(mode as Numeric, dp as String, ts as String)
  165. Declare external FormatOleDateTime(strFormat as String, nDate as Numeric) as String
  166.  
  167. ' String-Funktionen
  168. Declare external StringRight(text as String, len as Numeric) as String
  169. Declare external StringLeft(text as String, len as Numeric) as String
  170. Declare external StringMid(text as String, pos as Numeric, len as Numeric) as String
  171. Declare external StringLength(text as String) as Numeric
  172. Declare external StringGetAt(text as String, pos as Numeric) as String
  173. Declare external StringSetAt(text ref String, pos as Numeric, char as String)
  174. Declare external StringMakeUpper(text ref String)
  175. Declare external StringMakeLower(text ref String)
  176. Declare external StringToNumeric(zahl as String) as Numeric
  177.  
  178. 'Modulo-Funktion
  179. Declare external Modulo(v1 as Numeric, v2 as Numeric) as Numeric
  180.  
  181. ' Seitenumbruch ausl÷sen
  182. Declare external PageBreak()
  183.  
  184. ' ------------------------------------------------------------------------
  185. ' Zeichenfunktionen
  186. ' ------------------------------------------------------------------------
  187.  
  188. ' Textausgabe
  189. Const T as DrawText
  190. Const TL as DrawTextLn
  191. Const LF as DrawTextLn("")
  192. Declare external DrawText(text as String)
  193. Declare external DrawTextLn(text as String)
  194. Declare external DrawTextExt(x as Numeric, y as Numeric, text as String)
  195. Declare external SetWordWrap(wrap as Bool)
  196.  
  197. ' Linien
  198. Declare external DrawLine(x as Numeric, y as Numeric)
  199. Declare external DrawLineExt(x1 as Numeric, y1 as Numeric, x2 as Numeric, y2 as Numeric)
  200. Declare external DrawHorzLine(bottom as Bool)
  201.  
  202. ' Rechtecke
  203. Declare external DrawRect(x as Numeric, y as Numeric)
  204. Declare external DrawRectExt(x1 as Numeric, y1 as Numeric, x2 as Numeric, y2 as Numeric)
  205.  
  206. 'Ausgabe von Grafikdateien
  207. Declare external LXPlayMetafile(x as Numeric, y as Numeric, width as Numeric, height as Numeric, file as String)
  208. Declare external DrawGIF(x as Numeric, y as Numeric, width as Numeric, height as Numeric, file as String)
  209. Declare external DrawJPG(x as Numeric, y as Numeric, width as Numeric, height as Numeric, file as String)
  210. Declare external DrawBitmap(x as Numeric, y as Numeric, width as Numeric, height as Numeric, file as String)
  211.  
  212. ' Tabellen
  213. Declare external CreateCell(width as Numeric, height as Numeric, flags as Numeric) as CellType
  214. Declare external CreateCellEx(parent as CellType, width as Numeric, height as Numeric, flags as Numeric, 
  215.     text as String, font as FontType, align as Numeric, color as Numeric, 
  216.     pLeft as PenType, pTop as PenType, pRight as PenType, pBottom as PenType, pSep as PenType,
  217.     bLeft as Numeric, bTop as Numeric, bRight as Numeric, bBottom as Numeric) as CellType
  218. Declare external CreateCellTemplate(width as Numeric, height as Numeric, flags as Numeric, 
  219.     font as FontType, align as Numeric, color as Numeric, 
  220.     pLeft as PenType, pTop as PenType, pRight as PenType, pBottom as PenType, pSep as PenType,
  221.     bLeft as Numeric, bTop as Numeric, bRight as Numeric, bBottom as Numeric) as CellTemplateType
  222. Declare external CreateCellFromTemplate(template as CellTemplateType, parent as CellType, text as String) as CellType
  223. Declare external DeleteCell(id as CellType, delChildren as Bool)
  224. Declare external DeleteCellChildren(id as CellType)
  225. Declare external GetCellByIndex(id as CellType, index as Numeric) as CellType
  226. Declare external SetCellParent(id as CellType, parent as CellType)
  227. Declare external DuplicateCell(id as CellType) as Numeric
  228. Declare external SetCellFont(id as CellType, name as String, size as Numeric, type as Numeric, color as Numeric)
  229. Declare external SetCellBackground(id as CellType, color as Numeric)
  230. Declare external SetCellClip(id as CellType, clip as Bool)
  231. Declare external SetCellBorder(id as CellType, which as Numeric, width as Numeric, type as Numeric, color as Numeric)
  232. Declare external SetCellText(id as CellType, text as String)
  233. Declare external SetCellAlign(id as CellType, align as Numeric)
  234. Declare external SetCellTextBorder(id as CellType, left as Numeric, top as Numeric, right as Numeric, bottom as Numeric)
  235. Declare external SetCellSize(id as CellType, width as Numeric, height as Numeric)
  236. Declare external SetCellFlags(id as Numeric, flags as Numeric)
  237. Declare external GetCellWidth(id as CellType) as Numeric
  238. Declare external GetCellHeight(id as CellType) as Numeric
  239. Declare external SetHeaderCell(id as CellType)
  240. Declare external SetFooterCell(id as CellType)
  241. Declare external DrawCell(id as CellType, continue as Bool)
  242.  
  243. Declare external SelectCellFont(id as CellType, font as FontType)
  244. Declare external SelectCellBorder(id as CellType, which as Numeric, pen as PenType)
  245.  
  246. ' Ansprechen von COM-fΣhigen Objekten
  247. Declare external GetObject(strPfadOderName ref String, nResult ref Numeric) as Object
  248.  
  249. ' Wechseln zwischen verschiedenen Druckereinstellungen
  250. Declare external SetPrintDevice( Device as Numeric)
  251.  
  252. ' ACHTUNG:
  253. '   Diese Funktionen werden wom÷glich in den nΣchsten Versionen von 
  254. '   DruckNT nicht mehr unterstⁿtzt. Deshalb sollten Sie deren Verwendung 
  255. '   vermeiden
  256. Declare external Round(v as Numeric) as Numeric
  257. Declare external Str(v as Numeric) as String
  258. Declare external Trace(value as String)
  259. Declare external TraceNumeric(value as Numeric)
  260. Declare external TraceBool(value as Bool)
  261.  
  262. ' ------------------------------------------------------------------------
  263. ' allgemeine Initialisierungen von globalen Variablen
  264. ' ------------------------------------------------------------------------
  265.  
  266. ' globale Pens (Stifte)
  267. Dim hNullPen as PenType = CreatePen(0, PEN_NULL, 0)
  268. Dim hDotPen as PenType = CreatePen(0, PEN_DOT, COLOR_BLACK)
  269. Dim hSolidPen as PenType = CreatePen(0, PEN_SOLID, COLOR_BLACK)
  270.