SlideShare a Scribd company logo
Ring Documentation, Release 1.5.3
div {
classname = :container
div
{
id = "div3"
color = "black"
backgroundcolor = "white"
width = "100%"
form
{
method = "POST"
Action = website
Target = "codeoutput"
input { type="hidden" name="page" value=1 }
Table
{
style = stylewidth("100%") +
stylegradient(3)
TR
{
TD { align="center"
WIDTH="10%"
text("Code :")
}
TD {
html(`
<textarea name = "cCode"
rows="5"
style="width : 100%; ">
See "Hello, World!" + nl
</textarea>`)
}
}
}
Input { type = "submit"
classname="btn btn-primary btn-block"
value = "Execute" }
Table
{
style = stylewidth("100%") +
stylegradient(34)
TR
{
TD { align="center"
WIDTH="10%"
text("Output :")
}
TD {
html(`
<iframe name="codeoutput"
width="100%"
style="background-color:white;">
</iframe>`)
}
}
}
5.8. Better WebLib 85
Ring Documentation, Release 1.5.3
}
}
}
html(template("footer.rhtml",NULL))
}
5.9 Better RingQt
The next functions are added to RingQt
• SetDialogIcon(cIconFile)
• MsgInfo(cTitle,cMessage)
• ConfirmMsg(cTitle,cMessage)
• InputBox(cTitle,cMessage)
• InputBoxInt(cTitle,cMessage)
• InputBoxNum(cTitle,cMessage)
• InputBoxPass(cTitle,cMessage)
The next classes are added to RingQt
• QToolButton
• QSerialPort
• QSerialPortInfo
5.10 Qt Class Convertor
Ring 1.4 comes with a simple tool that help in porting Qt classes to RingQt.
You will find it in ring/samples/tools/QtClassConverter
Online : https://github.com/ring-lang/ring/tree/master/samples/tools/QtClassConverter
Screen Shot:
5.9. Better RingQt 86
Ring Documentation, Release 1.5.3
5.11 What is new in Ring 1.4.1?
Ring 1.4.1 comes with the next changes
• Better Scripts for Building from Source Code
• Better Colors for the Modern Style in Ring Notepad
• Better StdLib
• Better RingQt
• New Sample : Sixteen Puzzle
The scripts are updated for building from source code.
Tested using Windows, Ubuntu Linux, Linux Mint and MacOS X.
Screen Shot:
5.11. What is new in Ring 1.4.1? 87
Ring Documentation, Release 1.5.3
In Ring Notepad - the (Modern) Style colors are updated
Screen Shot:
The StdLib is updated to include the next functions
• TrimLeft()
• TrimRight()
• TrimAll()
• EpochTime()
5.11. What is new in Ring 1.4.1? 88
Ring Documentation, Release 1.5.3
The next functions are updated to display the dialogs on the top of other windows.
• SetDialogIcon(cIconFile)
• MsgInfo(cTitle,cMessage)
• ConfirmMsg(cTitle,cMessage)
• InputBox(cTitle,cMessage)
• InputBoxInt(cTitle,cMessage)
• InputBoxNum(cTitle,cMessage)
• InputBoxPass(cTitle,cMessage)
The Sixteen Puzzle is added to the Applications folder.
Screen Shot:
5.11. What is new in Ring 1.4.1? 89
Ring Documentation, Release 1.5.3
5.11. What is new in Ring 1.4.1? 90
CHAPTER
SIX
WHAT IS NEW IN RING 1.3?
In this chapter we will learn about the changes and new features in Ring 1.3 release.
6.1 List of changes and new features
Ring 1.3 comes with many new features
• Better RingQt
• Better Ring Notepad
• Ring mode for Emacs Editor
• Better StdLib
• Better Loop/Exit Command
• New Functions
• Return Self by Reference
• Using ‘<’ and ‘:’ operators as ‘from’ keyword
• Embedding Ring in Ring without sharing the State
• RingZip Library
• Form Designer
6.2 Better RingQt
(1) Another version of QPixMap class is added (QPixMap2) which takes (int width,int height) during object init.
Example:
Load "guilib.ring"
New qapp
{
win1 = new qwidget()
{
setwindowtitle("Drawing using QPixMap")
setgeometry(100,100,500,500)
label1 = new qlabel(win1)
{
setgeometry(10,10,400,400)
settext("")
91
Ring Documentation, Release 1.5.3
}
imageStock = new qlabel(win1)
{
image = new qPixMap2(200,200)
color = new qcolor() {
setrgb(255,255,255,255)
}
pen = new qpen() {
setcolor(color)
setwidth(10)
}
new qpainter() {
begin(image)
setpen(pen)
drawline(0,0,200,200)
drawline(200,0,0,200)
endpaint()
}
setpixmap(image)
}
show()
}
exec()
}
Screen Shot:
6.2. Better RingQt 92
Ring Documentation, Release 1.5.3
2. The Objects Library is updated to include the next functions
• Last_WindowID()
• Open_WindowNoShow()
• Open_WindowAndLink()
Also the class name (WindowViewBase) is changed to (WindowsViewParent).
In The next code for example the Open_WindowAndLink() will create an object from the SecondWindowController
Class Then will add the Method SecondWindow() to the FirstWindowController Class Also will add the Method
FirstWindow() to the SecondWindowController Class
So the SendMessage() method in FirstWindowController class can use the SecondWindow() method to access the
object.
class firstwindowController from windowsControllerParent
oView = new firstwindowView
func OpenSecondWindow
Open_WindowAndLink(:SecondWindowController,self)
6.2. Better RingQt 93
Ring Documentation, Release 1.5.3
func SendMessage
if IsSecondWindow()
SecondWindow().setMessage("Message from the first window")
ok
func setMessage cMessage
oView.Label1.setText(cMessage)
3. The next classes are added to RingQt
• QPixMap2
• QScrollArea
• QSplitter
• QCompleter
• QCompleter2
• QCompleter3
• QProcess
• QMdiArea
• QMdiSubWindow
• QCursor
• QListView
• QDesktopServices
4. Many constants are defined in qt.rh (loaded by guilib.ring)
5. New Classes names - Index Start from 1
We added new classes to RingQt - another version of classes where the class names doesn’t start with the “q” letter
Also updated methods so the index start from 1 when we deal with the GUI controls like
• ComboBox
• ListWidget
• TableWidget
• TreeWidget
These classes are inside guilib.ring under the package name : System.GUI
To use it
load "guilib.ring"
import System.GUI
This doesn’t have any effect on our previous code, It’s just another choice for better code that is consistent with Ring
rules.
Also the form designer is updated to provide us the choice between using classes where (index start from 0) or (index
start from 1)
Example (Uses the Form Designer)
1. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/indexstart/indexstartView.ring
6.2. Better RingQt 94

