Accueil CanalOpenSource
SourceServer
Langage xShell
BasicBrick
tcp OpenClient
tcp_OpenServer

DesignServer

openSource Shop Gallery
Main Street
freeway Avenue


Liens :

dsg_CaseOf
dsg_CommandLign
dsg_DefineFieldAndAlpList
dsg_DesignerExplorerOnStartup
dsg_Explorer
dsg_FindFI4DResource
dsg_FindTF4DResource
dsg_GetCC4D
dsg_GetFormBlob
dsg_GetMethod
dsg_GetMethodNames
dsg_LaunchApp
dsg_LoadPrefix
dsg_MenuEditor
dsg_MethodToText
dsg_SetFormBlob
Dsg_ToolBar
dsg_WebServerPrp
prc_Activate
uid_SetDef

 

 

Mot entier Recherche dans la sélection


Documentation | Méthode | Designer | Retour

dsg_Explorer
     `attention, o est utilisée par  dsg_CaseOf qui peut purger toutes les variables
     `de o . o ne doit pas être utilisée si dsg_CaseOf est appelée
     `la méthode d'appel sur evenement OnEventCall est aussi nécessaire
     `pour le clic souris
  
  
   C_TEXTE($1)
   Si (Nombre de parametres=0)
      <>appVers:=Version application
      Si (Type application#4D Server )
         $i:=Nouveau process("Dsg_Explorer";64000;"Dsg_Explorer";Launch )
         PASSER AU PREMIER PLAN($i)
      Fin de si
   Sinon
      
      Au cas ou
       : ($1=Launch )
         SUPPRIMER MESSAGES
        
         C_POINTEUR(str_ptrCurList)
         C_ENTIER(cboxReadWrite;bSearchInSel)
         C_TEXTE(vText;vtOutSideCallMessage;vtEntry;www_HTMLSource;uid_Current;usr_CurrentOnLoadAdmin)
         C_TEXTE(mnu_vtMenuBar;vtProcessType)
        
         txt_OnStartUpProcess
         prp_OnstartupProcess
         tcp_OnStartUpProcess
         alp_OnStartupProcess
         prc_OnStartUp
         frm_OnStartUpProcess
         OnErrorCall ("")
         fop_Declare (Init )
         o OnStartupProcess
        
         frm_vtEntryExeOnCloseBox:=""
         frm_DefineExecuteForEntry (OnLoad ;exe_SetExpr ("Dsg_Explorer('OnLoad')"))
         frm_DefineExecuteForEntry (OnOutSideCall ;exe_SetExpr ("Dsg_Explorer('OnOutSideCall')"))
        
         wnd_ResizableFloatingPalette ("Dsg_Explorer")
        
       : ($1=OnLoad )
           `________________________________________________________________________________
        
         vMessage:=""
         C_ENTIER($err)
         C_ENTIER LONG(vlh_DsgExplorer)
         hls_SetParam (Vrai;Gras ;458;0)
         $ptrTxt:=o ("hls_ItemText";Est un texte )
         $ptrTxt->:="Méthodes"
         hls_Set (->vlh_DsgExplorer;$ptrTxt)
         hls_SetParam (Vrai;Gras ;450;0)
         $ptrTxt->:="Structure virtuelle"
         hls_Set (->vlh_DsgExplorer;$ptrTxt)
         hls_SetParam (Vrai;Gras ;452;0)
         $ptrTxt->:="Préfixes & thèmes"
         hls_Set (->vlh_DsgExplorer;$ptrTxt)
        
         dsg_Explorer ("BuildListMethod")
         dsg_Explorer ("BuildListVirtualStructure")
        
         alp_SetArray
         alp_SetDefault (->alp_vlSubList;"";"")
         alp_SetColumn (-><>dsg_arrtPrefix;"Préfixe")
         alp_SetColumn (-><>dsg_arrtChapterName;"Thème")
         alp_SetCurrentArea (->alp_vlSubList)
         cbReadWrite:=1
        
           `construction de la liste des commandes 4D + plug in
        
        
       : ($1=OnOutSideCall )
        
        
        
       : ($1="OnDoubleClic")
         Si (Page formulaire courante=1)
            $method:=hls_GetText (->hls_vl1)
            $vl_Error:=API Open Method Editor ($method;0)
         Fin de si
        
       : ($1="OnClic")
        
        
         Si (ifOnPopUp ) & (ifOnWindows )
            dsg_CaseOf (hls_GetText (->hls_vl1))
         Sinon
            COORDONNEES FENETRE($gauche;$haut;$droit;$bas)
            POSITION SOURIS(sourisX;sourisY;boutonsouris)
            sourisX:=sourisX+$gauche
            sourisY:=sourisY+$haut
            $ref:=Fenetre premier plan
            $prc:=Numero du process courant
            COORDONNEES FENETRE($gauche2;$haut2;$droit2;$bas2;$ref)
            $ok1:=((sourisX<$gauche) | (sourisX>$droit) | (sourisY<$haut) | (sourisY>$bas))
            $ok2:=((sourisX>$gauche2) & (sourisX<$droit2) & (sourisY>$haut2) & (sourisY<$bas2))
            
            Si ($ok1) & ($ok2) & (<>MousseButton=1)
              
               Si (Page formulaire courante=1)
                  $txt:=hls_GetText (->hls_vl1)
               Sinon
                  $txt:=hls_GetText (->hls_vl3)
                  vtxt:=$txt
                  $txt1:=txt_CutOut (->vtxt;".")
                  $txt2:=txt_CutOut (->vtxt;".")
                  $txt3:=txt_CutOut (->vtxt;".")
                  Si ($txt3="")
                     Si (Windows Ctrl enfoncee)
                        $txt:="$ptr"+$txt2+":=vs_getptr("+Caractere(Guillemets )+$txt+Caractere(Guillemets )+")"
                     Sinon
                        $txt:="vs_getptr("+Caractere(Guillemets )+$txt+Caractere(Guillemets )+")"
                     Fin de si
                  Sinon
                     $txt1:=$txt2+$txt3
                     Si (Longueur($txt1)>31)
                        $txt2:=Sous chaine($txt1;1;5)
                        Si (Longueur($txt3)>26)
                           $txt3:=Sous chaine($txt3;1;26)
                        Fin de si
                        $txt1:=$txt2+$txt3
                     Fin de si
                     Si (Windows Ctrl enfoncee)
                        $txt:="$ptr"+$txt2+":=vs_getptr("+Caractere(Guillemets )+$txt+Caractere(Guillemets )+")"
                     Sinon
                        $txt:="vs_getptr("+Caractere(Guillemets )+$txt+Caractere(Guillemets )+")"
                     Fin de si
                  Fin de si
               Fin de si
              
               ECRIRE TEXTE DANS PRESSE PAPIERS($txt)
               ENDORMIR PROCESS($prc;1)
               C_ENTIER($gauche;$haut;$droit;$bas)
               COORDONNEES FENETRE($gauche;$haut;$droit;$bas;$ref)
               CHANGER COORDONNEES FENETRE($gauche;$haut;$droit;$bas;$ref)
               $prc2:=Process de premier plan(*)
               $Structure:=Chercher process(Lire chaine dans liste(170;3))
               Si ($prc2=$Structure)
                  $wndTitle:=Titre fenetre(Fenetre premier plan)
                  Si (Position("method";$wndTitle)=1)
                     Si (Non(ifOnWindows ))
                        CACHER PROCESS(Numero du process courant)
                        ENDORMIR PROCESS(Numero du process courant;10)
                     Fin de si
                     Si (Non(<>appVers>"0680"))
                        GENERER EVENEMENT(Touche enfoncée ;Code ascii("v");Nombre de ticks+5;0;0;Masque touche commande ;$Structure)
                     Fin de si
                     GENERER EVENEMENT(Touche enfoncée ;Code ascii("v");Nombre de ticks+5;0;0;Masque touche commande ;$Structure)
                     Si (Non(ifOnWindows ))
                        ENDORMIR PROCESS(Numero du process courant;10)
                        MONTRER PROCESS(Numero du process courant)
                     Fin de si
                  Fin de si
               Sinon
                  C_BOOLEEN(<>OnDrag_flgAccept)
                  Si (Non(<>OnDrag_flgAccept))
                     POSITION SOURIS(sourisX;sourisY;boutonsouris;*)
                     GENERER CLIC(sourisX;sourisY;$prc2;*)
                     GENERER FRAPPE CLAVIER(Code ascii("v");Masque touche commande ;$prc2)
                  Fin de si
                  <>OnDrag_flgAccept:=Faux
               Fin de si
            Fin de si
         Fin de si
        
        
        
       : ($1="BuildListMethod")
         TABLEAU TEXTE(dsg_arrtMethod;0)
         dsg_GetMethodNames (->dsg_arrtMethod)
         dsg_LoadPrefix
        
         hls_SetParam
         C_ENTIER LONG(hls_vl1)
         hls_vl1:=Nouvelle liste
         CHANGER PROPRIETES LISTE(hls_vl1;A la Macintosh ;860;20)
         hls_SetOnClic (exe_SetExpr ("Dsg_Explorer('OnClic')"))
         hls_vtExecuteOnDBClic:=exe_SetExpr ("Dsg_Explorer('OnDoubleClic')")
         vtext:="Toutes les méthodes"
         hls_vl2:=Nouvelle liste
         hls_SetParam (Faux;0;502;0)
         hls_AddArray (->hls_vl2;->dsg_arrtMethod)
         hls_SetParam (Faux;1;0)
         hls_AddList (->hls_vl1;vtext;->hls_vl2)
        
         C_ENTIER LONG(hls_vl2;hls_vl3)
         Boucle ($i;1;Taille tableau(<>dsg_arrtPrefix))
            $arrSize1:=0
            TABLEAU TEXTE(arr_ItemList;0)
            Repeter
               $x:=Chercher dans tableau(dsg_arrtMethod;<>dsg_arrtPrefix{$i}+Wildcard )
               Si ($x#-1)
                  $arrSize1:=$arrSize1+1
                  INSERER LIGNES(arr_ItemList;$arrSize1)
                  arr_ItemList{$arrSize1}:=dsg_arrtMethod{$x}
                  SUPPRIMER LIGNES(dsg_arrtMethod;$x)
               Fin de si
            Jusque ($x=-1)
            TRIER TABLEAU(arr_ItemList;>)
            hls_vl2:=Nouvelle liste
            hls_SetParam (Faux;0;502;0)
            hls_AddArray (->hls_vl2;->arr_ItemList)
            hls_SetParam (Faux;1;0)
            hls_AddList (->hls_vl1;<>dsg_arrtChapterName{$i};->hls_vl2)
            
         Fin de boucle
           `construction de la liste des methodes
         vtext:="Divers"
         TRIER TABLEAU(dsg_arrtMethod;>)
         hls_vl2:=Nouvelle liste
         hls_SetParam (Faux;0;502;0)
         hls_AddArray (->hls_vl2;->dsg_arrtMethod)
         hls_SetParam (Faux;1;0)
         hls_AddList (->hls_vl1;vtext;->hls_vl2)
         SELECTIONNER ELEMENT(hls_vl1;1)
         REDESSINER LISTE(hls_vl1)
         hls_SetParam (Faux;1;0)
        
       : ($1="BuildListVirtualStructure")
        
           `construction de la structure virtuelle
         C_ENTIER LONG(hls_vl3;hls_vl4;hls_vl5)
         hls_vl3:=Nouvelle liste
         dsg_DefineFieldAndAlpList ("ChargementListeDefinitions")
         TRIER TABLEAU(arr_FieldAndListDef;>)
         Boucle ($i;1;Taille tableau(arr_FieldAndListDef))
            arr_FieldAndListDef:=$i
            dsg_DefineFieldAndAlpList ("ChargementDefinitionTables")
            
            TABLEAU TEXTE(vs_arrTable;0)
            Boucle ($ii;1;Taille tableau(arr_LibelléTables))
               vs_arrTable{arr_AddLine (->vs_arrTable)}:=arr_FieldAndListDef{$i}+"."+arr_LibelléTables{$ii}
            Fin de boucle
            
            hls_vl4:=Nouvelle liste
            
            hls_SetParam (Faux;Gras ;450;0)
            hls_AddArray (->hls_vl4;->vs_arrTable)
            hls_SetParam (Faux;Gras ;10012;0)
            hls_AddList (->hls_vl3;arr_FieldAndListDef{$i};->hls_vl4)
            
            Boucle ($ii;1;Taille tableau(arr_LibelléTables))
              
               arr_LibelléTables:=$ii
               dsg_DefineFieldAndAlpList ("ChargementDesTableaux")
               $ptrArrPictType:=o ("$ptrArrPictType";Est un tableau entierlong )
               $ptrArrStyleIndexe:=o ("$ptrArrStyleIndexe";Est un tableau entierlong )
               TABLEAU TEXTE(vs_arrField;0)
               C_ENTIER LONG($type;$long)
               C_BOOLEEN($indexe)
               Boucle ($iii;1;Taille tableau(arr_NumChamps))
                  $ptrField:=Champ(Num(arr_NumTables{$ii});Num(arr_NumChamps{$iii}))
                  LIRE PROPRIETES CHAMP($ptrField;$type;$long;$indexe)
                  $ptrArrPictType->{arr_AddLine ($ptrArrPictType)}:=fld_TypeToPict ($ptrField)
                  $ptrArrStyleIndexe->{arr_AddLine ($ptrArrStyleIndexe)}:=Num($indexe)
                  vs_arrField{arr_AddLine (->vs_arrField)}:=arr_FieldAndListDef{$i}+"."+arr_LibelléTables{$ii}+"."+arr_LibelléChamps{$iii}
               Fin de boucle
               $ptrArrOpened:=o ("$ptrArrOpened";Est un tableau booléen )
               TABLEAU BOOLEEN($ptrArrOpened->;Taille tableau(vs_arrField))
              
               hls_vl5:=Nouvelle liste
              
               hls_SetParam
               hls_AddArray (->hls_vl5;->vs_arrField;$ptrArrOpened;$ptrArrStyleIndexe;$ptrArrPictType)
               hls_SetParam (Faux;Gras ;10011;0)
               hls_AddList (->hls_vl4;arr_LibelléTables{$ii};->hls_vl5)
              
            Fin de boucle
            
         Fin de boucle
        
        
        
      Fin de cas
   Fin de si
  
  



Documentation | Méthode | Designer  | Haut de page | Retour