Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pit-ray committed Feb 12, 2024
1 parent 9e88b78 commit 68bb834
Show file tree
Hide file tree
Showing 21 changed files with 1,491 additions and 1,305 deletions.
14 changes: 7 additions & 7 deletions docs/classfluent__tray_1_1_fluent_menu-members.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a8fa64025b0c5b1e2d81232acbf16682c">id</a>() const noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a915915efd6f57fb01fde29a26167802d">is_checked</a>() const noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a2bc0f8cecbad31b84a4576b54cdb6f5e">is_mouse_over</a>() const</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a751e8aa187e98f8ff7669d7613dec75b">menu_handle</a>() const noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a8c3d5e96538904a1ae0418bd1a99243c">operator=</a>(const FluentMenu &amp;)=default</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a5af584a59827d08895358de494b27bdd">operator=</a>(FluentMenu &amp;&amp;)=default</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#aae67e6ca87e722221048bc7e622aab58">process_click_event</a>()</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a3ac09df2b11379cb9c7bc1ca5e33df44">set_color</a>(const COLORREF &amp;text_color=CLR_INVALID, const COLORREF &amp;back_color=CLR_INVALID, const COLORREF &amp;border_color=CLR_INVALID) noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a6ff137fc157ad72bdfb83baf81454807">show_separator_line</a>() noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a5acab85532d54d958eae09437917556a">toggleable</a>() const noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a940f694634b08de638e20b8e9c4477af">is_toggleable</a>() const noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a751e8aa187e98f8ff7669d7613dec75b">menu_handle</a>() const noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a8c3d5e96538904a1ae0418bd1a99243c">operator=</a>(const FluentMenu &amp;)=default</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a5af584a59827d08895358de494b27bdd">operator=</a>(FluentMenu &amp;&amp;)=default</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#aae67e6ca87e722221048bc7e622aab58">process_click_event</a>()</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a3ac09df2b11379cb9c7bc1ca5e33df44">set_color</a>(const COLORREF &amp;text_color=CLR_INVALID, const COLORREF &amp;back_color=CLR_INVALID, const COLORREF &amp;border_color=CLR_INVALID) noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a6ff137fc157ad72bdfb83baf81454807">show_separator_line</a>() noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a9be3011c7471f2028b14c8bc384b37b6">uncheck</a>() noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#aabb3e01159c6db5b313381974281c83f">window_handle</a>() const noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html#a95678bbf2aa8b975ba3e9b4d795eba23">~FluentMenu</a>() noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_menu.html">fluent_tray::FluentMenu</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
Expand Down
66 changes: 34 additions & 32 deletions docs/classfluent__tray_1_1_fluent_menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a55a1de08b1e116b71f2225b76fa1a8ff" id="r_a55a1de08b1e116b71f2225b76fa1a8ff"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a55a1de08b1e116b71f2225b76fa1a8ff">FluentMenu</a> (bool <a class="el" href="#a5acab85532d54d958eae09437917556a">toggleable</a>=false, const std::function&lt; bool(void)&gt; &amp;callback=[] {return true ;}, const std::function&lt; bool(void)&gt; &amp;unchecked_callback=[] {return true ;})</td></tr>
<tr class="memitem:a55a1de08b1e116b71f2225b76fa1a8ff" id="r_a55a1de08b1e116b71f2225b76fa1a8ff"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a55a1de08b1e116b71f2225b76fa1a8ff">FluentMenu</a> (bool toggleable=false, const std::function&lt; bool(void)&gt; &amp;callback=[] {return true ;}, const std::function&lt; bool(void)&gt; &amp;unchecked_callback=[] {return true ;})</td></tr>
<tr class="memdesc:a55a1de08b1e116b71f2225b76fa1a8ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create menu object. <br /></td></tr>
<tr class="separator:a55a1de08b1e116b71f2225b76fa1a8ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae65751fe8b47abcae26e99d2cc092c85" id="r_ae65751fe8b47abcae26e99d2cc092c85"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae65751fe8b47abcae26e99d2cc092c85">FluentMenu</a> (const <a class="el" href="classfluent__tray_1_1_fluent_menu.html">FluentMenu</a> &amp;)=default</td></tr>
Expand Down Expand Up @@ -123,9 +123,9 @@
<tr class="memitem:a915915efd6f57fb01fde29a26167802d" id="r_a915915efd6f57fb01fde29a26167802d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a915915efd6f57fb01fde29a26167802d">is_checked</a> () const noexcept</td></tr>
<tr class="memdesc:a915915efd6f57fb01fde29a26167802d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Refer to the check status of the menu. <br /></td></tr>
<tr class="separator:a915915efd6f57fb01fde29a26167802d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5acab85532d54d958eae09437917556a" id="r_a5acab85532d54d958eae09437917556a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5acab85532d54d958eae09437917556a">toggleable</a> () const noexcept</td></tr>
<tr class="memdesc:a5acab85532d54d958eae09437917556a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the menu is toggleable. <br /></td></tr>
<tr class="separator:a5acab85532d54d958eae09437917556a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a940f694634b08de638e20b8e9c4477af" id="r_a940f694634b08de638e20b8e9c4477af"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a940f694634b08de638e20b8e9c4477af">is_toggleable</a> () const noexcept</td></tr>
<tr class="memdesc:a940f694634b08de638e20b8e9c4477af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the menu is toggleable. <br /></td></tr>
<tr class="separator:a940f694634b08de638e20b8e9c4477af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabb3e01159c6db5b313381974281c83f" id="r_aabb3e01159c6db5b313381974281c83f"><td class="memItemLeft" align="right" valign="top">HWND&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aabb3e01159c6db5b313381974281c83f">window_handle</a> () const noexcept</td></tr>
<tr class="memdesc:aabb3e01159c6db5b313381974281c83f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Refer to the menu window handle. <br /></td></tr>
<tr class="separator:aabb3e01159c6db5b313381974281c83f"><td class="memSeparator" colspan="2">&#160;</td></tr>
Expand Down Expand Up @@ -373,6 +373,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#ad822c8a3bed795638e96948f
</div><div class="memdoc">

