events callback chain WaitWindowEventsCallBack()
Posted: Fri Mar 01, 2013 10:03 pm
It would be useful to have a cross platform events callback chain for the development of user controls
of for general use as an event driven UI model eg MyGadget_OnLeftClick()
Currently there is no cross platform native PB method to set a callback for a gadget or a custom gadget.
This usually results in the user of control having to place an update function to the control within their
events loop so it process internal events.
Proposed Functions
It could be implemented by either using a list or by directly setting a pointer in a gadgets or windows structure
similar to SetGadgetData()
Draft Implementation
http://www.purebasic.fr/english/viewtop ... 12&t=53772
of for general use as an event driven UI model eg MyGadget_OnLeftClick()
Currently there is no cross platform native PB method to set a callback for a gadget or a custom gadget.
This usually results in the user of control having to place an update function to the control within their
events loop so it process internal events.
Proposed Functions
Code: Select all
SetEventCallBackGadget(Gadget,*Function.protoEventCallBackGadget,*UserData=0,EventType=-1)
ChangeEventCallBackGadget(EventCallback,*Function.protoEventCallBackGadget,*UserData=0,EventType=-1)
SetEventCallBackWindow(Window,*Function.protoEventCallBackWindow,*UserData=0,Event=-1)
ChangeEventCallBackWindow(EventCallback,*Function.protoEventCallBackGadget,*UserData=0,Event=-1)
WaitWindowEventCallBacks(timeout=0)
similar to SetGadgetData()
Draft Implementation
http://www.purebasic.fr/english/viewtop ... 12&t=53772