func_maxgui_querygadget.rst 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. .. _func_maxgui_querygadget:
  2. ===========
  3. QueryGadget
  4. ===========
  5. QueryGadget -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. QueryGadget(gadget:TGadget,queryid)
  10. Return internal gadget properties.
  11. Dependent on the Operating System and type of Gadget, #QueryGadget
  12. can be used to retrieve system handles useful for programming platform
  13. specific functions that extend the functionality of a TGadget.
  14. [ @Constant | @Return Value
  15. * QUERY_HWND | A Windows API HWND handle.
  16. * QUERY_HWND_CLIENT | A Windows API HWND handle representing a gadget's client area.
  17. * QUERY_NSVIEW | A Cocoa NSView handle.
  18. * QUERY_NSVIEW_CLIENT | A Cocoa NSView representing a gadget's client area.
  19. * QUERY_FLWIDGET | An FL_WIDGET handle.
  20. * QUERY_FLWIDGET_CLIENT | An FL_WIDGET handle representing a gadget's client area.
  21. ]
  22. Parameters
  23. ==========
  24. Return Values
  25. =============
  26. Nothing.
  27. Examples
  28. ========
  29. .. code-block:: blitzmax
  30. Strict
  31. Import MaxGUI.Drivers
  32. Import MaxGUI.ProxyGadgets
  33. AppTitle = "Hyperlink Test Window"
  34. Global wndMain:TGadget = CreateWindow( AppTitle, 100, 100, 300, 59, Null, WINDOW_TITLEBAR|WINDOW_CLIENTCOORDS|WINDOW_STATUS )
  35. 'Standard Hyperlink Gadget
  36. Global hypLeft:TGadget = CreateHyperlink( "http://www.blitzbasic.com/", 2, 2, ClientWidth(wndMain)-4, 15, wndMain, LABEL_LEFT )
  37. 'Center Aligned Hyperlink Gadget with alternate text
  38. Global hypCenter:TGadget = CreateHyperlink( "http://www.blitzbasic.com/", 2, 21, ClientWidth(wndMain)-4, 17, wndMain, LABEL_CENTER|LABEL_FRAME, "Alternate Text" )
  39. 'Right Aligned Sunken Hyperlink Gadget with custom rollover colors set
  40. Global hypRight:TGadget = CreateHyperlink( "http://www.blitzbasic.com/", 2, 42, ClientWidth(wndMain)-4, 15, wndMain, LABEL_RIGHT, "Custom Rollover Colors" )
  41. SetGadgetTextColor(hypRight,128,128,128) 'Set normal text color to grey.
  42. SetGadgetColor(hypRight,255,128,0) 'Set rollover color to orange.
  43. Repeat
  44. WaitEvent()
  45. SetStatusText wndMain, CurrentEvent.ToString()
  46. Select EventID()
  47. Case EVENT_WINDOWCLOSE, EVENT_APPTERMINATE
  48. End
  49. EndSelect
  50. Forever
  51. See Also
  52. ========