This document provides a summary of classes and functions available in the Ring programming language version 1.9. It includes over 200 classes and functions ranging from core classes like QObject and QString to GUI classes like QWidget and QGraphicsView. The classes and functions cover a wide range of topics including GUI, 2D/3D graphics, threading, networking, database access, and more.
3. Ring Documentation, Release 1.9
Create Zip File, 509
Extract Zip File, 509
Introduction, 508
Print files in Zip file, 509
Using RingZip Classes, 509
Zip Class Reference, 511
ZipEntry Class Reference, 511
RingZip Library
What is new in Ring 1.3?, 155
Rotate Text
Desktop and Mobile Development, 734
Rules
The Type Hints Library, 827
Run the program
Getting Started - First Style, 186
Getting Started - Second Style, 189
Getting Started - Third Style, 191
Running Forms
Form Designer, 786
Runtime Errors
Reference, 968
Runtime Errors when Embedding Ring in Ring
Embedding Ring in Ring, 891
Samples
How to contribute?, 184
Samples in this book
Applications developed in little hours, 14
Samples Source (Authors)
Using RingOpenGL and RingFreeGLUT for 3D
Graphics, 594
Save and Restore Images
ODBC Functions, 315
Save Image Inside the Database
MySQL Functions, 323
Save output to string
RingLibCurl, 506
Scaling and Rotating Images
Graphics and Game Programming, 521
Scope Rules
Accessing the class attributes from braces inside
class methods, 802
Conflict between Class Attributes and Local Vari-
ables, 799
Conflict between Global Variables and Class At-
tributes, 798
Conflict between self inside braces and self in the
class region, 805
Creating a Class for each Window in GUI applica-
tions, 804
Defining Variables and Variables Access, 796
How Ring find the Variable?, 797
Introduction, 795
Summary of Scope Rules, 809
The For Loops uses the local scope, 809
The Self Object, 797
Three Scopes, 796
Using Braces to access objects inside Class Methods,
800
Using braces to escape from the current object scope,
808
Using Object.Attribute, 797
Scope Rules for Functions and Methods
Calling a function sharing the name with a method in
the current class, 814
Example about Sharing Names between Functions
and Methods, 812
How Ring find a functions and methods?, 812
Introduction, 811
Screen Shots
The Gold Magic 800 Game, 664
ScriptFunctions Class
Web Development (CGI Library), 498
Search
Lists, 251
Search of global names while defining the class attributes
Frequently Asked Questions, 941
Security and Internet Functions
Decrypt(), 339
Download(), 340
Encrypt(), 338
Example, 339
File Hash, 339
Introduction, 335
MD5(), 336
RandBytes(), 340
SendEmail(), 340
SHA1(), 337
SHA224(), 338
SHA256(), 337
SHA384(), 338
SHA512(), 337
Security Class
Stdlib Classes, 422
Send Parameters
Functions - First Style, 236
Functions - Second Style, 240
Functions - Third Style, 244
SendEmail()
Security and Internet Functions, 340
Serial Execution of Programs
Embedding Ring in Ring, 888
Server Example
RingLibuv, 534
Server Example using Classes
RingLibuv, 537
Set List Item
Lists, 250
Index 2051
4. Ring Documentation, Release 1.9
setattribute()
Reflection and Meta-programming, 378
Setter and Getter
Object Oriented Programming, 346
SHA1()
Security and Internet Functions, 337
SHA224()
Security and Internet Functions, 338
SHA256()
Security and Internet Functions, 337
SHA384()
Security and Internet Functions, 338
SHA512()
Security and Internet Functions, 337
Shared Libraries
Extension, 900
Short-circuit evaluation
Control Structures - First Style, 222
Shutdown() Function
System Functions, 300
sign()
Stdlib Functions, 387
Simple
Language Design, 30
Simple Client and Server Example
Desktop and Mobile Development, 738
Sin() Implementation
Extension, 896
Single: Desktop and Mobile Development
Introduction, 667
sleep()
Stdlib Functions, 394
Smart Garbage Collector
Language Design, 38
Sort()
Lists, 251
Sort() and List of Objects
Object Oriented Programming, 353
Sound Class
Game Engine for 2D Games, 545
Source Code
Resources, 2018
The Gold Magic 800 Game, 666
Source Code File Sections
Program Structure, 247
space()
Low Level Functions, 862
Special Thanks
Introduction, 24
Special thanks to contributors
How to contribute?, 184
split()
Stdlib Functions, 384
splitmany()
Stdlib Functions, 384
Sprite Automatic Movement
Game Engine for 2D Games, 552
Sprite Class
Game Engine for 2D Games, 544
Sprite Keypress Event
Game Engine for 2D Games, 553
Sprite Mouse Event
Game Engine for 2D Games, 554
Sprite State Event
Game Engine for 2D Games, 555
SQLite
Introduction, 325
sqlite_close(), 326
sqlite_execute(), 326
sqlite_init(), 326
sqlite_open(), 326
SQLite Class
Stdlib Classes, 420
sqlite_close()
SQLite, 326
sqlite_execute()
SQLite, 326
sqlite_init()
SQLite, 326
sqlite_open()
SQLite, 326
Squares Puzzle Game
Applications developed in little hours, 9
SRandom()
Mathematical Functions, 281
Stack Class
Stdlib Classes, 405
Stars Fighter Game
Game Engine for 2D Games, 564
startswith()
Stdlib Functions, 388
Static Methods
Code Generator, 924
StdBase Class
Stdlib Classes, 400
Stdlib Classes
Conversion Class, 417
DataType Class, 416
DateTime Class, 411
Debug Class, 415
File Class, 413
HashTable Class, 406
Internet Class, 423
Introduction, 399
List Class, 403
Math Class, 408
MySQL Class, 419
ODBC Class, 418
Index 2052
5. Ring Documentation, Release 1.9
PostgreSQL Class, 421
Queue Class, 405
Security Class, 422
SQLite Class, 420
Stack Class, 405
StdBase Class, 400
String Class, 401
System Class, 414
Tree Class, 407
Stdlib Functions
apppath(), 382
ASCIIList2Str(), 398
binarydigits(), 391
capitalized(), 385
changestring(), 394
dayofweek(), 392
direxists(), 394
endswith(), 388
EpochTime(), 396
evenorodd(), 390
factorial(), 386
factors(), 390
fibonacci(), 387
file2list(), 388
filter(), 384
FSize(), 395
gcd(), 389
getnumber(), 382
getstring(), 382
Introduction, 380
isleapyear(), 391
ismainsourcefile(), 394
isprime(), 387
isspecial(), 385
isvowel(), 386
JustFileName(), 383
JustFilePath(), 382
lcm(), 389
linecount(), 386
List2Code() Function, 398
list2file(), 387
ListAllFiles() Function, 396
makedir(), 395
map(), 384
matrixmulti(), 391
matrixtrans(), 392
newlist(), 385
OSCopyFile() Function, 397
OSCopyFolder() Function, 397
OSCreateOpenFolder() Function, 397
OSDeleteFile() Function, 398
OSDeleteFolder() Function, 397
OSRenameFile() Function, 398
palindrome(), 391
permutation(), 392
print(), 381
Print2Str() Function, 381
prodlist(), 390
puts(), 381
readline(), 393
sign(), 387
sleep(), 394
split(), 384
splitmany(), 384
startswith(), 388
Str2ASCIIList(), 398
substring(), 393
sumlist(), 389
SystemCmd() Function, 396
SystemSilent() Function, 397
times(), 383
TrimAll(), 395
TrimLeft(), 395
TrimRight(), 396
value(), 383
StdLib functions and classes written in Ring
What is new in Ring 1.1?, 168
Step Option
Control Structures - First Style, 220
Steps to create the extension
Create your first extension, 927
StopWatch Application
What is new in Ring 1.8?, 59
Str2ASCIIList()
Stdlib Functions, 398
Str2Hex()
Data Type, 277
str2list() and list2str()
Strings, 263
strcmp()
Strings, 263
String Class
Stdlib Classes, 401
String Literals
Strings, 259
String()
Data Type, 275
String2Constant Application
What is new in Ring 1.8?, 58
Strings
Access String Letters, 259
Convert Letters Case, 259
Copy(), 261
Find SubString, 262
Get Number of Characters from position, 262
Get String Length, 259
Get Substring from position to end, 262
Introduction, 258
Index 2053
6. Ring Documentation, Release 1.9
Left(), 260
Lines(), 261
Merge binary characters, 264
Right(), 260
str2list() and list2str(), 263
strcmp(), 263
String Literals, 259
Substr(), 261
Transform Substring To Another Substring, 262
Trim(), 261
StyleFunctions Class
Web Development (CGI Library), 498
Substr()
Strings, 261
substring()
Stdlib Functions, 393
sumlist()
Stdlib Functions, 389
Summary of Scope Rules
Scope Rules, 809
Super Man 2016 Game
Game Engine for 2D Games, 579
Swap Items
Lists, 257
Switch Between Two Images
RingLibSDL, 526
Switch Statement
Control Structures - First Style, 218
Control Structures - Second Style, 225
Control Structures - Third Style, 228
Syntax Flexibility
Change Language Keywords, 816
Change Language Operators, 817
Ignore new lines after keywords, 825
Introduction, 815
Language Design, 36
Load Syntax Files, 817
Using ’case’ as ’on’ in switch statements, 823
Using ’def’ as ’func’ in functions/methods defini-
tion, 823
Using ’end’ keyword after Pack-
ages/Classes/Functions, 824
Using ’endpackage’/’endclass’/’endfunc’ keywords
after Packages/Classes/Functions, 824
Using ’put’ and ’get’ as ’see’ and ’give’, 823
Using () around the function parameters, 817
in the start of the variable name, 820
Using braces { } in Packages/Classes/Functions, 824
Using braces to start and end different control struc-
tures, 822
Using Semi-colon after and between statements, 819
Using the ’else’ keyword as ’other’ in switch state-
ment, 820
Using the ’elseif’ keyword as ’but’ in if statement,
820
Using the ’end’ keyword in different control struc-
tures, 821
What is new in Ring 1.1?, 165
SysGet() Function
System Functions, 295
System Class
Stdlib Classes, 414
System Functions
ChDir() Function, 299
CurrentDir() Function, 299
Example, 296
ExeFileName() Function, 299
ExeFolder() Function, 299
Get Active Source File Name, 298
Get Command Line Arguments, 297
Introduction, 293
IsAndroid() Function, 296
IsFreeBSD() Function, 296
IsLinux() Function, 296
IsMacOSX() Function, 295
IsMSDOS() Function, 295
IsUnix() Function, 295
IsWindows() Function, 295
IsWindows64() Function, 295
PrevFileName() Function, 298
Shutdown() Function, 300
SysGet() Function, 295
System() Function, 294
Version() Function, 299
Windowsnl() Function, 297
System() Function
System Functions, 294
SystemCmd() Function
Stdlib Functions, 396
SystemSilent() Function
Stdlib Functions, 397
Tempfile()
Files, 288
Templates
Web Development (CGI Library), 462
Tempname()
Files, 288
Testing
How to contribute?, 184
Testing the extension
Create your first extension, 928
Text Class
Game Engine for 2D Games, 544
The Browser Menu
Ring Notepad, 204
The Camera
Index 2054
7. Ring Documentation, Release 1.9
Using RingOpenGL and RingFreeGLUT for 3D
Graphics, 604
The Cards Game
Demo Programs, 760
Desktop and Mobile Development, 760
The Designer Windows
Form Designer, 785
The Difference between Qt and RingQt
Desktop and Mobile Development, 770
The Distribute Menu
Ring Notepad, 205
The documentation says functional programming is sup-
ported, but then this happens?
Frequently Asked Questions, 933
The Edit Menu
Ring Notepad, 202
The Events Loop
Desktop and Mobile Development, 669
RingLibuv, 534
The File Menu
Ring Notepad, 201
The files ring.ring and ring.ringo
Distributing Ring Application, 851
The First GUI Application
Desktop and Mobile Development, 668
The First Triangle
Using RingOpenGL and RingFreeGLUT for 3D
Graphics, 597
The First Window using RingFreeGLUT
Using RingOpenGL and RingFreeGLUT for 3D
Graphics, 595
The For Loops uses the local scope
Scope Rules, 809
What is new in Ring 1.8?, 64
The Game Story
The Gold Magic 800 Game, 664
The Gold Magic 800 Game
How to play?, 664
Introduction, 663
Screen Shots, 664
Source Code, 666
The Game Story, 664
What will you learn?, 664
The Help Menu
Ring Notepad, 205
The Main File in the Project
Ring Notepad, 200
The Natural Library
What is new in Ring 1.4?, 134
The Program Menu
Ring Notepad, 204
The Properties
Form Designer, 785
The Qt project for your Ring application
Building RingQt Applications for Mobile, 776
The Self Object
Scope Rules, 797
The Tools Menu
Ring Notepad, 205
The Trace Library and the Interactive Debugger
BreakPoint, 885
Disable BreakPoints, 885
Execute Program Line by Line, 884
Interactive Debugger, 884
Introduction, 882
Loading the Trace library, 883
Pass Error, 884
Trace All Events, 883
Trace control flow between functions, 883
Using the Interactive Debugger, 885
The Type Hints Library
Example, 826
Introduction to the Type Hints Library, 825
Rules, 827
User Types, 826
Using Types inside Code, 827
Why Type Hints?, 826
The View Menu
Ring Notepad, 202
Threads
Graphics and Game Programming, 523
Threads Example
RingLibuv, 539
Threads Example - Using Classes
RingLibuv, 540
Threads Support
Code Generator, 913
Three Scopes
Scope Rules, 796
TicTacToe 3D Game
Using RingOpenGL and RingAllegro for 3D Graph-
ics, 651
TicTacToe Game
Applications developed in little hours, 8
Time()
Date and Time, 266
TimeList()
Date and Time, 267
times()
Stdlib Functions, 383
Trace All Events
The Trace Library and the Interactive Debugger, 883
Trace control flow between functions
The Trace Library and the Interactive Debugger, 883
Trace Library and Interactive Debugger
What is new in Ring 1.5?, 118
Transaction Example
MySQL Functions, 324
Index 2055
8. Ring Documentation, Release 1.9
Transactions and Using Commit and Rollback
ODBC Functions, 314
Transform Substring To Another Substring
Strings, 262
Transparent Image
Graphics and Game Programming, 522
Transparent Implementation
Language Design, 36
Tree Class
Stdlib Classes, 407
Triangle Rotation
Using RingOpenGL and RingFreeGLUT for 3D
Graphics, 600
Trim()
Strings, 261
TrimAll()
Stdlib Functions, 395
TrimLeft()
Stdlib Functions, 395
TrimRight()
Stdlib Functions, 396
TrueType Fonts
Graphics and Game Programming, 519
Try/Carch/Done
Eval() and Debugging, 301
Trying to be natural
Language Design, 31
Type Hints Library
What is new in Ring 1.5?, 121
Type()
Data Type, 271
Ungetc()
Files, 290
Unsigned()
Mathematical Functions, 281
Update the Android SDK
Building RingQt Applications for Mobile, 775
Upload Files
Web Development (CGI Library), 456
URL Encode
Web Development (CGI Library), 461
Usage
Deploying Web Applications in the Cloud, 501
Use TTF Fonts
RingLibSDL, 528
User Types
The Type Hints Library, 826
Users registration and Login
Web Development (CGI Library), 483
Using ’<’ and ’:’ operators as ’from’ keyword
What is new in Ring 1.3?, 154
Using ’case’ as ’on’ in switch statements
Syntax Flexibility, 823
Using ’def’ as ’func’ in functions/methods definition
Syntax Flexibility, 823
Using ’end’ keyword after Packages/Classes/Functions
Syntax Flexibility, 824
Using ’endpackage’/’endclass’/’endfunc’ keywords after
Packages/Classes/Functions
Syntax Flexibility, 824
Using ’put’ and ’get’ as ’see’ and ’give’
Syntax Flexibility, 823
Using () around the function parameters
Syntax Flexibility, 817
Using ? to print expression then new line
Getting Started - First Style, 187
What is new in Ring 1.6?, 87
in the start of the variable name
Syntax Flexibility, 820
Using && and || operators
What is new in Ring 1.6?, 86
Using _ in numbers
Mathematical Functions, 282
Using Atom
Using Other Code Editors, 209
Using Bootstrap Library using Functions
Web Development (CGI Library), 477
Using Bootstrap Library using Objects
Web Development (CGI Library), 478
Using braces { } in Packages/Classes/Functions
Syntax Flexibility, 824
Using Braces to access objects inside Class Methods
Scope Rules, 800
Using braces to escape from the current object scope
Scope Rules, 808
Using braces to start and end different control structures
Syntax Flexibility, 822
Using C/C++ Compiler and Linker
Distributing Ring Application, 851
Using configuration file that wrap C++ library
Code Generator, 915
Using CR as Carriage return
What is new in Ring 1.6?, 86
Using Emacs Editor
Using Other Code Editors, 211
Using Eval() with our Natural Code
Natural Language Programming, 434
Using f after numbers
Mathematical Functions, 282
Using Fonts
Using RingOpenGL and RingFreeGLUT for 3D
Graphics, 621
Using Geany
Using Other Code Editors, 208
Using Layout
Desktop and Mobile Development, 670
Using Layouts
Index 2056
9. Ring Documentation, Release 1.9
Form Designer, 791
Using len() and For Loops
Performance Tips, 847
Using Lists during definition
Lists, 254
Using Many Source Code Files
Program Structure, 247
Using Notepad++
Using Other Code Editors, 207
Using NULL instead of NULLPointer()
What is new in Ring 1.2?, 162
Using Object.Attribute
Scope Rules, 797
Using Other Code Editors
Introduction, 206
Using Atom, 209
Using Emacs Editor, 211
Using Geany, 208
Using Notepad++, 207
Using Sublime Text 2, 210
Using Visual Studio IDE, 211
Using QCheckBox
Desktop and Mobile Development, 696
Using QComboBox Class
Desktop and Mobile Development, 677
Using QDateEdit
Desktop and Mobile Development, 691
Using QDesktopWidget Class
Desktop and Mobile Development, 733
Using QDial
Desktop and Mobile Development, 692
Using QDockWidget
Desktop and Mobile Development, 684
Using QFrame
Desktop and Mobile Development, 701
Using QInputDialog Class
Desktop and Mobile Development, 725
Using qLCDNumber
Desktop and Mobile Development, 722
Using QPrintPreviewDialog
Desktop and Mobile Development, 717
Using QProgressBar
Desktop and Mobile Development, 688
Using QProgressBar and Timer
Desktop and Mobile Development, 711
Using QRadioButton and QButtonGroup
Desktop and Mobile Development, 697
Using QSlider
Desktop and Mobile Development, 689
Using QSpinBox
Desktop and Mobile Development, 689
Using QTableWidget
Desktop and Mobile Development, 687
Using QTabWidget
Desktop and Mobile Development, 685
Using QTreeView and QFileSystemModel
Desktop and Mobile Development, 675
Using QTreeWidget and QTreeWidgetItem
Desktop and Mobile Development, 676
Using QWebView
Desktop and Mobile Development, 695
Using Ring2EXE
Building RingQt Applications for Mobile, 776
Distributing Ring Application using Ring2EXE, 852
Using RING_API_RETMANAGEDCPOINTER()
Extension, 901
Using RingOpenGL and RingAllegro for 3D Graphics
3D Cube and Texture, 642
Introduction, 641
Many Cubes, 646
More 3D Samples, 661
TicTacToe 3D Game, 651
Using RingOpenGL and RingFreeGLUT for 3D Graphics
Drawing using RingOpenGL, 596
Frames Per Second, 629
Introduction, 593
Keyboard Events and Colors, 601
Make a Cube using RingOpenGL and RingFreeG-
LUT, 638
Menu Events, 614
Mouse Events, 610
Samples Source (Authors), 594
The Camera, 604
The First Triangle, 597
The First Window using RingFreeGLUT, 595
Triangle Rotation, 600
Using Fonts, 621
What is RingFreeGLUT?, 595
What is RingOpenGL?, 594
Window Resize Event, 598
Using RingZip Classes
RingZip, 509
Using Self.Attribute
Object Oriented Programming, 355
Using Self.Attribute in the Class Region to define new at-
tributes
What is new in Ring 1.1?, 172
Using Semi-colon after and between statements
Syntax Flexibility, 819
Using String2Constant
Multi-language applications, 792
Using Sublime Text 2
Using Other Code Editors, 210
Using Tab instead of char(9)
What is new in Ring 1.6?, 85
Using the
operator as not
What is new in Ring 1.6?, 86
Index 2057
10. Ring Documentation, Release 1.9
Using the ’else’ keyword as ’other’ in switch statement
Syntax Flexibility, 820
Using the ’elseif’ keyword as ’but’ in if statement
Syntax Flexibility, 820
Using the ’end’ keyword in different control structures
Syntax Flexibility, 821
Using the Interactive Debugger
The Trace Library and the Interactive Debugger, 885
Using the Natural Library
Defining Commands, 442
Defining commands using classes, 445
Introduction, 439
Natural Library - Demo Program, 440
Operators, 444
Using the QColorDialog Class
Desktop and Mobile Development, 721
Using the QFileDialog Class
Desktop and Mobile Development, 713
Using the QListWidget Class
Desktop and Mobile Development, 672
Using the QTextEdit Class
Desktop and Mobile Development, 671
Using the QTimer Class
Desktop and Mobile Development, 710
Using the tool
Code Generator, 906
Using This in the class region as Self
Object Oriented Programming, 356
What is new in Ring 1.8?, 62
Using This.Attribute and This.Method()
Object Oriented Programming, 355
Using This.Attribute in nested Braces inside the Class
Methods
What is new in Ring 1.1?, 172
Using Types inside Code
The Type Hints Library, 827
Using Visual Studio IDE
Using Other Code Editors, 211
value()
Stdlib Functions, 383
Variables
Deep Copy, 213
Dynamic Typing, 213
Introduction, 212
Weakly Typed, 214
Variables Scope
Functions - First Style, 237
Functions - Second Style, 241
Functions - Third Style, 245
varptr()
Low Level Functions, 862
Version() Function
System Functions, 299
Video-Music-Player Application
Applications developed in little hours, 10
What is new in Ring 1.5?, 89
Virtual Machine Instructions
Reference, 971
Visual Implementation
Language Design, 37
Weakly Typed
Variables, 214
Web Development (CGI Library)
Application Class, 495
Configure the Apache web server, 447
Cookies, 459
CRUD Example using MVC, 481
Database, ModelBase & ControllerBase classes, 489
Generating Pages using Objects, 471
Gradient, 470
Hash Functions, 465
Hello World Program using the Web Library, 448
HTML Lists, 468
HTML Special Characters, 464
HTML Tables, 469
HtmlPage Class, 476, 500
HTTP Get Example, 449
HTTP POST Example, 454
Introduction, 446
Page Class, 496
Random Image, 467
Ring CGI Hello World Program, 448
ScriptFunctions Class, 498
StyleFunctions Class, 498
Templates, 462
Upload Files, 456
URL Encode, 461
Users registration and Login, 483
Using Bootstrap Library using Functions, 477
Using Bootstrap Library using Objects, 478
Web Library Features, 449
WebLib API, 494
WebPage Class, 499
Web Library Features
Web Development (CGI Library), 449
WebLib API
Web Development (CGI Library), 494
WebPage Class
Web Development (CGI Library), 499
Weight History Application
Desktop and Mobile Development, 741
Werdy Application
Applications developed in little hours, 13
What about predefined parameters or optional parameters
in functions?
Frequently Asked Questions, 943
Index 2058