home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
iconselect.tcl
< prev
next >
Wrap
Text File
|
1996-08-28
|
2KB
|
66 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)iconselect.tcl 1.7
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)iconselect.tcl 1.7 12 Mar 1996 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 path [path_name concat $path *_[$this size] \
[string trim $BITMAP_EXT "."]]
set bitmaps [glob $path]
set count 1
foreach i $bitmaps {
lappend names [path_name base $i]
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