DISTRHO Plugin Framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
6.8KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.17"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>DISTRHO Plugin Framework: Window::ScopedGraphicsContext Class Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">DISTRHO Plugin Framework
  25. </div>
  26. </td>
  27. </tr>
  28. </tbody>
  29. </table>
  30. </div>
  31. <!-- end header part -->
  32. <!-- Generated by Doxygen 1.8.17 -->
  33. <script type="text/javascript">
  34. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. /* @license-end */
  37. </script>
  38. <script type="text/javascript" src="menudata.js"></script>
  39. <script type="text/javascript" src="menu.js"></script>
  40. <script type="text/javascript">
  41. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  42. $(function() {
  43. initMenu('',true,false,'search.php','Search');
  44. $(document).ready(function() { init_search(); });
  45. });
  46. /* @license-end */</script>
  47. <div id="main-nav"></div>
  48. <!-- window showing the filter options -->
  49. <div id="MSearchSelectWindow"
  50. onmouseover="return searchBox.OnSearchSelectShow()"
  51. onmouseout="return searchBox.OnSearchSelectHide()"
  52. onkeydown="return searchBox.OnSearchSelectKey(event)">
  53. </div>
  54. <!-- iframe showing the search results (closed by default) -->
  55. <div id="MSearchResultsWindow">
  56. <iframe src="javascript:void(0)" frameborder="0"
  57. name="MSearchResults" id="MSearchResults">
  58. </iframe>
  59. </div>
  60. <div id="nav-path" class="navpath">
  61. <ul>
  62. <li class="navelem"><a class="el" href="classWindow.html">Window</a></li><li class="navelem"><a class="el" href="classWindow_1_1ScopedGraphicsContext.html">ScopedGraphicsContext</a></li> </ul>
  63. </div>
  64. </div><!-- top -->
  65. <div class="header">
  66. <div class="summary">
  67. <a href="#pub-methods">Public Member Functions</a> &#124;
  68. <a href="classWindow_1_1ScopedGraphicsContext-members.html">List of all members</a> </div>
  69. <div class="headertitle">
  70. <div class="title">Window::ScopedGraphicsContext Class Reference</div> </div>
  71. </div><!--header-->
  72. <div class="contents">
  73. <p><code>#include &lt;<a class="el" href="Window_8hpp_source.html">Window.hpp</a>&gt;</code></p>
  74. <table class="memberdecls">
  75. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  76. Public Member Functions</h2></td></tr>
  77. <tr class="memitem:a05761155e7d7de67f5a593968f581607"><td class="memItemLeft" align="right" valign="top"><a id="a05761155e7d7de67f5a593968f581607"></a>
  78. &#160;</td><td class="memItemRight" valign="bottom"><b>ScopedGraphicsContext</b> (<a class="el" href="classWindow.html">Window</a> &amp;window)</td></tr>
  79. <tr class="separator:a05761155e7d7de67f5a593968f581607"><td class="memSeparator" colspan="2">&#160;</td></tr>
  80. </table>
  81. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  82. <div class="textblock"><p><a class="el" href="classWindow.html">Window</a> graphics context as a scoped struct. This class gives graphics context drawing time to a window's widgets. Typically used for allowing OpenGL drawing operations during a window + widget constructor.</p>
  83. <p>Unless you are subclassing the <a class="el" href="classWindow.html">Window</a> or <a class="el" href="classStandaloneWindow.html">StandaloneWindow</a> classes, you do not need to care. In such cases you will need to use this struct as a way to get a valid OpenGL context. For example in a standalone application: </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div>
  84. <div class="line">{</div>
  85. <div class="line"> <a class="code" href="classApplication.html">Application</a> app;</div>
  86. <div class="line"> <a class="code" href="classWindow.html">Window</a> win(app);</div>
  87. <div class="line"> <a class="code" href="classScopedPointer.html">ScopedPointer&lt;MyCustomTopLevelWidget&gt;</a> widget;</div>
  88. <div class="line"> {</div>
  89. <div class="line"> <span class="keyword">const</span> ScopedGraphicsContext sgc(win);</div>
  90. <div class="line"> widget = <span class="keyword">new</span> MyCustomTopLevelWidget(win);</div>
  91. <div class="line"> }</div>
  92. <div class="line"> app.<a class="code" href="classApplication.html#a805dd37af3b9adfc1d0ee1e734ad81e3">exec</a>();</div>
  93. <div class="line"> <span class="keywordflow">return</span> 0;</div>
  94. <div class="line">}</div>
  95. </div><!-- fragment --><p>This struct is necessary because we cannot automatically make the window leave the OpenGL context in custom code. We must always cleanly enter and leave the OpenGL context. In order to avoid messing up the global host context, this class is used around widget creation. </p>
  96. </div><hr/>The documentation for this class was generated from the following file:<ul>
  97. <li>dgl/<a class="el" href="Window_8hpp_source.html">Window.hpp</a></li>
  98. </ul>
  99. </div><!-- contents -->
  100. <div class="ttc" id="aclassWindow_html"><div class="ttname"><a href="classWindow.html">Window</a></div><div class="ttdef"><b>Definition:</b> Window.hpp:50</div></div>
  101. <div class="ttc" id="aclassScopedPointer_html"><div class="ttname"><a href="classScopedPointer.html">ScopedPointer</a></div><div class="ttdef"><b>Definition:</b> ScopedPointer.hpp:64</div></div>
  102. <div class="ttc" id="aclassApplication_html"><div class="ttname"><a href="classApplication.html">Application</a></div><div class="ttdef"><b>Definition:</b> Application.hpp:36</div></div>
  103. <div class="ttc" id="aclassApplication_html_a805dd37af3b9adfc1d0ee1e734ad81e3"><div class="ttname"><a href="classApplication.html#a805dd37af3b9adfc1d0ee1e734ad81e3">Application::exec</a></div><div class="ttdeci">void exec(uint idleTimeInMs=30)</div></div>
  104. <!-- start footer part -->
  105. <hr class="footer"/><address class="footer"><small>
  106. Generated on Sat Jul 3 2021 23:10:10 for DISTRHO Plugin Framework by &#160;<a href="http://www.doxygen.org/index.html">
  107. <img class="footer" src="doxygen.png" alt="doxygen"/>
  108. </a> 1.8.17
  109. </small></address>
  110. </body>
  111. </html>