home *** CD-ROM | disk | FTP | other *** search
/ PC World 1997 November / PCWorld_1997-11_cd.bin / software / programy / komix / DATA.Z / menueditor.tcl < prev    next >
Text File  |  1996-08-19  |  2KB  |  65 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Westmount Technology    1994
  4. #
  5. #      File:           @(#)menueditor.tcl    /main/hindenburg/2
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)menueditor.tcl    /main/hindenburg/2   19 Aug 1996 Copyright 1994 Westmount Technology
  10.  
  11. # Start user added include file section
  12. require "menuedarea.tcl"
  13. require "iconselect.tcl"
  14. # End user added include file section
  15.  
  16. require "custeditor.tcl"
  17.  
  18. Class MenuEditor : {CustEditor} {
  19.     constructor
  20.     method destructor
  21.     method getSelectedSet
  22.     attribute smallIconSelector
  23. }
  24.  
  25. constructor MenuEditor {class this name} {
  26.     set this [CustEditor::constructor $class $this $name]
  27.     # Start constructor user section
  28.     $this initObjTypeInformation
  29.     $this menuHdlr [CustBrMenuHandler new menuced]
  30.     $this setToolBarPresence uce
  31.     [$this menuHdlr] setCurrentContext
  32.     $this setContextAreaPresence uce
  33.     $this editorArea [MenuEdArea new [$this editorArea].editorArea]
  34.     [$this editorArea] selectionChanged "$this selectionChanged"
  35.     $this setMessageAreaPresence uce
  36.     $this smallIconSelector [IconSelector new $this.smallIconSelector \
  37.         16 -title "ToolBar Icon Selector"]
  38.     $this setWindowGeometry mnu
  39.     # End constructor user section
  40.     return $this
  41. }
  42.  
  43. method MenuEditor::destructor {this} {
  44.     # Start destructor user section
  45.     $this saveToolBarPresence uce
  46.     $this saveContextAreaPresence uce
  47.     $this saveMessageAreaPresence uce
  48.     $this saveWindowGeometry mnu
  49.     [$this menuHdlr] delete
  50.     # End destructor user section
  51.     $this CustEditor::destructor
  52. }
  53.  
  54. method MenuEditor::getSelectedSet {this} {
  55.     
  56.     if {![[$this editorArea] isA BrowsTree]} {
  57.         return ""
  58.     }
  59.  
  60.     return [[$this editorArea] selected]
  61. }
  62.  
  63. # Do not delete this line -- regeneration end marker
  64.  
  65.