#------------------------------------------------------------------------ # Compagny : 4Js # Developper : PhM # Program : $PROJET/objects/frame.obj # Last modif. : 13.10.1995 # Title : Description des classes de base #------------------------------------------------------------------------ # Explication : # Displaying is assumed by the methode Display_Frame, called by # the display event of the object. Define_Frame creates the graphical # object, with root window and so on. But only the Pack_Frame (and # eventually the Place_Frame- ) -methodes can display it on screen. # So Display_Frame is tk-independant. # The display event is called with optionnaly root parameter (in this case, # the actually object root is lost and replaced with the new), but the # define, pack_it, place_it are without root parameter, because it is # assumed that the root is already known. #====================================================================== Class Frame { inherit Container public int_geoman "pack_it" public geo_fill "x" constructor { config } { # puts "Doing Frame::constructor" } destructor { } # method config {config} {} #----------------------------------------------------------------------- # Define_Frame : # Creation of the graphical object, with full path... # Entry : name : Entity name of object # Returns : nothing. #....................................................................... method define { } { Container::define # puts stderr "Frame::define pass for $this" # trace "Creation d'un frame ..... $name(geo,widget)" set cmd "" ;# Creation de la commande adaptee a l'objet !!! lappend cmd frame ${geo_root}w$int_name lappend cmd -background $geo_bg lappend cmd -borderwidth $geo_borderwidth lappend cmd -relief $geo_relief if {$geo_width != 0} { lappend cmd -width $geo_width} { } if {$geo_height != 0} { lappend cmd -height $geo_height } set geo_widget [ eval $cmd ] # puts "Frame::define, created $geo_widget" } #----------------------------------------------------------------------- method refresh { } { set cmd "" ;# Creation de la commande adaptee a l'objet !!! lappend cmd $geo_widget configure lappend cmd -borderwidth $geo_borderwidth lappend cmd -relief $geo_relief lappend cmd -background $geo_bg if {$geo_width != 0} { lappend cmd -width $geo_width} if {$geo_height != 0} { lappend cmd -height $geo_height} eval $cmd } method hide { } { # lower $geo_widget place $geo_widget -x 2000 -y 2000 } } ;# end of class #======================================================================