[DEVELOPMENT ENVIRONMENT]
* NEW: Animate wizards. * NEW: Software farm: The software description is now selectable. * NEW: Software farm: The software box text contents is now displayed without waiting for the icon to be available. [EXAMPLES] * BUG: Fix the GNUBoxWorld icon. [GB.FORM] * NEW: Wizard.Animated is a new property that animate the wizard when going to the next or previous step. git-svn-id: svn://localhost/gambas/trunk@6728 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
0ed95bb0d4
commit
c31c915f1d
@ -1,16 +1,19 @@
|
||||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 3.6.0
|
||||
# Compiled with Gambas 3.6.90
|
||||
Title=Fractal
|
||||
Startup=FFractal
|
||||
Icon=icon.png
|
||||
Version=3.6.2
|
||||
Version=3.6.90
|
||||
VersionFile=1
|
||||
Component=gb.image
|
||||
Component=gb.gui
|
||||
Component=gb.form
|
||||
Description="Mandelbrot Fractal with Just-In-Time compilation"
|
||||
Description="Mandelbrot Fractal with Just-In-Time compilation.\n\nThis example allows to freely zoom into the Mandelbrot fractal in real-time. You can toggle just-in-time compilation by hitting the \"F\" key."
|
||||
Authors="Benoît Minisini"
|
||||
TabSize=2
|
||||
Translate=1
|
||||
Language=en
|
||||
Vendor=Example
|
||||
Packager=1
|
||||
Tags=JustInTime
|
||||
Screenshot=/home/benoit/fractal.jpg
|
||||
|
@ -1,17 +1,18 @@
|
||||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 3.5.90
|
||||
# Compiled with Gambas 3.6.90
|
||||
Title=Anti-Aliased Drawing
|
||||
Startup=FMain
|
||||
Icon=icon.png
|
||||
Version=3.6.2
|
||||
Version=3.6.90
|
||||
VersionFile=1
|
||||
Component=gb.image
|
||||
Component=gb.gui
|
||||
Component=gb.form
|
||||
Description="Anti-aliased drawing with the Paint class"
|
||||
Description="Anti-aliased drawing with the Paint class.\n\nThis example shows the different methods of the Paint class."
|
||||
Authors="Fabien Bodard\nBenoît Minisini"
|
||||
Environment="GB_GUI=gb.gtk3"
|
||||
TabSize=2
|
||||
Translate=1
|
||||
Language=en
|
||||
Vendor=Example
|
||||
Packager=1
|
||||
Screenshot=/home/benoit/Painting.jpg
|
||||
|
@ -2,7 +2,7 @@ FMain
|
||||
Anti-Aliased Drawing
|
||||
0
|
||||
0
|
||||
3.5.90
|
||||
3.6.90
|
||||
|
||||
gb.image
|
||||
gb.gui
|
||||
|
@ -1,13 +1,15 @@
|
||||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 3.5.90
|
||||
# Compiled with Gambas 3.6.90
|
||||
Title=QuasiRegular
|
||||
Startup=FMain
|
||||
Icon=icon.png
|
||||
Version=3.6.2
|
||||
Version=3.6.90
|
||||
VersionFile=1
|
||||
Component=gb.image
|
||||
Component=gb.gui
|
||||
Component=gb.form
|
||||
Description="An example of a quasi-regular pattern."
|
||||
Description="An example of a quasi-regular pattern.\n\nThe drawing is the result of an exclusive-or between a black & white chess pattern and the same pattern rotated by 90°."
|
||||
TabSize=2
|
||||
Vendor=Example
|
||||
Packager=1
|
||||
Screenshot=/home/benoit/QuasiRegular.jpg
|
||||
|
@ -2,7 +2,7 @@ FMain
|
||||
QuasiRegular
|
||||
0
|
||||
0
|
||||
3.5.90
|
||||
3.6.90
|
||||
|
||||
gb.image
|
||||
gb.gui
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 3.7 KiB |
@ -2,7 +2,7 @@
|
||||
# Compiled with Gambas 3.6.90
|
||||
Title=GNUBoxWorld
|
||||
Startup=FMain
|
||||
Icon=logo.png
|
||||
Icon=icon.png
|
||||
Version=3.6.90
|
||||
VersionFile=1
|
||||
Component=gb.image
|
||||
|
@ -180,7 +180,7 @@ Private Function WhoMove(direction As Integer) As Picture
|
||||
End
|
||||
|
||||
Public Sub ShowGameBoard()
|
||||
Dim control As Object
|
||||
|
||||
Dim row As Integer
|
||||
Dim col As Integer
|
||||
For row = 0 To 9
|
||||
@ -188,6 +188,7 @@ Public Sub ShowGameBoard()
|
||||
PicturesBoxes[row, col].Picture = Game.Cells[row, col].Pic
|
||||
Next
|
||||
Next
|
||||
|
||||
End
|
||||
|
||||
Public Sub MakePictureBoxes()
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
{ Form Form
|
||||
MoveScaled(0,0,42,16)
|
||||
Icon = Picture["logo.png"]
|
||||
Icon = Picture["icon.png"]
|
||||
Resizable = False
|
||||
{ MnuGame Menu
|
||||
Text = ("Game")
|
||||
|
BIN
app/examples/Games/GNUBoxWorld/icon.png
Normal file
BIN
app/examples/Games/GNUBoxWorld/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
@ -1,20 +1,21 @@
|
||||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 3.5.90
|
||||
# Compiled with Gambas 3.6.90
|
||||
Title=Client Socket Example
|
||||
Startup=FrmMain
|
||||
Icon=socket.png
|
||||
Version=3.6.2
|
||||
Version=3.6.90
|
||||
VersionFile=1
|
||||
Component=gb.image
|
||||
Component=gb.gui
|
||||
Component=gb.net
|
||||
Description="Client socket example.\n\nThis example shows how to use a socket to connect to a server. You should use the \"ServerSocket\" example as a testing peer."
|
||||
Authors="Daniel Campos Fernández\nBenoît Minisini"
|
||||
Environment="GB_GUI=gb.gtk"
|
||||
TabSize=2
|
||||
Translate=1
|
||||
Language=fr
|
||||
Maintainer=benoit
|
||||
Vendor=Princeton
|
||||
Vendor=Example
|
||||
Address=benoit@desnouettes
|
||||
License=General Public Licence
|
||||
Packager=1
|
||||
Tags=Network
|
||||
|
@ -1,20 +1,22 @@
|
||||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 3.5.90
|
||||
# Compiled with Gambas 3.6.90
|
||||
Title=Server socket example
|
||||
Startup=FrmMain
|
||||
Icon=serversocket.png
|
||||
Version=3.6.2
|
||||
Version=3.6.90
|
||||
VersionFile=1
|
||||
Component=gb.image
|
||||
Component=gb.gui
|
||||
Component=gb.net
|
||||
Component=gb.net.curl
|
||||
Description="Server socket example.\n\nThis example shows how to implement a TCP server accepting and managing multiple connections in the same process. You can use the 'ClientSocket' example as a testing peer."
|
||||
Environment="GB_GUI=gb.qt4"
|
||||
TabSize=2
|
||||
Translate=1
|
||||
Language=fr
|
||||
Maintainer=benoit
|
||||
Vendor=Princeton
|
||||
Vendor=Example
|
||||
Address=benoit@desnouettes
|
||||
License=General Public Licence
|
||||
Packager=1
|
||||
Tags=Network
|
||||
|
@ -14,6 +14,7 @@
|
||||
TextFont = Font["Bold,+3"]
|
||||
ShowIndex = True
|
||||
Border = False
|
||||
Animated = True
|
||||
Index = 0
|
||||
Text = ("Package information")
|
||||
{ TextLabel1 TextLabel
|
||||
|
@ -15,6 +15,7 @@
|
||||
TextFont = Font["Bold,+3"]
|
||||
ShowIndex = True
|
||||
Border = False
|
||||
Animated = True
|
||||
Index = 0
|
||||
Text = ("Project type")
|
||||
{ HBox5 HBox
|
||||
|
@ -16,6 +16,7 @@
|
||||
Border = False
|
||||
ActionText = "Publish"
|
||||
ActionPicture = Picture["icon:/small/internet"]
|
||||
Animated = True
|
||||
Index = 0
|
||||
Text = ("Information")
|
||||
{ HBox9 HBox
|
||||
|
@ -300,7 +300,8 @@ Private Sub UpdateSoftware()
|
||||
|
||||
Else
|
||||
|
||||
txtDescription.Text = Replace(Html(sText), "\n", "<br>")
|
||||
txtDescription.Text = sText
|
||||
txtDescription.H = txtDescription.Font.RichTextHeight(Replace(Html(sText), "\n", "<br>"), txtDescription.W)
|
||||
|
||||
Endif
|
||||
|
||||
|
@ -98,9 +98,12 @@
|
||||
Font = Font["Bold"]
|
||||
Text = ("Description")
|
||||
}
|
||||
{ txtDescription TextLabel
|
||||
MoveScaled(2,4,35,5)
|
||||
AutoResize = True
|
||||
{ txtDescription TextArea
|
||||
MoveScaled(2,5,29,4)
|
||||
ReadOnly = True
|
||||
Wrap = True
|
||||
Border = False
|
||||
ScrollBar = Scroll.None
|
||||
}
|
||||
{ panURL HBox
|
||||
MoveScaled(2,10,29,4)
|
||||
|
@ -154,7 +154,7 @@ Public Sub DrawingArea_Draw()
|
||||
Paint.Stroke
|
||||
Paint.AntiAlias = True
|
||||
|
||||
If Not $hSoft Or If $hSoft.State < CSoftware.STATE_READY Then Return
|
||||
If Not $hSoft Then Return
|
||||
|
||||
If $hSoft.IsInstalled() Then
|
||||
If $hSoft.CanUpgrade() Then
|
||||
|
@ -16,6 +16,7 @@
|
||||
TextFont = Font["Bold,+3"]
|
||||
ShowIndex = True
|
||||
Border = False
|
||||
Animated = True
|
||||
Index = 0
|
||||
Text = ("Select patch origin")
|
||||
{ Panel1 VBox
|
||||
|
@ -2977,7 +2977,7 @@ C
|
||||
_Properties
|
||||
C
|
||||
s
|
||||
*,Count{Range:1;256}=1,Index,Text,TextFont,Picture,ShowTitle=True,ShowIndex=False,Border=True,ActionText,ActionPicture
|
||||
*,Count{Range:1;256}=1,Index,Text,TextFont,Picture,ShowTitle=True,ShowIndex=False,Border=True,ActionText,ActionPicture,Animated
|
||||
_DefaultEvent
|
||||
C
|
||||
s
|
||||
@ -3054,6 +3054,10 @@ ActionPicture
|
||||
p
|
||||
Picture
|
||||
|
||||
Animated
|
||||
p
|
||||
b
|
||||
|
||||
_new
|
||||
m
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 3.6.90
|
||||
Title=More controls for graphical components
|
||||
Startup=Form1
|
||||
Startup=FTestWizard
|
||||
Version=3.6.90
|
||||
VersionFile=1
|
||||
Component=gb.image
|
||||
|
8
comp/src/gb.form/.src/Test/FTestWizard.class
Normal file
8
comp/src/gb.form/.src/Test/FTestWizard.class
Normal file
@ -0,0 +1,8 @@
|
||||
' Gambas class file
|
||||
|
||||
|
||||
Public Sub Wizard1_Cancel()
|
||||
|
||||
Me.Close
|
||||
|
||||
End
|
30
comp/src/gb.form/.src/Test/FTestWizard.form
Normal file
30
comp/src/gb.form/.src/Test/FTestWizard.form
Normal file
@ -0,0 +1,30 @@
|
||||
# Gambas Form File 3.0
|
||||
|
||||
{ Form Form
|
||||
MoveScaled(0,0,71,64)
|
||||
Arrangement = Arrange.Fill
|
||||
Margin = True
|
||||
{ Wizard1 Wizard
|
||||
MoveScaled(4,4,64,54)
|
||||
Count = 4
|
||||
Border = False
|
||||
Animated = True
|
||||
Index = 0
|
||||
Text = ("Étape n°1")
|
||||
{ Button1 Button
|
||||
MoveScaled(19,22,17,6)
|
||||
Text = ("Button1")
|
||||
}
|
||||
Index = 1
|
||||
Text = ("Étape n°2")
|
||||
{ LCDLabel1 LCDLabel
|
||||
MoveScaled(8,9,44,16)
|
||||
Text = ("LCDLabel1")
|
||||
}
|
||||
Index = 2
|
||||
Text = ("Étape n°3")
|
||||
Index = 3
|
||||
Text = ("Étape n°4")
|
||||
Index = 0
|
||||
}
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
Export
|
||||
Inherits UserContainer
|
||||
|
||||
Public Const _Properties As String = "*,Count{Range:1;256}=1,Index,Text,TextFont,Picture,ShowTitle=True,ShowIndex=False,Border=True,ActionText,ActionPicture"
|
||||
Public Const _Properties As String = "*,Count{Range:1;256}=1,Index,Text,TextFont,Picture,ShowTitle=True,ShowIndex=False,Border=True,ActionText,ActionPicture,Animated"
|
||||
Public Const _DefaultEvent As String = "Change"
|
||||
Public Const _Similar As String = "TabStrip"
|
||||
Public Const _IsMultiContainer As Boolean = True
|
||||
@ -25,6 +25,7 @@ Property Border As Boolean
|
||||
Property TextFont As Font
|
||||
Property ActionText As String
|
||||
Property ActionPicture As Picture
|
||||
Property Animated As Boolean
|
||||
|
||||
Private $hWizard As FWizard
|
||||
Private $aStep As New _WizardContainer[]
|
||||
@ -33,6 +34,8 @@ Private $iLast As Integer = -1
|
||||
Private $bShowIndex As Boolean
|
||||
Private $sActionText As String
|
||||
Private $hActionPicture As Picture
|
||||
Private $iAllowAnimation As Integer
|
||||
Private $bAnimated As Boolean
|
||||
|
||||
Public Sub _new()
|
||||
|
||||
@ -114,6 +117,52 @@ Private Function Index_Read() As Integer
|
||||
|
||||
End
|
||||
|
||||
Private Sub DoAnimate(iSrc As Integer, iDest As Integer)
|
||||
|
||||
Dim fTime As Float
|
||||
Dim hCont As Container
|
||||
Dim hSrc As _WizardContainer
|
||||
Dim hDest As _WizardContainer
|
||||
|
||||
hCont = $hWizard.GetContainer()
|
||||
hSrc = $aStep[iSrc]
|
||||
hDest = $aStep[iDest]
|
||||
|
||||
hSrc.Show
|
||||
hDest.Show
|
||||
hSrc.Ignore = True
|
||||
hDest.Ignore = True
|
||||
|
||||
If iDest > iSrc Then
|
||||
|
||||
hDest.Move(hCont.W, 0)
|
||||
|
||||
fTime = Timer
|
||||
While hDest.X > 0
|
||||
hDest.X = Max(0, hCont.W * (1 - (Timer - fTime) * 8))
|
||||
hSrc.X = hDest.X - hCont.W
|
||||
Wait
|
||||
Wend
|
||||
|
||||
Else
|
||||
|
||||
hDest.Move(- hCont.W, 0)
|
||||
|
||||
fTime = Timer
|
||||
While hDest.X < 0
|
||||
hDest.X = Min(0, - hCont.W * (1 - (Timer - fTime) * 8))
|
||||
hSrc.X = hDest.X + hCont.W
|
||||
Wait
|
||||
Wend
|
||||
|
||||
Endif
|
||||
|
||||
hDest.Raise
|
||||
hSrc.Ignore = False
|
||||
hDest.Ignore = False
|
||||
|
||||
End
|
||||
|
||||
Private Sub Index_Write(iIndex As Integer)
|
||||
|
||||
Dim bCancel As Boolean
|
||||
@ -139,6 +188,8 @@ Private Sub Index_Write(iIndex As Integer)
|
||||
|
||||
Endif
|
||||
|
||||
If $bAnimated And If $iAllowAnimation Then DoAnimate($iCurrent, iIndex)
|
||||
|
||||
Me._Container = $aStep[iIndex]
|
||||
|
||||
$iLast = $iCurrent
|
||||
@ -239,7 +290,11 @@ End
|
||||
Public Sub Wizard_Previous()
|
||||
|
||||
Dim iInd As Integer = GetPrevious($iCurrent)
|
||||
If iInd >= 0 Then Index_Write(iInd)
|
||||
If iInd >= 0 Then
|
||||
Inc $iAllowAnimation
|
||||
Index_Write(iInd)
|
||||
Dec $iAllowAnimation
|
||||
Endif
|
||||
|
||||
End
|
||||
|
||||
@ -247,7 +302,9 @@ Public Sub Wizard_Next()
|
||||
|
||||
Dim iInd As Integer = GetNext($iCurrent)
|
||||
If iInd >= 0 Then
|
||||
Inc $iAllowAnimation
|
||||
Index_Write(iInd)
|
||||
Dec $iAllowAnimation
|
||||
Else
|
||||
Raise BeforeChange
|
||||
Raise {Close}
|
||||
@ -339,3 +396,15 @@ Private Sub ActionPicture_Write(Value As Picture)
|
||||
$hActionPicture = Value
|
||||
|
||||
End
|
||||
|
||||
Private Function Animated_Read() As Boolean
|
||||
|
||||
Return $bAnimated
|
||||
|
||||
End
|
||||
|
||||
Private Sub Animated_Write(Value As Boolean)
|
||||
|
||||
$bAnimated = Value
|
||||
|
||||
End
|
||||
|
Loading…
x
Reference in New Issue
Block a user