SlideShare a Scribd company logo
Ring Documentation, Release 1.8
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>`)
}
}
}
8.8. Better WebLib 121
Ring Documentation, Release 1.8
}
}
}
html(template("footer.rhtml",NULL))
}
8.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
8.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:
8.9. Better RingQt 122
Ring Documentation, Release 1.8
8.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:
8.11. What is new in Ring 1.4.1? 123
Ring Documentation, Release 1.8
In Ring Notepad - the (Modern) Style colors are updated
Screen Shot:
The StdLib is updated to include the next functions
• TrimLeft()
• TrimRight()
• TrimAll()
• EpochTime()
8.11. What is new in Ring 1.4.1? 124
Ring Documentation, Release 1.8
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:
8.11. What is new in Ring 1.4.1? 125
Ring Documentation, Release 1.8
8.11. What is new in Ring 1.4.1? 126
CHAPTER
NINE
WHAT IS NEW IN RING 1.3?
In this chapter we will learn about the changes and new features in Ring 1.3 release.
9.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
9.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("")
127
Ring Documentation, Release 1.8
}
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:
9.2. Better RingQt 128
Ring Documentation, Release 1.8
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)
9.2. Better RingQt 129
Ring Documentation, Release 1.8
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
9.2. Better RingQt 130

More Related Content

PDF
The Ring programming language version 1.9 book - Part 18 of 210
PDF
The Ring programming language version 1.5.3 book - Part 12 of 184
PDF
SISTEMA DE FACTURACION (Ejemplo desarrollado)
PDF
The Ring programming language version 1.7 book - Part 7 of 196
PDF
Sistema de ventas
PDF
Visual Studio.Net - Sql Server
TXT
Codeofdatabase
PDF
The Ring programming language version 1.10 book - Part 22 of 212
The Ring programming language version 1.9 book - Part 18 of 210
The Ring programming language version 1.5.3 book - Part 12 of 184
SISTEMA DE FACTURACION (Ejemplo desarrollado)
The Ring programming language version 1.7 book - Part 7 of 196
Sistema de ventas
Visual Studio.Net - Sql Server
Codeofdatabase
The Ring programming language version 1.10 book - Part 22 of 212

What's hot (12)

PDF
The Ring programming language version 1.10 book - Part 38 of 212
PDF
The Ring programming language version 1.7 book - Part 23 of 196
PDF
The Ring programming language version 1.6 book - Part 73 of 189
DOCX
Kode vb.net
DOCX
Sumsem2014 15 cp0399-13-jun-2015_rm01_programs
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 67 of 180
PDF
Closures for Java
PDF
The Ring programming language version 1.7 book - Part 85 of 196
PDF
Do you Promise?
PDF
C++ Windows Forms L05 - Controls P4
PDF
C++ Windows Forms L10 - Instantiate
The Ring programming language version 1.10 book - Part 38 of 212
The Ring programming language version 1.7 book - Part 23 of 196
The Ring programming language version 1.6 book - Part 73 of 189
Kode vb.net
Sumsem2014 15 cp0399-13-jun-2015_rm01_programs
The Ring programming language version 1.5.1 book - Part 11 of 180
The Ring programming language version 1.5.1 book - Part 67 of 180
Closures for Java
The Ring programming language version 1.7 book - Part 85 of 196
Do you Promise?
C++ Windows Forms L05 - Controls P4
C++ Windows Forms L10 - Instantiate
Ad

Similar to The Ring programming language version 1.8 book - Part 16 of 202 (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.7 book - Part 15 of 196
PDF
The Ring programming language version 1.10 book - Part 20 of 212
PDF
The Ring programming language version 1.9 book - Part 13 of 210
PDF
The Ring programming language version 1.3 book - Part 5 of 88
PDF
The Ring programming language version 1.6 book - Part 14 of 189
PDF
The Ring programming language version 1.5.2 book - Part 7 of 181
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.9 book - Part 99 of 210
PDF
The Ring programming language version 1.5.3 book - Part 8 of 184
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.5.1 book - Part 175 of 180
PDF
The Ring programming language version 1.5.4 book - Part 8 of 185
PDF
The Ring programming language version 1.8 book - Part 95 of 202
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.2 book - Part 5 of 84
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.7 book - Part 15 of 196
The Ring programming language version 1.10 book - Part 20 of 212
The Ring programming language version 1.9 book - Part 13 of 210
The Ring programming language version 1.3 book - Part 5 of 88
The Ring programming language version 1.6 book - Part 14 of 189
The Ring programming language version 1.5.2 book - Part 7 of 181
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.9 book - Part 99 of 210
The Ring programming language version 1.5.3 book - Part 8 of 184
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.5.1 book - Part 175 of 180
The Ring programming language version 1.5.4 book - Part 8 of 185
The Ring programming language version 1.8 book - Part 95 of 202
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.2 book - Part 5 of 84
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)

PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
ai tools demonstartion for schools and inter college
PDF
Digital Strategies for Manufacturing Companies
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
System and Network Administration Chapter 2
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
top salesforce developer skills in 2025.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
L1 - Introduction to python Backend.pptx
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Odoo POS Development Services by CandidRoot Solutions
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
VVF-Customer-Presentation2025-Ver1.9.pptx
Design an Analysis of Algorithms I-SECS-1021-03
Which alternative to Crystal Reports is best for small or large businesses.pdf
Reimagine Home Health with the Power of Agentic AI​
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
ai tools demonstartion for schools and inter college
Digital Strategies for Manufacturing Companies
Navsoft: AI-Powered Business Solutions & Custom Software Development
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
System and Network Administration Chapter 2
PTS Company Brochure 2025 (1).pdf.......
top salesforce developer skills in 2025.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
L1 - Introduction to python Backend.pptx
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
How to Migrate SBCGlobal Email to Yahoo Easily
Odoo POS Development Services by CandidRoot Solutions

The Ring programming language version 1.8 book - Part 16 of 202

  • 1. Ring Documentation, Release 1.8 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>`) } } } 8.8. Better WebLib 121
  • 2. Ring Documentation, Release 1.8 } } } html(template("footer.rhtml",NULL)) } 8.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 8.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: 8.9. Better RingQt 122
  • 3. Ring Documentation, Release 1.8 8.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: 8.11. What is new in Ring 1.4.1? 123
  • 4. Ring Documentation, Release 1.8 In Ring Notepad - the (Modern) Style colors are updated Screen Shot: The StdLib is updated to include the next functions • TrimLeft() • TrimRight() • TrimAll() • EpochTime() 8.11. What is new in Ring 1.4.1? 124
  • 5. Ring Documentation, Release 1.8 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: 8.11. What is new in Ring 1.4.1? 125
  • 6. Ring Documentation, Release 1.8 8.11. What is new in Ring 1.4.1? 126
  • 7. CHAPTER NINE WHAT IS NEW IN RING 1.3? In this chapter we will learn about the changes and new features in Ring 1.3 release. 9.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 9.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("") 127
  • 8. Ring Documentation, Release 1.8 } 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: 9.2. Better RingQt 128
  • 9. Ring Documentation, Release 1.8 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) 9.2. Better RingQt 129
  • 10. Ring Documentation, Release 1.8 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 9.2. Better RingQt 130