For example, in Include_File_1 I could have my main window and an about box:
Code: Select all
Enumeration Windows
#Main_Window
EndEnumeration
Enumeration Gadgets; main window
#StringGadget
#ButtonGadget
#EditorGagdet
EndEnumeration
; Lots of code implementing main window
Enumeration Windows
#About_Dialog
EndEnumeration
Enumeration Gadgets; about dialog
#StringGadget
#ButtonGadget
#EditorGagdet
EndEnumeration
;Lots of code implementing the about dialog
Code: Select all
Enumeration Windows
#Search_and_Replace
EndEnumeration
Enumeration Gadgets; Search and Replace dialog
#Find_String
#Replace_String
#Find_First_Button
#Find_Next_Button
#Replace_Button
#Replace_All_Buttion
EndEnumeration
I don't think it would be too difficult to implement. The compiler could keep a list of all enumerations declared and keep note of the next available value for that enumeration.
Enumerations without a name could be given a default name, such as
_PB_Enum_1.
The immediate benefit of this would be that several VisualDesigner include files could be easily included without modification.
In fact, it would provide a clean, static alternative for handling any necessary ids across include files, making the creation of standard libraries easy.
This could be achieved using #PB_Any, which is a great new feature, but it does require additional coding to look after the dynamic ids returned. If the contents are static then this method would prevent any additional code clutter.