[DEVELOPMENT ENVIRONMENT]
* NEW: Put the WebView icon in the IDE. [GB.FORM.EDITOR] * OPT: Don't raise Cursor event if we are between calls to Begin / End or during an undo or redo process. [GB.GUI.QT.WEBKIT] * NEW: No need to put the WebView icon there. git-svn-id: svn://localhost/gambas/trunk@7367 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
afd98e3f55
commit
beeabd049f
@ -2,6 +2,7 @@
|
||||
# Compiled with Gambas 3.8.90
|
||||
Title=Gambas 3
|
||||
Startup=Project
|
||||
Profiling=1
|
||||
Icon=img/logo/logo-ide.png
|
||||
Version=3.8.90
|
||||
VersionFile=1
|
||||
|
@ -2466,8 +2466,10 @@ Public Sub OpenExternFile(Optional sPath As String)
|
||||
|
||||
If Not sPath Then
|
||||
Dialog.Title = ("Select a file")
|
||||
Dialog.Path = Settings["/OpenExtern"]
|
||||
If Dialog.OpenFile() Then Return
|
||||
sPath = Dialog.Path
|
||||
Settings["/OpenExtern"] = sPath
|
||||
Endif
|
||||
|
||||
$bInOpenExtern = True
|
||||
|
BIN
app/src/gambas3/img/control/webview.png
Normal file
BIN
app/src/gambas3/img/control/webview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
@ -353,6 +353,10 @@ HideSelection
|
||||
m
|
||||
|
||||
|
||||
_RaiseCursor
|
||||
m
|
||||
|
||||
|
||||
EnsureVisible_Timer
|
||||
m
|
||||
|
||||
|
@ -171,6 +171,8 @@ Public Sub End()
|
||||
EnableHighlight
|
||||
AddUndo(CCommand(Me, CCommand.END,, Me.Current.Column, Me.Current.Line))
|
||||
|
||||
CheckUnlock
|
||||
|
||||
End
|
||||
|
||||
Private Function Current_Read() As TextEditor
|
||||
@ -1264,6 +1266,24 @@ End
|
||||
Public Sub EnableUndo()
|
||||
|
||||
Dec $iNoUndo
|
||||
CheckUnlock
|
||||
|
||||
End
|
||||
|
||||
Public Sub IsLocked() As Boolean
|
||||
|
||||
Return $iBegin + $iNoUndo
|
||||
|
||||
End
|
||||
|
||||
Private Sub CheckUnlock()
|
||||
|
||||
Dim hView As TextEditor
|
||||
|
||||
If IsLocked() Then Return
|
||||
For Each hView In GetAllViews()
|
||||
hView._RaiseCursor
|
||||
Next
|
||||
|
||||
|
||||
End
|
@ -95,6 +95,8 @@ Private $Y As Integer
|
||||
Private $XY As Point
|
||||
Private $bShowCursor As Boolean
|
||||
Private $bHideCursor As Boolean
|
||||
Private $LX As Integer
|
||||
Private $LY As Integer
|
||||
|
||||
Private $hTimerCursor As Timer
|
||||
Private $hTimerChange As Timer
|
||||
@ -148,6 +150,7 @@ Private $bFirstFocus As Boolean
|
||||
|
||||
Private $aFold As Integer[]
|
||||
|
||||
Private $iSaveCursor As Integer
|
||||
Private $aSaveCursor As Integer[]
|
||||
Private $hFontNumber As Font
|
||||
|
||||
@ -1387,6 +1390,20 @@ Public Sub HideSelection()
|
||||
|
||||
End
|
||||
|
||||
Public Sub _RaiseCursor()
|
||||
|
||||
If $iSaveCursor Then Return
|
||||
If $X = $LX And If $Y = $LY Then Return
|
||||
If $hDoc.IsLocked() Then Return
|
||||
|
||||
$LX = $X
|
||||
$LY = $Y
|
||||
EnsureVisible
|
||||
If $bShowPosition Then UpdatePosition
|
||||
Raise Cursor
|
||||
|
||||
End
|
||||
|
||||
Public Sub Goto(NX As Integer, NY As Integer, Optional Mark As Boolean)
|
||||
|
||||
Dim bRaiseCursor As Boolean
|
||||
@ -1450,16 +1467,9 @@ Public Sub Goto(NX As Integer, NY As Integer, Optional Mark As Boolean)
|
||||
_RefreshLine($Y)
|
||||
|
||||
'$hView.EnsureVisible($XX, $hRows._GetRowY($Y), $MW + 3, $hRows._GetRowHeight($Y))
|
||||
EnsureVisible
|
||||
|
||||
CheckMatch
|
||||
|
||||
If bRaiseCursor Then
|
||||
If $bShowPosition Then
|
||||
UpdatePosition
|
||||
Endif
|
||||
Raise Cursor
|
||||
Endif
|
||||
_RaiseCursor
|
||||
|
||||
End
|
||||
|
||||
@ -4213,7 +4223,8 @@ End
|
||||
|
||||
Public Sub _SaveCursor()
|
||||
|
||||
$aSaveCursor = [$X, $Y, $SX, $SY]
|
||||
If $iSaveCursor = 0 Then $aSaveCursor = [$X, $Y, $SX, $SY]
|
||||
Inc $iSaveCursor
|
||||
|
||||
End
|
||||
|
||||
@ -4221,6 +4232,9 @@ Public Sub _RestoreCursor()
|
||||
|
||||
Dim X, Y, SX, SY As Integer
|
||||
|
||||
Dec $iSaveCursor
|
||||
If $iSaveCursor Then Return
|
||||
|
||||
X = $aSaveCursor[0]
|
||||
Y = $aSaveCursor[1]
|
||||
SX = $aSaveCursor[2]
|
||||
|
@ -44,10 +44,12 @@ Private Sub Text_Write(Value As String)
|
||||
|
||||
With GetView()
|
||||
If ._GetDocument().Lines[_Line] <> Value Then
|
||||
._SaveCursor
|
||||
.Begin
|
||||
.Remove(0, _Line, String.Len(._GetDocument().Lines[_Line]), _Line)
|
||||
.Insert(Value)
|
||||
.End
|
||||
._RestoreCursor
|
||||
Endif
|
||||
End With
|
||||
|
||||
|
@ -206,6 +206,7 @@ Public Sub View_MouseMove()
|
||||
If I = $iIndex Then Return
|
||||
|
||||
$iIndex = I
|
||||
'Debug I
|
||||
$iLastIndex = $iIndex
|
||||
|
||||
If I >= 0 Then
|
||||
@ -264,6 +265,7 @@ Public Sub View_Leave()
|
||||
|
||||
If $iIndex >= 0 Then
|
||||
$iIndex = -1
|
||||
'Debug -1
|
||||
$hView.Refresh
|
||||
Endif
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
../../../../gb.qt4/src/webkit/control/webview.png
|
Loading…
x
Reference in New Issue
Block a user