CREATE gDialogForm AS QFORM
CAPTION = ""
Width = 270
Height = 103
Center
CREATE gDialogLabel AS QLABEL
CAPTION = ""
Left = 5
Top = 3
Width = 192
Height = 29
Transparent = 1
END CREATE
CREATE gDialogEdit AS QEDIT
Text = ""
Left = 4
Top = 31
Width = 150
Height = 29
TabOrder = 1
END CREATE
CREATE gDialogOKButton AS QBUTTON
CAPTION = "OK"
Left = 160
Top = 34
Width = 34
TabOrder = 2
Default = True
OnClick = gDialogExecute
END CREATE
CREATE gDialogCancelButton AS QBUTTON
CAPTION = "Cancel"
Left = 200
Top = 34
Width = 44
TabOrder = 3
Cancel = True
OnClick = gDialogForm_Close
END CREATE
END CREATE
SUB gDialogForm_Close
gDialogForm.CLOSE
END SUB
SUB gDialogExecute
gDialogForm.CLOSE
SELECT CASE gDialogLabel.Tag
CASE 0
IF gDialogEdit.Text <> "" THEN
DEFINT i = VAL(gDialogEdit.Text)
re.GotoLine(i)
re.EnsureLineVisible(i)
re.SetFocus
END IF
CASE ELSE
END SELECT
END SUB
CREATE IDEimageViewerForm AS QFORM
Width = 100
Height = 100
BorderStyle = bsSizeToolWin
CREATE IDEimage AS QImageEx
Width = IDEimageViewerForm.ClientWidth
Height = IDEimageViewerForm.ClientHeight
Autosize = True
END CREATE
END CREATE
SUB ImageViewerLoad(TheFileName AS STRING)
SELECT CASE StripFileExt(TheFileName)
CASE ".BMP"
IDEimage.Stretch = False
IDEimage.BMP = TheFileName
IDEimageViewerForm.ClientWidth = IDEimage.Width
IDEimageViewerForm.ClientHeight = IDEimage.Height
CASE ".ICO"
IDEimage.Width = 100
IDEimage.Height = 100
IDEimage.Stretch = True
IDEimage.icon = TheFileName
IDEimageViewerForm.ClientWidth = IDEimage.Width
IDEimageViewerForm.ClientHeight = IDEimage.Height
CASE ".JPG", ".JPEG", ".GIF", ".TGA", ".RLE", ".DIB", ".PCX"
IF NViewLibPresent = True THEN
IDEimage.Stretch = False
IDEimage.LoadOtherImage (TheFileName, 0, 0)
END IF
END SELECT
IDEimageViewerForm.Top = Screen.MOUSEY - IDEimageViewerForm.Height
IDEimageViewerForm.Left = RightPanel.Left - IDEimageViewerForm.Width
IDEimageViewerForm.Show
END SUB
SUB gDialogCancel
gDialogForm.CLOSE
END SUB
CREATE gListForm AS QFORM
BorderStyle = bsSizeToolWin
CAPTION = "List"
Width = 352
Height = 640
Center
CREATE gListLabel AS QLABEL
CAPTION = "Double Click to jump to line"
Font.Size = 10
Left = 26
Top = 5
Width = 200
Height = 21
END CREATE
CREATE gListBox AS QLISTBOX
Font.Size = 10
Left = 0
Top = 22
Width = 480
Height = 557
OnDblClick = gListExecute
END CREATE
CREATE gListCancelButton AS QBUTTON
CAPTION = "Cancel"
Left = 4
Height = 23
Top = gListBox.Top + gListBox.Height + 2
Width = 70
TabOrder = 3
Cancel = True
OnClick = gListForm_Close
END CREATE
CREATE gListOkButton AS QBUTTON
CAPTION = "Ok"
Left = 0
Height = 23
Top = gListBox.Top + gListBox.Height + 2
Width = 70
Left = 150
TabOrder = 3
OnClick = gListExecute
END CREATE
END CREATE
SUB gListExecute
gListForm.CLOSE
SELECT CASE gListOkButton.Tag
CASE 1
DEFINT i = MFE_Tab.TabIndex
DEFINT j = IDE.BookMark(i, gListBox.ItemIndex+1)
DEFSTR s = gListBox.Item(gListBox.ItemIndex)
IF LEFT$(s, 1) = "<" THEN
i = VAL(MID$(s , 2, INSTR(s, "> ") - 2 ))
j = VAL(MID$(s , RINSTR(s, ": ") +2, LEN(s)))
END IF
IF i <> MFE_Tab.TabIndex THEN MFE_ChangeToIndex(i)
re.GotoLine(IDE.BookMark(i, j))
re.EnsureLineVisible(j)
re.SetFocus
CASE 2
tmpList.Text = DirTree.Directory
CASE ELSE
END SELECT
END SUB
SUB gListForm_Close
gListForm.CLOSE
END SUB
|