home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)edenablepa.tcl /main/titanic/4
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)edenablepa.tcl /main/titanic/4 14 Mar 1997 Copyright 1997 Cayenne Software Inc.
-
- # Start user added include file section
- # End user added include file section
-
- require "enablepage.tcl"
-
- Class EdEnablePage : {EnablePage} {
- constructor
- method destructor
- method createInterface
- method clearInterface
- method sensitive
- method fromInterface
- method toInterface
- }
-
- constructor EdEnablePage {class this name} {
- set this [EnablePage::constructor $class $this $name]
- # Start constructor user section
- # End constructor user section
- return $this
- }
-
- method EdEnablePage::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this EnablePage::destructor
- }
-
- method EdEnablePage::createInterface {this} {
-
- interface NamedGroup $this.NG {
- label "Enabled editor area operation"
- DlgColumn DC {
- DlgRow DR {
- DlgColumn DC {
- CheckButton openCB { label Open }
- CheckButton undoCB { label Undo }
- CheckButton moveCB { label Move }
- CheckButton copyCB { label Copy }
- CheckButton deleteCB { label Delete }
- CheckButton replaceCB { label Replace }
- CheckButton changeCB { label Change }
- CheckButton copyToClipboardCB {label "Copy To Clipboard"}
- }
- DlgColumn DC {
- CheckButton centerCB { label Center }
- CheckButton saveCB { label Save }
- CheckButton readCB { label Read }
- CheckButton editCB { label Edit }
- CheckButton itemCB { label "On Item" }
- CheckButton checkCB { label Check }
- CheckButton diagramCB { label "On Diagram" }
- CheckButton pasteFromClipboardCB {label "Paste From Clipboard"}
- }
- }
- }
- }
- }
-
- method EdEnablePage::clearInterface {this} {
-
- [$this if].openCB state 0
- [$this if].undoCB state 0
- [$this if].moveCB state 0
- [$this if].copyCB state 0
- [$this if].deleteCB state 0
- [$this if].replaceCB state 0
- [$this if].changeCB state 0
- [$this if].centerCB state 0
- [$this if].saveCB state 0
- [$this if].readCB state 0
- [$this if].editCB state 0
- [$this if].itemCB state 0
- [$this if].checkCB state 0
- [$this if].diagramCB state 0
- [$this if].copyToClipboardCB state 0
- [$this if].pasteFromClipboardCB state 0
- }
-
- method EdEnablePage::sensitive {this args} {
-
- if {[llength $args] == 0} {
- return [[$this if].openCB sensitive]
- } else {
- set sensitive [lindex $args 0]
- }
-
- [$this if].openCB sensitive $sensitive
- [$this if].undoCB sensitive $sensitive
- [$this if].moveCB sensitive $sensitive
- [$this if].copyCB sensitive $sensitive
- [$this if].deleteCB sensitive $sensitive
- [$this if].replaceCB sensitive $sensitive
- [$this if].changeCB sensitive $sensitive
- [$this if].centerCB sensitive $sensitive
- [$this if].saveCB sensitive $sensitive
- [$this if].readCB sensitive $sensitive
- [$this if].editCB sensitive $sensitive
- [$this if].itemCB sensitive $sensitive
- [$this if].checkCB sensitive $sensitive
- [$this if].diagramCB sensitive $sensitive
- [$this if].copyToClipboardCB sensitive $sensitive
- [$this if].pasteFromClipboardCB sensitive $sensitive
-
- return $sensitive
- }
-
- method EdEnablePage::fromInterface {this} {
-
- set ops ""
- if [[$this if].openCB state] { lappend ops open }
- if [[$this if].undoCB state] { lappend ops undo }
- if [[$this if].moveCB state] { lappend ops move }
- if [[$this if].copyCB state] { lappend ops copy }
- if [[$this if].deleteCB state] { lappend ops delete }
- if [[$this if].replaceCB state] { lappend ops replace }
- if [[$this if].changeCB state] { lappend ops change }
- if [[$this if].centerCB state] { lappend ops center }
- if [[$this if].saveCB state] { lappend ops save }
- if [[$this if].readCB state] { lappend ops read }
- if [[$this if].editCB state] { lappend ops edit }
- if [[$this if].itemCB state] { lappend ops item }
- if [[$this if].checkCB state] { lappend ops check }
- if [[$this if].diagramCB state] { lappend ops diagram }
- if [[$this if].copyToClipboardCB state] \
- { lappend ops copyToClipboard }
- if [[$this if].pasteFromClipboardCB state] \
- { lappend ops pasteFromClipboard }
- set spec ""
- if {$ops != ""} {
- set spec [list operations $ops]
- }
- return $spec
- }
-
- method EdEnablePage::toInterface {this key value} {
-
- if {$key == "operations"} {
- foreach op $value {
- if [isCommand [$this if].${op}CB] {
- [$this if].${op}CB state 1
- }
- }
- }
- }
-
- # Do not delete this line -- regeneration end marker
-
-