; Form Designer for PureBasic - 6.20 ; Warning: this file uses a strict syntax, if you edit it, make sure to respect the Form Designer limitation or it won't be opened again. ; ; This code is automatically generated by the Form Designer. ; Manual modification is possible to adjust existing commands, but anything else will be dropped when the code is compiled. ; Event procedures need to be put in another source file. ; Global Window_0 Global Text_0, inputFile, in_open, Text_0_Copy1, outputFile, out_open, wait_text, start, normalize, Text_1, Text_1_Copy1, Frame_0, ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, download_text Enumeration FormMenu #MenuItem_2 #MenuItem_3 #MenuItem_4 #MenuItem_5 EndEnumeration Declare CheckUpdate(Event) Declare About(Event) Declare PCRELicense(Event) Declare RemoveFFmpeg(Event) Declare StartReencode(EventType) Declare SelectOutput(EventType) Declare SelectInput(EventType) Procedure OpenWindow_0(x = 100, y = 100, width = 600, height = 390) Window_0 = OpenWindow(#PB_Any, x, y, width, height, "FFmpeg Reencode", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_TitleBar) CreateMenu(0, WindowID(Window_0)) MenuTitle("About") MenuItem(#MenuItem_2, "Delete FFmpeg") MenuItem(#MenuItem_3, "About") MenuItem(#MenuItem_4, "PCRE license (RegEx library)") MenuItem(#MenuItem_5, "Check For Updates") Text_0 = TextGadget(#PB_Any, 10, 10, 100, 25, "Input File") inputFile = StringGadget(#PB_Any, 10, 30, 460, 25, "") GadgetToolTip(inputFile, "Input File") in_open = ButtonGadget(#PB_Any, 480, 30, 110, 25, "Open...") Text_0_Copy1 = TextGadget(#PB_Any, 10, 70, 100, 25, "Output File") outputFile = StringGadget(#PB_Any, 10, 90, 460, 25, "") GadgetToolTip(outputFile, "Output File") out_open = ButtonGadget(#PB_Any, 480, 90, 110, 25, "Open...") wait_text = TextGadget(#PB_Any, 220, 300, 170, 20, "Please wait for FFmpeg to finish") SetGadgetColor(wait_text, #PB_Gadget_FrontColor,RGB(255,0,0)) start = ButtonGadget(#PB_Any, 250, 320, 100, 25, "Reencode") normalize = CheckBoxGadget(#PB_Any, 10, 130, 190, 25, "Normalize Audio (Experimental!)") Text_1 = TextGadget(#PB_Any, 230, 220, 360, 25, "Note: Higher encoding speeds result in less compression efficiency") Text_1_Copy1 = TextGadget(#PB_Any, 230, 240, 360, 25, "(Very Slow is about 80% smaller than Ultra Fast)") Frame_0 = FrameGadget(#PB_Any, 220, 130, 370, 130, "Encoding Speed") ultrafast = OptionGadget(#PB_Any, 240, 150, 100, 25, "Ultra Fast") superfast = OptionGadget(#PB_Any, 240, 170, 100, 25, "Super Fast") veryfast = OptionGadget(#PB_Any, 240, 190, 100, 25, "Very Fast") faster = OptionGadget(#PB_Any, 350, 150, 100, 25, "Faster") fast = OptionGadget(#PB_Any, 350, 170, 100, 25, "Fast") medium = OptionGadget(#PB_Any, 350, 190, 100, 25, "Medium") SetGadgetState(medium, 1) slow = OptionGadget(#PB_Any, 450, 150, 100, 25, "Slow") slower = OptionGadget(#PB_Any, 450, 170, 100, 25, "Slower") veryslow = OptionGadget(#PB_Any, 450, 190, 100, 25, "Very Slow") download_text = TextGadget(#PB_Any, 130, 280, 350, 20, "Downloading FFmpeg...", #PB_Text_Center) SetGadgetColor(download_text, #PB_Gadget_FrontColor,RGB(255,0,0)) EndProcedure Procedure Window_0_Events(event) Select event Case #PB_Event_CloseWindow ProcedureReturn #False Case #PB_Event_Menu Select EventMenu() Case #MenuItem_2 RemoveFFmpeg(EventMenu()) Case #MenuItem_3 About(EventMenu()) Case #MenuItem_4 PCRELicense(EventMenu()) Case #MenuItem_5 CheckUpdate(EventMenu()) EndSelect Case #PB_Event_Gadget Select EventGadget() Case in_open SelectInput(EventType()) Case out_open SelectOutput(EventType()) Case start StartReencode(EventType()) EndSelect EndSelect ProcedureReturn #True EndProcedure