home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
iconselect.tcl
< prev
next >
Wrap
Text File
|
1997-07-31
|
2KB
|
68 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)iconselect.tcl /main/titanic/1
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)iconselect.tcl /main/titanic/1 31 Jul 1997 Copyright 1996 Cadre Technologies Inc.
# Start user added include file section
# End user added include file section
Class IconSelector : {TemplateDialog} {
method destructor
constructor
method select
method popUp
attribute image
attribute size
}
method IconSelector::destructor {this} {
# Start destructor user section
# End destructor user section
}
constructor IconSelector {class this name size} {
set this [TemplateDialog::constructor $class $this $name]
$this size $size
return $this
}
method IconSelector::select {this forImage} {
$this image $forImage
$this popUp
}
method IconSelector::popUp {this} {
if {![isCommand $this.HCP]} {
HorControlPanel new $this.HCP
set path [path_name concat [m4_var get M4_home] bitmaps]
set pattern *_[$this size]$BITMAP_EXT
set path [file join $path $pattern]
set bitmaps [glob $path]
set count 1
foreach i $bitmaps {
set name [file rootname [lindex [file split $i] end]]
lappend names $name
incr count
}
$this.HCP rowCount [ expr {$count/10}]
$this.HCP entrySet $names
$this modal Yes
$this okPressed {[%this image] pixmap [%this.HCP selected]}
$this helpPressed {.main helpOnName iconSelector}
}
$this TemplateDialog::popUp
}
# Do not delete this line -- regeneration end marker