Manpower

Check-in [1e0323ae61]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:More progress
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:1e0323ae6197113ae3c3f1e5c797df8400a68507
User & Date: kevin 2019-08-20 12:47:04
Context
2019-08-21
06:18
UI pretty much working now, need to polish and update user docs check-in: bb18dda27a user: kevin tags: trunk
2019-08-20
12:47
More progress check-in: 1e0323ae61 user: kevin tags: trunk
2019-08-18
02:01
Further updates check-in: 7de2e42581 user: kevin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to libs/manpower/manpower-main.tcl.

1
2
3
4
5
6
7
8
9
10
...
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
...
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
...
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
...
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320





321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
...
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
...
495
496
497
498
499
500
501
502
503


504
505
506
507
508
509
510
...
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
...
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
...
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
...
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
...
873
874
875
876
877
878
879
























880
881
882
883
884
885
886
887
888
889
890
891

892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
...
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
# Manpower: Man page browser and viewer 

#Copyright (C) 2018  WordTech Communications LLC

#MIT license

#let's get started

package require softwareupdate
package require regproc
................................................................................
    .mb.apple add command -label "Check for Updates" -command "softwareupdate::checkVersion $appname::name $appname::version"
    .mb.apple add separator
    .mb add cascade -label "Manpower" -menu .mb.apple


    #man page menu
    menu .mb.man
    .mb.man add command -label "Find Man Page" -command {.t.left.tree selection set Search} -accelerator "Command-F"

    menu .mb.man.save  
    .mb.man.save add command -label "Text" -command saveMan 
    .mb.man.save add command -label "HTML" -command saveHTML
    .mb.man.save add command -label "PDF" -command savePDF

    .mb.man add cascade -label "Save As" -menu .mb.man.save
