Page 1 of 1
Constants
Posted: Tue Jan 24, 2017 7:37 am
by falcon
I am new to PureBasic. Is there a complete list of WaitWindowEvent() constants documented somewhere? I know a few, such as:
#PB_Event_CloseWindow
#PB_Event_RightClick
#PB_Event_LeftClick
#PB_Event_Gadget
#PB_Event_SizeWindow
Re: Constants
Posted: Tue Jan 24, 2017 7:40 am
by Shield
PB's manual under WaitWindowEvent() states:
Return the event which occurred, see WindowEvent() for more information.
And the manual under WindowEvent() lists these:
Code: Select all
Possible Events are :
#PB_Event_Menu : a menu has been selected
#PB_Event_Gadget : a gadget has been pushed
#PB_Event_SysTray : an icon in the systray zone was clicked
#PB_Event_Timer : a timer has reached its timeout
#PB_Event_CloseWindow : the window close gadget has been pushed
#PB_Event_Repaint : the window content has been destroyed and must be repainted (useful for 2D graphics operations)
#PB_Event_SizeWindow : the window has been resized
#PB_Event_MoveWindow : the window has been moved
#PB_Event_MinimizeWindow : the window has been minimized
#PB_Event_MaximizeWindow : the window has been maximized
#PB_Event_RestoreWindow : the window has been restored to normal size (either from a minimum or maximum size)
#PB_Event_ActivateWindow : the window has been activated (got the focus)
#PB_Event_DeactivateWindow: the window has been deactivated (lost the focus)
#PB_Event_WindowDrop : a Drag & Drop operation was finished on a window
#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. This can be useful to display a popup menu
#PB_Event_LeftClick : a left mouse button click has occurred on the window
#PB_Event_LeftDoubleClick : a left mouse button double-click has occurred on the window

Re: Constants
Posted: Tue Jan 24, 2017 8:01 am
by netmaestro
On the tools menu of the ide there is an option called 'structure viewer'. Open that, then open the 'Constants' tab and every constant that PureBasic knows is listed in alphabetical order. Want to know all the event types? Just search for 'PB_EventType_' and the're all right there (you don't need to add the '#' when searching the structure viewer for constants).
Re: Constants
Posted: Tue Jan 24, 2017 9:25 am
by Josh
Or you just type #PB_Event_ in the Pb-Ide and follow the pop-up menu

Re: Constants
Posted: Tue Jan 24, 2017 10:20 am
by TI-994A
falcon wrote:...a complete list of WaitWindowEvent() constants...
It should be noted that not all gadgets support all events. Accordingly, the best reference would be the entries in the manual against each specific gadget, where the supported events are listed.
Re: Constants
Posted: Tue Jan 24, 2017 1:20 pm
by blueb
If you'd really like to get to the bottom of things...
you need Danilo's: GetPBInfo.pb
http://www.forums.purebasic.com/english ... da#p406202
Re: Constants
Posted: Tue Jan 24, 2017 3:30 pm
by Josh
blueb wrote:you need Danilo's: GetPBInfo.pb
Yeahhh, thats cool. Each newbie should first deal with these compiler functions.
But seriously. What do you think from where the structure viewer suggested by netmeastro has its results? Why to use a sledgehamer for cracking a nut? Especially newbies does not have to deal with these compiler funktionen!
Re: Constants
Posted: Tue Jan 24, 2017 3:41 pm
by blueb
Josh wrote:... Why to use a sledgehamer for cracking a nut? Especially newbies does not have to deal with these compiler funktionen!
That's true! That's why TI-994A makes the most sense. Look at the help file and it will explain the constants that work with the procedure you need.
Re: Constants
Posted: Tue Jan 24, 2017 9:07 pm
by falcon
Wow... I thank all of you for your comprehensive and timely responses. They are greatly appreciated!!!