More Related Content

What's hot (20)

PDF
Sistema de ventas
DAYANA RETO
 
PDF
Visual Studio.Net - Sql Server
Darwin Durand
 
PDF
The Ring programming language version 1.6 book - Part 9 of 189
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.4 book - Part 27 of 185
Mahmoud Samir Fayed
 
DOC
Baitap tkw
nguyenquy2101
 
TXT
Ss
Karan Soni
 
PDF
The Ring programming language version 1.5.2 book - Part 26 of 181
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.1 book - Part 175 of 180
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 22 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.9 book - Part 34 of 210
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.7 book - Part 23 of 196
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.3 book - Part 8 of 184
Mahmoud Samir Fayed
 
DOCX
VISUALIZAR REGISTROS EN UN JTABLE
Darwin Durand
 
PDF
The Ring programming language version 1.6 book - Part 13 of 189
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.2 book - Part 25 of 181
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.3 book - Part 18 of 88
Mahmoud Samir Fayed
 
DOC
Working With Infopath 2007
LiquidHub
 
PDF
The Ring programming language version 1.5.4 book - Part 13 of 185
Mahmoud Samir Fayed
 
PPTX
MVVM e Caliburn Micro for Windows Phone applications
Matteo Pagani
 
Sistema de ventas
DAYANA RETO
 
Visual Studio.Net - Sql Server
Darwin Durand
 
The Ring programming language version 1.6 book - Part 9 of 189
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.4 book - Part 27 of 185
Mahmoud Samir Fayed
 
Baitap tkw
nguyenquy2101
 
The Ring programming language version 1.5.2 book - Part 26 of 181
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 175 of 180
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 22 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 34 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 23 of 196
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 8 of 184
Mahmoud Samir Fayed
 
VISUALIZAR REGISTROS EN UN JTABLE
Darwin Durand
 
The Ring programming language version 1.6 book - Part 13 of 189
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 25 of 181
Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 18 of 88
Mahmoud Samir Fayed
 
Working With Infopath 2007
LiquidHub
 
