#------------------------------------------------------------------------ # Compagny : 4Js # Developper : PM # Program : $PROJET/objects/boxmenu.obj # Date : 04.07.1995 # Last modif. : 15.10.1995 # Title : Description d'un objet menu #------------------------------------------------------------------------ # Explications : # #====================================================================== # Boxmenu : # List of RadioButton #...................................................................... Class Boxmenu { inherit Frame global Default #vars : #application vars : public int_geoman "place_it" public int_cmd_box "" public int_listbox "" public int_variable "" ;# will be given by default ;# to the members public int_lifetype "permanent" ;# permanent or not public int_soons "listbox members" public int_members "" ;# list of command button constructor { config } { set int_variable ${this}_var set int_listbox [ Listbox ${this}_bm \ -int_geoman "pack_it" \ -geo_bg $geo_bg \ ] # -geo_highlight_bg "black" } destructor { # puts stderr "Boxmenu::destructor, come in for $this" } #----------------------------------------------------------------------- # Add_Member_Boxmenu : # This function adds a new menu point to the chose # Parameters: name of object, its label, and the working variable #........................................................................ method add_member { label method } { global Default # puts stderr "Boxmenu::addmember; come in; received label $label" # puts stderr "this is $this" $int_listbox append $label lappend int_cmd_box $method # puts stderr "Boxmenu::add_member; goes out" } #----------------------------------------------------------------------- # Define_Boxmenu : # This function defines a one-level menu. # Parameters: name of object # Returns: the list of objects defined. #........................................................................ method define { } { #wm geometry . +50+250 Frame::define ${this}_bm set_binding " eval \[lindex \[$this getPub -int_cmd_box\] \[\[$this getPub -int_listbox\] highlight\]\] " # puts \"coucou : index is \[\[$this getPub -int_listbox\] highlight\]\" # puts \" command is \[$this getPub -int_cmd_box\]\" } method refresh { } { Frame::refresh } } ;# end of class Boxmenu #----------------------------------------------------------------------- # ======================================================================