Further Reading: Library Descriptions
PureBasic has an extensive collection of PureLibraries, containing all the commands
which give it so much power and flexibility. Since it may take you some time to
look through them all, short descriptions of each one can be found on this page.
Hopefully it will give you the direction to know what you can do with the default
libraries, since the User Guide could not cover everything.
2D Drawing
The 2D drawing library is used for drawing standard items (points, lines, geometric
shapes, simple images and so on) in two dimensions. You can draw to a variety of
output devices, including screens, windows, sprites, images and printers.
Camera
The Camera library is used with the OGRE 3D engine, and provide a way to display the
3D world you have created. Cameras are actually objects in the 3D world giving you
total freedom to show anything in any way.
CDAudio
This library is used to control the CD drive of your computer as if it were an audio
CD player. You can perform all standard functions of an audio CD player such as
play, stop, pause, skip and find out information about the tracks on the CD.
Cipher
The Cipher library contains commands for performing typical forms of encryption
and "fingerprinting", such as Base64, CRC32, DES and MD5.
Clipboard
This library allows you to support the clipboard provided as standard in most
Operating Systems. There are commands to read and write the standard clipboard
in different formats.
Console
The Console library has already been introduced in the User Guide. It allows your
program to interact with the user through a text-based console.
Database
The database library gives users easy access (no pun intended) to any standard
form of database, using SQL queries (and ODBC).
Date
This library contains commands for setting and retrieving the current system time
and date, and commands to convert between dates and strings.
Engine3D
The Engine3D library is the main library used when working with 3D and the OGRE
engine. It provides the main commands for loading and displaying your 3D world.
File
This library lets you perform standard operations on files, such as open, close
and various methods of reading and writing.
FileSystem
The FileSystem library is a bit more specialised than the File library since it lets
you perform operations above the level of a file. For the most part, it allows
you to access the directory structures on a computer.
Font
This library is very simple and allows you to load fonts. These fonts can then be
used with other PureLibraries, such as the 2D drawing library (to draw text) or
the Gadget library (to set the font for a user interface).
Gadget
The Gadget library contains all commands for creating and manipulating the elements
of a Graphical User Interface (GUI). These elements are also sometimes known
as widgets or controls, depending on your OS.
Help
This library provides the program with a simple way to access the Operating Systems
standard help system or facilities. You use this library to give your programs
online, context sensitive help.
Image
The Image library is used when you want to load and manipulate pictures in standard
formats. Note that this library has nothing to do with displaying images, only the
handling of them. However, you will use images with other libraries (such as
2D drawing and Gadget) to display them.
Joystick
The Joystick library provides a standard, simple method to read joysticks under
whatever OS you are using. This library is most useful when writing games,
although there is no reason why you cannot use a joystick in an application.
Keyboard
This library is mainly aimed at games and gives you very fast access to raw keyboard
data. You would not normally use this library for applications since the window
library can provide keyboard access for applications.
Library
The Library library is used to interface to standard OS libraries. There are
commands for opening and closing libraries, finding functions and executing them.
You can also use the commands in this library to call your on code if you
know what you are doing.
Light
This is another library used when working with the OGRE 3D engine. The Light library
is used to provide commands for manipulating the lighting in your 3D worlds,
and like the Camera library, Lights are objects that can be moved around and
manipulated.
Linked List
You have already met the linked list library in this User Guide. The commands for
handling, processing and manipulating linked lists are stored in this library.
Math
The Math library provides commands for common mathematical functions, such as powers
logarithms, trigonometry and so on.
Memory
The Memory library is a simple library for the allocation, filling, comparing and
freeing of memory blocks. While this would be simple to do with the OS directly,
using this library allows you to use platform independent code.
Menu
This library is used to add menu bars to your windows and create popup/context menus
(those which appear when you, typically, press the right mouse button over something
that is not the normal menu bar).
Mesh
The Mesh library is used with the OGRE 3D engine library. Meshes are sets of linked
triangles which create a surface that can be manipulated in 3D space. Meshes
therefore allow you a means to create any kind of 3D object.
Misc
This library contains some commands which are generally useful and do not fit into
any other library. The included commands can be used to manipulate colours, path
and file names, random numbers, poking and peeking memory, OS version and parameters
for your program.
Module
Modules are a method of storing and playing back music which have been established for
a very long time. The reason for their popularity are that they are very memory
efficient (compared to something like an MP3, Ogg Vorbis or WAV file), small file
sizes and low CPU requirements. Needless to say, this library can be used for
loading and playing music modules.
Mouse
Like the Keyboard library, this Mouse library is especially for games rather than
applications. It provides low level access to the mouse speed, position and buttons.
Movie
The Movie library can be used to load and play any kind of media, such as AVI, MPG,
DivX, MP3, etc, provided the support for the type of media you want to play is
already installed on the computer.
Network
The Network library gives you the ability to communicate over the internet. There are
lots of useful functions in here relating to general IP (Internet Protocol) address
handling, and also for acting as clients or servers.
Packer
The Packer library gives you a set of commands for compressing and decompressing data.
The level of compression is high and decompression is extremely fast. You can use this
to simply pack single blocks of memory or you can work with "PackFiles"
which allow you to add many files to a single compressed block.
Palette
This library allows you to create, load, manipulate and display palettes on screens
with 256 colours (or less).
Preference
The Preference library allows you to create hierarchical preference files for your
programs, where you can store settings and other information. Creating, loading,
saving, reading and writing of preferences is possible.
Printer
This library allows you to get information about available printers and to be able to
print to them.
Requester
The Requester library has commands in it for displaying standard user input windows,
such as load file, save file, palette and simple button input requesters.
Sort
This library contains commands for sorting data in arrays.
Sound
The Sound library lets you add sound to your game or application. You can load, play
and modify the sound while it is playing.
Sprite & Screen
Sprites and screens are normally used when you need high speed, full-screen graphics.
This library gives you the ability to load, manipulate and display sprites and
to be able to handle the screens required for displaying them.
Sprite3D
This library is an enhancement to the regular sprite library. It allows your programs
to perform effects on sprites using the modern hardware in 3D graphics cards,
such as zooming, rotating and blending.
StatusBar
Status bars are areas of windows (usually across the full width of the bottom of a
window) which are typically used to permanently show information to the user. For
example, text editors typically show the line and column in status bars.
String
This library contains commands for manipulating strings, such as removing sections,
finding sub-strings, changing case, accessing parts of a string and converting
numbers to strings in various formats.
SysTray
The System Tray is found at the opposite end of the Windows Start Bar from the Start
button. Typically you can find the system clock here, but applications can also
use the system tray to show small icons giving some information to the user,
or just as a shortcut for controlling the application. This library gives you full
control of the system tray features so you can do anything you want with it.
Texture
The Texture library is another one for working with the OGRE 3D engine library. This
library allows you to put textures (images) over meshes to make them look more realistic.
You can load textures or even draw them directly in combination with the 2D drawing
library.
Thread
The thread library allows you to make parts of your application run asynchronously.
The basic functionality of threads (creation, killing, waiting for, pausing and
priority) can abe be controlled using this library.
Toolbar
Toolbars are elements of a graphical user interface (GUI) which give the user some
graphical shortcuts to commonly used features, for example loading and saving files
in a text editor. This library lets you add toolbars to your PureBasic applications.
Window
The Window library is the main library for giving your applications a graphical user
interface (GUI). This library is the one which allows you to open, manipulate and
close windows and handle events for the elements of your GUI.