The Ring programming language version 1.5.4 book - Part 13 of 185
Mahmoud Samir Fayed
 
MVVM e Caliburn Micro for Windows Phone applications
Matteo Pagani
 

Similar to The Ring programming language version 1.5.3 book - Part 12 of 184 (20)

PDF
The Ring programming language version 1.3 book - Part 7 of 88
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 19 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.3 book - Part 5 of 88
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.6 book - Part 14 of 189
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.1 book - Part 11 of 180
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 20 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.7 book - Part 15 of 196
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.2 book - Part 7 of 181
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.9 book - Part 13 of 210
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.1 book - Part 7 of 180
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.6 book - Part 184 of 189
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.3 book - Part 81 of 184
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.4 book - Part 8 of 185
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.1 book - Part 12 of 180
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.8 book - Part 95 of 202
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.3 book - Part 43 of 184
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.3 book - Part 53 of 184
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.5.4 book - Part 12 of 185
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 53 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.9 book - Part 99 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 7 of 88
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 19 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 5 of 88
Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 14 of 189
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 11 of 180
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 20 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 15 of 196
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 7 of 181
Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 13 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 7 of 180
Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 184 of 189
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 81 of 184
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.4 book - Part 8 of 185
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 12 of 180
Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 95 of 202
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 43 of 184
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 53 of 184
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.4 book - Part 12 of 185
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 53 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.9 book - Part 99 of 210
Mahmoud Samir Fayed
 
Ad

More from Mahmoud Samir Fayed (20)

PDF
The Ring programming language version 1.10 book - Part 212 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 211 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 210 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 208 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 207 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 205 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 206 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 204 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 203 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 202 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 201 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 200 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 199 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 198 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 197 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 196 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 195 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 194 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 193 of 212
Mahmoud Samir Fayed
 
PDF
The Ring programming language version 1.10 book - Part 192 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 212 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 211 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 210 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 208 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 207 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 205 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 206 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 204 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 203 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 202 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 201 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 200 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 199 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 198 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 197 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 196 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 195 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 194 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 193 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 192 of 212
Mahmoud Samir Fayed
 
Ad

Recently uploaded (20)

PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
July Patch Tuesday
Ivanti
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
July Patch Tuesday
Ivanti
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 

