home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Westmount Technology 1994
- #
- # File: @(#)editseldia.tcl /main/titanic/2
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)editseldia.tcl /main/titanic/2 2 Oct 1997 Copyright 1994 Westmount Technology
-
- # Start user added include file section
-
- require wmt_util.tcl
-
- # End user added include file section
-
-
- Class EditSelDialog : {TemplateDialog} {
- constructor
- method destructor
- method handleEdit
- method handleHelp
- method handleSelectionChanged
- method popUp
- method text
- attribute entrySet
- attribute editPressed
- attribute message
- }
-
- constructor EditSelDialog {class this name} {
- set this [TemplateDialog::constructor $class $this $name]
- # Start constructor user section
-
- interface DlgColumn $this.top {
- Label message {}
- ComboBox list {
- rowCount 10
- }
- }
- PushButton new $this.edit \
- -label Edit \
- -activated "$this handleEdit"
- $this config \
- -modal yes \
- -helpPressed "$this handleHelp"
- $this.top.list textModified "$this handleSelectionChanged"
-
- # End constructor user section
- return $this
- }
-
- method EditSelDialog::destructor {this} {
- # Start destructor user section
- # End destructor user section
- }
-
- method EditSelDialog::handleEdit {this} {
- $this popDown
- set doDelete [regsub -all "$this delete" "[$this okPressed]" "" okPressed]
- eval $okPressed
- eval [$this editPressed]
- if $doDelete {
- $this delete
- }
- }
-
- method EditSelDialog::handleHelp {this} {
- [getParent $this] helpOnName [nt_get_type $this]
- }
-
- method EditSelDialog::handleSelectionChanged {this} {
- if {"[rmWhiteSpace [$this text]]" == ""} {
- set selected 0
- } else {
- set selected 1
- }
- $this okSensitive $selected
- $this okDefault $selected
- $this cancelDefault [expr 1 - $selected]
- $this.edit config \
- -sensitive $selected \
- -default 0
- }
-
- method EditSelDialog::popUp {this} {
- $this.top.message text [$this message]
- set entrySet [$this entrySet]
- $this.top.list config -entrySet $entrySet
- $this handleSelectionChanged
- $this TemplateDialog::popUp
- }
-
- method EditSelDialog::text {this} {
- return [$this.top.list text]
- }
-
- # Do not delete this line -- regeneration end marker
-
-