<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<div><font class="Apple-style-span" face="Tahoma" size="2">unit D_fleche; {written by denis bertin in a day for www.denisdraw.com with delphi-7}</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">interface</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">uses windows,whelp,wbase,col_plan,dialbase,messages;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">type</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">Tdial_position_fleche = class(whelp.ThelpDialog)</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> constructor create (un_parent:wbase.twindow; un_plan_param:col_plan.TCalque);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> procedure setupwindow; override;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> procedure wmnum_edit_change(var msg:messages.TMessage); override;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> procedure <span class="Apple-tab-span" style="white-space:pre"> </span>wmcommand(var Msg: TMessage); override;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> private</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> un_calque_actif:col_plan.TCalque;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Position_de_la_fleche:dialbase.TNumEdit_plus_moins;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Epaisseur_de_la_fleche:dialbase.TNumEdit_plus_moins;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Distance_de_la_fleche:dialbase.TNumEdit_plus_moins;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> public</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> bool_modifier:boolean;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> count_before:integer;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> end; {Tdial_position_fleche}</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">implementation</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">uses wmain;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">Type</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> TRec_Position_fleche = record</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Position,</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Epaisseur,</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Distance:integer;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> end;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">var Rec_Position_fleche : TRec_Position_fleche;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">const id_appliquer = 1000;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">constructor Tdial_position_fleche.create(un_parent:wbase.twindow; un_plan_param:col_plan.TCalque);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> const kid_position_fleche = 1681;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> const id_Position_de_la_fleche = 101;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> const id_Epaisseur_de_la_fleche = 102;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> const id_Distance_de_la_fleche = 103;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> begin</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> inherited create(un_parent,kid_position_fleche,0);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> TransferBuffer := @Rec_Position_fleche;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Self.un_calque_actif:=un_plan_param;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Self.Position_de_la_fleche:=dialbase.TNumEdit_plus_moins.create(self,id_Position_de_la_fleche,3,0,100,0);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Self.Position_de_la_fleche.Enable_Previent_ton_Parent(true);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Self.Epaisseur_de_la_fleche:=dialbase.TNumEdit_plus_moins.create(self,id_Epaisseur_de_la_fleche,3,0,100,0);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Self.Epaisseur_de_la_fleche.Enable_Previent_ton_Parent(true);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Self.Distance_de_la_fleche:=dialbase.TNumEdit_plus_moins.create(self,id_Distance_de_la_fleche,3,0,100,0);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Self.Distance_de_la_fleche.Enable_Previent_ton_Parent(true);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Self.bool_modifier:=false;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> count_before:=Self.un_calque_actif.count;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> end;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">procedure Tdial_position_fleche.setupwindow;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> begin</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> inherited setupwindow;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> postmessage(self.hwindow,wm_command,id_appliquer,0);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> end; {Tdial_position_fleche.setupwindow}</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">procedure Tdial_position_fleche.wmnum_edit_change(var msg:TMessage);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> begin</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> postmessage(self.hwindow,wm_command,id_appliquer,0);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> end; {Tdial_position_fleche.wmnum_edit_change}</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">procedure Tdial_position_fleche.wmcommand(var Msg: TMessage);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> var i:integer;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> begin</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> inherited wmcommand(Msg);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> case Msg.Wparam of</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> id_cancel:</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> begin</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> if bool_modifier then</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> begin</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> for i:=count_before to pred(Self.un_calque_actif.count) do</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> begin Self.un_calque_actif.atdelete(i); end;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> end;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> end;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> id_appliquer:</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> begin</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> if bool_modifier then</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> begin</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> for i:=count_before to pred(Self.un_calque_actif.count) do</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> begin Self.un_calque_actif.atdelete(i); end;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> end;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> Self.TransferData(TDirT_GetData);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> with Rec_Position_fleche do</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> un_calque_actif.Dessiner_une_fleche_rigide(bool_modifier,Epaisseur,Position,Distance); {->formecom}</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> invalidaterect(wmain.MainWindow.hwindow,nil,false);</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> end;</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> end; {case}</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> end; {Tdial_position_fleche.wmcommand}</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">begin</font></div><div><font class="Apple-style-span" face="Tahoma" size="2">Rec_Position_fleche.Position:=80; {%}</font></div><div><font class="Apple-style-span" face="Tahoma" size="2">Rec_Position_fleche.Epaisseur:=20; {%}</font></div><div><font class="Apple-style-span" face="Tahoma" size="2">Rec_Position_fleche.Distance:=25; {%}</font></div><div><font class="Apple-style-span" face="Tahoma" size="2">end.</font></div><div style="font-family: Tahoma; font-size: 10pt; "><br></div> </body>
</html>