#PB_Web_BlockPopupMenu: Block standard the popup menu. #PB_EventType_PopupWindow is fired if this setting is enabled. #PB_Web_BlockPopups : Block popup windows. #PB_Web_ScrollY´ : Set the vertical scrolling position. #PB_Web_ScrollX : Set the horizontal scrolling position. SetGadgetAttribute(): Set the following attributes: #PB_Web_SelectedText : Get the currently selected text inside the gadget. #PB_Web_StatusMessage: Get the current statusbar message. #PB_Web_PageTitle : Get the current title for the displayed page. #Purebasic openwindow example code#PB_Web_HtmlCode : Get the html code from the gadget. GetGadgetItemText(): The following constants can be used to get information: SetGadgetItemText(): With #PB_Web_HtmlCode as 'Item' html code can be streamed into the Gadget. #Purebasic openwindow example windowsNote: The following features do not work with the Mozilla ActiveX on windows ( #PB_Web_Mozilla flag) #PB_Web_Refresh: Refresh the current page. #PB_Web_Stop : Stop loading the current page. #PB_Web_Forward: One step forward in the navigation history. #PB_Web_Back : One step back in the navigation history. SetGadgetState(): Perform an action on the gadget. SetGadgetText(): Change the current URL. The following functions can be used to act on a WebGadget: #PB_Web_Mozilla : Uses the Mozilla ActiveX instead of the IE one (Windows only). 'Flags' is an optional parameter and can be composed of one of the following constants: #Gadget will be the number returned by EventGadget() function. If #PB_Any is used as '#Gadget' parameter, the new gadget number will be returned as 'Result'. When no events are received.Result = WebGadget(#Gadget, x, y, Width, Height, URL$ ) DescriptionĬreates a Web gadget in the current GadgetList. (like refresh, gadgets updates etc.) the app will wait between each event. If Event An event was in the queue so process itĮlse Delay(1) No event, let the others apps get some CPU time too ! EndIf Until Event = #PB_Event_CloseWindow Important: The 'Delay' shouldn't be put after each event, because when lot of events will come Important: The window event loop should not be processed in a thread, as there is some limitation on OS X and Linux.Ĭorrect way to handle an infinite WindowEvent() loop: Of the Drag & Drop library can be used to examine and read the dropped data. #PB_Event_LeftDoubleClick : a left mouse button double-click has occurred on the windowĪ basic example for event handling can be found in the WaitWindowEvent() description.Īfter a #PB_Event_WindowDrop or #PB_Event_GadgetDrop Event, the event functions #PB_Event_LeftClick : a left mouse button click has occurred on the window This can be useful to display a popup menu #PB_Event_GadgetDrop : a Drag & Drop operation was finished on a gadget #PB_Event_RightClick : a right mouse button click has occurred on the window. #PB_Event_WindowDrop : a Drag & Drop operation was finished on a window #PB_Event_DeactivateWindow: the window has been deactivated (lost the focus) #PB_Event_ActivateWindow : the window has been activated (got the focus) #PB_Event_RestoreWindow : the window has been restored to normal size (either from a minimum or maximum size) #PB_Event_MaximizeWindow : the window has been maximized #PB_Event_MinimizeWindow : the window has been minimized #PB_Event_MoveWindow : the window has been moved #PB_Event_SizeWindow : the window has been resized #PB_Event_Repaint : the window content has been destroyed and must be repainted (useful for 2D graphics operations) #PB_Event_CloseWindow : the window close gadget has been pushed #PB_Event_Timer : a timer has reached its timeout #PB_Event_SysTray : an icon in the systray zone was clicked #PB_Event_Gadget : a gadget has been pushed #PB_Event_Menu : a menu has been selected To get the window number in which the event occurred, use the EventWindow() function. In this case, either Delay() shouldīe used somewhere in the loop or WaitWindowEvent() with a small timeout value. WaitWindowEvent(), it will not give CPU time to other programs while waitingįor an event and therefore consume all CPU power. It must be handled with care though if used on a continuing basis, because unlike This makes it useful for window event loops, where other processing needs to be done without waitingįor an event to happen (e.g. Unlike WaitWindowEvent() it doesn't wait for the next event - it always returns immediately.Įvent() can be used to get back this value. The next event from the event queue or zero if there are no more events. Checks if an event has occurred on any of the opened windows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |