File: w_window.srw
Size: 9646
Date: Wed, 28 Sep 2011 00:21:36 +0200
$PBExportHeader$w_window.srw
forward
global type w_window from Window
end type
type canvas1 from System.Windows.Controls.Canvas within w_window
end type
type dw_1 from DataWindow within w_window
end type
type mle_1 from MultiLineEdit within w_window
end type
type cb_1 from CommandButton within w_window
end type
type dw_2 from DataWindow within w_window
end type
type inv_dwfisheye from n_cst_dwfisheye within w_window
end type
type sle_mouselog from SingleLineEdit within w_window
end type
type cb_2 from CommandButton within w_window
end type
end forward

global type w_window from Window
event ue_xaml_mousemove (System.Object sender, System.Windows.Input.MouseEventArgs e)
canvas1 canvas1
dw_1 dw_1
mle_1 mle_1
cb_1 cb_1
dw_2 dw_2
inv_dwfisheye inv_dwfisheye
sle_mouselog sle_mouselog
cb_2 cb_2
end type
global w_window w_window

type variables
long il_counter
end variables

on w_window.create
this.canvas1 = create canvas1
this.dw_1 = create dw_1
this.mle_1 = create mle_1
this.cb_1 = create cb_1
this.dw_2 = create dw_2
this.inv_dwfisheye = create inv_dwfisheye
this.sle_mouselog = create sle_mouselog
this.cb_2 = create cb_2
this.Control[]={this.canvas1,&
this.dw_1,&
this.mle_1,&
this.cb_1,&
this.dw_2,&
this.sle_mouselog,&
this.cb_2}
end on

on w_window.destroy
destroy(this.canvas1)
destroy(this.dw_1)
destroy(this.mle_1)
destroy(this.cb_1)
destroy(this.dw_2)
destroy(this.inv_dwfisheye)
destroy(this.sle_mouselog)
destroy(this.cb_2)
end on

event Open;dw_1.SetTransObject(sqlca);
dw_1.Retrieve()

//dw_2.OnLostMouseCapture

System.Windows.RoutedEventHandler reh
reh = dw_2.ue_LostMouseCapture
System.Windows.RoutedEvent re
System.Windows.UIElement UIEL
System.object so
//so = dw_2
//UIEL = so
//this.dw_2.InnerControl.LostMouseCapture+=dw_2.ue_LostMouseCapture
//UIEL.OnM

//LostMouseCapture+=dw_2.ue_LostMouseCapture


//re = dw_2.LostMouseCapture
//This.InnerControl.AddHandler(re, reh)
//this.InnerControl.Ad
//AddHandler(re, reh)
//System.Windows.Controls.Button dw_3
//dw_2.LostMouseCapture+=dw_2.ue_LostMouseCapture
end event

event ue_xaml_mousemove;MessageBox("Hi from XAML","")
end event

type canvas1 from System.Windows.Controls.Canvas within w_window
end type

type dw_1 from DataWindow within w_window
end type

on dw_1.create
end on

on dw_1.destroy
end on

type mle_1 from MultiLineEdit within w_window
end type

on mle_1.create
end on

on mle_1.destroy
end on

type cb_1 from CommandButton within w_window
end type

on cb_1.create
end on

on cb_1.destroy
end on

event Clicked;
DataStore lds

String   ls_syntax, ls_style, ls_action
String   ls_html
Integer li_return
ls_action =  "/cgi-bin/pbcgi60.exe/myapp/uo_webtest/f_emplist"
//li_return = lds.GenerateHTMLForm  &
//        (ls_syntax, ls_style, ls_action)
//li_return = dw_1.GenerateHTMLForm  &
        //(ls_syntax, ls_style, ls_action)
      
ls_html = dw_1.Describe('DataWindow.Data.XML')
ls_html = dw_1.Object.DataWindow.Data.XML
mle_1.Text = ls_html
end event

type dw_2 from DataWindow within w_window
event ue_dwn_mousemove pbm_dwnmousemove
event ue_LostMouseCapture (Object sender, System.Windows.RoutedEventArgs e)
end type

on dw_2.create
end on

on dw_2.destroy
end on

event ue_dwn_mousemove;
inv_dwfisheye.of_mousemove( xpos, ypos)
il_counter ++
sle_mouselog.text = string ( il_counter ) + "- " + string ( xpos ) + " - " + string (ypos )
end event

event ue_LostMouseCapture;MessageBox("Lost","")
return
end event

event Constructor;
string ls_images [] = { 'p_1', 'p_2' , 'p_3' , 'p_4' , 'p_5' }

inv_dwfisheye.of_setrequestor( this )

inv_dwfisheye.of_registerimages( ls_images )
end event

type inv_dwfisheye from n_cst_dwfisheye within w_window descriptor "pb_nvo" = "true"
end type

on inv_dwfisheye.create
call super::create
end on

on inv_dwfisheye.destroy
call super::destroy
end on

type sle_mouselog from SingleLineEdit within w_window
end type

on sle_mouselog.create
end on

on sle_mouselog.destroy
end on

type cb_2 from CommandButton within w_window
end type

on cb_2.create
end on

on cb_2.destroy
end on

event Clicked;
DataStore lds

String   ls_syntax, ls_style, ls_action
String   ls_html
Integer li_return
ls_action =  "/cgi-bin/pbcgi60.exe/myapp/uo_webtest/f_emplist"
//li_return = lds.GenerateHTMLForm  &
//        (ls_syntax, ls_style, ls_action)
//li_return = dw_1.GenerateHTMLForm  &
//     (ls_syntax, ls_style, ls_action)
//     dw_1.setHTMLAction( ls_action, ls_context)
//ls_html = dw_1.GenerateXMLWeb ("1")     
//ls_html = dw_1.Describe('DataWindow.Data.HTML')
//ls_html = dw_1.Object.DataWindow.Data.HTML
//ls_html = dw_1.Object.DataWindow.Data.XML
mle_1.Text = ls_html
end event