................................................................................

    ttk::button .tool.toolbar.frame.cog -image  xbm_settings_32 -style Toolbutton -command  toggleBookmarks  -takefocus 0
    pack .tool.toolbar.frame.cog -side left  -expand no
    tooltip::tooltip .tool.toolbar.frame.cog  "Toggle bookmarks"

    ttk::button .tool.toolbar.frame.search -image xbm_search_32 -style Toolbutton -command manSearch -takefocus 0
    pack .tool.toolbar.frame.search -side left  -expand no
    tooltip::tooltip  .tool.toolbar.frame.search balloon "Search for man page"

    pack .tool.toolbar.frame.cog  .tool.toolbar.frame.search -side left -fill both -expand no

    #entry field for specific man page with image
    ttk::style layout ImgEntry {
	Entry.field -children {
	    ImgEntry.icon -side left
................................................................................
    pack .tool.toolbar.frame.entry -side right -fill both -expand no
    pack  .tool.toolbar.frame.browser -side right -fill both -expand yes


    ttk::separator .bottomsep1 -orient vertical 
    pack .bottomsep1 -side bottom -fill both -expand no -side bottom

    bind .tool.toolbar.frame.browser <ButtonRelease-1>  checkManSelection


    #additional bindings
    bind .tool.toolbar.frame.browser <Return> {singleManPage}
    bind .tool.toolbar.frame.entry <Return> {manSearch}
    
    ttk::frame .bottom
    pack .bottom -side bottom -fill both -expand no
................................................................................
	file-system xbm_folder_sans_16
	other xbm_star_16
	macro xbm_script_16
	admin xbm_home_16
	kernel xbm_refresh_16
    } 
    
    #lay out the tree widget
    ttk::treeview .middle.left.tree  -yscrollcommand [list .middle.left.scroll set] -show tree
    pack .middle.left.tree -fill both -side left -expand yes
    
    #tree display for categories
    ttk::treeview .t.left.tree -yscrollcommand [list .t.left.scroll set] -show tree
    
    pack .t.left.tree -fill both -side left -expand yes

    ttk::scrollbar .t.left.scroll -command [list .t.left.tree yview]
    pack .t.left.scroll -side right -fill y -expand no

    set entry1 [.middle.left.tree insert {} end -id All -value All -text "All" -image xbm_website_16]
    set entry2 [.middle.left.tree insert {} end -id Search -value Search -text "Search" -image xbm_search_16]
    set entry3 [ .middle.left.tree insert {} end -id Category -value Category -text "Category" -image xbm_category_16 ]


    set categoryman [list  users "1. User Commands" system "2. System Commands" library "3. Library Commands" special "4. Special" file-system "5. File Formats" other "6. Other" macro "7. Macros/Conventions" admin "8. Administrative" kernel "9. Kernel Commands" ]

    foreach {key value} $categoryman {
	.middle.left.tree insert $entry3 end -id $key -value $key  -text $value -image $treelabel($key)
    }


    ttk::scrollbar .middle.left.scroll -command [list .middle.left.tree yview]
    pack .middle.left.scroll -side right -fill y -expand no

    bind .middle.left.tree <<TreeviewSelect>> {setCat}


    .middle.left.tree opentree Category

    ttk::panedwindow .middle.right
    pack .middle.right -side right -fill both -expand yes

    ttk::frame .middle.right.upper
    pack .middle.right.upper -side right -fill both -expand yes

    ttk::frame .middle.right.upper.frame  
    pack .middle.right.upper.frame -side top -fill both -expand yes

    ttk::frame .middle.right.upper.frame.row
    pack .middle.right.upper.frame.row -side right -fill y  -expand no

    ttk::label .middle.right.upper.frame.row.corner -style TablelistHeader.TLabel 
    pack .middle.right.upper.frame.row.corner -side top -fill x -expand no

    ttk::scrollbar .middle.right.upper.frame.row.vsb -orient vertical -command [list .middle.right.upper.frame.listbox yview]
    pack .middle.right.upper.frame.row.vsb -side bottom -fill y -expand 1

    #main data display
    ttk::treeview .middle.right.upper.frame.listbox -columns {"Man Page" "Description"} -show headings -yscrollcommand [list .middle.right.upper.frame.row.vsb set] -displaycolumns #all





    
    pack .middle.right.upper.frame.listbox -side left -fill both -expand yes
    bind .middle.right.upper.frame.listbox <<TreeviewSelect>> {getManPage}

    foreach "item" $manlist {
	.middle.right.upper.frame.listbox insert end $item
    }


    #menu for right-clicking
    menu .popup 
    .popup add command -label "Find Man Page" -command  {.t.left.tree selection set Search}  
    .popup add command -label "Print Man Page" -command  printFile

    bind [.middle.right.upper.frame.listbox bodypath] <Button-2> {tk_popup .popup %X %Y}

    #the rest of the display
    ttk::frame .middle.right.lower 
    pack .middle.right.lower -side bottom -fill both -expand true


    ttk::frame .middle.right.lower.right -height 100
................................................................................
    listbox .bookmarks.top.list -yscrollcommand [list .bookmarks.top.ttk::scrollbar set] -font {-size 12} -relief flat -bd 0 -height 30 -activestyle none
    pack .bookmarks.top.list -side left -fill both -expand yes


    ttk::scrollbar .bookmarks.top.ttk::scrollbar -command [list .bookmarks.top.list yview]
    pack .bookmarks.top.ttk::scrollbar -side right -fill y -expand no

    ttk::button .bookmarks.bottom.add -style Toolbutton -text "+"	-takefocus 0 -command addBookMark
    ttk::button .bookmarks.bottom.delete -style Toolbutton -text "-" -takefocus 0 -command deleteBookMark

    tooltip::tooltip .bookmarks.bottom.add  "Add bookmark" 
    tooltip::tooltip  .bookmarks.bottom.delete  "Delete bookmark" 

    bind .bookmarks.top.list <<ListboxSelect>> getManPagefromBookmark

    pack .bookmarks.bottom.add .bookmarks.bottom.delete -side left -fill both -expand no

    wm withdraw .bookmarks
    wm protocol .bookmarks WM_DELETE_WINDOW {wm withdraw .bookmarks}

    #other bindings
    bind all <Command-F> {.t.left.tree selection set Search} 
    bind all <Command-f>  {.t.left.tree selection set Search} 
    bind all <Command-P> printFile
    bind all <Command-p>  printFile

    bind . <Command-W> {wm state .  withdrawn}
    bind . <Command-w> {wm state .  withdrawn}
    wm protocol . WM_DELETE_WINDOW {wm withdraw .}

    .t.left.tree selection set All

}

