Skip to content

Commit

Permalink
add balloon tip method
Browse files Browse the repository at this point in the history
  • Loading branch information
pit-ray committed Feb 13, 2024
1 parent d96178a commit 22934fb
Show file tree
Hide file tree
Showing 9 changed files with 518 additions and 392 deletions.
4 changes: 4 additions & 0 deletions demo/demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,9 @@ int main()
return 1 ;
}

if(!tray.show_balloon_tip("Balloon Tips", "Successfully Exited!")) {
return 1 ;
}

return 0 ;
}
15 changes: 8 additions & 7 deletions docs/classfluent__tray_1_1_fluent_tray-members.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,14 @@
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a2c09e0d56e7b0a2100dfd1330405c449">operator=</a>(FluentTray &amp;&amp;)=default</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>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#ab2c7402a216a5ecfd6e3b886a524418c">set_color</a>(const COLORREF &amp;text_color=CLR_INVALID, const COLORREF &amp;back_color=CLR_INVALID, unsigned char color_decay=10)</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#a435a8474b6d141044cd324bb45e6d726">set_font</a>(LONG font_size=0, LONG font_weight=0, const std::string &amp;font_name=&quot;&quot;)</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#a2287afaa97f4f41c4346c5f2f939857c">show_menu_window</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></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a599e83a0b01cbbaecf20e8e19c734480">status</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#a25d65dcfec83f0ea7de8055530000e54">stop</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="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#ae5a734a0b5255bef1bf143e2996d76de">update</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></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a75a1e972c3c22bc8874f16cf7465fc53">update_with_loop</a>(std::chrono::milliseconds sleep_time=std::chrono::milliseconds(1))</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#add43b02d24c2934deaa755124c2930a7">window_handle</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#a08af8b2acf71cea22983b2e45151046b">~FluentTray</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><span class="mlabel">virtual</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a02abceeae16c5342ae88af29f12cd08a">show_balloon_tip</a>(const std::string &amp;title, const std::string &amp;message)</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#a2287afaa97f4f41c4346c5f2f939857c">show_menu_window</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></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a599e83a0b01cbbaecf20e8e19c734480">status</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="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a25d65dcfec83f0ea7de8055530000e54">stop</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#ae5a734a0b5255bef1bf143e2996d76de">update</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></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a75a1e972c3c22bc8874f16cf7465fc53">update_with_loop</a>(std::chrono::milliseconds sleep_time=std::chrono::milliseconds(1))</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#add43b02d24c2934deaa755124c2930a7">window_handle</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="even"><td class="entry"><a class="el" href="classfluent__tray_1_1_fluent_tray.html#a08af8b2acf71cea22983b2e45151046b">~FluentTray</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><span class="mlabel">virtual</span></td></tr>
</table></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Expand Down
43 changes: 43 additions & 0 deletions docs/classfluent__tray_1_1_fluent_tray.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
<tr class="memitem:aba45a136ce6348aa79da7805624a59c6" id="r_aba45a136ce6348aa79da7805624a59c6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aba45a136ce6348aa79da7805624a59c6">hide_menu_window</a> ()</td></tr>
<tr class="memdesc:aba45a136ce6348aa79da7805624a59c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Hide the menu window above the tray icon. <br /></td></tr>
<tr class="separator:aba45a136ce6348aa79da7805624a59c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02abceeae16c5342ae88af29f12cd08a" id="r_a02abceeae16c5342ae88af29f12cd08a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a02abceeae16c5342ae88af29f12cd08a">show_balloon_tip</a> (const std::string &amp;title, const std::string &amp;message)</td></tr>
<tr class="memdesc:a02abceeae16c5342ae88af29f12cd08a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shows a balloon tip that is placed in the notification area. <br /></td></tr>
<tr class="separator:a02abceeae16c5342ae88af29f12cd08a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a599e83a0b01cbbaecf20e8e19c734480" id="r_a599e83a0b01cbbaecf20e8e19c734480"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacefluent__tray.html#aa636c02ce33a7170c008cd007f4831f9">TrayStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a599e83a0b01cbbaecf20e8e19c734480">status</a> () const noexcept</td></tr>
<tr class="memdesc:a599e83a0b01cbbaecf20e8e19c734480"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current status of tray. <br /></td></tr>
<tr class="separator:a599e83a0b01cbbaecf20e8e19c734480"><td class="memSeparator" colspan="2">&#160;</td></tr>
Expand Down Expand Up @@ -890,6 +893,46 @@ <h2 class="memtitle"><span class="permalink"><a href="#a435a8474b6d141044cd324bb
<dl class="section return"><dt>Returns</dt><dd>Returns true on success, false on failure.</dd></dl>
<p>For font_weight, you can use the constant value specified for lfWeght in <a href="https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-logfontw">LOGFONT</a>. The default value used is FW_MEDIUM(500). </p>

</div>
</div>
<a id="a02abceeae16c5342ae88af29f12cd08a" name="a02abceeae16c5342ae88af29f12cd08a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02abceeae16c5342ae88af29f12cd08a">&#9670;&#160;</a></span>show_balloon_tip()</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::FluentTray::show_balloon_tip </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>title</em>, </span></td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>message</em></span>&#160;)</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">

<p>Shows a balloon tip that is placed in the notification area. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">title</td><td>The UTF-8 string of title. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">message</td><td>The UTF-8 string of message. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns true on success, false on failure.</dd></dl>
<p>Titles longer than 48 characters and messages longer than 200 characters will be trimmed. </p>

</div>
</div>
<a id="a2287afaa97f4f41c4346c5f2f939857c" name="a2287afaa97f4f41c4346c5f2f939857c"></a>
Expand Down
Loading

0 comments on commit 22934fb

Please sign in to comment.