The Ring programming language version 1.5.3 book - Part 12 of 184

  • 1. Ring Documentation, Release 1.5.3 div { classname = :container div { id = "div3" color = "black" backgroundcolor = "white" width = "100%" form { method = "POST" Action = website Target = "codeoutput" input { type="hidden" name="page" value=1 } Table { style = stylewidth("100%") + stylegradient(3) TR { TD { align="center" WIDTH="10%" text("Code :") } TD { html(` <textarea name = "cCode" rows="5" style="width : 100%; "> See "Hello, World!" + nl </textarea>`) } } } Input { type = "submit" classname="btn btn-primary btn-block" value = "Execute" } Table { style = stylewidth("100%") + stylegradient(34) TR { TD { align="center" WIDTH="10%" text("Output :") } TD { html(` <iframe name="codeoutput" width="100%" style="background-color:white;"> </iframe>`) } } } 5.8. Better WebLib 85
  • 2. Ring Documentation, Release 1.5.3 } } } html(template("footer.rhtml",NULL)) } 5.9 Better RingQt The next functions are added to RingQt • SetDialogIcon(cIconFile) • MsgInfo(cTitle,cMessage) • ConfirmMsg(cTitle,cMessage) • InputBox(cTitle,cMessage) • InputBoxInt(cTitle,cMessage) • InputBoxNum(cTitle,cMessage) • InputBoxPass(cTitle,cMessage) The next classes are added to RingQt • QToolButton • QSerialPort • QSerialPortInfo 5.10 Qt Class Convertor Ring 1.4 comes with a simple tool that help in porting Qt classes to RingQt. You will find it in ring/samples/tools/QtClassConverter Online : https://github.com/ring-lang/ring/tree/master/samples/tools/QtClassConverter Screen Shot: 5.9. Better RingQt 86
  • 3. Ring Documentation, Release 1.5.3 5.11 What is new in Ring 1.4.1? Ring 1.4.1 comes with the next changes • Better Scripts for Building from Source Code • Better Colors for the Modern Style in Ring Notepad • Better StdLib • Better RingQt • New Sample : Sixteen Puzzle The scripts are updated for building from source code. Tested using Windows, Ubuntu Linux, Linux Mint and MacOS X. Screen Shot: 5.11. What is new in Ring 1.4.1? 87
  • 4. Ring Documentation, Release 1.5.3 In Ring Notepad - the (Modern) Style colors are updated Screen Shot: The StdLib is updated to include the next functions • TrimLeft() • TrimRight() • TrimAll() • EpochTime() 5.11. What is new in Ring 1.4.1? 88
  • 5. Ring Documentation, Release 1.5.3 The next functions are updated to display the dialogs on the top of other windows. • SetDialogIcon(cIconFile) • MsgInfo(cTitle,cMessage) • ConfirmMsg(cTitle,cMessage) • InputBox(cTitle,cMessage) • InputBoxInt(cTitle,cMessage) • InputBoxNum(cTitle,cMessage) • InputBoxPass(cTitle,cMessage) The Sixteen Puzzle is added to the Applications folder. Screen Shot: 5.11. What is new in Ring 1.4.1? 89
  • 6. Ring Documentation, Release 1.5.3 5.11. What is new in Ring 1.4.1? 90
  • 7. CHAPTER SIX WHAT IS NEW IN RING 1.3? In this chapter we will learn about the changes and new features in Ring 1.3 release. 6.1 List of changes and new features Ring 1.3 comes with many new features • Better RingQt • Better Ring Notepad • Ring mode for Emacs Editor • Better StdLib • Better Loop/Exit Command • New Functions • Return Self by Reference • Using ‘<’ and ‘:’ operators as ‘from’ keyword • Embedding Ring in Ring without sharing the State • RingZip Library • Form Designer 6.2 Better RingQt (1) Another version of QPixMap class is added (QPixMap2) which takes (int width,int height) during object init. Example: Load "guilib.ring" New qapp { win1 = new qwidget() { setwindowtitle("Drawing using QPixMap") setgeometry(100,100,500,500) label1 = new qlabel(win1) { setgeometry(10,10,400,400) settext("") 91
  • 8. Ring Documentation, Release 1.5.3 } imageStock = new qlabel(win1) { image = new qPixMap2(200,200) color = new qcolor() { setrgb(255,255,255,255) } pen = new qpen() { setcolor(color) setwidth(10) } new qpainter() { begin(image) setpen(pen) drawline(0,0,200,200) drawline(200,0,0,200) endpaint() } setpixmap(image) } show() } exec() } Screen Shot: 6.2. Better RingQt 92
  • 9. Ring Documentation, Release 1.5.3 2. The Objects Library is updated to include the next functions • Last_WindowID() • Open_WindowNoShow() • Open_WindowAndLink() Also the class name (WindowViewBase) is changed to (WindowsViewParent). In The next code for example the Open_WindowAndLink() will create an object from the SecondWindowController Class Then will add the Method SecondWindow() to the FirstWindowController Class Also will add the Method FirstWindow() to the SecondWindowController Class So the SendMessage() method in FirstWindowController class can use the SecondWindow() method to access the object. class firstwindowController from windowsControllerParent oView = new firstwindowView func OpenSecondWindow Open_WindowAndLink(:SecondWindowController,self) 6.2. Better RingQt 93
  • 10. Ring Documentation, Release 1.5.3 func SendMessage if IsSecondWindow() SecondWindow().setMessage("Message from the first window") ok func setMessage cMessage oView.Label1.setText(cMessage) 3. The next classes are added to RingQt • QPixMap2 • QScrollArea • QSplitter • QCompleter • QCompleter2 • QCompleter3 • QProcess • QMdiArea • QMdiSubWindow • QCursor • QListView • QDesktopServices 4. Many constants are defined in qt.rh (loaded by guilib.ring) 5. New Classes names - Index Start from 1 We added new classes to RingQt - another version of classes where the class names doesn’t start with the “q” letter Also updated methods so the index start from 1 when we deal with the GUI controls like • ComboBox • ListWidget • TableWidget • TreeWidget These classes are inside guilib.ring under the package name : System.GUI To use it load "guilib.ring" import System.GUI This doesn’t have any effect on our previous code, It’s just another choice for better code that is consistent with Ring rules. Also the form designer is updated to provide us the choice between using classes where (index start from 0) or (index start from 1) Example (Uses the Form Designer) 1. https://github.com/ring-lang/ring/blob/master/applications/formdesigner/tests/indexstart/indexstartView.ring 6.2. Better RingQt 94