SlideShare a Scribd company logo
Ring Documentation, Release 1.9
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>`)
}
}
}
9.8. Better WebLib 139
Ring Documentation, Release 1.9
}
}
}
html(template("footer.rhtml",NULL))
}
9.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
9.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:
9.9. Better RingQt 140
Ring Documentation, Release 1.9
9.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:
9.11. What is new in Ring 1.4.1? 141
Ring Documentation, Release 1.9
In Ring Notepad - the (Modern) Style colors are updated
Screen Shot:
The StdLib is updated to include the next functions
• TrimLeft()
• TrimRight()
• TrimAll()
• EpochTime()
9.11. What is new in Ring 1.4.1? 142
Ring Documentation, Release 1.9
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:
9.11. What is new in Ring 1.4.1? 143
Ring Documentation, Release 1.9
9.11. What is new in Ring 1.4.1? 144
CHAPTER
TEN
WHAT IS NEW IN RING 1.3?
In this chapter we will learn about the changes and new features in Ring 1.3 release.
10.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
10.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("")
145
Ring Documentation, Release 1.9
}
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:
10.2. Better RingQt 146
Ring Documentation, Release 1.9
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)
10.2. Better RingQt 147
Ring Documentation, Release 1.9
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
10.2. Better RingQt 148

More Related Content

PDF
The Ring programming language version 1.8 book - Part 16 of 202
PDF
The Ring programming language version 1.5.3 book - Part 12 of 184
PDF
The Ring programming language version 1.7 book - Part 7 of 196
PDF
SISTEMA DE FACTURACION (Ejemplo desarrollado)
PDF
Sistema de ventas
DOCX
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
PDF
Visual Studio.Net - Sql Server
PDF
The Ring programming language version 1.10 book - Part 38 of 212
The Ring programming language version 1.8 book - Part 16 of 202
The Ring programming language version 1.5.3 book - Part 12 of 184
The Ring programming language version 1.7 book - Part 7 of 196
SISTEMA DE FACTURACION (Ejemplo desarrollado)
Sistema de ventas
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
Visual Studio.Net - Sql Server
The Ring programming language version 1.10 book - Part 38 of 212

What's hot (15)

TXT
Codeofdatabase
TXT
PDF
The Ring programming language version 1.7 book - Part 23 of 196
PDF
The Ring programming language version 1.5.3 book - Part 8 of 184
TXT
Penjualan swalayan
PDF
The Ring programming language version 1.10 book - Part 22 of 212
PDF
PDF
Closures for Java
PDF
The Ring programming language version 1.5.1 book - Part 11 of 180
PDF
The Ring programming language version 1.5.1 book - Part 175 of 180
DOCX
VISUALIZAR REGISTROS EN UN JTABLE
DOC
Baitap tkw
PDF
The Ring programming language version 1.9 book - Part 37 of 210
DOCX
Sumsem2014 15 cp0399-13-jun-2015_rm01_programs
PDF
Do you Promise?
Codeofdatabase
The Ring programming language version 1.7 book - Part 23 of 196
The Ring programming language version 1.5.3 book - Part 8 of 184
Penjualan swalayan
The Ring programming language version 1.10 book - Part 22 of 212
Closures for Java
The Ring programming language version 1.5.1 book - Part 11 of 180
The Ring programming language version 1.5.1 book - Part 175 of 180
VISUALIZAR REGISTROS EN UN JTABLE
Baitap tkw
The Ring programming language version 1.9 book - Part 37 of 210
Sumsem2014 15 cp0399-13-jun-2015_rm01_programs
Do you Promise?
Ad

Similar to The Ring programming language version 1.9 book - Part 18 of 210 (20)

PDF
The Ring programming language version 1.10 book - Part 19 of 212
PDF
The Ring programming language version 1.3 book - Part 7 of 88
PDF
The Ring programming language version 1.10 book - Part 20 of 212
PDF
The Ring programming language version 1.3 book - Part 5 of 88
PDF
The Ring programming language version 1.7 book - Part 15 of 196
PDF
The Ring programming language version 1.9 book - Part 13 of 210
PDF
The Ring programming language version 1.6 book - Part 14 of 189
PDF
The Ring programming language version 1.9 book - Part 99 of 210
PDF
The Ring programming language version 1.5.1 book - Part 7 of 180
PDF
The Ring programming language version 1.6 book - Part 184 of 189
PDF
The Ring programming language version 1.5 book - Part 3 of 31
PDF
The Ring programming language version 1.5.4 book - Part 8 of 185
PDF
The Ring programming language version 1.5.2 book - Part 14 of 181
PDF
The Ring programming language version 1.5.2 book - Part 7 of 181
PDF
The Ring programming language version 1.5.3 book - Part 81 of 184
PDF
The Ring programming language version 1.5.1 book - Part 12 of 180
PDF
The Ring programming language version 1.2 book - Part 5 of 84
PDF
The Ring programming language version 1.10 book - Part 101 of 212
PDF
The Ring programming language version 1.8 book - Part 19 of 202
PDF
The Ring programming language version 1.5.3 book - Part 15 of 184
The Ring programming language version 1.10 book - Part 19 of 212
The Ring programming language version 1.3 book - Part 7 of 88
The Ring programming language version 1.10 book - Part 20 of 212
The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.7 book - Part 15 of 196
The Ring programming language version 1.9 book - Part 13 of 210
The Ring programming language version 1.6 book - Part 14 of 189
The Ring programming language version 1.9 book - Part 99 of 210
The Ring programming language version 1.5.1 book - Part 7 of 180
The Ring programming language version 1.6 book - Part 184 of 189
The Ring programming language version 1.5 book - Part 3 of 31
The Ring programming language version 1.5.4 book - Part 8 of 185
The Ring programming language version 1.5.2 book - Part 14 of 181
The Ring programming language version 1.5.2 book - Part 7 of 181
The Ring programming language version 1.5.3 book - Part 81 of 184
The Ring programming language version 1.5.1 book - Part 12 of 180
The Ring programming language version 1.2 book - Part 5 of 84
The Ring programming language version 1.10 book - Part 101 of 212
The Ring programming language version 1.8 book - Part 19 of 202
The Ring programming language version 1.5.3 book - Part 15 of 184
Ad

More from Mahmoud Samir Fayed (20)

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

Recently uploaded (20)

PDF
top salesforce developer skills in 2025.pdf
PPTX
Essential Infomation Tech presentation.pptx
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
L1 - Introduction to python Backend.pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
history of c programming in notes for students .pptx
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
System and Network Administraation Chapter 3
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Introduction to Artificial Intelligence
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Digital Strategies for Manufacturing Companies
PDF
Understanding Forklifts - TECH EHS Solution
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
top salesforce developer skills in 2025.pdf
Essential Infomation Tech presentation.pptx
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
VVF-Customer-Presentation2025-Ver1.9.pptx
Adobe Illustrator 28.6 Crack My Vision of Vector Design
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
L1 - Introduction to python Backend.pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Upgrade and Innovation Strategies for SAP ERP Customers
history of c programming in notes for students .pptx
Design an Analysis of Algorithms I-SECS-1021-03
System and Network Administraation Chapter 3
CHAPTER 2 - PM Management and IT Context
Introduction to Artificial Intelligence
2025 Textile ERP Trends: SAP, Odoo & Oracle
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Digital Strategies for Manufacturing Companies
Understanding Forklifts - TECH EHS Solution
PTS Company Brochure 2025 (1).pdf.......
How to Migrate SBCGlobal Email to Yahoo Easily

The Ring programming language version 1.9 book - Part 18 of 210

  • 1. Ring Documentation, Release 1.9 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>`) } } } 9.8. Better WebLib 139
  • 2. Ring Documentation, Release 1.9 } } } html(template("footer.rhtml",NULL)) } 9.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 9.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: 9.9. Better RingQt 140
  • 3. Ring Documentation, Release 1.9 9.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: 9.11. What is new in Ring 1.4.1? 141
  • 4. Ring Documentation, Release 1.9 In Ring Notepad - the (Modern) Style colors are updated Screen Shot: The StdLib is updated to include the next functions • TrimLeft() • TrimRight() • TrimAll() • EpochTime() 9.11. What is new in Ring 1.4.1? 142
  • 5. Ring Documentation, Release 1.9 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: 9.11. What is new in Ring 1.4.1? 143
  • 6. Ring Documentation, Release 1.9 9.11. What is new in Ring 1.4.1? 144
  • 7. CHAPTER TEN WHAT IS NEW IN RING 1.3? In this chapter we will learn about the changes and new features in Ring 1.3 release. 10.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 10.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("") 145
  • 8. Ring Documentation, Release 1.9 } 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: 10.2. Better RingQt 146
  • 9. Ring Documentation, Release 1.9 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) 10.2. Better RingQt 147
  • 10. Ring Documentation, Release 1.9 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 10.2. Better RingQt 148