Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

FlatButton.tcl

00001 # Copyright (C) 1997-2004 The CDG Team <cdg@nats.informatik.uni-hamburg.de> 00002 # 00003 # This file is free software; as a special exception the author gives 00004 # unlimited permission to copy and/or distribute it, with or without 00005 # modifications, as long as this notice is preserved. 00006 # 00007 # This program is distributed in the hope that it will be useful, but 00008 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the 00009 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00010 00011 ## ---------------------------------------------------------------------------- 00012 ## FlatButton - a flatened pushbutton. 00013 ## This is just a button with a more KDEish look and feel mainly used in 00014 ## the toolbars. 00015 ## 00016 ## \author Michael Daum 00017 ## 00018 ## $Id: FlatButton.tcl,v 1.8 2004/02/25 14:42:09 micha Exp $ 00019 ## ---------------------------------------------------------------------------- 00020 class FlatButton { 00021 inherit iwidgets::Pushbutton 00022 00023 constructor {args} {}; ## \type TclList 00024 }; 00025 00026 ## ---------------------------------------------------------------------------- 00027 ## constructor 00028 ## ---------------------------------------------------------------------------- 00029 body FlatButton::constructor {args} { 00030 00031 bind $itk_component(pushbutton) <Enter> {%W configure -relief raised} 00032 bind $itk_component(pushbutton) <Leave> {%W configure -relief flat} 00033 00034 eval itk_initialize $args 00035 00036 configure \ 00037 -defaultringpad 0 \ 00038 -borderwidth 2 \ 00039 -padx 2 \ 00040 -pady 2 \ 00041 -relief flat 00042 00043 $itk_component(pushbutton) configure \ 00044 -relief flat \ 00045 }

YADA 2.0-alpha (20 Oct 2004)