GitLab Commit is coming up on August 3-4. Learn how to innovate together using GitLab, the DevOps platform. Register for free: gitlabcommitvirtual2021.com

Commits (15)
......@@ -3,7 +3,7 @@ Title=Gambas Wiki Web Application
Startup=Main
UseHttpServer=1
Icon=icon.png
Version=3.14.90
Version=3.15.90
VersionFile=1
Component=gb.db
Component=gb.net
......
......@@ -49,10 +49,10 @@ Static Public Sub Init()
$cImplement.Clear
$cRescue["3.0:Form"] = "gb.qt4"
$cRescue["3.0:OpenGLViewer"] = "gb.qt4.opengl"
$cRescue["3.0:Form"] = "gb.qt5"
$cRescue["3.0:OpenGLViewer"] = "gb.qt5.opengl"
$cRescue["3.0:ImageIO"] = "gb.image.io"
$cRescue["3.0:EventLoop"] = "gb.qt4"
$cRescue["3.0:EventLoop"] = "gb.qt5"
$cRescue["3.0:XML"] = "gb.xml"
$cFeatures["form"] = ("Graphical form management")
......@@ -528,6 +528,13 @@ Static Private Sub CreateClass(sClass As String, sParent As String, sComp As Str
End
Static Private Sub SubstInfo(sKey As String) As String
If sKey Begins "gb.qt4" Then sKey = Replace(sKey, "gb.qt4", "gb.qt5")
Return sKey
End
Public Sub Load()
Dim aLine As String[]
......@@ -548,6 +555,7 @@ Public Sub Load()
Dim sElt As String
Dim cCycle As Collection
Dim I As Integer
Dim sInfo As String
If $bLoaded Then Return
......@@ -583,10 +591,12 @@ Public Sub Load()
'sPath = Main.InfoFilePath &/ Name & ".info"
sInfo = SubstInfo(Key)
If Main.InfoDir Then
sPath = Main.InfoDir &/ Key & ".info"
sPath = Main.InfoDir &/ sInfo & ".info"
Else
sPath = System.Path &/ "share/gambas" & System.Version &/ "info" &/ Key & ".info"
sPath = System.Path &/ "share/gambas" & System.Version &/ "info" &/ sInfo & ".info"
Endif
If Not Exist(sPath) Then
......
......@@ -91,6 +91,7 @@ Public Sub Command(sCommand As String) As String[]
Dim aClass As String[]
Dim aSearch As String[]
Dim sLink As String
Dim sSort As String
aArg = Split(sCommand, " ", Chr$(34))
sCommand = aArg[0]
......@@ -107,6 +108,8 @@ Public Sub Command(sCommand As String) As String[]
For I = 1 To aArg.Max
If aArg[I] Begins "col=" Then
Try NC = CInt(Mid$(aArg[I], 5))
aArg.Remove(I)
Break
Endif
Next
......@@ -120,19 +123,20 @@ Public Sub Command(sCommand As String) As String[]
sTitle = Main.GetPageTitle(sPath)
If aArg.Count > 2 And If Comp(Left(sTitle, Len(aArg[2])), aArg[2], gb.Language + gb.IgnoreCase) = 0 Then sTitle = LTrim(Mid$(sTitle, Len(aArg[2]) + 1))
sSort = sTitle
Do
sLetter = String.Left(sTitle)
sLetter = String.Left(sSort)
If Len(sLetter) > 1 Then Break
If Not IsPunct(sLetter) Then Break
If Not sTitle Then Break
sTitle = String.Mid$(sTitle, 2)
sSort = String.Mid$(sSort, 2)
Loop
If Not sTitle Then sTitle = " "
If Not sSort Then sSort = " "
If aDir.Exist(sTitle & "\n*", gb.Like) Then Continue
If aDir.Exist(sSort & "\n" & sTitle & "\n*", gb.Like) Then Continue
aDir.Add(sTitle & "\n[" & sPath & "]")
aDir.Add(sSort & "\n" & sTitle & "\n[" & sPath & "]")
Next
If aDir.Count Then
......@@ -294,6 +298,7 @@ MAKE_INDEX_LETTER:
For J = J To J + N - 1
If J >= I Then Break
iPos = InStr(aDir[J], "\n")
iPos = InStr(aDir[J], "\n", iPos + 1)
aResult.Add(Mid$(aDir[J], iPos + 1) & "\\")
Next
......
......@@ -10,7 +10,7 @@
Arrangement = Arrange.Fill
{ panComp Panel
MoveScaled(1,1,67,15)
Background = Color.Background
Background = Color.TextBackground
Arrangement = Arrange.Horizontal
Border = Border.Plain
{ gvwComp GridView
......@@ -28,16 +28,16 @@
Expand = True
NoHeader = True
}
{ panResizeTop Panel
MoveScaled(64,1,2,2)
Mouse = Mouse.SizeNESW
Ignore = True
}
{ panResizeBottom Panel
MoveScaled(64,12,2,2)
Mouse = Mouse.SizeNWSE
Ignore = True
}
{ panResizeTop Panel
MoveScaled(64,1,2,2)
Mouse = Mouse.SizeNESW
Ignore = True
}
{ timHideLater #Timer
#MoveScaled(0,8)
}
......
......@@ -5654,7 +5654,7 @@ Public Sub SetCurrentPopup(hMenu As Menu)
Try $hCurrentPopup.Enabled = False
$hCurrentPopup = hMenu
Try $hCurrentPopup.Enabled = True
'Debug $hCurrentPopup.Name;; $hCurrentPopup.Window.Title
'Debug $hCurrentPopup.Window.Name; "."; $hCurrentPopup.Name
End
......
......@@ -1047,7 +1047,7 @@ Public Sub btnImport_Click()
DisplayTrans
$bModify = True
SaveTranslate
SetLang($sLang)
Dec Application.Busy
......
app/src/gambas3/img/32/do-not-translate.png

433 Bytes | W: | H:

app/src/gambas3/img/32/do-not-translate.png

156 Bytes | W: | H:

app/src/gambas3/img/32/do-not-translate.png
app/src/gambas3/img/32/do-not-translate.png
app/src/gambas3/img/32/do-not-translate.png
app/src/gambas3/img/32/do-not-translate.png
  • 2-up
  • Swipe
  • Onion skin
app/src/gambas3/img/symbol/method.png

313 Bytes | W: | H:

app/src/gambas3/img/symbol/method.png

313 Bytes | W: | H:

app/src/gambas3/img/symbol/method.png
app/src/gambas3/img/symbol/method.png
app/src/gambas3/img/symbol/method.png
app/src/gambas3/img/symbol/method.png
  • 2-up
  • Swipe
  • Onion skin
app/src/gambas3/img/symbol/s-method.png

390 Bytes | W: | H:

app/src/gambas3/img/symbol/s-method.png

384 Bytes | W: | H:

app/src/gambas3/img/symbol/s-method.png
app/src/gambas3/img/symbol/s-method.png
app/src/gambas3/img/symbol/s-method.png
app/src/gambas3/img/symbol/s-method.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -550,7 +550,7 @@ Private Sub DrawText(sText As String, SX As Integer, X As Integer, Y As Integer)
End
Private Sub DrawMatch(X As Integer, Y As Integer, H As Integer, XM As Integer, YM As Integer)
Private Sub DrawMatch(X As Integer, Y As Integer, H As Integer, XM As Integer, YM As Integer, bOther As Boolean)
'Dim sCar As String
Dim XY As Point
......@@ -559,8 +559,11 @@ Private Sub DrawMatch(X As Integer, Y As Integer, H As Integer, XM As Integer, Y
If Not $bShowCursor Then Return
XY = LinePos(YM, XM)
WW = TextWidth($hDoc.Lines[YM], XM + 1, 1)
'Paint.FillRect(X + XY.X, Y + XY.Y + H - 1, WW, 1, $iForeground)
Paint.FillRect(X + XY.X, Y + XY.Y, WW, H, $iMatchColor)
If bOther Then
Paint.FillRect(X + XY.X, Y + XY.Y, WW, H, $iMatchColor)
Else
Paint.FillRect(X + XY.X, Y + XY.Y + H - 2, WW, 2, $iMatchColor)
Endif
End
......@@ -1064,8 +1067,8 @@ Private Sub DrawLine(X As Integer, Y As Integer, Width As Integer, Height As Int
' Matching characters
If $YM >= 0 Then
If Row = $YMO Then DrawMatch(X, Y, H, $XMO, $YMO)
If Row = $YM Then DrawMatch(X, Y, H, $XM, $YM)
If Row = $YMO Then DrawMatch(X, Y, H, $XMO, $YMO, False)
If Row = $YM Then DrawMatch(X, Y, H, $XM, $YM, True)
Endif
' Text
......@@ -1882,6 +1885,9 @@ Public Sub View_KeyPress()
Case Key.Insert
Me.Overwrite = Not $bOverwrite
Case Else
Stop Event
End Select
STOP_EVENT:
......
......@@ -12,9 +12,34 @@ Public Sub _new()
$aStyle = New TextEditorStyle[32]
$aStyle[Highlight.Background] = New TextEditorStyle(Color.White) As "Style"
$aStyle[Highlight.Normal] = New TextEditorStyle(Color.Black) As "Style"
$aStyle[Highlight.Keyword] = New TextEditorStyle(Color.Black, True) As "Style"
' $aStyle[Highlight.Background] = New TextEditorStyle(Color.White) As "Style"
' $aStyle[Highlight.Normal] = New TextEditorStyle(Color.Black) As "Style"
' $aStyle[Highlight.Keyword] = New TextEditorStyle(Color.Black, True) As "Style"
' $aStyle[Highlight.Datatype] = New TextEditorStyle(&HDF6B00&, True) As "Style"
' $aStyle[Highlight.Function] = New TextEditorStyle(&H3398C3&, True) As "Style"
' $aStyle[Highlight.Operator] = New TextEditorStyle(Color.Black, True) As "Style"
' $aStyle[Highlight.Symbol] = New TextEditorStyle(Color.Black) As "Style"
' $aStyle[Highlight.Number] = New TextEditorStyle(&HFF0000&, True) As "Style"
' $aStyle[Highlight.String] = New TextEditorStyle(&H7F0000&) As "Style"
' $aStyle[Highlight.Comment] = New TextEditorStyle(&H888888&, False) As "Style"
' $aStyle[Highlight.Help] = New TextEditorStyle(&H888888&, True) As "Style"
' $aStyle[Highlight.Preprocessor] = New TextEditorStyle(&H006E28&, True) As "Style"
' $aStyle[Highlight.Breakpoint] = New TextEditorStyle(&HFF5F5F&) As "Style"
' $aStyle[Highlight.Current] = New TextEditorStyle(&H42C9FF&) As "Style"
' $aStyle[Highlight.Selection] = New TextEditorStyle(&HC3EDFF&) As "Style"
' $aStyle[Highlight.Highlight] = New TextEditorStyle(&H7FFF00&) As "Style"
' $aStyle[Highlight.CurrentLine] = New TextEditorStyle(&HE7F3FF&) As "Style"
' $aStyle[Highlight.Error] = New TextEditorStyle(&HBF0303&, False, True) As "Style"
' $aStyle[Highlight.Escape] = New TextEditorStyle(&H7F0000&, True, False, True) As "Style"
' $aStyle[Highlight.Label] = New TextEditorStyle(Color.Black, False, False, True) As "Style"
' $aStyle[Highlight.Constant] = New TextEditorStyle(&HA00000&, True) As "Style"
' $aStyle[Highlight.Alternate] = New TextEditorStyle(&HE0E0E0&) As "Style"
' $aStyle[Highlight.Added] = New TextEditorStyle(&00FF00) As "Style"
' $aStyle[Highlight.Removed] = New TextEditorStyle(&FF8080) As "Style"
$aStyle[Highlight.Background] = New TextEditorStyle(Color.TextBackground) As "Style"
$aStyle[Highlight.Normal] = New TextEditorStyle(Color.TextForeground) As "Style"
$aStyle[Highlight.Keyword] = New TextEditorStyle(Color.TextForeground, True) As "Style"
$aStyle[Highlight.Datatype] = New TextEditorStyle(&HDF6B00&, True) As "Style"
$aStyle[Highlight.Function] = New TextEditorStyle(&H3398C3&, True) As "Style"
$aStyle[Highlight.Operator] = New TextEditorStyle(Color.Black, True) As "Style"
......@@ -26,9 +51,9 @@ Public Sub _new()
$aStyle[Highlight.Preprocessor] = New TextEditorStyle(&H006E28&, True) As "Style"
$aStyle[Highlight.Breakpoint] = New TextEditorStyle(&HFF5F5F&) As "Style"
$aStyle[Highlight.Current] = New TextEditorStyle(&H42C9FF&) As "Style"
$aStyle[Highlight.Selection] = New TextEditorStyle(&HC3EDFF&) As "Style"
$aStyle[Highlight.Selection] = New TextEditorStyle(Color.SelectedBackground) As "Style"
$aStyle[Highlight.Highlight] = New TextEditorStyle(&H7FFF00&) As "Style"
$aStyle[Highlight.CurrentLine] = New TextEditorStyle(&HE7F3FF&) As "Style"
$aStyle[Highlight.CurrentLine] = New TextEditorStyle(Color.LightBackground) As "Style"
$aStyle[Highlight.Error] = New TextEditorStyle(&HBF0303&, False, True) As "Style"
$aStyle[Highlight.Escape] = New TextEditorStyle(&H7F0000&, True, False, True) As "Style"
$aStyle[Highlight.Label] = New TextEditorStyle(Color.Black, False, False, True) As "Style"
......
......@@ -29,7 +29,7 @@ End
Public Sub Form_Open()
Debug Style.ScrollbarSize
'Debug Style.ScrollbarSize
Application.Animations = True
Application.Shadows = True
......
......@@ -44,7 +44,7 @@
Expand = True
{ TextEditor1 TextEditor
MoveScaled(14,5,47,33)
Font = Font["Go Mono,10"]
Font = Font["Gambas"]
Background = Color.TextBackground
Border = False
Mode = "Gambas"
......
# Gambas Project File 3.0
Title=Common controls and classes for GUI components
Startup=FPaint
Startup=Main
Version=3.15.90
VersionFile=1
Component=gb.image
Component=gb.gui
Component=gb.settings
ArgumentList=[["-style=oxygen"],["-style=qtcurve"]]
Environment="GB_JIT_DEBUG=1\nGB_GUI=gb.gtk3\nLIBOVERLAY_SCROLLBAR=0"
Environment="GB_JIT_DEBUG=1\nGB_GUI=gb.gtk3\nLIBOVERLAY_SCROLLBAR=0\n GTK_DEBUG=interactive"
TabSize=2
Translate=1
Language=en
......
......@@ -417,8 +417,6 @@ Public Sub ScrollArea_Draw()
Dim iBgSel As Integer
Dim iPadding As Integer
'Debug Me.Font.ToString();; Draw.Font.ToString()
If $iBg <> Color.Transparent Then
If $iBg = Color.Default Then
iBg = Color.TextBackground
......
......@@ -33,15 +33,9 @@
Public Sub Main()
' Dim hImage As Image
'
' hImage = New Image(256, 256, Color.Transparent)
' Paint.Begin(hImage)
' Paint.Background = Color.Red
' Paint.Cross(16, 16, 224, 224, 64)
' Paint.Fill
' Paint.End
' hImage.Save("~/test.png")
Component.Load("gb.form")
'Message.Question("Ceci est un très long message qui doit permettre de tester la nouvelle disposition des boutons des boites de dialogues affichant des messages.", "Oui", "Non", "Peut-être")
Message.Question("Ceci est un message.") ', "Oui", "Non", "Peut-être")
End
......
......@@ -4,6 +4,7 @@ Static Private $iButton As Integer
Public Sub Run(sIcon As String, sText As String, aButton As String[]) As Integer
Dim DS As Integer = Desktop.Scale
Dim sTitle As String
Dim hPict As Picture
Dim H As Integer
......@@ -13,6 +14,7 @@ Public Sub Run(sIcon As String, sText As String, aButton As String[]) As Integer
Dim iBusy As Integer
Dim WB As Integer
Dim HT As Integer
Dim hSpace As Spring
sTitle = Message.Title
If Not sTitle Then sTitle = Application.Title
......@@ -33,14 +35,10 @@ Public Sub Run(sIcon As String, sText As String, aButton As String[]) As Integer
If Not hPict Then hPict = Picture["./gb.gui.base/message/info.png"]
picMessage.Picture = hPict
hPict = Picture["icon:/small/copy"]
If Not hPict Then hPict = Picture["./gb.gui.base/message/copy.png"]
btnCopy.Picture = hPict
sText = Replace(sText, "\n", "<br>")
txtMessage.Ignore = True
txtMessage.W = Screen.AvailableWidth \ 3
txtMessage.W = Screen.AvailableWidth \ 4
txtMessage.Text = sText
txtMessage.Adjust
HT = txtMessage.H
......@@ -51,16 +49,17 @@ Public Sub Run(sIcon As String, sText As String, aButton As String[]) As Integer
hButton = New Button(panButton) As "Button"
hButton.Tag = I
hButton.Text = aButton[I]
hButton.W = Max(Desktop.Scale * 14, hButton.Font.TextWidth(hButton.Text) + Desktop.Scale * 2)
hButton.W = Max(DS * 14, hButton.Font.TextWidth(hButton.Text) + DS * 2)
H = Max(H, hButton.Font.TextHeight(hButton.Text))
WB += hButton.W + Desktop.Scale
WB += hButton.W + DS
If I = 0 Then hButton.SetFocus()
If I = aButton.Max Then hButton.Cancel = True
Next
panButton.H = Max(H, Desktop.Scale * 4)
hSpace = New Spring(panButton)
panButton.H = Max(H, DS * 4)
W = Max(txtMessage.W + 1, WB) + picMessage.W + Desktop.Scale * 4
H = Max(Desktop.Scale * 8, HT) + panButton.H + Desktop.Scale * 5
W = Max(DS * 32, Max(txtMessage.W + 1, WB) + picMessage.W + DS * 4)
H = Max(DS * 8, HT) + panButton.H + DS * 5
Me.Resize(W, H)
......@@ -98,9 +97,10 @@ Public Sub Form_KeyPress()
End
Public Sub btnCopy_Click()
Public Sub mnuCopy_Click()
Component.Load("gb.util")
Clipboard.Copy(String.FromHTML(txtMessage.Text))
End
# Gambas Form File 3.0
{ Form Form
MoveScaled(0,0,64,18)
MoveScaled(0,0,69,31)
Resizable = False
Arrangement = Arrange.Vertical
Margin = True
{ mnuPopup Menu
Text = ("Menu1")
Visible = False
{ mnuCopy Menu
Text = ("Copy message")
Shortcut = "Ctrl+C"
}
}
{ panMessage HBox
MoveScaled(1,1,58,8)
MoveScaled(1,1,65,20)
Expand = True
{ Panel3 Panel
MoveScaled(0,0,8,9)
MoveScaled(1,1,8,17)
{ picMessage PictureBox
MoveScaled(0,0,8,8)
Mode = PictureBox.Fill
}
}
{ Panel2 Panel
MoveScaled(10,2,2,4)
MoveScaled(10,2,1,4)
}
{ txtMessage TextLabel
MoveScaled(16,0,41,4)
{ Panel4 VBox
MoveScaled(14,1,43,18)
Expand = True
PopupMenu = "mnuPopup"
{ txtMessage TextLabel
MoveScaled(1,1,41,4)
Expand = True
}
}
}
{ Panel5 Panel
MoveScaled(30,22,7,2)
}
{ panButton HBox
MoveScaled(1,13,62,4)
MoveScaled(11,25,37,4)
Spacing = True
{ btnCopy ToolButton
MoveScaled(2,0,4,4)
ToolTip = ("Copy message")
}
{ Panel1 Panel
MoveScaled(9,0,4,4)
MoveScaled(2,0,4,4)
Expand = True
}
}
......
......@@ -190,13 +190,12 @@ RETRY:
W = Me.Width - FW * 2
H = Me.Height - FW * 2
'Debug W;; H;; "/";; $W;; $H;; bHBarAllowed;; bVBarAllowed
If W >= $W And If H >= $H Then
$hHBar.MinValue = 0
'$hHBar.MinValue = 0
$hHBar.MaxValue = 0
$hVBar.MinValue = 0
'$hVBar.MinValue = 0
$hVBar.MaxValue = 0
'$hHBar.Hide
'$hVBar.Hide
......@@ -205,10 +204,10 @@ RETRY:
Else If bHBarAllowed And If $W > W And If $H <= (H - SB - SP) Then
$hHBar.MinValue = 0
'$hHBar.MinValue = 0
$hHBar.MaxValue = $W - W
$hHBar.PageStep = W
$hVBar.MinValue = 0
'$hVBar.MinValue = 0
$hVBar.MaxValue = 0
'$hHBar.Show
'$hVBar.Hide
......@@ -217,10 +216,10 @@ RETRY:
Else If bVBarAllowed And If $H > H And If $W <= (W - SB - SP) Then
$hVBar.MinValue = 0
'$hVBar.MinValue = 0
$hVBar.MaxValue = $H - H
$hVBar.PageStep = H
$hHBar.MinValue = 0
'$hHBar.MinValue = 0
$hHBar.MaxValue = 0
'$hHBar.Hide
'$hVBar.Show
......@@ -229,7 +228,7 @@ RETRY:
Else
$hHBar.MinValue = 0
'$hHBar.MinValue = 0
If bVBarAllowed Then
P = W - SB - SP
Else
......@@ -242,12 +241,12 @@ RETRY:
bHBarVisible = bHBarAllowed
Else
'$hHBar.Hide
$hHBar.MinValue = 0
'$hHBar.MinValue = 0
$hHBar.MaxValue = 0
bHBarVisible = False
Endif
$hVBar.MinValue = 0
'$hVBar.MinValue = 0
If bHBarAllowed Then
P = H - SB - SP
Else
......@@ -260,7 +259,7 @@ RETRY:
bVBarVisible = bVBarAllowed
Else
'$hVBar.Hide
$hVBar.MinValue = 0
'$hVBar.MinValue = 0
$hVBar.MaxValue = 0
bVBarVisible = False
Endif
......
......@@ -54,15 +54,6 @@
#include <stdarg.h>
#include <string.h>
#ifdef PACKAGE_NAME
#undef PACKAGE_NAME
#undef PACKAGE_BUGREPORT
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#undef PACKAGE_URL
#endif
#ifdef Max
#undef Max
#endif
......