Type IDBWin ... Method Create:IDBWin(name$,width%,height%) 'Local a:IDBWin dbg_win=CreateWindow(name$,200,200,width%,height%,Null,WINDOW_TITLEBAR) dbg_varSelect=CreateTreeView(5,5,282,200,dbg_win) For getGrp:IDB_GROUP = EachIn IDB_GList getGrp.tnode=AddTreeViewNode(getGrp.name$,dbg_varSelect) For Local tVar:IDB_VARIABLE = EachIn getGrp.varList tVar.tnode=AddTreeViewNode(tVar.name$,getGrp.tnode) Next Next dbg_desc=CreateLabel("Description: ",5,210,282,20,dbg_win) dbg_dtype=CreateLabel("Data Type: ",5,230,282,20,dbg_win) dbg_defv=CreateLabel("Default Value: ",5,250,282,20,dbg_win) dbg_inp=CreateTextField(5,270,200,24,dbg_win) dbg_setb=CreateButton("SET",207,270,77,24,dbg_win,BUTTON_PUSH) SetGadgetText(dbg_inp,"VALUE") DisableGadget(dbg_inp) AddHook EmitEventHook,eventHook,Self Return Self EndMethod Method Destroy() RemoveHook EmitEventHook,eventHook FreeGadget(Self.dbg_win) EndMethod Function eventHook:Object(id,data:Object,context:Object) Local app:IDBWin Local event:TEvent event=TEvent(data) app=IDBWin(context) app.OnEvent event End Function ... EndType Function idb_GUIOpen(idb:IDBWin) idb = New IDBWin.Create("Test",300,400) EndFunction Function idb_GUIClose(idb:IDBWin) idb.Destroy() idb = Null EndFunction
Hook Unhook?
BlitzMax Forums/BlitzMax GUI Programming/Hook Unhook?The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.