#===============================================================
# Compagny	:	4Js
# Developper	:	PhM
# Program	:	$CFGDESI/objects/rkeframe.tko
# Project	:	ConfDaisy.tko
# Date		:	03.04.1997
# Last modif.	:	03.04.1997
# Explication	: 
#  This class was created to procure the methode init_bg_res,
# which is a particular method for the 4GL-Window point of the
# Resource manager. This method make the bg resource to be the same
# than the bgColorWhite, and was first implemented in rFrame,
# (rFrame was corresponding to the 4GL-Window point). But when
# the 4GL-Window has the same bg resource than bgColorWhite,
# every object derived from rFrame had the same bg color (menu..).
# So I had to create a new class for the object 4GL-Window.
#---------------------------------------------------------------

Class r4glFrame {
inherit rFrame

#	public geo_x	   50
#	public geo_y	   10
	public geo_width   200
  	public geo_text "4GL - Window"

	protected _geo_bg		""
	protected _geo_fg		""
	protected _geo_relief		""
	protected _geo_borderwidth	""
	protected _res_list   "geo_bg  geo_relief geo_borderwidth "
	protected _geo_height		""

	public int_moveable	"Y"
	public int_show_attr	"Y"

constructor { config } {
#  set geo_text "r4glFrame"
  }

#===================================================================
# This method is a redefinition of the one defined in rwidget class.
# Because FglFrame(r4glFrame) must use the same background than
# bgColorWhite.
# january 1997
#-------------------------------------------------------------------
method init_bg_res { class } {
    # puts stderr "came in init_bg_res for $this"
    if { [ Resource :: have_you FglbgColorWhite_bg ] == 0} {
#          puts stderr "FglbgColorWhite_bg Resource object does already exist"
           set geo_bg [FglbgColorWhite_bg getPub -int_value]
        } else {
           rBackground FglbgColorWhite_bg -int_host_class FglbgColorWhite
#          puts stderr "FglbgColorWhite_bg Resource object did not exist"
           FglbgColorWhite_bg config -int_value $geo_bg
        }
   set _geo_bg  FglbgColorWhite_bg
   if {[catch {FglbgColorWhite_bg info class}] == 0 } {
     # objects does exists
#     puts stderr "Adding $this to FglbgColorWhite_bg resource"
     FglbgColorWhite_bg add_obj_to_rlist $this
     } else {
#     puts stderr "FglbgColorWhite_bg does not exist"
     }
  }
#---------------------------------------------------------------
}	;# end of class