This commit is contained in:
Sergey Kalinin
2018-03-05 18:07:30 +03:00
parent 77ba144afd
commit 53672ad0f3
17 changed files with 47 additions and 27 deletions

View File

@@ -4,7 +4,6 @@
# Copyright (c) "Sergey Kalinin", 2002, http://nuk-svk.ru #
# Author: Sergey Kalinin banzaj28@yandex.ru #
###########################################################
## GETTING OPERATORS FOR COMPLITE PROCEDURE #
proc GetOp {} {
global opList
@@ -59,8 +58,15 @@ proc SetDefStyle { text args } {
## CURSOR POSITION COUNTERED ##
proc Position {} {
global tree noteBook fontNormal fontBold replace
global noteBook noteBookFiles fontNormal fontBold replace
set nodeEdit [$noteBook raise]
set tree [GetTreeForNode $nodeEdit]
if {$tree eq ".frmBody.frmCat.noteBook.ffiles.frmTreeFiles.treeFiles"} {
$noteBookFiles raise files
} elseif {$tree eq ".frmBody.frmCat.noteBook.fprojects.frmTree.tree"} {
$noteBookFiles raise projects
}
if {$nodeEdit == "" || $nodeEdit == "newproj" || $nodeEdit == "debug" || $nodeEdit == "about"} {
return
}
@@ -603,6 +609,9 @@ proc EditFile {tree node fileName} {
# set w [$noteBook insert end $node -text "$file" -image [Bitmap::get [file join $imgDir [GetImage $fileName].gif]] \
#-background $editor(bg) -foreground $editor(fg)]
set w [$noteBook insert end $node -text "$file" -image [Bitmap::get [file join $imgDir [GetImage $fileName].gif]]]
#set lblEditFileFullPath [label $w.lblEditFileFullPath -text [regsub -all -- {/|\\} $fileName " > "] -anchor w]
#pack $lblEditFileFullPath -side top -fill x
#puts $w
# create array with file names #
if {[info exists fileList($node)] != 1} {
@@ -623,7 +632,7 @@ proc EditFile {tree node fileName} {
# pack $w.textLines -side left -fill y -expand true
# Editor textbox
set scrwin [ScrolledWindow $w.scrwin -bg $editor(bg)]
pack $scrwin -side left -fill both -expand true
pack $scrwin -side top -fill both -expand true
text $w.text -relief sunken -wrap $editor(wrap) -highlightthickness 0 \
-undo 1 -font $editor(font) -blockcursor true -selectborderwidth 0 \
-selectbackground $editor(selectbg) -width 10 -background $editor(bg) \
@@ -964,12 +973,13 @@ proc ReadFileStructure {mod line lineNumber tree node} {
$tree insert end $node $prcNode$dot$lineNumber -text $procName \
-data "prc_$procName"\
-image [Bitmap::get [file join $imgDir $img]] -font $fontNormal
#$tree insert end $prcNode$dot$lineNumber param_$prcNode$dot$lineNumber -text $params \
#-data "prc_$procName" \
#-image [Bitmap::get [file join $imgDir param.gif]] -font $fontNormal
}
}
}
####################################
GetOp

View File

@@ -619,3 +619,4 @@ proc FileOperation::FileDialog {tree operation} {

View File

@@ -263,14 +263,14 @@ pack $frm6.lblOvwrt -fill x
########## PROJECT-FILE-FUNCTION TREE ##################
#set frmCat [frame .frmBody.frmCat -border 1 -relief sunken -bg $editor(bg)]
set frmCat [frame .frmBody.frmCat -border 1 -relief sunken]
set frmCat [frame .frmBody.frmCat -border 0 -relief flat]
pack $frmCat -side left -fill y -fill both
#set frmWork [frame .frmBody.frmWork -border 1 -relief sunken -bg $editor(bg)]
set frmWork [frame .frmBody.frmWork -border 1 -relief sunken]
set frmWork [frame .frmBody.frmWork -border 0 -relief flat]
pack $frmWork -side left -fill both -expand true
## CREATE PANE ##
pane::create .frmBody.frmCat .frmBody.frmWork
pane::create .frmBody.frmCat .frmBody.frmWork -percent 0.20
# NoteBook - Projects and Files
#################### WORKING AREA ####################
@@ -285,11 +285,11 @@ set nbFiles [$noteBookFiles insert end files -text [::msgcat::mc "Files"] \
# Create FileTree
#FileTree::create $nbFiles
set frmTreeFiles [ScrolledWindow $nbFiles.frmTreeFiles -bg $editor(bg) -background $editor(bg) ]
set frmTreeFiles [ScrolledWindow $nbFiles.frmTreeFiles -bd 0 -bg $editor(bg) -background $editor(bg) ]
set treeFiles [
Tree $frmTreeFiles.treeFiles \
-relief sunken -borderwidth 1 -width 5 -highlightthickness 0\
-relief sunken -borderwidth 0 -width 5 -highlightthickness 1\
-redraw 0 -dropenabled 1 -dragenabled 1 -dragevent 3 \
-background $editor(bg) -selectbackground $editor(selectbg) -selectforeground white\
-droptypes {
@@ -314,10 +314,10 @@ GetMenuFileTree [menu .popMenuFileTree -bg $editor(bg) -fg $editor(fg)] ;# pop-u
bind $frmTreeFiles.treeFiles.c <Button-3> {catch [PopupMenuFileTree $treeFiles %X %Y]}
# Create Project tree
set frmTree [ScrolledWindow $nbProjects.frmTree -bg $editor(bg)]
set frmTree [ScrolledWindow $nbProjects.frmTree -bd 0 -bg $editor(bg)]
global tree noteBook
set tree [Tree $frmTree.tree \
-relief sunken -borderwidth 1 -width 3 -height 5 -highlightthickness 1\
-relief sunken -borderwidth 0 -width 3 -height 5 -highlightthickness 1\
-redraw 0 -dropenabled 1 -dragenabled 1 -dragevent 3 \
-background $editor(bg) -selectbackground $editor(selectbg) -selectforeground white\
-droptypes {
@@ -375,7 +375,6 @@ $m add command -label [::msgcat::mc "Add to existing project"] -command {AddToPr
-font $fontNormal -state disable
$m add command -label [::msgcat::mc "Add as new project"] -command {OpenProj [$noteBookFiles raise]} -font $fontNormal
## POPUP PROJECT-MENU ##
set m [menu .popupProj -font $fontNormal -bg $editor(bg) -fg $editor(fg)]
GetProjMenu $m
@@ -388,7 +387,6 @@ $m add command -label [::msgcat::mc "Close"] -command {FileDialog [$noteBookFile
$m add command -label [::msgcat::mc "Close all"] -command {FileDialog [$noteBookFiles raise] close_all}\
-font $fontNormal
bind $frmTree.tree.c <Button-3> {catch [PopupMenuTree %X %Y]}
######### DEDERER: bind Wheel Scroll ##################
@@ -422,7 +420,3 @@ if {[info exists workingProject]} {
}
}

View File

@@ -94,3 +94,4 @@ proc GetMenu {m} {

View File

@@ -30,7 +30,7 @@ namespace eval pane {
set pane(2) $f2
set pane(grip) [frame $master.grip -background $pane(-gripcolor) \
-width $width -height $height \
-bd 1 -relief raised -cursor $pane(-gripcursor)]
-bd 0 -relief raised -cursor $pane(-gripcursor)]
if {! [string match v* $pane(-orient)] } {
set pane(D) Y
@@ -101,3 +101,4 @@ namespace eval pane {

View File

@@ -1009,3 +1009,4 @@ proc InsertTitle {newFile type} {

View File

@@ -23,7 +23,7 @@ proc CreateToolBar {} {
global toolBar fontBold noteBook tree imgDir editor
if {$toolBar == "Yes"} {
set bboxFile [ButtonBox .frmTool.bboxFile -spacing 0 -padx 1 -pady 1 -bg $editor(bg)]
add_toolbar_button $bboxFile new.png {AddToProjDialog file} [::msgcat::mc "Create new file"]
add_toolbar_button $bboxFile new.png {AddToProjDialog file [$noteBookFiles raise]} [::msgcat::mc "Create new file"]
#add_toolbar_button $bboxFile open.png {FileDialog $tree open} [::msgcat::mc "Open file"]
add_toolbar_button $bboxFile save.png {FileDialog $tree save} [::msgcat::mc "Save file"]
add_toolbar_button $bboxFile save_as.png {FileDialog $tree save_as} [::msgcat::mc "Save file as"]
@@ -73,8 +73,3 @@ proc GoToLineButton {w} {
balloon $w.entGoTo set [::msgcat::mc "Goto line"]
}

View File

@@ -82,3 +82,4 @@ proc Translit {line} {
]
}

View File

@@ -342,3 +342,5 @@ proc FileNotePageRaise {nb s} {