diff --git a/kpad/.project b/kpad/.project index 5d949d3..65ea3b7 100644 --- a/kpad/.project +++ b/kpad/.project @@ -1,7 +1,7 @@ # Gambas Project File 3.0 Title=Kpad Startup=FMain -Version=0.0.4 +Version=0.0.7 Component=gb.image Component=gb.gui.qt Component=gb.form @@ -12,8 +12,11 @@ Component=gb.util Component=gb.form.editor Component=gb.settings Component=gb.term +Component=gb.form.terminal Component=gb.pcre Component=gb.signal +Description="Gambas version of kake pad" +Authors="Paul M" TabSize=2 Language=en_US KeepDebugInfo=0 diff --git a/kpad/.src/FMain.class b/kpad/.src/FMain.class index 89f3cdc..1ec636c 100644 --- a/kpad/.src/FMain.class +++ b/kpad/.src/FMain.class @@ -12,7 +12,7 @@ Private txtc As Boolean ' Contents of text editor used in combination with tchng Public Sub Menu5_Click() CloseDoc() - Me.Close + End @@ -76,7 +76,7 @@ Private Function CloseDoc() As Boolean Endif txtc = False - + Me.Close End @@ -170,9 +170,10 @@ End Public Sub Menu24_Click() - ' This does work but gambas app launched from a console, looks like gb.term.form might be option in the future - Exec [regx[3].Text, Dialog.Path] ' We might want to pop that into a visible window for shell stuff, does work - 'Shell(regx[3].Text & " " & Dialog.Path) +Global.termrun = [regx[3].Text, Dialog.Path] + FTerm.Show + FTerm.termrun() + End Public Sub Menu25_Click() @@ -191,3 +192,67 @@ End Public Sub Form_Open() txtc = False End + +Public Sub Menu11_Click() + + Replace.Show() + +End + +Public Sub Menu27_Click() + + If Menu27.Checked Then + TextEditor1.Highlight = "gambas" + + Endif + +End + +Public Sub Menu28_Click() + + If Menu28.Checked Then + TextEditor1.Highlight = "html" + Endif + +End + +Public Sub Menu29_Click() + + If Menu29.Checked Then + TextEditor1.Highlight = "css" + Endif + +End + +Public Sub Menu30_Click() + + If Menu30.Checked Then + TextEditor1.Highlight = "javascript" + Endif + +End + +Public Sub Menu31_Click() + + If Menu31.Checked Then + TextEditor1.Highlight = "sql" + Endif + +End + +Public Sub Menu32_Click() + + If Menu32.Checked Then + TextEditor1.Highlight = "webpage" + Endif + +End + +Public Sub Menu33_Click() + + Global.termrun = ["/bin/bash"] + FTerm.Show + FTerm.termrun() + + +End diff --git a/kpad/.src/FMain.form b/kpad/.src/FMain.form index 7af5aaf..45f8601 100644 --- a/kpad/.src/FMain.form +++ b/kpad/.src/FMain.form @@ -30,7 +30,6 @@ } { Menu11 Menu Text = ("Replace") - Enabled = False } { Menu19 Menu Text = ("--------") @@ -59,6 +58,33 @@ } { Menu7 Menu Text = ("View") + { Menu26 Menu + Text = ("Highlighting") + { Menu27 Menu + Text = ("Gambas") + Radio = True + } + { Menu28 Menu + Text = ("HTML") + Radio = True + } + { Menu29 Menu + Text = ("CSS") + Radio = True + } + { Menu30 Menu + Text = ("JavaScript") + Radio = True + } + { Menu31 Menu + Text = ("SQL") + Radio = True + } + { Menu32 Menu + Text = ("WebPage") + Radio = True + } + } { Menu4 Menu Text = ("Word Wrap") Toggle = True @@ -71,6 +97,9 @@ Text = ("Line Numbers") Toggle = True } + { Menu33 Menu + Text = ("View Terminal") + } } { Menu23 Menu Text = ("Run") diff --git a/kpad/.src/FTerm.class b/kpad/.src/FTerm.class new file mode 100644 index 0000000..b93753f --- /dev/null +++ b/kpad/.src/FTerm.class @@ -0,0 +1,9 @@ +' Gambas class file + + +Public Sub termrun() + +'Exec [FMain.regx[3], Dialog.Path] + TerminalView1.Exec(Global.termrun) + +End diff --git a/kpad/.src/FTerm.form b/kpad/.src/FTerm.form new file mode 100644 index 0000000..6c661aa --- /dev/null +++ b/kpad/.src/FTerm.form @@ -0,0 +1,14 @@ +# Gambas Form File 3.0 + +{ Form Form + MoveScaled(0,0,64,64) + Text = ("Terminal Output") + Arrangement = Arrange.Fill + AutoResize = True + { TerminalView1 TerminalView + MoveScaled(0,0,64,64) + Expand = True + Blink = True + ShowScrollBar = True + } +} diff --git a/kpad/.src/Global.class b/kpad/.src/Global.class index 6fcde28..9858b4a 100644 --- a/kpad/.src/Global.class +++ b/kpad/.src/Global.class @@ -11,11 +11,11 @@ Create Static ' Variables first some might get removed Public cbflag As Integer -Public txtch As Integer -Public dlgtitle As String +'Public txtch As Integer +'Public dlgtitle As String Public fndin As String Public rpstr As String - +Public termrun As String[] ' Allows for waiting on custom dialogs, shouldn't have had to do it like this diff --git a/kpad/.src/Replace.class b/kpad/.src/Replace.class new file mode 100644 index 0000000..e424190 --- /dev/null +++ b/kpad/.src/Replace.class @@ -0,0 +1,15 @@ +' Gambas class file + + +Public Sub Form_Open() + + + +End + +Public Sub Button1_Click() + + FMain.TextEditor1.FindNextString(TextBox1.text, 1) + + +End diff --git a/kpad/.src/Replace.form b/kpad/.src/Replace.form new file mode 100644 index 0000000..a98ba33 --- /dev/null +++ b/kpad/.src/Replace.form @@ -0,0 +1,25 @@ +# Gambas Form File 3.0 + +{ Form Form + MoveScaled(0,0,64,17) + Text = ("Find And Replace") + Resizable = False + { Label1 Label + MoveScaled(1,3,15,4) + Text = ("Find:") + } + { Label2 Label + MoveScaled(1,8,8,4) + Text = ("Replace:") + } + { TextBox1 TextBox + MoveScaled(9,3,25,4) + } + { TextBox2 TextBox + MoveScaled(9,8,25,4) + } + { Button1 Button + MoveScaled(49,11,14,4) + Text = ("Find / Replace") + } +}