Purebasic Reference Manual 4.50 (Windows)
Total Page:16
File Type:pdf, Size:1020Kb
PureBasic Reference Manual 4.50 (Windows) http://www.purebasic.com/ June 8, 2010 Contents I General 27 1 Introduction 28 2 Terms And Conditions 29 3 System requirements 30 4 Installation 31 5 Order 32 6 Contact 34 7 Acknowledgements 36 II The PureBasic Editor 38 8 Getting Started 39 9 Working with source files 41 10 Editing features 43 11 Managing projects 49 12 Compiling your programs 55 13 Using the debugger 65 14 Included debugging tools 73 15 Using the buildin Tools 82 16 Using external tools 87 17 Getting Help 92 18 Customizing the IDE 95 19 Commandline options for the IDE 112 III Language Reference 113 20 Working with different number bases 114 21 Break : Continue 119 22 Using the command line compiler 121 23 Compiler Directives 123 1 24 Compiler Functions 127 25 Data 132 26 Debugger keywords in PureBasic 135 27 Define 137 28 Dim 139 29 Building a DLL 141 30 Enumerations 143 31 For : Next 145 32 ForEach : Next 147 33 General Rules 149 34 Global 152 35 Gosub : Return 154 36 Handles and Numbers 156 37 If : Else : EndIf 158 38 Import : EndImport 159 39 Includes Functions 161 40 Inline x86 ASM 163 41 Interfaces 165 42 Macros 167 43 Pointers and memory access 169 44 NewList 173 45 NewMap 175 46 Others Commands 177 47 Procedures 179 48 Protected 182 49 Prototypes 184 50 Pseudotypes 186 51 PureBasic objects 188 52 Repeat : Until 190 53 Select : EndSelect 191 54 Using several PureBasic versions on Windows 193 55 Shared 194 2 56 Static 195 57 Structures 197 58 Threaded 201 59 Unicode 202 60 Variables and Types 204 61 We start programming... 213 62 While : Wend 216 63 Windows Message Handling 217 64 With : EndWith 219 IV Library Reference 221 65 2DDrawing 222 65.1 BackColor ............................................222 65.2 Box................................................222 65.3 RoundBox ............................................223 65.4 Circle...............................................224 65.5 DrawImage............................................225 65.6 DrawAlphaImage ........................................225 65.7 DrawingBuffer..........................................226 65.8 DrawingBufferPitch.......................................226 65.9 DrawingBufferPixelFormat...................................226 65.10 DrawingFont...........................................227 65.11 DrawingMode ..........................................227 65.12 DrawRotatedText........................................229 65.13 FillArea .............................................230 65.14 GrabDrawingImage.......................................231 65.15 StartDrawing ..........................................231 65.16 DrawText ............................................232 65.17 Ellipse ..............................................233 65.18 FrontColor............................................234 65.19 Line................................................234 65.20 LineXY..............................................235 65.21 Plot................................................235 65.22 Point...............................................236 65.23 StopDrawing...........................................236 65.24 TextHeight............................................237 65.25 TextWidth............................................237 65.26 OutputDepth ..........................................237 65.27 OutputWidth ..........................................237 65.28 OutputHeight ..........................................238 65.29 CustomFilterCallback......................................238 65.30 GradientColor..........................................239 65.31 ResetGradientColors ......................................240 65.32 LinearGradient..........................................241 65.33 CircularGradient.........................................242 65.34 EllipticalGradient........................................243 65.35 BoxedGradient..........................................244 65.36 ConicalGradient.........................................245 65.37 CustomGradient.........................................246 66 Array 248 3 66.1 ArraySize.............................................248 66.2 CopyArray............................................249 66.3 FreeArray ............................................249 67 AudioCD 250 67.1 AudioCDLength.........................................250 67.2 AudioCDName..........................................250 67.3 AudioCDTrackLength......................................251 67.4 AudioCDStatus .........................................251 67.5 AudioCDTracks.........................................251 67.6 AudioCDTrackSeconds .....................................251 67.7 EjectAudioCD..........................................252 67.8 InitAudioCD...........................................252 67.9 PauseAudioCD .........................................252 67.10 PlayAudioCD ..........................................252 67.11 ResumeAudioCD ........................................253 67.12 StopAudioCD ..........................................253 67.13 UseAudioCD...........................................253 68 Billboard 254 68.1 AddBillboard ..........................................254 68.2 BillboardGroupID........................................255 68.3 BillboardGroupLocate .....................................255 68.4 BillboardGroupMaterial.....................................255 68.5 BillboardGroupX ........................................256 68.6 BillboardGroupY ........................................256 68.7 BillboardGroupZ ........................................257 68.8 BillboardHeight .........................................257 68.9 BillboardLocate.........................................257 68.10 BillboardWidth .........................................258 68.11 BillboardX............................................258 68.12 BillboardY............................................259 68.13 BillboardZ............................................259 68.14 ClearBillboards .........................................260 68.15 CountBillboards.........................................260 68.16 CreateBillboardGroup......................................261 68.17 FreeBillboardGroup.......................................261 68.18 HideBillboardGroup.......................................262 68.19 IsBillboardGroup ........................................262 68.20 MoveBillboard..........................................263 68.21 MoveBillboardGroup ......................................263 68.22 RemoveBillboard ........................................264 68.23 ResizeBillboard .........................................264 68.24 RotateBillboardGroup .....................................265 69 Camera 266 69.1 CameraBackColor........................................266 69.2 CameraFOV...........................................267 69.3 CameraID ............................................267 69.4 CameraLocate..........................................267 69.5 CameraLookAt .........................................268 69.6 CameraProjectionMode.....................................268 69.7 CameraProjectionX.......................................269 69.8 CameraProjectionY.......................................269 69.9 CameraRange ..........................................269 69.10 CameraRenderMode.......................................270 69.11 CameraX.............................................271 69.12 CameraY.............................................271 69.13 CameraZ.............................................271 4 69.14 CreateCamera..........................................272 69.15 FreeCamera ...........................................273 69.16 IsCamera.............................................273 69.17 MoveCamera...........................................274 69.18 RotateCamera..........................................274 70 Cipher 275 70.1 AddCipherBuffer ........................................275 70.2 AESEncoder...........................................275 70.3 AESDecoder...........................................277 70.4 DESFingerprint .........................................277 70.5 ExamineMD5Fingerprint....................................278 70.6 ExamineSHA1Fingerprint ...................................279 70.7 FinishCipher...........................................279 70.8 NextFingerprint.........................................280 70.9 FinishFingerprint ........................................280 70.10 IsFingerprint...........................................280 70.11 MD5FileFingerprint.......................................281 70.12 MD5Fingerprint.........................................281 70.13 SHA1Fingerprint ........................................282 70.14 SHA1FileFingerprint ......................................282 70.15 CRC32Fingerprint........................................283 70.16 CRC32FileFingerprint......................................283 70.17 Base64Decoder..........................................284 70.18 Base64Encoder..........................................284 70.19 StartAESCipher.........................................285 70.20 OpenCryptRandom.......................................285 70.21 CloseCryptRandom.......................................286 70.22 CryptRandom..........................................286 70.23 CryptRandomData .......................................286 71 Clipboard 288 71.1 ClearClipboard .........................................288 71.2 GetClipboardImage.......................................289 71.3 GetClipboardText........................................289 71.4 SetClipboardImage