home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)repobjbrow.tcl /main/titanic/6
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)repobjbrow.tcl /main/titanic/6 17 Oct 1997 Copyright 1997 Cayenne Software Inc.
-
- # Start user added include file section
- require "browstable.tcl"
- # End user added include file section
-
- require "reptooldia.tcl"
-
- Class RepObjBrowser : {RepToolDialog} {
- constructor
- method destructor
- method selected
- method selectedObject
- method update
- method popUp
- method checkOk
- method doubleClicked
- method delCancelButton
- attribute objLabel
- attribute objList
- attribute objMap
- attribute statusLabel
- attribute statusValue
- attribute statusChange
- attribute dirField
- attribute cancelDeleted
- }
-
- constructor RepObjBrowser {class this name view} {
- set this [RepToolDialog::constructor $class $this $name $view]
- # Start constructor user section
-
- interface DlgColumn $this.gui {
- Label label { text "" }
- BrowsTable objects {
- mode DETAIL
- selectionPolicy BROWSE
- rowCount 10
- columnCount 30
- }
- DlgRow d {
- verShrinkFactor 0
- verStretchFactor 0
- Label l {
- text "Subdirectory:"
- horStretchFactor 20
- }
- SingleLineText dir {
- text ""
- horShrinkFactor 80
- horStretchFactor 80
- columnCount 16
- }
- }
- DlgRow s {
- verShrinkFactor 0
- verStretchFactor 0
- Label label {
- horStretchFactor 20
- text "Status"
- }
- Label value {
- horStretchFactor 60
- text "Value"
- }
- PushButton change {
- horStretchFactor 20
- label "Change"
- }
- }
- }
-
- $this objMap [Dictionary new]
- $this objLabel $this.gui.label
- $this objList $this.gui.objects
- $this dirField $this.gui.d.dir
- $this statusLabel $this.gui.s.label
- $this statusValue $this.gui.s.value
- $this statusChange $this.gui.s.change
-
- [$this objList] selectionChanged "$this checkOk; $this selectionChanged"
- [$this objList] font [m4_var get M4_font -context repcorp]
- [$this dirField] sensitive 0
-
- $this cancelDeleted 0
-
- # End constructor user section
- return $this
- }
-
- method RepObjBrowser::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this RepToolDialog::destructor
- }
-
- method RepObjBrowser::selected {this} {
- return [[$this objList] selectedSet]
- }
-
- method RepObjBrowser::selectedObject {this} {
- set sel [[$this objList] selectedSet]
- if [lempty $sel] {
- return [ORB::nil]
- }
- set name [lindex [split $sel .] end]
- return [[$this objMap] set $name]
- }
-
- method RepObjBrowser::update {this} {
- [$this objList] removeAllObjects
- $this fillList
- [$this objList] format
- }
-
- method RepObjBrowser::popUp {this} {
- set currSel [[$this objList] selectedSet]
- $this update
- [$this objList] selectedSet $currSel
- $this checkOk
- $this RepToolDialog::popUp
- }
-
- method RepObjBrowser::checkOk {this} {
- if [$this cancelDeleted] {
- $this okSensitive 1
- } else {
- $this okSensitive [llength [[$this objList] selectedSet]]
- }
- }
-
- method RepObjBrowser::doubleClicked {this} {
- if [$this okSensitive] {
- eval [$this okPressed]
- }
- $this popDown
- }
-
- method RepObjBrowser::delCancelButton {this} {
- $this RepToolDialog::delCancelButton
- $this cancelDeleted 1
- }
-
- # Do not delete this line -- regeneration end marker
-
-