Just a small idea/ whish:
As PB stores a lot of datas, related to PB objects, internaly, it would be nice if the coder can benefit from this. Maybe something like
PB-Windows:
ExaminePBWindows(), NextPBWindow(),GetPBWindowID()
PB-Gadgets:
ExaminePBGadget([WindowID]), NextPBGadget(), GetPBGadgetID()
This would help the coder not to add another list, to the existing internal one of pb, for handling with PB objects.
With this commands its then possible to save all Window-Position and sizes to an .ini file that can be loaded and restored on the next application start. No need for a new linked list to store these datas, deleting elements of that lists if an pb object got freed....
Examineing PB Objects
Examineing PB Objects
Tranquil
try this :
Code: Select all
Import "ObjectManager.lib"
PB_Object_EnumerateAll(obj,cb,uData)
PB_Gadget_Objects.l
PB_Window_Objects.l
EndImport
Procedure GadgetEnumCB(id,*element,udata)
Debug id
ProcedureReturn #True ; if false then abort
EndProcedure
hwnd = OpenWindow(0,0,0,0,0,"")
OpenWindow(#PB_Any,0,0,0,0,"")
OpenWindow(55,0,0,0,0,"")
CreateGadgetList(hwnd)
ButtonGadget(0,0,0,0,0,"")
ButtonGadget(77,0,0,0,0,"")
StringGadget(2,0,0,0,0,"")
StringGadget(#PB_Any,0,0,0,0,"")
Debug "----------- Window -----------"
PB_Object_EnumerateAll(PB_Window_Objects,@GadgetEnumCB(),0)
Debug "----------- Gadget -----------"
PB_Object_EnumerateAll(PB_Gadget_Objects,@GadgetEnumCB(),0)