<p>Checks the menu if it is toggleable. </p>
<p>Update only the current state without calling the callback function. </p>

</div>
</div>
Expand Down Expand Up @@ -622,6 +623,34 @@ <h2 class="memtitle"><span class="permalink"><a href="#a2bc0f8cecbad31b84a4576b5
<p>Checks whether the mouse cursor is over the menu or not. </p>
<dl class="section return"><dt>Returns</dt><dd>If the cursor is over it, true is returned; otherwise, false is returned. </dd></dl>

</div>
</div>
<a id="a940f694634b08de638e20b8e9c4477af" name="a940f694634b08de638e20b8e9c4477af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a940f694634b08de638e20b8e9c4477af">&#9670;&#160;</a></span>is_toggleable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fluent_tray::FluentMenu::is_toggleable </td>
<td>(</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">

<p>Check if the menu is toggleable. </p>
<dl class="section return"><dt>Returns</dt><dd>Returns true if the menu is toggleable, false otherwise. </dd></dl>

</div>
</div>
<a id="a751e8aa187e98f8ff7669d7613dec75b" name="a751e8aa187e98f8ff7669d7613dec75b"></a>
Expand Down Expand Up @@ -801,34 +830,6 @@ <h2 class="memtitle"><span class="permalink"><a href="#a6ff137fc157ad72bdfb83baf

<p>Show a separator line under the menu. </p>

</div>
</div>
<a id="a5acab85532d54d958eae09437917556a" name="a5acab85532d54d958eae09437917556a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5acab85532d54d958eae09437917556a">&#9670;&#160;</a></span>toggleable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fluent_tray::FluentMenu::toggleable </td>
<td>(</td>
<td class="paramname"><span class="paramname"></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">

<p>Check if the menu is toggleable. </p>
<dl class="section return"><dt>Returns</dt><dd>Returns true if the menu is toggleable, false otherwise. </dd></dl>

</div>
</div>
<a id="a9be3011c7471f2028b14c8bc384b37b6" name="a9be3011c7471f2028b14c8bc384b37b6"></a>
Expand All @@ -855,6 +856,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a9be3011c7471f2028b14c8bc
</div><div class="memdoc">

<p>Unchecks the menu if it is toggleable. </p>
<p>Update only the current state without calling the callback function. </p>

</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/classfluent__tray_1_1_fluent_tray-members.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a9374619a46a4084eb0101648e039f553">cend</a>() const noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html">fluent_tray::FluentTray</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a6833da7c8fb8bb3d27470aa45af6b157">change_icon</a>(const std::string &amp;icon_path)</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html">fluent_tray::FluentTray</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a6e7ec8d9589d3b1fdb14885349f8daec">count_menus</a>() const noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html">fluent_tray::FluentTray</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a317e0bfab8dea66def0cb307541e76f6">create_tray</a>(const std::string &amp;app_name, const std::string &amp;icon_path=&quot;&quot;, LONG menu_x_margin=5, LONG menu_y_margin=5, LONG menu_x_pad=5, LONG menu_y_pad=5, BYTE opacity=255, bool round_corner=true)</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html">fluent_tray::FluentTray</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a24733799536bdaa1f8d2f0504d4ba4ac">create_tray</a>(const std::string &amp;app_name, const std::string &amp;icon_path=&quot;&quot;, LONG menu_x_margin=5, LONG menu_y_margin=5, LONG menu_x_pad=5, LONG menu_y_pad=5, unsigned char opacity=255, bool round_corner=true)</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html">fluent_tray::FluentTray</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a0e64e2f5bea8af804f3c38502fb20346">end</a>() noexcept</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html">fluent_tray::FluentTray</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a6a6631acc765ddc89ba36976bbe0175f">FluentTray</a>()</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html">fluent_tray::FluentTray</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#ac538f9a69ab74ead314a5004f717080f">FluentTray</a>(const FluentTray &amp;)=delete</td><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html">fluent_tray::FluentTray</a></td><td class="entry"></td></tr>
Expand Down
Loading

0 comments on commit 68bb834

Please sign in to comment.