Non mais là je deviens marteau. g-ROM en reprenant ton agencement, ça ne marche pas.
Je ne vois pas ce que j'ai pu louper.
(ESC pour quitter)
Code : Tout sélectionner
UseJPEGImageEncoder()
UseJPEGImageDecoder()
UsePNGImageEncoder()
UsePNGImageDecoder()
UseTGAImageDecoder()
UseTIFFImageDecoder()
; UseJPEG2000ImageDecoder()
; UseJPEG2000ImageEncoder()
Declare Affiche()
Enumeration
#ARS
EndEnumeration
Enumeration
#Panel
#ROOT
#EXP
#CANVAS
EndEnumeration
Enumeration
#TOUCHE_ESC
EndEnumeration
Enumeration
#T ; Timer
EndEnumeration
Structure Info
ID.i
imgID.i
IDpic.i
IDmin.i
imgIDpic.q
imgIDmin.q
Name.s
Path.s
L.i
H.i
Poids.q
EndStructure
Global.b Quite, ThreadLIST
Global NewMap img.info()
Global.i Hbarre, Lwin, Hwin, Lmin, Hmin, Lexp, Lcanvas, Hcanvas, LminPic, HminPic
Global.s RepEnCours, RepSelect, rep, OldROOT, Root, ROOTex
Global.s IMGpath
;-----------------------------
; A MODIFIER
IMGpath.s = "F:\Pics\"
; -----------------------------
Lexp = 300 ; largeur de l'explorer
Quite = 0
ThreadLIST = 0
; --------------------------------------------------------------------------------------------
; ----------- PROCE ------------ LISTAGE DES IMAGES
; --------------------------------------------------------------------------------------------
Procedure.i ListPics(*ZBOUB)
EndProcedure
; --------------------------------------------------------------------------------------------
; ----------- PROCE ------------ AFFICHAGE DES MINIATURES
; --------------------------------------------------------------------------------------------
Procedure Affiche()
EndProcedure
; --------------------------------------------------------------------------------------------
; ----------- PROCE ------------ FENETRE PRINCIPALE
; --------------------------------------------------------------------------------------------
If OpenWindow(#ARS, #PB_Ignore, #PB_Ignore, #PB_Ignore, #PB_Ignore, "Ar-S VISIONEUSE test ",#PB_Window_BorderLess) = 0
End
EndIf
SetWindowState(#ars, #PB_Window_Maximize)
Lwin = WindowWidth(#ars, #PB_Window_InnerCoordinate)
Hwin = WindowHeight(#ars, #PB_Window_InnerCoordinate)
Debug "fenêtre : " + Str(Lwin) + " x " +Str(Hwin)
PanelGadget(#Panel, 0, 0, Lwin, Hwin)
LCanvas = (GadgetWidth(#panel))
HCanvas = GadgetHeight(#panel)
; Tab #1
AddGadgetItem(#Panel, -1, "Choix du dossier")
ExplorerComboGadget(#ROOT,0,0, Lexp,25, "F:\",#PB_Explorer_DrivesOnly)
ExplorerListGadget(#EXP, 0, 25, Lexp, Hwin-25, IMGpath.s , #PB_Explorer_NoFiles |#PB_Explorer_AutoSort|#PB_Explorer_FullRowSelect|#PB_Explorer_GridLines)
RepEnCours.s = GetGadgetText(#EXP)
Debug "RepEnCours : " + RepEnCours
CanvasGadget(#CANVAS, Lexp, 0, LCanvas-Lexp, Hcanvas)
CloseGadgetList()
AddKeyboardShortcut(#ARS, #PB_Shortcut_Escape, #TOUCHE_ESC)
AddWindowTimer(#ARS, #T, 50)
; --------------------------------------------------------------------------------------------
; ----------- BOUCLE ------------ PRINCIPALE
; --------------------------------------------------------------------------------------------
While(1)
Event = WindowEvent()
EventType = #Null ; On ne sait pas encore
EventGadget = #Null ; On ne sait pas encore
If Event
Select Event
; --------------------------------------------------------------------------------------------
; ----------- EVENT ------------ WINDOW + dbleclic
; --------------------------------------------------------------------------------------------
Case #PB_Event_LeftDoubleClick
Debug "double clic dans fenetre"
; --------------------------------------------------------------------------------------------
; ----------- EVENT ------------ GADGETS
; --------------------------------------------------------------------------------------------
Case #PB_Event_Gadget
EventGadget = EventGadget() ; appel au bon moment
EventType = EventType() ; appel au bon moment
If EventGadget = #EXP And EventType = #PB_EventType_LeftDoubleClick
Debug "DOUBLE CLIC !"
;
EndIf
If EventGadget = #ROOT
OldROOT.s = GetGadgetText(#ROOT)
If Left(GetGadgetText(#EXP),1) <> Left(GetGadgetText(#ROOT),1)
SetGadgetText(#EXP, GetGadgetText(#ROOT))
EndIf
EndIf
; --------------------------------------------------------------------------------------------
; ----------- EVENT ------------ MENU (raccourcis clavier)
; --------------------------------------------------------------------------------------------
Case #PB_Event_Menu
Select EventMenu()
Case #TOUCHE_ESC
Quite = 1
Break
EndSelect
EndSelect
EndIf
Wend
RemoveKeyboardShortcut(#ARS, #TOUCHE_ESC)
CloseWindow(#ARS)
End
;
;}