; ; This code is automatically generated by the FormDesigner. ; Manual modification is possible to adjust existing commands, but anything else will be dropped when the code is compiled. ; Event procedures needs to be put in another source file. ; Enumeration FormWindow #Window_Websocketclient EndEnumeration Enumeration FormGadget #String_send #String_url #Button_connect #Frame3D_io #Button_send #ListView_Output EndEnumeration Declare gui_button_connect(EventType) Declare gui_button_send(EventType) Procedure OpenWindow_Websocketclient(x = 0, y = 0, width = 600, height = 400) OpenWindow(#Window_Websocketclient, x, y, width, height, "Websocketclient :: Test-GUI", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered) StringGadget(#String_send, 20, 60, 460, 25, "") StringGadget(#String_url, 10, 10, 470, 25, "ws://echo.websocket.org") ButtonGadget(#Button_connect, 490, 10, 100, 25, "Connect") FrameGadget(#Frame3D_io, 10, 40, 580, 350, "Input/Output") ButtonGadget(#Button_send, 490, 60, 90, 25, "Send") ListViewGadget(#ListView_Output, 20, 100, 560, 280) EndProcedure Procedure Window_Websocketclient_Events(event) Select event Case #PB_Event_CloseWindow ProcedureReturn #False Case #PB_Event_Menu Select EventMenu() EndSelect Case #PB_Event_Gadget Select EventGadget() Case #Button_connect gui_button_connect(EventType()) Case #Button_send gui_button_send(EventType()) EndSelect EndSelect ProcedureReturn #True EndProcedure ; IDE Options = PureBasic 5.31 (Windows - x64) ; CursorPosition = 31 ; Folding = - ; EnableUnicode ; EnableXP ; EnableUser ; EnableCompileCount = 0 ; EnableBuildCount = 0