home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: @(#)newmenusep.tcl /main/titanic/2
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)newmenusep.tcl /main/titanic/2 19 Nov 1996 Copyright 1996 Cadre Technologies Inc.
-
- # Start user added include file section
- # End user added include file section
-
- require "newcustobj.tcl"
-
- Class NewMenuSeparatorDialog : {NewCustObjectDialog} {
- constructor
- method destructor
- method popUp
- }
-
- constructor NewMenuSeparatorDialog {class this name} {
- set this [NewCustObjectDialog::constructor $class $this $name]
- # Start constructor user section
- $this title CustMenuSeparator
-
- interface DlgColumn $this.DC {
- Label L {
- text "Parent:"
- }
- DropDwnList parentDDL {
- rowCount 10
- }
- }
-
- $this okPressed {
- %this popDown
- [.main editorArea] \
- newObject [%this title] CustMenuSeparator \
- [%this.DC.parentDDL selected] [%this edit]
- }
-
- lappend checkList "$this.DC.parentDDL selectionChanged selected"
- $this checkList $checkList
-
- $this helpPressed { .main helpOnName newMenuPart }
- # End constructor user section
- return $this
- }
-
- method NewMenuSeparatorDialog::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this NewCustObjectDialog::destructor
- }
-
- method NewMenuSeparatorDialog::popUp {this} {
-
- if {[[.main editorArea] _level] != "user"} {
- # remove the invalid ones (user defined parents)
- set pars {}
- foreach i [[.main editorArea] getParentTypeObjects] {
- if {![$i userDefined]} {
- lappend pars $i
- }
- }
- } else {
- set pars [[.main editorArea] getParentTypeObjects]
- }
-
- set select [[.main editorArea] selected]
- set names {}
- foreach i $pars {
- lappend names [$i label]
- }
- $this.DC.parentDDL entrySet $names
- if {[isCommand $select] && [$select isA ParentNode]} {
- $this.DC.parentDDL selected [$select label]
- } else {
- $this.DC.parentDDL selected [lindex $names 0]
- }
-
- $this TemplateDialog::popUp
- }
-
- # Do not delete this line -- regeneration end marker
-
-