[DEVELOPMENT ENVIRONMENT]
* BUG: Use a relative font size in the workspace, toolbox and property sheet. * NEW: The file information dialog was synchronized with Gambas 2. * BUG: UTF-8 fixes in the code editor. * BUG: Help pages on special method are opened correctly now. * BUG: Breakpoint list is not filled with impossible breakpoints anymore. * BUG: The procedure combo-box now always displays the correct current procedure name. [GB.QT.EXT] * BUG: Some fixes in Editor procedure folding. git-svn-id: svn://localhost/gambas/trunk@1257 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
ab3e3d5146
commit
909ce3f531
@ -108,7 +108,7 @@ PUBLIC SUB Open(sMode AS String, OPTIONAL sClass AS String, OPTIONAL bStatic AS
|
||||
iX = hEditor.X + hEditor.CursorX - iLeft * hEditor.Font.Width("X")
|
||||
|
||||
IF sMode = "<" THEN 'Key.Code = Key.Backspace THEN
|
||||
iX = iX - hEditor.Font.Width(Mid$(hEditor.Lines[hEditor.Line].Text, hEditor.Column, 1))
|
||||
iX = iX - hEditor.Font.Width(String.Mid$(hEditor.Lines[hEditor.Line].Text, hEditor.Column, 1))
|
||||
ELSE
|
||||
iX = iX + hEditor.Font.Width(Key.Text)
|
||||
ENDIF
|
||||
|
@ -408,6 +408,7 @@ PUBLIC SUB Goto(iLine AS Integer, OPTIONAL iColumn AS Integer = -1, OPTIONAL bCe
|
||||
'DEC iLine
|
||||
IF iColumn < 0 THEN iColumn = Editor.Column
|
||||
|
||||
Editor.Lines[iLine].Expanded = TRUE
|
||||
Editor.Goto(iLine, iColumn, bCenter)
|
||||
|
||||
END
|
||||
@ -1938,7 +1939,7 @@ PRIVATE SUB CheckSignature(OPTIONAL sText AS String)
|
||||
IF NOT $bCompletion THEN RETURN
|
||||
|
||||
'sLig = Left$(edtEditor.GetPurgedLine(edtEditor.Line), edtEditor.Column) & sText
|
||||
sLig = Left$(Highlight.Purge(Editor.Lines[Editor.Line].Text), Editor.Column) & sText
|
||||
sLig = String.Left$(Highlight.Purge(Editor.Lines[Editor.Line].Text), Editor.Column) & sText
|
||||
Highlight.Analyze(sLig)
|
||||
|
||||
IF NOT IsCurrentProc() THEN
|
||||
@ -2235,7 +2236,9 @@ PUBLIC SUB Editors_MouseUp()
|
||||
IF NOT Editor.Selected THEN RETURN
|
||||
IF Editor.Selection.StartLine < Editor.Selection.EndLine THEN RETURN
|
||||
|
||||
FDebugInfo.InstantWatch(Trim(Editor.Selection.Text), Editor, Editor.CursorX + Editor.CharWidth * ((Editor.Selection.StartColumn + Editor.Selection.EndColumn) / 2 - Editor.Column), Mouse.ScreenY - Editor.ScreenY)
|
||||
FDebugInfo.InstantWatch(Trim(Editor.Selection.Text), Editor,
|
||||
Editor.CursorX + Editor.CharWidth * ((Editor.Selection.StartColumn + Editor.Selection.EndColumn) / 2 - Editor.Column),
|
||||
Mouse.ScreenY - Editor.ScreenY)
|
||||
|
||||
END
|
||||
|
||||
@ -2284,7 +2287,9 @@ PUBLIC SUB ShowMessage(sMsg AS String)
|
||||
hIcon = Picture["icon:/32/error"]
|
||||
ENDIF
|
||||
|
||||
Balloon(sMsg, Editor, hIcon, Editor.CursorX + Editor.CharWidth * ((Editor.Selection.StartColumn + Editor.Selection.EndColumn) / 2 - Editor.Column), Mouse.ScreenY - Editor.ScreenY)
|
||||
Balloon(sMsg, Editor, hIcon,
|
||||
Editor.CursorX + Editor.CharWidth * ((Editor.Selection.StartColumn + Editor.Selection.EndColumn) / 2 - Editor.Column),
|
||||
Mouse.ScreenY - Editor.ScreenY)
|
||||
|
||||
END
|
||||
|
||||
@ -2380,8 +2385,8 @@ PRIVATE SUB FillProcCombo()
|
||||
|
||||
hSymbol = cSymbol[sName]
|
||||
cmbProc.Add(sName)
|
||||
$cProc[hSymbol.Name] = hSymbol.LineNumber
|
||||
$iFirstProcLine = Min($iFirstProcLine, hSymbol.LineNumber)
|
||||
$cProc[hSymbol.Name] = hSymbol.LineNumber - 1
|
||||
$iFirstProcLine = Min($iFirstProcLine, hSymbol.LineNumber - 1)
|
||||
|
||||
NEXT
|
||||
|
||||
@ -2423,11 +2428,11 @@ PUBLIC SUB GotoProc(iLine AS Integer)
|
||||
IF sLine THEN BREAK
|
||||
LOOP
|
||||
|
||||
IF UCase(sLine) = "END" THEN
|
||||
IF UCase(sLine) = "END" OR IF UCase(sLine) = "END SUB" THEN
|
||||
iLine = Min(iStart + 2, iLine - 1)
|
||||
ENDIF
|
||||
|
||||
iCol = Len(Editor.Lines[iLine].Text) - Len(LTrim(Editor.Lines[iLine].Text))
|
||||
iCol = String.Len(Editor.Lines[iLine].Text) - String.Len(LTrim(Editor.Lines[iLine].Text))
|
||||
|
||||
ME.GotoCenter(iLine, iCol, TRUE)
|
||||
Editor.SetFocus
|
||||
@ -2560,3 +2565,14 @@ PUBLIC SUB mnuLastPosition_Click()
|
||||
Project.LastPosition
|
||||
|
||||
END
|
||||
|
||||
' PUBLIC SUB GetFoldedProc() AS Integer[]
|
||||
'
|
||||
' DIM aFold AS NEW Integer[]
|
||||
' DIM iLine AS Integer
|
||||
'
|
||||
' DO
|
||||
' IF Editor.Lines[iLine].
|
||||
' LOOP
|
||||
'
|
||||
' END
|
||||
|
@ -154,9 +154,9 @@ PUBLIC SUB Run()
|
||||
IF Left(sPath) <> "$" THEN
|
||||
|
||||
IF sPath = Project.Dir THEN
|
||||
hPict = Project.GetIcon(Project.Dir, 16)
|
||||
hPict = Project.GetIcon(Project.Dir, 32)
|
||||
ELSE
|
||||
hPict = Project.GetFileIcon(sPath, 16)
|
||||
hPict = Project.GetFileIcon(sPath, 32)
|
||||
ENDIF
|
||||
|
||||
picInfo.Picture = hPict
|
||||
|
@ -10,104 +10,113 @@
|
||||
Spacing = 8
|
||||
Padding = 8
|
||||
{ panInfo Panel
|
||||
MoveScaled(1,1,35,4)
|
||||
MoveScaled(1,1,35,5)
|
||||
Arrangement = Arrange.Horizontal
|
||||
Spacing = 4
|
||||
Padding = 4
|
||||
Border = Border.Sunken
|
||||
AutoResize = True
|
||||
Spacing = 8
|
||||
{ picInfo PictureBox
|
||||
MoveScaled(0,0,4,3)
|
||||
Alignment = Align.Center
|
||||
MoveScaled(0,0,6,4)
|
||||
}
|
||||
{ lblName Label
|
||||
MoveScaled(8,1,18,2)
|
||||
Font = Font["Bold"]
|
||||
Expand = True
|
||||
AutoResize = True
|
||||
Text = ("")
|
||||
}
|
||||
}
|
||||
{ HBox5 HBox
|
||||
MoveScaled(1,6,35,3)
|
||||
Spacing = 8
|
||||
{ Label5 Label
|
||||
MoveScaled(0,0,12,3)
|
||||
Font = Font["Bold"]
|
||||
Text = ("Link to")
|
||||
}
|
||||
{ lblLink TextBox
|
||||
MoveScaled(14,0,18,3)
|
||||
Background = Color.Background
|
||||
Foreground = Color.Foreground
|
||||
Expand = True
|
||||
Text = ("")
|
||||
ReadOnly = True
|
||||
Border = False
|
||||
}
|
||||
{ Panel2 Panel
|
||||
MoveScaled(23,7,3,1)
|
||||
}
|
||||
{ HBox1 HBox
|
||||
MoveScaled(1,10,35,3)
|
||||
Spacing = 8
|
||||
{ Label1 Label
|
||||
MoveScaled(0,0,12,3)
|
||||
Font = Font["Bold"]
|
||||
Text = ("Type")
|
||||
}
|
||||
{ lblType Label
|
||||
MoveScaled(16,0,16,3)
|
||||
Expand = True
|
||||
Text = ("")
|
||||
}
|
||||
}
|
||||
{ HBox3 HBox
|
||||
MoveScaled(1,14,35,3)
|
||||
Spacing = 8
|
||||
{ Label2 Label
|
||||
MoveScaled(0,0,12,3)
|
||||
Font = Font["Bold"]
|
||||
Text = ("Size")
|
||||
}
|
||||
{ lblSize Label
|
||||
MoveScaled(16,0,16,3)
|
||||
Expand = True
|
||||
Text = ("")
|
||||
}
|
||||
}
|
||||
{ HBox4 HBox
|
||||
MoveScaled(1,18,35,3)
|
||||
Spacing = 8
|
||||
{ Label3 Label
|
||||
MoveScaled(0,0,12,3)
|
||||
Font = Font["Bold"]
|
||||
Text = ("Last modified")
|
||||
}
|
||||
{ lblTime Label
|
||||
MoveScaled(16,0,16,3)
|
||||
Expand = True
|
||||
Text = ("")
|
||||
}
|
||||
}
|
||||
{ HBox6 HBox
|
||||
MoveScaled(1,22,35,3)
|
||||
{ VBox1 VBox
|
||||
MoveScaled(1,7,45,22)
|
||||
Expand = True
|
||||
Spacing = 8
|
||||
{ Label4 Label
|
||||
MoveScaled(0,0,12,3)
|
||||
Font = Font["Bold"]
|
||||
Text = ("Details")
|
||||
Alignment = Align.TopNormal
|
||||
}
|
||||
{ lblInfo TextLabel
|
||||
MoveScaled(18,0,14,3)
|
||||
Expand = True
|
||||
Spacing = 4
|
||||
{ HBox5 HBox
|
||||
MoveScaled(1,1,35,3)
|
||||
AutoResize = True
|
||||
Text = ("")
|
||||
Spacing = 8
|
||||
{ Label5 Label
|
||||
MoveScaled(0,0,12,3)
|
||||
Font = Font["Bold"]
|
||||
Text = ("Link to")
|
||||
}
|
||||
{ lblLink TextBox
|
||||
MoveScaled(14,0,18,3)
|
||||
Background = Color.Background
|
||||
Foreground = Color.Foreground
|
||||
Expand = True
|
||||
Text = ("")
|
||||
ReadOnly = True
|
||||
Border = False
|
||||
}
|
||||
}
|
||||
{ HBox1 HBox
|
||||
MoveScaled(1,5,35,3)
|
||||
AutoResize = True
|
||||
Spacing = 8
|
||||
{ Label1 Label
|
||||
MoveScaled(0,0,12,3)
|
||||
Font = Font["Bold"]
|
||||
Text = ("Type")
|
||||
}
|
||||
{ lblType Label
|
||||
MoveScaled(16,0,16,3)
|
||||
Expand = True
|
||||
Text = ("")
|
||||
}
|
||||
}
|
||||
{ HBox3 HBox
|
||||
MoveScaled(1,9,35,3)
|
||||
AutoResize = True
|
||||
Spacing = 8
|
||||
{ Label2 Label
|
||||
MoveScaled(0,0,12,3)
|
||||
Font = Font["Bold"]
|
||||
Text = ("Size")
|
||||
}
|
||||
{ lblSize Label
|
||||
MoveScaled(16,0,16,3)
|
||||
Expand = True
|
||||
Text = ("")
|
||||
}
|
||||
}
|
||||
{ HBox4 HBox
|
||||
MoveScaled(1,13,35,3)
|
||||
AutoResize = True
|
||||
Spacing = 8
|
||||
{ Label3 Label
|
||||
MoveScaled(0,0,12,3)
|
||||
Font = Font["Bold"]
|
||||
Text = ("Last modified")
|
||||
}
|
||||
{ lblTime Label
|
||||
MoveScaled(16,0,16,3)
|
||||
Expand = True
|
||||
Text = ("")
|
||||
}
|
||||
}
|
||||
{ HBox6 HBox
|
||||
MoveScaled(1,17,35,3)
|
||||
Expand = True
|
||||
Spacing = 8
|
||||
{ Label4 Label
|
||||
MoveScaled(0,0,12,3)
|
||||
Font = Font["Bold"]
|
||||
Text = ("Details")
|
||||
Alignment = Align.TopNormal
|
||||
}
|
||||
{ lblInfo TextLabel
|
||||
MoveScaled(18,0,14,3)
|
||||
Expand = True
|
||||
AutoResize = True
|
||||
Text = ("")
|
||||
}
|
||||
}
|
||||
}
|
||||
{ HBox2 HBox
|
||||
MoveScaled(1,28,36,3)
|
||||
MoveScaled(1,32,36,3)
|
||||
{ Panel1 Panel
|
||||
MoveScaled(5,0,3,2)
|
||||
MoveScaled(5,1,3,2)
|
||||
Expand = True
|
||||
}
|
||||
{ btnClose Button
|
||||
|
@ -666,7 +666,7 @@
|
||||
Arrangement = Arrange.Vertical
|
||||
{ wrkProject Workspace
|
||||
MoveScaled(1,2,19,30)
|
||||
Font = Font["8"]
|
||||
Font = Font["-1"]
|
||||
Expand = True
|
||||
}
|
||||
{ panDebug SidePanel
|
||||
@ -686,7 +686,7 @@
|
||||
Hidden = True
|
||||
{ tabProperty TabStrip
|
||||
MoveScaled(4,0,26,4)
|
||||
Font = Font["8"]
|
||||
Font = Font["-1"]
|
||||
Arrangement = Arrange.Fill
|
||||
Count = 2
|
||||
Index = 0
|
||||
|
@ -7,7 +7,7 @@
|
||||
Arrangement = Arrange.Fill
|
||||
{ tabTool TabStrip
|
||||
MoveScaled(1,1,33,45)
|
||||
Font = Font["8"]
|
||||
Font = Font["-1"]
|
||||
Arrangement = Arrange.Fill
|
||||
Padding = 2
|
||||
Index = 0
|
||||
|
@ -29,6 +29,7 @@ PRIVATE SUB FormatName(sName AS String) AS String
|
||||
sName = LCase(sName)
|
||||
sName = Replace(sName, "_", "+")
|
||||
sName = Replace(sName, "/.", "/_")
|
||||
sName = Replace(sName, "/+", "/_")
|
||||
sName = Replace(sName, ".", "+")
|
||||
sName = Replace(sName, ":", "+")
|
||||
|
||||
|
@ -325,6 +325,12 @@ BEGIN_METHOD(CEDITOR_find_next_breakpoint, GB_INTEGER line)
|
||||
|
||||
END_METHOD
|
||||
|
||||
BEGIN_METHOD(CEDITOR_find_next_limit, GB_INTEGER line)
|
||||
|
||||
GB.ReturnInteger(DOC->getNextLimit(VARG(line)));
|
||||
|
||||
END_METHOD
|
||||
|
||||
BEGIN_METHOD(CEDITOR_find_next_word, GB_STRING word; GB_INTEGER line)
|
||||
|
||||
int line = VARG(line);
|
||||
@ -893,6 +899,7 @@ GB_DESC CEditorLineDesc[] =
|
||||
GB_PROPERTY("Expanded", "b", CEDITOR_line_expanded),
|
||||
GB_PROPERTY("Current", "b", CEDITOR_line_current),
|
||||
GB_PROPERTY("Breakpoint", "b", CEDITOR_line_breakpoint),
|
||||
GB_PROPERTY_READ("Limit", "b", CEDITOR_line_limit),
|
||||
|
||||
GB_END_DECLARE
|
||||
};
|
||||
@ -1020,6 +1027,8 @@ GB_DESC CEditorDesc[] =
|
||||
|
||||
GB_METHOD("FindNextBreakpoint", "i", CEDITOR_find_next_breakpoint, "(Line)i"),
|
||||
GB_METHOD("FindNextWord", "i", CEDITOR_find_next_word, "(Word)s(Line)i"),
|
||||
GB_METHOD("FindNextLimit", "i", CEDITOR_find_next_limit, "(Line)i"),
|
||||
//GB_METHOD("FindPreviousLimit", "i", CEDITOR_find_next_limit, "(Line)i"),
|
||||
|
||||
GB_EVENT("Cursor", NULL, NULL, &EVENT_Cursor),
|
||||
GB_EVENT("Scroll", NULL, NULL, &EVENT_Scroll),
|
||||
|
@ -1336,7 +1336,8 @@ void GEditor::mouseDoubleClickEvent(QMouseEvent *e)
|
||||
else
|
||||
unfoldAll();
|
||||
}
|
||||
emit marginDoubleClicked(ny);
|
||||
else
|
||||
emit marginDoubleClicked(ny);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1473,6 +1474,8 @@ void GEditor::setNumRows(int n)
|
||||
{
|
||||
n = realToView(n - 1) + 1;
|
||||
QGridView::setNumRows(n);
|
||||
QGridView::updateScrollBars();
|
||||
updateLength();
|
||||
if (contentsHeight() < visibleHeight())
|
||||
repaintContents(contentsX(), contentsHeight(), visibleWidth(), visibleHeight() - contentsHeight() + contentsX(), true);
|
||||
//if (contentsHeight() < visibleHeight())
|
||||
@ -1612,7 +1615,7 @@ int GEditor::checkCursor(int y)
|
||||
return ny;
|
||||
}
|
||||
|
||||
void GEditor::foldLine(int row)
|
||||
void GEditor::foldLine(int row, bool no_refresh)
|
||||
{
|
||||
uint i;
|
||||
int pos;
|
||||
@ -1656,8 +1659,11 @@ void GEditor::foldLine(int row)
|
||||
if (ny != y)
|
||||
cursorGoto(ny, x, false);
|
||||
|
||||
setNumRows(numLines());
|
||||
redrawContents();
|
||||
if (!no_refresh)
|
||||
{
|
||||
setNumRows(numLines());
|
||||
redrawContents();
|
||||
}
|
||||
}
|
||||
|
||||
void GEditor::unfoldLine(int row)
|
||||
@ -1781,11 +1787,14 @@ void GEditor::foldAll()
|
||||
row = 0;
|
||||
for(;;)
|
||||
{
|
||||
foldLine(row);
|
||||
foldLine(row, true);
|
||||
row = doc->getNextLimit(row);
|
||||
if (row < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
setNumRows(numLines());
|
||||
updateContents();
|
||||
}
|
||||
|
||||
void GEditor::unfoldAll()
|
||||
|
@ -196,7 +196,7 @@ public:
|
||||
void ensureCursorVisible();
|
||||
|
||||
void foldClear() { fold.clear(); }
|
||||
void foldLine(int row);
|
||||
void foldLine(int row, bool no_refresh = false);
|
||||
void foldAll();
|
||||
void unfoldAll();
|
||||
void unfoldLine(int row);
|
||||
|
Loading…
x
Reference in New Issue
Block a user