## Code to do the sorting of the tree contents when clicked on
proc SortBy {tree col direction} {

    set tree .middle.right.upper.frame.listbox
................................................................................

    global manitem
    global manterm
    global status
    global rmanpath
    global cachedir

    .middle.left.tree selection clear
    set manitem [.tool.toolbar.frame.browser get]



    clearData
    clearText
    .middle.right.lower.right.log configure -state normal

    after 50

................................................................................
proc setCat {} {

    global category 
    global manlist

    set node [lindex [.middle.left.tree  item [.middle.left.tree selection] -values] 0]
    
    switch - $node  {
	"" {
	    return
	} "Category" {
	    return
	} "Search" {
	    manSearch
	    return
................................................................................
    clearText

    .middle.left.tree selection set "Search"
    set status "Man pages with keyword \"$searchterm\""

    set parsesearch [lsearch -all -inline $manlist *$searchterm*]
    foreach "item" $parsesearch {
	.middle.right.upper.frame.listbox insert end $item
    }
}


#re-display entire list of man pages
proc refreshManList {} {
    global manlist

    clearData
    clearText

    foreach "item" $manlist {
	.middle.right.upper.frame.listbox insert end $item
    }
}


#get man pages by category
proc manCat {} {
    global manlist
................................................................................
	    continue
	}
    }
    
    set sortlist [lsort -dictionary $interimcat]
    set catlist [lrange $sortlist 1 end-1]
    foreach item $catlist {	
	.middle.right.upper.frame.listbox insert end $item
    }

}


#clear text display; do this whenever selection changes in tree view
proc clearText {} {
................................................................................
    .middle.right.lower.right.log delete 1.0 end
    .middle.right.lower.right.log configure -state disabled

}

#clear table display; do this whenever selection changes in tree view
proc clearData {} {
    .middle.right.upper.frame.listbox delete 0 end

}

#save man page to text file
proc saveMan {} {
    
    global manitem
................................................................................

    puts $manitem
    
    singleManPage

}



























#"about application" command
proc tkAboutDialog {} {
    aboutWindow
}


#display user help
proc tk::mac::ShowHelp {} {
    machelp::userhelp
}


#initialize the app
proc startUp {} {
    global appname
    global appversion
    global datadir
    global rmanpath
    global cachedir
    global searchterm
    global mynode
    
    appname::setAppName Manpower 6.7


    set rmanpath [file join [file dirname [info script]] rman]

    
    #check for app support directory
    set appdir [file join $::env(HOME) "Library" "Application Support" "Manpower"]
................................................................................

    getAllMan
    makeImage
    softwareupdate::setVersion $appname::name $appname::version
    machelp::setAppName $appname::name $appname::version
    drawGUI

    checkPref
    setPref
    readBookMarks

    after 50

    .middle.left.tree selection set All
    set mynode All
    set searchterm {}
    set manitem {}

    after 500 
    regproc::readLic $appname::name $appname::version

    after 500
    checkDefaultURL x-man-page

    
}


#handle program shutdown via command-q
proc  ::tk::mac::Quit {} {
    savePref
    destroy .preferences
    exit
}



#command for AppleScript support
proc showpage {manpage} {


|







 







|







 







|







 







<
<







 







<
<
<
|

|

|

|
|












<
<
<
<


<
|













<
<
<





>
>
>
>
>





|





|


|







 







|













|
|







|







 







|

>
>







 







|







 







|












|







 







|







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>








|
|
|
<
>











|







 







<
<











<
<
<
<






<
<







1
2
3
4
5
6
7
8
9
10
...
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
...
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
...
228
229
230
231
232
233
234


235
236
237
238
239
240
241
...
260
261
262
263
264
265
266



267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286




287
288

289
290
291
292
293
294
295
296
297
298
299
300
301
302



303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
...
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
...
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
...
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
...
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
...
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
...
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
...
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908

909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
...
946
947
948
949
950
951
952


953
954
955
956
957
958
959
960
961
962
963




964
965
966
967
968
969


970
971
972
973
974
975
976
# Manpower: Man page browser and viewer 

#Copyright (C) 2019  WordTech Communications LLC

#MIT license

#let's get started

package require softwareupdate
package require regproc
................................................................................
    .mb.apple add command -label "Check for Updates" -command "softwareupdate::checkVersion $appname::name $appname::version"
    .mb.apple add separator
    .mb add cascade -label "Manpower" -menu .mb.apple


    #man page menu
    menu .mb.man
    .mb.man add command -label "Find Man Page" -command {.middle.left.tree selection set Search} -accelerator "Command-F"

    menu .mb.man.save  
    .mb.man.save add command -label "Text" -command saveMan 
    .mb.man.save add command -label "HTML" -command saveHTML
    .mb.man.save add command -label "PDF" -command savePDF

    .mb.man add cascade -label "Save As" -menu .mb.man.save
................................................................................

    ttk::button .tool.toolbar.frame.cog -image  xbm_settings_32 -style Toolbutton -command  toggleBookmarks  -takefocus 0
    pack .tool.toolbar.frame.cog -side left  -expand no
    tooltip::tooltip .tool.toolbar.frame.cog  "Toggle bookmarks"

    ttk::button .tool.toolbar.frame.search -image xbm_search_32 -style Toolbutton -command manSearch -takefocus 0
    pack .tool.toolbar.frame.search -side left  -expand no
    tooltip::tooltip  .tool.toolbar.frame.search "Search for man page"

    pack .tool.toolbar.frame.cog  .tool.toolbar.frame.search -side left -fill both -expand no

    #entry field for specific man page with image
    ttk::style layout ImgEntry {
	Entry.field -children {
	    ImgEntry.icon -side left
................................................................................
    pack .tool.toolbar.frame.entry -side right -fill both -expand no
    pack  .tool.toolbar.frame.browser -side right -fill both -expand yes


    ttk::separator .bottomsep1 -orient vertical 
    pack .bottomsep1 -side bottom -fill both -expand no -side bottom




    #additional bindings
    bind .tool.toolbar.frame.browser <Return> {singleManPage}
    bind .tool.toolbar.frame.entry <Return> {manSearch}
    
    ttk::frame .bottom
    pack .bottom -side bottom -fill both -expand no
................................................................................
	file-system xbm_folder_sans_16
	other xbm_star_16
	macro xbm_script_16
	admin xbm_home_16
	kernel xbm_refresh_16
    } 
    



   
    #tree display for categories
    ttk::treeview .middle.left.tree -yscrollcommand [list .middle.left.scroll set] -show tree
    
    pack .middle.left.tree -fill both -side left -expand yes

    ttk::scrollbar .middle.left.scroll -command [list .middle.left.tree yview]
    pack .middle.left.scroll -side right -fill y -expand no

    set entry1 [.middle.left.tree insert {} end -id All -value All -text "All" -image xbm_website_16]
    set entry2 [.middle.left.tree insert {} end -id Search -value Search -text "Search" -image xbm_search_16]
    set entry3 [ .middle.left.tree insert {} end -id Category -value Category -text "Category" -image xbm_category_16 ]


    set categoryman [list  users "1. User Commands" system "2. System Commands" library "3. Library Commands" special "4. Special" file-system "5. File Formats" other "6. Other" macro "7. Macros/Conventions" admin "8. Administrative" kernel "9. Kernel Commands" ]

    foreach {key value} $categoryman {
	.middle.left.tree insert $entry3 end -id $key -value $key  -text $value -image $treelabel($key)
    }





    bind .middle.left.tree <<TreeviewSelect>> {setCat}


    .middle.left.tree item Category -open true

    ttk::panedwindow .middle.right
    pack .middle.right -side right -fill both -expand yes

    ttk::frame .middle.right.upper
    pack .middle.right.upper -side right -fill both -expand yes

    ttk::frame .middle.right.upper.frame  
    pack .middle.right.upper.frame -side top -fill both -expand yes

    ttk::frame .middle.right.upper.frame.row
    pack .middle.right.upper.frame.row -side right -fill y  -expand no




    ttk::scrollbar .middle.right.upper.frame.row.vsb -orient vertical -command [list .middle.right.upper.frame.listbox yview]
    pack .middle.right.upper.frame.row.vsb -side bottom -fill y -expand 1

    #main data display
    ttk::treeview .middle.right.upper.frame.listbox -columns {"Man Page" "Description"} -show headings -yscrollcommand [list .middle.right.upper.frame.row.vsb set] -displaycolumns #all

        foreach col [list "Man Page" "Description"] {
	.middle.right.upper.frame.listbox heading $col -text $col -anchor w -command [list SortBy .middle.right.upper.frame.listbox $col 0] -image noArrow
    }

    
    pack .middle.right.upper.frame.listbox -side left -fill both -expand yes
    bind .middle.right.upper.frame.listbox <<TreeviewSelect>> {getManPage}

    foreach "item" $manlist {
	.middle.right.upper.frame.listbox insert {} end -values $item
    }


    #menu for right-clicking
    menu .popup 
    .popup add command -label "Find Man Page" -command  {.middle.left.tree selection set Search}  
    .popup add command -label "Print Man Page" -command  printFile

    bind .middle.right.upper.frame.listbox <Button-2> {tk_popup .popup %X %Y}

    #the rest of the display
    ttk::frame .middle.right.lower 
    pack .middle.right.lower -side bottom -fill both -expand true


    ttk::frame .middle.right.lower.right -height 100
................................................................................
    listbox .bookmarks.top.list -yscrollcommand [list .bookmarks.top.ttk::scrollbar set] -font {-size 12} -relief flat -bd 0 -height 30 -activestyle none
    pack .bookmarks.top.list -side left -fill both -expand yes


    ttk::scrollbar .bookmarks.top.ttk::scrollbar -command [list .bookmarks.top.list yview]
    pack .bookmarks.top.ttk::scrollbar -side right -fill y -expand no

    ttk::button .bookmarks.bottom.add -style Toolbutton -text "+"  -takefocus 0 -command addBookMark
    ttk::button .bookmarks.bottom.delete -style Toolbutton -text "-" -takefocus 0 -command deleteBookMark

    tooltip::tooltip .bookmarks.bottom.add  "Add bookmark" 
    tooltip::tooltip  .bookmarks.bottom.delete  "Delete bookmark" 

    bind .bookmarks.top.list <<ListboxSelect>> getManPagefromBookmark

    pack .bookmarks.bottom.add .bookmarks.bottom.delete -side left -fill both -expand no

    wm withdraw .bookmarks
    wm protocol .bookmarks WM_DELETE_WINDOW {wm withdraw .bookmarks}

    #other bindings
    bind all <Command-F> {.middle.left.tree selection set Search} 
    bind all <Command-f>  {.middle.left.tree selection set Search} 
    bind all <Command-P> printFile
    bind all <Command-p>  printFile

    bind . <Command-W> {wm state .  withdrawn}
    bind . <Command-w> {wm state .  withdrawn}
    wm protocol . WM_DELETE_WINDOW {wm withdraw .}

    .middle.left.tree selection set All

}

## Code to do the sorting of the tree contents when clicked on
proc SortBy {tree col direction} {

    set tree .middle.right.upper.frame.listbox
................................................................................

    global manitem
    global manterm
    global status
    global rmanpath
    global cachedir

    .middle.left.tree selection remove [.middle.left.tree selection]
    set manitem [.tool.toolbar.frame.browser get]

    puts "manitem is $manitem"

    clearData
    clearText
    .middle.right.lower.right.log configure -state normal

    after 50

................................................................................
proc setCat {} {

    global category 
    global manlist

    set node [lindex [.middle.left.tree  item [.middle.left.tree selection] -values] 0]
    
    switch -- $node  {
	"" {
	    return
	} "Category" {
	    return
	} "Search" {
	    manSearch
	    return
................................................................................
    clearText

    .middle.left.tree selection set "Search"
    set status "Man pages with keyword \"$searchterm\""

    set parsesearch [lsearch -all -inline $manlist *$searchterm*]
    foreach "item" $parsesearch {
	.middle.right.upper.frame.listbox insert {} end -values $item
    }
}


#re-display entire list of man pages
proc refreshManList {} {
    global manlist

    clearData
    clearText

    foreach "item" $manlist {
	.middle.right.upper.frame.listbox insert {} end -values $item
    }
}


#get man pages by category
proc manCat {} {
    global manlist
................................................................................
	    continue
	}
    }
    
    set sortlist [lsort -dictionary $interimcat]
    set catlist [lrange $sortlist 1 end-1]
    foreach item $catlist {	
	.middle.right.upper.frame.listbox insert {} end -values $item
    }

}


#clear text display; do this whenever selection changes in tree view
proc clearText {} {
................................................................................
    .middle.right.lower.right.log delete 1.0 end
    .middle.right.lower.right.log configure -state disabled

}

#clear table display; do this whenever selection changes in tree view
proc clearData {} {
    .middle.right.upper.frame.listbox delete [.middle.right.upper.frame.listbox children {}]

}

#save man page to text file
proc saveMan {} {
    
    global manitem
................................................................................

    puts $manitem
    
    singleManPage

}

#read bookmarks
proc readBookMarks {} {

    global datadir 
    global bookmarklist

    if {![file exists $datadir/.bookmarks]} {
	return
    } else {
	
	set bookmarkfile [open $datadir/.bookmarks r]
	set bookmarks [read $bookmarkfile]
	close $bookmarkfile
	foreach item $bookmarks {
	    lappend bookmarklist $item
	}
	set bookmarklist [lsort $bookmarklist]
	
	foreach item $bookmarklist {
	    .bookmarks.top.list insert end $item
	}
    }
    
}


#"about application" command
proc tkAboutDialog {} {
    aboutWindow
}


# #display user help
# proc tk::mac::ShowHelp {} {
#     machelp::userhelp

# }

#initialize the app
proc startUp {} {
    global appname
    global appversion
    global datadir
    global rmanpath
    global cachedir
    global searchterm
    global mynode
    
    appname::setAppName Manpower 7.0 


    set rmanpath [file join [file dirname [info script]] rman]

    
    #check for app support directory
    set appdir [file join $::env(HOME) "Library" "Application Support" "Manpower"]
................................................................................

    getAllMan
    makeImage
    softwareupdate::setVersion $appname::name $appname::version
    machelp::setAppName $appname::name $appname::version
    drawGUI



    readBookMarks

    after 50

    .middle.left.tree selection set All
    set mynode All
    set searchterm {}
    set manitem {}

    after 500 
    regproc::readLic $appname::name $appname::version




    
}


#handle program shutdown via command-q
proc  ::tk::mac::Quit {} {


    exit
}



#command for AppleScript support
proc showpage {manpage} {