Constants

Just starting out? Need help? Post your questions and find answers here.
falcon
New User
New User
Posts: 5
Joined: Tue Jan 24, 2017 7:21 am

Constants

Post 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
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: Constants

Post 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
:wink:
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Constants

Post 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).
BERESHEIT
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: Constants

Post by Josh »

Or you just type #PB_Event_ in the Pb-Ide and follow the pop-up menu :D
sorry for my bad english
User avatar
TI-994A
Addict
Addict
Posts: 2704
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Constants

Post 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.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
blueb
Addict
Addict
Posts: 1111
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: Constants

Post 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
- It was too lonely at the top.

System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: Constants

Post 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!
sorry for my bad english
User avatar
blueb
Addict
Addict
Posts: 1111
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: Constants

Post 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.
- It was too lonely at the top.

System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
falcon
New User
New User
Posts: 5
Joined: Tue Jan 24, 2017 7:21 am

Re: Constants

Post by falcon »

Wow... I thank all of you for your comprehensive and timely responses. They are greatly appreciated!!!
Post Reply