diff --git a/README.md b/README.md index 988a410..354461b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@
- +

diff --git a/docs/_r_e_a_d_m_e_8md.html b/docs/_r_e_a_d_m_e_8md.html index 5f5495b..6c1ba45 100644 --- a/docs/_r_e_a_d_m_e_8md.html +++ b/docs/_r_e_a_d_m_e_8md.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: README.md File Reference - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
-
README.md File Reference
+
+
README.md File Reference
diff --git a/docs/annotated.html b/docs/annotated.html index b85caa0..cd4e3b9 100644 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: Class List - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */ @@ -61,33 +57,27 @@
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
-
Class List
+
+
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
-
[detail level 12]
- - +
[detail level 12]
 Nfluent_trayBase namespace
 CFluentMenuClass with information on each menu
+ +
 Nfluent_trayBase namespace
 CFluentMenuClass with information on each menu
 CFluentTrayClass with information on the entire tray
diff --git a/docs/bdwn.png b/docs/bdwn.png new file mode 100644 index 0000000..940a0b9 Binary files /dev/null and b/docs/bdwn.png differ diff --git a/docs/classes.html b/docs/classes.html index c700667..47cd865 100644 --- a/docs/classes.html +++ b/docs/classes.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: Class Index - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */ @@ -61,32 +57,26 @@
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
-
Class Index
+
+
Class Index
F
-
F
+
F
FluentMenu (fluent_tray)
FluentTray (fluent_tray)
diff --git a/docs/classfluent__tray_1_1_fluent_menu-members.html b/docs/classfluent__tray_1_1_fluent_menu-members.html index 0134aed..c0b36cc 100644 --- a/docs/classfluent__tray_1_1_fluent_menu-members.html +++ b/docs/classfluent__tray_1_1_fluent_menu-members.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: Member List - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
-
fluent_tray::FluentMenu Member List
+
+
fluent_tray::FluentMenu Member List

This is the complete list of members for fluent_tray::FluentMenu, including all inherited members.

- + - + - + - + - + - + - + - - - + + + - + - +
background_brush() const noexceptfluent_tray::FluentMenuinline
calculate_required_dims(HFONT font, SIZE &size) constfluent_tray::FluentMenuinline
calculate_required_dims(HFONT font, SIZE &size) constfluent_tray::FluentMenuinline
check() noexceptfluent_tray::FluentMenuinline
create_menu(HINSTANCE hinstance, HWND parent_hwnd, std::size_t id, const std::string &label_text="", const std::string &icon_path="", const std::string &checkmark="✓")fluent_tray::FluentMenuinline
create_menu(HINSTANCE hinstance, HWND parent_hwnd, std::size_t id, const std::string &label_text="", const std::string &icon_path="", const std::string &checkmark="✓")fluent_tray::FluentMenuinline
draw_menu(LPDRAWITEMSTRUCT info, HFONT font) constfluent_tray::FluentMenuinline
FluentMenu(bool toggleable=false, const std::function< bool(void)> &callback=[] {return true ;}, const std::function< bool(void)> &unchecked_callback=[] {return true ;})fluent_tray::FluentMenuinlineexplicit
FluentMenu(bool toggleable=false, const std::function< bool(void)> &callback=[] {return true ;}, const std::function< bool(void)> &unchecked_callback=[] {return true ;})fluent_tray::FluentMenuinlineexplicit
FluentMenu(const FluentMenu &)=defaultfluent_tray::FluentMenu
FluentMenu(FluentMenu &&)=defaultfluent_tray::FluentMenu
FluentMenu(FluentMenu &&)=defaultfluent_tray::FluentMenu
get_label(std::string &str) constfluent_tray::FluentMenuinline
hide_separator_line() noexceptfluent_tray::FluentMenuinline
hide_separator_line() noexceptfluent_tray::FluentMenuinline
id() const noexceptfluent_tray::FluentMenuinline
is_checked() const noexceptfluent_tray::FluentMenuinline
is_checked() const noexceptfluent_tray::FluentMenuinline
is_mouse_over() constfluent_tray::FluentMenuinline
is_toggleable() const noexceptfluent_tray::FluentMenuinline
is_toggleable() const noexceptfluent_tray::FluentMenuinline
menu_handle() const noexceptfluent_tray::FluentMenuinline
operator=(const FluentMenu &)=defaultfluent_tray::FluentMenu
operator=(FluentMenu &&)=defaultfluent_tray::FluentMenu
process_click_event()fluent_tray::FluentMenuinline
operator=(const FluentMenu &)=defaultfluent_tray::FluentMenu
operator=(FluentMenu &&)=defaultfluent_tray::FluentMenu
process_click_event()fluent_tray::FluentMenuinline
set_color(const COLORREF &text_color=CLR_INVALID, const COLORREF &back_color=CLR_INVALID, const COLORREF &border_color=CLR_INVALID) noexceptfluent_tray::FluentMenuinline
show_separator_line() noexceptfluent_tray::FluentMenuinline
show_separator_line() noexceptfluent_tray::FluentMenuinline
uncheck() noexceptfluent_tray::FluentMenuinline
window_handle() const noexceptfluent_tray::FluentMenuinline
window_handle() const noexceptfluent_tray::FluentMenuinline
~FluentMenu() noexceptfluent_tray::FluentMenuinline
diff --git a/docs/classfluent__tray_1_1_fluent_menu.html b/docs/classfluent__tray_1_1_fluent_menu.html index 7aee26f..c3ce606 100644 --- a/docs/classfluent__tray_1_1_fluent_menu.html +++ b/docs/classfluent__tray_1_1_fluent_menu.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: fluent_tray::FluentMenu Class Reference - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+

Class with information on each menu. - More...

+ More...

#include <fluent_tray.hpp>

- - - + + - + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +

+

Public Member Functions

 FluentMenu (bool toggleable=false, const std::function< bool(void)> &callback=[] {return true ;}, const std::function< bool(void)> &unchecked_callback=[] {return true ;})
 Create menu object.
 FluentMenu (bool toggleable=false, const std::function< bool(void)> &callback=[] {return true ;}, const std::function< bool(void)> &unchecked_callback=[] {return true ;})
 Create menu object. More...
 
 FluentMenu (const FluentMenu &)=default
 FluentMenu (const FluentMenu &)=default
 
FluentMenuoperator= (const FluentMenu &)=default
 
 FluentMenu (FluentMenu &&)=default
FluentMenuoperator= (const FluentMenu &)=default
 
 FluentMenu (FluentMenu &&)=default
 
FluentMenuoperator= (FluentMenu &&)=default
 
 ~FluentMenu () noexcept
FluentMenuoperator= (FluentMenu &&)=default
 
 ~FluentMenu () noexcept
 
bool create_menu (HINSTANCE hinstance, HWND parent_hwnd, std::size_t id, const std::string &label_text="", const std::string &icon_path="", const std::string &checkmark="✓")
 Creates a menu window.
bool create_menu (HINSTANCE hinstance, HWND parent_hwnd, std::size_t id, const std::string &label_text="", const std::string &icon_path="", const std::string &checkmark="✓")
 Creates a menu window. More...
 
bool process_click_event ()
 Execute the process when clicked on the menu.
bool process_click_event ()
 Execute the process when clicked on the menu. More...
 
bool is_mouse_over () const
 Checks whether the mouse cursor is over the menu or not.
bool is_mouse_over () const
 Checks whether the mouse cursor is over the menu or not. More...
 
void check () noexcept
 Checks the menu if it is toggleable.
void check () noexcept
 Checks the menu if it is toggleable. More...
 
void uncheck () noexcept
 Unchecks the menu if it is toggleable.
void uncheck () noexcept
 Unchecks the menu if it is toggleable. More...
 
bool is_checked () const noexcept
 Refer to the check status of the menu.
bool is_checked () const noexcept
 Refer to the check status of the menu. More...
 
bool is_toggleable () const noexcept
 Check if the menu is toggleable.
bool is_toggleable () const noexcept
 Check if the menu is toggleable. More...
 
HWND window_handle () const noexcept
 Refer to the menu window handle.
HWND window_handle () const noexcept
 Refer to the menu window handle. More...
 
HMENU menu_handle () const noexcept
 Refer to the menu handle.
HMENU menu_handle () const noexcept
 Refer to the menu handle. More...
 
std::size_t id () const noexcept
 Refer to the menu identifier.
std::size_t id () const noexcept
 Refer to the menu identifier. More...
 
bool get_label (std::string &str) const
 Get menu label as UTF-8 string.
bool get_label (std::string &str) const
 Get menu label as UTF-8 string. More...
 
void show_separator_line () noexcept
 Show a separator line under the menu.
void show_separator_line () noexcept
 Show a separator line under the menu. More...
 
void hide_separator_line () noexcept
 Hide a separator line under the menu.
void hide_separator_line () noexcept
 Hide a separator line under the menu. More...
 
bool set_color (const COLORREF &text_color=CLR_INVALID, const COLORREF &back_color=CLR_INVALID, const COLORREF &border_color=CLR_INVALID) noexcept
 Set the menu color.
bool set_color (const COLORREF &text_color=CLR_INVALID, const COLORREF &back_color=CLR_INVALID, const COLORREF &border_color=CLR_INVALID) noexcept
 Set the menu color. More...
 
bool draw_menu (LPDRAWITEMSTRUCT info, HFONT font) const
 Draws a menu using drawing information and the specified font.
bool draw_menu (LPDRAWITEMSTRUCT info, HFONT font) const
 Draws a menu using drawing information and the specified font. More...
 
HBRUSH background_brush () const noexcept
 Refer to the brush for drawing the background.
HBRUSH background_brush () const noexcept
 Refer to the brush for drawing the background. More...
 
bool calculate_required_dims (HFONT font, SIZE &size) const
 Calculates the size of the bounding box surrounding the menu based on the font information and the length of the label.
bool calculate_required_dims (HFONT font, SIZE &size) const
 Calculates the size of the bounding box surrounding the menu based on the font information and the length of the label. More...
 

Detailed Description

Class with information on each menu.

Constructor & Destructor Documentation

- -

◆ FluentMenu() [1/3]

+ +

◆ FluentMenu() [1/3]

@@ -172,17 +162,25 @@

fluent_tray::FluentMenu::FluentMenu ( - bool toggleable = false, + bool  + toggleable = false, - const std::function< bool(void)> & callback = [] {return true ;}, + const std::function< bool(void)> &  + callback = [] {return true ;}, - const std::function< bool(void)> & unchecked_callback = [] {return true ;} ) + const std::function< bool(void)> &  + unchecked_callback = [] {return true ;}  + + + + ) + @@ -205,8 +203,8 @@

-

◆ FluentMenu() [2/3]

+ +

◆ FluentMenu() [2/3]

@@ -217,7 +215,8 @@

fluent_tray::FluentMenu::FluentMenu ( - const FluentMenu & ) + const FluentMenu &  + ) @@ -230,8 +229,8 @@

-

◆ FluentMenu() [3/3]

+ +

◆ FluentMenu() [3/3]

@@ -242,7 +241,8 @@

fluent_tray::FluentMenu::FluentMenu ( - FluentMenu && ) + FluentMenu &&  + ) @@ -255,8 +255,8 @@

-

◆ ~FluentMenu()

+ +

◆ ~FluentMenu()

@@ -267,7 +267,7 @@

fluent_tray::FluentMenu::~FluentMenu ( - ) + ) @@ -281,8 +281,8 @@

Member Function Documentation

- -

◆ background_brush()

+ +

◆ background_brush()

@@ -293,7 +293,7 @@

HBRUSH fluent_tray::FluentMenu::background_brush ( - ) + ) const @@ -310,8 +310,8 @@

-

◆ calculate_required_dims()

+ +

◆ calculate_required_dims()

@@ -322,12 +322,19 @@

bool fluent_tray::FluentMenu::calculate_required_dims ( - HFONT font, + HFONT  + font, - SIZE & size ) const + SIZE &  + size  + + + + ) + const @@ -349,8 +356,8 @@

-

◆ check()

+ +

◆ check()

@@ -361,7 +368,7 @@

void fluent_tray::FluentMenu::check ( - ) + ) @@ -377,8 +384,8 @@

-

◆ create_menu()

+ +

◆ create_menu()

@@ -389,32 +396,43 @@

bool fluent_tray::FluentMenu::create_menu ( - HINSTANCE hinstance, + HINSTANCE  + hinstance, - HWND parent_hwnd, + HWND  + parent_hwnd, - std::size_t id, + std::size_t  + id, - const std::string & label_text = "", + const std::string &  + label_text = "", - const std::string & icon_path = "", + const std::string &  + icon_path = "", - const std::string & checkmark = "✓" ) + const std::string &  + checkmark = "✓"  + + + + ) + @@ -440,8 +458,8 @@

-

◆ draw_menu()

+ +

◆ draw_menu()

@@ -452,12 +470,19 @@

bool fluent_tray::FluentMenu::draw_menu ( - LPDRAWITEMSTRUCT info, + LPDRAWITEMSTRUCT  + info, - HFONT font ) const + HFONT  + font  + + + + ) + const @@ -480,8 +505,8 @@

-

◆ get_label()

+ +

◆ get_label()

@@ -492,7 +517,8 @@

bool fluent_tray::FluentMenu::get_label ( - std::string & str) + std::string &  + str) const @@ -514,8 +540,8 @@

-

◆ hide_separator_line()

+ +

◆ hide_separator_line()

@@ -526,7 +552,7 @@

void fluent_tray::FluentMenu::hide_separator_line ( - ) + ) @@ -541,8 +567,8 @@

-

◆ id()

+ +

◆ id()

@@ -553,7 +579,7 @@

std::size_t fluent_tray::FluentMenu::id ( - ) + ) const @@ -569,8 +595,8 @@

-

◆ is_checked()

+ +

◆ is_checked()

@@ -581,7 +607,7 @@

bool fluent_tray::FluentMenu::is_checked ( - ) + ) const @@ -597,8 +623,8 @@

-

◆ is_mouse_over()

+ +

◆ is_mouse_over()

@@ -609,7 +635,7 @@

bool fluent_tray::FluentMenu::is_mouse_over ( - ) + ) const @@ -625,8 +651,8 @@

-

◆ is_toggleable()

+ +

◆ is_toggleable()

@@ -637,7 +663,7 @@

bool fluent_tray::FluentMenu::is_toggleable ( - ) + ) const @@ -653,8 +679,8 @@

-

◆ menu_handle()

+ +

◆ menu_handle()

@@ -665,7 +691,7 @@

HMENU fluent_tray::FluentMenu::menu_handle ( - ) + ) const @@ -681,8 +707,8 @@

-

◆ operator=() [1/2]

+ +

◆ operator=() [1/2]

@@ -691,9 +717,10 @@

- + - + +
FluentMenu & fluent_tray::FluentMenu::operator= FluentMenu& fluent_tray::FluentMenu::operator= (const FluentMenu & )const FluentMenu)
@@ -706,8 +733,8 @@

-

◆ operator=() [2/2]

+ +

◆ operator=() [2/2]

@@ -716,9 +743,10 @@

- + - + +
FluentMenu & fluent_tray::FluentMenu::operator= FluentMenu& fluent_tray::FluentMenu::operator= (FluentMenu && )FluentMenu && )
@@ -731,8 +759,8 @@

-

◆ process_click_event()

+ +

◆ process_click_event()

@@ -743,7 +771,7 @@

bool fluent_tray::FluentMenu::process_click_event ( - ) + ) @@ -759,8 +787,8 @@

-

◆ set_color()

+ +

◆ set_color()

@@ -771,17 +799,25 @@

bool fluent_tray::FluentMenu::set_color ( - const COLORREF & text_color = CLR_INVALID, + const COLORREF &  + text_color = CLR_INVALID, - const COLORREF & back_color = CLR_INVALID, + const COLORREF &  + back_color = CLR_INVALID, - const COLORREF & border_color = CLR_INVALID ) + const COLORREF &  + border_color = CLR_INVALID  + + + + ) + @@ -805,8 +841,8 @@

-

◆ show_separator_line()

+ +

◆ show_separator_line()

@@ -817,7 +853,7 @@

void fluent_tray::FluentMenu::show_separator_line ( - ) + ) @@ -832,8 +868,8 @@

-

◆ uncheck()

+ +

◆ uncheck()

@@ -844,7 +880,7 @@

void fluent_tray::FluentMenu::uncheck ( - ) + ) @@ -860,8 +896,8 @@

-

◆ window_handle()

+ +

◆ window_handle()

@@ -872,7 +908,7 @@

HWND fluent_tray::FluentMenu::window_handle ( - ) + ) const @@ -894,7 +930,7 @@

diff --git a/docs/classfluent__tray_1_1_fluent_tray-members.html b/docs/classfluent__tray_1_1_fluent_tray-members.html index d49cd50..c216349 100644 --- a/docs/classfluent__tray_1_1_fluent_tray-members.html +++ b/docs/classfluent__tray_1_1_fluent_tray-members.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: Member List - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
-
fluent_tray::FluentTray Member List
+
+
fluent_tray::FluentTray Member List

This is the complete list of members for fluent_tray::FluentTray, including all inherited members.

- - - - - + + + + + - - - + + + - + - - - + + + - + - + - + - +
add_menu(const std::string &label_text="", const std::string &icon_path="", bool toggleable=false, const std::string &checkmark="✓", const std::function< bool(void)> &callback=[] {return true ;}, const std::function< bool(void)> &unchecked_callback=[] {return true ;})fluent_tray::FluentTrayinline
add_separator()fluent_tray::FluentTrayinline
begin() noexceptfluent_tray::FluentTrayinline
cbegin() const noexceptfluent_tray::FluentTrayinline
cend() const noexceptfluent_tray::FluentTrayinline
change_icon(const std::string &icon_path)fluent_tray::FluentTrayinline
add_separator()fluent_tray::FluentTrayinline
begin() noexceptfluent_tray::FluentTrayinline
cbegin() const noexceptfluent_tray::FluentTrayinline
cend() const noexceptfluent_tray::FluentTrayinline
change_icon(const std::string &icon_path)fluent_tray::FluentTrayinline
count_menus() const noexceptfluent_tray::FluentTrayinline
create_tray(const std::string &app_name, const std::string &icon_path="", 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)fluent_tray::FluentTrayinline
end() noexceptfluent_tray::FluentTrayinline
FluentTray()fluent_tray::FluentTrayinlineexplicit
create_tray(const std::string &app_name, const std::string &icon_path="", 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)fluent_tray::FluentTrayinline
end() noexceptfluent_tray::FluentTrayinline
FluentTray()fluent_tray::FluentTrayinlineexplicit
FluentTray(const FluentTray &)=deletefluent_tray::FluentTray
FluentTray(FluentTray &&)=defaultfluent_tray::FluentTray
FluentTray(FluentTray &&)=defaultfluent_tray::FluentTray
hide_menu_window()fluent_tray::FluentTrayinline
operator=(const FluentTray &)=deletefluent_tray::FluentTray
operator=(FluentTray &&)=defaultfluent_tray::FluentTray
set_color(const COLORREF &text_color=CLR_INVALID, const COLORREF &back_color=CLR_INVALID, unsigned char color_decay=10)fluent_tray::FluentTrayinline
operator=(const FluentTray &)=deletefluent_tray::FluentTray
operator=(FluentTray &&)=defaultfluent_tray::FluentTray
set_color(const COLORREF &text_color=CLR_INVALID, const COLORREF &back_color=CLR_INVALID, unsigned char color_decay=10)fluent_tray::FluentTrayinline
set_font(LONG font_size=0, LONG font_weight=0, const std::string &font_name="")fluent_tray::FluentTrayinline
show_menu_window()fluent_tray::FluentTrayinline
show_menu_window()fluent_tray::FluentTrayinline
status() const noexceptfluent_tray::FluentTrayinline
stop() noexceptfluent_tray::FluentTrayinline
stop() noexceptfluent_tray::FluentTrayinline
update()fluent_tray::FluentTrayinline
update_with_loop(std::chrono::milliseconds sleep_time=std::chrono::milliseconds(1))fluent_tray::FluentTrayinline
update_with_loop(std::chrono::milliseconds sleep_time=std::chrono::milliseconds(1))fluent_tray::FluentTrayinline
window_handle() const noexceptfluent_tray::FluentTrayinline
~FluentTray() noexceptfluent_tray::FluentTrayinlinevirtual
~FluentTray() noexceptfluent_tray::FluentTrayinlinevirtual
diff --git a/docs/classfluent__tray_1_1_fluent_tray.html b/docs/classfluent__tray_1_1_fluent_tray.html index 8587987..ce7fff1 100644 --- a/docs/classfluent__tray_1_1_fluent_tray.html +++ b/docs/classfluent__tray_1_1_fluent_tray.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: fluent_tray::FluentTray Class Reference - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+

Class with information on the entire tray. - More...

+ More...

#include <fluent_tray.hpp>

- - - + + - + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - - + + - - + +

+

Public Member Functions

 FluentTray ()
 Create tray object.
 FluentTray ()
 Create tray object. More...
 
 FluentTray (const FluentTray &)=delete
 FluentTray (const FluentTray &)=delete
 
FluentTrayoperator= (const FluentTray &)=delete
 
 FluentTray (FluentTray &&)=default
FluentTrayoperator= (const FluentTray &)=delete
 
 FluentTray (FluentTray &&)=default
 
FluentTrayoperator= (FluentTray &&)=default
 
virtual ~FluentTray () noexcept
FluentTrayoperator= (FluentTray &&)=default
 
virtual ~FluentTray () noexcept
 
bool create_tray (const std::string &app_name, const std::string &icon_path="", 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)
 Initialize tray and create icon on tray.
bool create_tray (const std::string &app_name, const std::string &icon_path="", 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)
 Initialize tray and create icon on tray. More...
 
bool add_menu (const std::string &label_text="", const std::string &icon_path="", bool toggleable=false, const std::string &checkmark="✓", const std::function< bool(void)> &callback=[] {return true ;}, const std::function< bool(void)> &unchecked_callback=[] {return true ;})
 Add a menu in order from the top.
bool add_menu (const std::string &label_text="", const std::string &icon_path="", bool toggleable=false, const std::string &checkmark="✓", const std::function< bool(void)> &callback=[] {return true ;}, const std::function< bool(void)> &unchecked_callback=[] {return true ;})
 Add a menu in order from the top. More...
 
void add_separator ()
 Add a separator line under the last menu item added.
void add_separator ()
 Add a separator line under the last menu item added. More...
 
bool update ()
 Get window message and update tray.
bool update ()
 Get window message and update tray. More...
 
bool update_with_loop (std::chrono::milliseconds sleep_time=std::chrono::milliseconds(1))
 Create a message loop to update the tray.
bool update_with_loop (std::chrono::milliseconds sleep_time=std::chrono::milliseconds(1))
 Create a message loop to update the tray. More...
 
HWND window_handle () const noexcept
 Refer to the handle of menu window.
HWND window_handle () const noexcept
 Refer to the handle of menu window. More...
 
bool show_menu_window ()
 Show the menu window above the tray icon.
bool show_menu_window ()
 Show the menu window above the tray icon. More...
 
bool hide_menu_window ()
 Hide the menu window above the tray icon.
bool hide_menu_window ()
 Hide the menu window above the tray icon. More...
 
TrayStatus status () const noexcept
 Get the current status of tray.
TrayStatus status () const noexcept
 Get the current status of tray. More...
 
void stop () noexcept
 Exit the tray successfully.
void stop () noexcept
 Exit the tray successfully. More...
 
std::vector< FluentMenu >::iterator begin () noexcept
 Returns an iterator to the beginning of menus.
 
std::vector< FluentMenu >::iterator end () noexcept
 Returns an iterator to the end of menus.
 
std::vector< FluentMenu >::const_iterator cbegin () const noexcept
 Returns a constant iterator to the beginning of menus.
 
std::vector< FluentMenu >::const_iterator cend () const noexcept
 Returns a constant iterator to the end of menus.
 
std::size_t count_menus () const noexcept
 Returns the number of menus.
std::vector< FluentMenu >::iterator begin () noexcept
 Returns an iterator to the beginning of menus. More...
 
std::vector< FluentMenu >::iterator end () noexcept
 Returns an iterator to the end of menus. More...
 
std::vector< FluentMenu >::const_iterator cbegin () const noexcept
 Returns a constant iterator to the beginning of menus. More...
 
std::vector< FluentMenu >::const_iterator cend () const noexcept
 Returns a constant iterator to the end of menus. More...
 
std::size_t count_menus () const noexcept
 Returns the number of menus. More...
 
bool set_font (LONG font_size=0, LONG font_weight=0, const std::string &font_name="")
 Set font information to draw menus.
bool set_font (LONG font_size=0, LONG font_weight=0, const std::string &font_name="")
 Set font information to draw menus. More...
 
bool set_color (const COLORREF &text_color=CLR_INVALID, const COLORREF &back_color=CLR_INVALID, unsigned char color_decay=10)
 Set colors to draw menus.
bool set_color (const COLORREF &text_color=CLR_INVALID, const COLORREF &back_color=CLR_INVALID, unsigned char color_decay=10)
 Set colors to draw menus. More...
 
bool change_icon (const std::string &icon_path)
 Load the image file and change the icon.
bool change_icon (const std::string &icon_path)
 Load the image file and change the icon. More...
 

Detailed Description

Class with information on the entire tray.

Constructor & Destructor Documentation

- -

◆ FluentTray() [1/3]

+ +

◆ FluentTray() [1/3]

@@ -175,7 +165,7 @@

fluent_tray::FluentTray::FluentTray ( - ) + ) @@ -190,8 +180,8 @@

-

◆ FluentTray() [2/3]

+ +

◆ FluentTray() [2/3]

@@ -202,7 +192,8 @@

fluent_tray::FluentTray::FluentTray ( - const FluentTray & ) + const FluentTray &  + ) @@ -215,8 +206,8 @@

-

◆ FluentTray() [3/3]

+ +

◆ FluentTray() [3/3]

@@ -227,7 +218,8 @@

fluent_tray::FluentTray::FluentTray ( - FluentTray && ) + FluentTray &&  + ) @@ -240,8 +232,8 @@

-

◆ ~FluentTray()

+ +

◆ ~FluentTray()

@@ -252,7 +244,7 @@

virtual fluent_tray::FluentTray::~FluentTray ( - ) + ) @@ -266,8 +258,8 @@

Member Function Documentation

- -

◆ add_menu()

+ +

◆ add_menu()

@@ -278,32 +270,43 @@

bool fluent_tray::FluentTray::add_menu ( - const std::string & label_text = "", + const std::string &  + label_text = "", - const std::string & icon_path = "", + const std::string &  + icon_path = "", - bool toggleable = false, + bool  + toggleable = false, - const std::string & checkmark = "✓", + const std::string &  + checkmark = "✓", - const std::function< bool(void)> & callback = [] {return true ;}, + const std::function< bool(void)> &  + callback = [] {return true ;}, - const std::function< bool(void)> & unchecked_callback = [] {return true ;} ) + const std::function< bool(void)> &  + unchecked_callback = [] {return true ;}  + + + + ) + @@ -329,8 +332,8 @@

-

◆ add_separator()

+ +

◆ add_separator()

@@ -341,7 +344,7 @@

void fluent_tray::FluentTray::add_separator ( - ) + ) @@ -356,8 +359,8 @@

-

◆ begin()

+ +

◆ begin()

@@ -366,9 +369,9 @@

- + - +
std::vector< FluentMenu >::iterator fluent_tray::FluentTray::begin std::vector<FluentMenu>::iterator fluent_tray::FluentTray::begin ())
@@ -384,8 +387,8 @@

-

◆ cbegin()

+ +

◆ cbegin()

@@ -394,9 +397,9 @@

- + - +
std::vector< FluentMenu >::const_iterator fluent_tray::FluentTray::cbegin std::vector<FluentMenu>::const_iterator fluent_tray::FluentTray::cbegin ()) const
@@ -412,8 +415,8 @@

-

◆ cend()

+ +

◆ cend()

@@ -422,9 +425,9 @@

- + - +
std::vector< FluentMenu >::const_iterator fluent_tray::FluentTray::cend std::vector<FluentMenu>::const_iterator fluent_tray::FluentTray::cend ()) const
@@ -440,8 +443,8 @@

-

◆ change_icon()

+ +

◆ change_icon()

@@ -452,7 +455,8 @@

bool fluent_tray::FluentTray::change_icon ( - const std::string & icon_path) + const std::string &  + icon_path) @@ -468,8 +472,8 @@

-

◆ count_menus()

+ +

◆ count_menus()

@@ -480,7 +484,7 @@

std::size_t fluent_tray::FluentTray::count_menus ( - ) + ) const @@ -496,8 +500,8 @@

-

◆ create_tray()

+ +

◆ create_tray()

@@ -508,42 +512,55 @@

bool fluent_tray::FluentTray::create_tray ( - const std::string & app_name, + const std::string &  + app_name, - const std::string & icon_path = "", + const std::string &  + icon_path = "", - LONG menu_x_margin = 5, + LONG  + menu_x_margin = 5, - LONG menu_y_margin = 5, + LONG  + menu_y_margin = 5, - LONG menu_x_pad = 5, + LONG  + menu_x_pad = 5, - LONG menu_y_pad = 5, + LONG  + menu_y_pad = 5, - unsigned char opacity = 255, + unsigned char  + opacity = 255, - bool round_corner = true ) + bool  + round_corner = true  + + + + ) + @@ -571,8 +588,8 @@

-

◆ end()

+ +

◆ end()

@@ -581,9 +598,9 @@

- + - +
std::vector< FluentMenu >::iterator fluent_tray::FluentTray::end std::vector<FluentMenu>::iterator fluent_tray::FluentTray::end ())
@@ -599,8 +616,8 @@

-

◆ hide_menu_window()

+ +

◆ hide_menu_window()

@@ -611,7 +628,7 @@

bool fluent_tray::FluentTray::hide_menu_window ( - ) + ) @@ -627,8 +644,8 @@

-

◆ operator=() [1/2]

+ +

◆ operator=() [1/2]

@@ -637,9 +654,10 @@

- + - + +
FluentTray & fluent_tray::FluentTray::operator= FluentTray& fluent_tray::FluentTray::operator= (const FluentTray & )const FluentTray)
@@ -652,8 +670,8 @@

-

◆ operator=() [2/2]

+ +

◆ operator=() [2/2]

@@ -662,9 +680,10 @@

- + - + +
FluentTray & fluent_tray::FluentTray::operator= FluentTray& fluent_tray::FluentTray::operator= (FluentTray && )FluentTray && )
@@ -677,8 +696,8 @@

-

◆ set_color()

+ +

◆ set_color()

@@ -689,17 +708,25 @@

bool fluent_tray::FluentTray::set_color ( - const COLORREF & text_color = CLR_INVALID, + const COLORREF &  + text_color = CLR_INVALID, - const COLORREF & back_color = CLR_INVALID, + const COLORREF &  + back_color = CLR_INVALID, - unsigned char color_decay = 10 ) + unsigned char  + color_decay = 10  + + + + ) + @@ -722,8 +749,8 @@

-

◆ set_font()

+ +

◆ set_font()

@@ -734,17 +761,25 @@

bool fluent_tray::FluentTray::set_font ( - LONG font_size = 0, + LONG  + font_size = 0, - LONG font_weight = 0, + LONG  + font_weight = 0, - const std::string & font_name = "" ) + const std::string &  + font_name = ""  + + + + ) + @@ -768,8 +803,8 @@

-

◆ show_menu_window()

+ +

◆ show_menu_window()

@@ -780,7 +815,7 @@

bool fluent_tray::FluentTray::show_menu_window ( - ) + ) @@ -796,8 +831,8 @@

-

◆ status()

+ +

◆ status()

@@ -808,7 +843,7 @@

TrayStatus fluent_tray::FluentTray::status ( - ) + ) const @@ -824,8 +859,8 @@

-

◆ stop()

+ +

◆ stop()

@@ -836,7 +871,7 @@

void fluent_tray::FluentTray::stop ( - ) + ) @@ -851,8 +886,8 @@

-

◆ update()

+ +

◆ update()

@@ -863,7 +898,7 @@

bool fluent_tray::FluentTray::update ( - ) + ) @@ -879,8 +914,8 @@

-

◆ update_with_loop()

+ +

◆ update_with_loop()

@@ -891,7 +926,8 @@

bool fluent_tray::FluentTray::update_with_loop ( - std::chrono::milliseconds sleep_time = std::chrono::milliseconds(1)) + std::chrono::milliseconds  + sleep_time = std::chrono::milliseconds(1)) @@ -913,8 +949,8 @@

-

◆ window_handle()

+ +

◆ window_handle()

@@ -925,7 +961,7 @@

HWND fluent_tray::FluentTray::window_handle ( - ) + ) const @@ -947,7 +983,7 @@

diff --git a/docs/dir_d44c64559bbebec7f509842c48db8b23.html b/docs/dir_d44c64559bbebec7f509842c48db8b23.html index e1ce432..6cc2fb8 100644 --- a/docs/dir_d44c64559bbebec7f509842c48db8b23.html +++ b/docs/dir_d44c64559bbebec7f509842c48db8b23.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: include Directory Reference - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
-
include Directory Reference
+
+
include Directory Reference
- - +

+

Files

 fluent_tray.hpp
file  fluent_tray.hpp [code]
 Fluent Design-based GUI Library for System Tray Applications.
 
diff --git a/docs/doc.png b/docs/doc.png new file mode 100644 index 0000000..17edabf Binary files /dev/null and b/docs/doc.png differ diff --git a/docs/doxygen.css b/docs/doxygen.css index 7b7d851..ffbff02 100644 --- a/docs/doxygen.css +++ b/docs/doxygen.css @@ -1,422 +1,29 @@ -/* The standard CSS for doxygen 1.10.0*/ - -html { -/* page base colors */ ---page-background-color: white; ---page-foreground-color: black; ---page-link-color: #3D578C; ---page-visited-link-color: #4665A2; - -/* index */ ---index-odd-item-bg-color: #F8F9FC; ---index-even-item-bg-color: white; ---index-header-color: black; ---index-separator-color: #A0A0A0; - -/* header */ ---header-background-color: #F9FAFC; ---header-separator-color: #C4CFE5; ---header-gradient-image: url('nav_h.png'); ---group-header-separator-color: #879ECB; ---group-header-color: #354C7B; ---inherit-header-color: gray; - ---footer-foreground-color: #2A3D61; ---footer-logo-width: 104px; ---citation-label-color: #334975; ---glow-color: cyan; - ---title-background-color: white; ---title-separator-color: #5373B4; ---directory-separator-color: #9CAFD4; ---separator-color: #4A6AAA; - ---blockquote-background-color: #F7F8FB; ---blockquote-border-color: #9CAFD4; - ---scrollbar-thumb-color: #9CAFD4; ---scrollbar-background-color: #F9FAFC; - ---icon-background-color: #728DC1; ---icon-foreground-color: white; ---icon-doc-image: url('doc.svg'); ---icon-folder-open-image: url('folderopen.svg'); ---icon-folder-closed-image: url('folderclosed.svg'); - -/* brief member declaration list */ ---memdecl-background-color: #F9FAFC; ---memdecl-separator-color: #DEE4F0; ---memdecl-foreground-color: #555; ---memdecl-template-color: #4665A2; - -/* detailed member list */ ---memdef-border-color: #A8B8D9; ---memdef-title-background-color: #E2E8F2; ---memdef-title-gradient-image: url('nav_f.png'); ---memdef-proto-background-color: #DFE5F1; ---memdef-proto-text-color: #253555; ---memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); ---memdef-doc-background-color: white; ---memdef-param-name-color: #602020; ---memdef-template-color: #4665A2; - -/* tables */ ---table-cell-border-color: #2D4068; ---table-header-background-color: #374F7F; ---table-header-foreground-color: #FFFFFF; - -/* labels */ ---label-background-color: #728DC1; ---label-left-top-border-color: #5373B4; ---label-right-bottom-border-color: #C4CFE5; ---label-foreground-color: white; - -/** navigation bar/tree/menu */ ---nav-background-color: #F9FAFC; ---nav-foreground-color: #364D7C; ---nav-gradient-image: url('tab_b.png'); ---nav-gradient-hover-image: url('tab_h.png'); ---nav-gradient-active-image: url('tab_a.png'); ---nav-gradient-active-image-parent: url("../tab_a.png"); ---nav-separator-image: url('tab_s.png'); ---nav-breadcrumb-image: url('bc_s.png'); ---nav-breadcrumb-border-color: #C2CDE4; ---nav-splitbar-image: url('splitbar.png'); ---nav-font-size-level1: 13px; ---nav-font-size-level2: 10px; ---nav-font-size-level3: 9px; ---nav-text-normal-color: #283A5D; ---nav-text-hover-color: white; ---nav-text-active-color: white; ---nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); ---nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-menu-button-color: #364D7C; ---nav-menu-background-color: white; ---nav-menu-foreground-color: #555555; ---nav-menu-toggle-color: rgba(255, 255, 255, 0.5); ---nav-arrow-color: #9CAFD4; ---nav-arrow-selected-color: #9CAFD4; - -/* table of contents */ ---toc-background-color: #F4F6FA; ---toc-border-color: #D8DFEE; ---toc-header-color: #4665A2; ---toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); - -/** search field */ ---search-background-color: white; ---search-foreground-color: #909090; ---search-magnification-image: url('mag.svg'); ---search-magnification-select-image: url('mag_sel.svg'); ---search-active-color: black; ---search-filter-background-color: #F9FAFC; ---search-filter-foreground-color: black; ---search-filter-border-color: #90A5CE; ---search-filter-highlight-text-color: white; ---search-filter-highlight-bg-color: #3D578C; ---search-results-foreground-color: #425E97; ---search-results-background-color: #EEF1F7; ---search-results-border-color: black; ---search-box-shadow: inset 0.5px 0.5px 3px 0px #555; - -/** code fragments */ ---code-keyword-color: #008000; ---code-type-keyword-color: #604020; ---code-flow-keyword-color: #E08000; ---code-comment-color: #800000; ---code-preprocessor-color: #806020; ---code-string-literal-color: #002080; ---code-char-literal-color: #008080; ---code-xml-cdata-color: black; ---code-vhdl-digit-color: #FF00FF; ---code-vhdl-char-color: #000000; ---code-vhdl-keyword-color: #700070; ---code-vhdl-logic-color: #FF0000; ---code-link-color: #4665A2; ---code-external-link-color: #4665A2; ---fragment-foreground-color: black; ---fragment-background-color: #FBFCFD; ---fragment-border-color: #C4CFE5; ---fragment-lineno-border-color: #00FF00; ---fragment-lineno-background-color: #E8E8E8; ---fragment-lineno-foreground-color: black; ---fragment-lineno-link-fg-color: #4665A2; ---fragment-lineno-link-bg-color: #D8D8D8; ---fragment-lineno-link-hover-fg-color: #4665A2; ---fragment-lineno-link-hover-bg-color: #C8C8C8; ---fragment-copy-ok-color: #2EC82E; ---tooltip-foreground-color: black; ---tooltip-background-color: white; ---tooltip-border-color: gray; ---tooltip-doc-color: grey; ---tooltip-declaration-color: #006318; ---tooltip-link-color: #4665A2; ---tooltip-shadow: 1px 1px 7px gray; ---fold-line-color: #808080; ---fold-minus-image: url('minus.svg'); ---fold-plus-image: url('plus.svg'); ---fold-minus-image-relpath: url('../../minus.svg'); ---fold-plus-image-relpath: url('../../plus.svg'); - -/** font-family */ ---font-family-normal: Roboto,sans-serif; ---font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; ---font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; ---font-family-title: Tahoma,Arial,sans-serif; ---font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; ---font-family-search: Arial,Verdana,sans-serif; ---font-family-icon: Arial,Helvetica; ---font-family-tooltip: Roboto,sans-serif; - -/** special sections */ ---warning-color-bg: #f8d1cc; ---warning-color-hl: #b61825; ---warning-color-text: #75070f; ---note-color-bg: #faf3d8; ---note-color-hl: #f3a600; ---note-color-text: #5f4204; ---todo-color-bg: #e4f3ff; ---todo-color-hl: #1879C4; ---todo-color-text: #274a5c; ---test-color-bg: #e8e8ff; ---test-color-hl: #3939C4; ---test-color-text: #1a1a5c; ---deprecated-color-bg: #ecf0f3; ---deprecated-color-hl: #5b6269; ---deprecated-color-text: #43454a; ---bug-color-bg: #e4dafd; ---bug-color-hl: #5b2bdd; ---bug-color-text: #2a0d72; ---invariant-color-bg: #d8f1e3; ---invariant-color-hl: #44b86f; ---invariant-color-text: #265532; -} - -@media (prefers-color-scheme: dark) { - html:not(.dark-mode) { - color-scheme: dark; - -/* page base colors */ ---page-background-color: black; ---page-foreground-color: #C9D1D9; ---page-link-color: #90A5CE; ---page-visited-link-color: #A3B4D7; - -/* index */ ---index-odd-item-bg-color: #0B101A; ---index-even-item-bg-color: black; ---index-header-color: #C4CFE5; ---index-separator-color: #334975; - -/* header */ ---header-background-color: #070B11; ---header-separator-color: #141C2E; ---header-gradient-image: url('nav_hd.png'); ---group-header-separator-color: #283A5D; ---group-header-color: #90A5CE; ---inherit-header-color: #A0A0A0; - ---footer-foreground-color: #5B7AB7; ---footer-logo-width: 60px; ---citation-label-color: #90A5CE; ---glow-color: cyan; - ---title-background-color: #090D16; ---title-separator-color: #354C79; ---directory-separator-color: #283A5D; ---separator-color: #283A5D; - ---blockquote-background-color: #101826; ---blockquote-border-color: #283A5D; - ---scrollbar-thumb-color: #283A5D; ---scrollbar-background-color: #070B11; - ---icon-background-color: #334975; ---icon-foreground-color: #C4CFE5; ---icon-doc-image: url('docd.svg'); ---icon-folder-open-image: url('folderopend.svg'); ---icon-folder-closed-image: url('folderclosedd.svg'); - -/* brief member declaration list */ ---memdecl-background-color: #0B101A; ---memdecl-separator-color: #2C3F65; ---memdecl-foreground-color: #BBB; ---memdecl-template-color: #7C95C6; - -/* detailed member list */ ---memdef-border-color: #233250; ---memdef-title-background-color: #1B2840; ---memdef-title-gradient-image: url('nav_fd.png'); ---memdef-proto-background-color: #19243A; ---memdef-proto-text-color: #9DB0D4; ---memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9); ---memdef-doc-background-color: black; ---memdef-param-name-color: #D28757; ---memdef-template-color: #7C95C6; - -/* tables */ ---table-cell-border-color: #283A5D; ---table-header-background-color: #283A5D; ---table-header-foreground-color: #C4CFE5; - -/* labels */ ---label-background-color: #354C7B; ---label-left-top-border-color: #4665A2; ---label-right-bottom-border-color: #283A5D; ---label-foreground-color: #CCCCCC; - -/** navigation bar/tree/menu */ ---nav-background-color: #101826; ---nav-foreground-color: #364D7C; ---nav-gradient-image: url('tab_bd.png'); ---nav-gradient-hover-image: url('tab_hd.png'); ---nav-gradient-active-image: url('tab_ad.png'); ---nav-gradient-active-image-parent: url("../tab_ad.png"); ---nav-separator-image: url('tab_sd.png'); ---nav-breadcrumb-image: url('bc_sd.png'); ---nav-breadcrumb-border-color: #2A3D61; ---nav-splitbar-image: url('splitbard.png'); ---nav-font-size-level1: 13px; ---nav-font-size-level2: 10px; ---nav-font-size-level3: 9px; ---nav-text-normal-color: #B6C4DF; ---nav-text-hover-color: #DCE2EF; ---nav-text-active-color: #DCE2EF; ---nav-text-normal-shadow: 0px 1px 1px black; ---nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); ---nav-menu-button-color: #B6C4DF; ---nav-menu-background-color: #05070C; ---nav-menu-foreground-color: #BBBBBB; ---nav-menu-toggle-color: rgba(255, 255, 255, 0.2); ---nav-arrow-color: #334975; ---nav-arrow-selected-color: #90A5CE; - -/* table of contents */ ---toc-background-color: #151E30; ---toc-border-color: #202E4A; ---toc-header-color: #A3B4D7; ---toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); - -/** search field */ ---search-background-color: black; ---search-foreground-color: #C5C5C5; ---search-magnification-image: url('mag_d.svg'); ---search-magnification-select-image: url('mag_seld.svg'); ---search-active-color: #C5C5C5; ---search-filter-background-color: #101826; ---search-filter-foreground-color: #90A5CE; ---search-filter-border-color: #7C95C6; ---search-filter-highlight-text-color: #BCC9E2; ---search-filter-highlight-bg-color: #283A5D; ---search-results-background-color: #101826; ---search-results-foreground-color: #90A5CE; ---search-results-border-color: #7C95C6; ---search-box-shadow: inset 0.5px 0.5px 3px 0px #2F436C; - -/** code fragments */ ---code-keyword-color: #CC99CD; ---code-type-keyword-color: #AB99CD; ---code-flow-keyword-color: #E08000; ---code-comment-color: #717790; ---code-preprocessor-color: #65CABE; ---code-string-literal-color: #7EC699; ---code-char-literal-color: #00E0F0; ---code-xml-cdata-color: #C9D1D9; ---code-vhdl-digit-color: #FF00FF; ---code-vhdl-char-color: #C0C0C0; ---code-vhdl-keyword-color: #CF53C9; ---code-vhdl-logic-color: #FF0000; ---code-link-color: #79C0FF; ---code-external-link-color: #79C0FF; ---fragment-foreground-color: #C9D1D9; ---fragment-background-color: #090D16; ---fragment-border-color: #30363D; ---fragment-lineno-border-color: #30363D; ---fragment-lineno-background-color: black; ---fragment-lineno-foreground-color: #6E7681; ---fragment-lineno-link-fg-color: #6E7681; ---fragment-lineno-link-bg-color: #303030; ---fragment-lineno-link-hover-fg-color: #8E96A1; ---fragment-lineno-link-hover-bg-color: #505050; ---fragment-copy-ok-color: #0EA80E; ---tooltip-foreground-color: #C9D1D9; ---tooltip-background-color: #202020; ---tooltip-border-color: #C9D1D9; ---tooltip-doc-color: #D9E1E9; ---tooltip-declaration-color: #20C348; ---tooltip-link-color: #79C0FF; ---tooltip-shadow: none; ---fold-line-color: #808080; ---fold-minus-image: url('minusd.svg'); ---fold-plus-image: url('plusd.svg'); ---fold-minus-image-relpath: url('../../minusd.svg'); ---fold-plus-image-relpath: url('../../plusd.svg'); - -/** font-family */ ---font-family-normal: Roboto,sans-serif; ---font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; ---font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; ---font-family-title: Tahoma,Arial,sans-serif; ---font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; ---font-family-search: Arial,Verdana,sans-serif; ---font-family-icon: Arial,Helvetica; ---font-family-tooltip: Roboto,sans-serif; - -/** special sections */ ---warning-color-bg: #2e1917; ---warning-color-hl: #ad2617; ---warning-color-text: #f5b1aa; ---note-color-bg: #3b2e04; ---note-color-hl: #f1b602; ---note-color-text: #ceb670; ---todo-color-bg: #163750; ---todo-color-hl: #1982D2; ---todo-color-text: #dcf0fa; ---test-color-bg: #121258; ---test-color-hl: #4242cf; ---test-color-text: #c0c0da; ---deprecated-color-bg: #2e323b; ---deprecated-color-hl: #738396; ---deprecated-color-text: #abb0bd; ---bug-color-bg: #2a2536; ---bug-color-hl: #7661b3; ---bug-color-text: #ae9ed6; ---invariant-color-bg: #303a35; ---invariant-color-hl: #76ce96; ---invariant-color-text: #cceed5; -}} -body { - background-color: var(--page-background-color); - color: var(--page-foreground-color); -} +/* The standard CSS for doxygen 1.9.1 */ body, table, div, p, dl { - font-weight: 400; - font-size: 14px; - font-family: var(--font-family-normal); - line-height: 22px; + font: 400 14px/22px Roboto,sans-serif; +} + +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; } /* @group Heading Levels */ -.title { - font-family: var(--font-family-normal); - line-height: 28px; +h1.groupheader { font-size: 150%; - font-weight: bold; - margin: 10px 2px; } -h1.groupheader { +.title { + font: 400 14px/28px Roboto,sans-serif; font-size: 150%; + font-weight: bold; + margin: 10px 2px; } h2.groupheader { - border-bottom: 1px solid var(--group-header-separator-color); - color: var(--group-header-color); + border-bottom: 1px solid #879ECB; + color: #354C7B; font-size: 150%; font-weight: normal; margin-top: 1.75em; @@ -439,13 +46,22 @@ h1, h2, h3, h4, h5, h6 { } h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { - text-shadow: 0 0 15px var(--glow-color); + text-shadow: 0 0 15px cyan; } dt { font-weight: bold; } +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; +} + p.startli, p.startdd { margin-top: 2px; } @@ -497,6 +113,7 @@ h3.version { } div.navtab { + border-right: 1px solid #A3B4D7; padding-right: 15px; text-align: right; line-height: 110%; @@ -510,17 +127,16 @@ td.navtab { padding-right: 6px; padding-left: 6px; } - td.navtabHL { - background-image: var(--nav-gradient-active-image); + background-image: url('tab_a.png'); background-repeat:repeat-x; padding-right: 6px; padding-left: 6px; } td.navtabHL a, td.navtabHL a:visited { - color: var(--nav-text-hover-color); - text-shadow: var(--nav-text-hover-shadow); + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); } a.navtab { @@ -532,13 +148,7 @@ div.qindex{ width: 100%; line-height: 140%; font-size: 130%; - color: var(--index-separator-color); -} - -#main-menu a:focus { - outline: auto; - z-index: 10; - position: relative; + color: #A0A0A0; } dt.alphachar{ @@ -547,7 +157,7 @@ dt.alphachar{ } .alphachar a{ - color: var(--index-header-color); + color: black; } .alphachar a:hover, .alphachar a:visited{ @@ -566,12 +176,8 @@ dt.alphachar{ line-height: 1.15em; } -.classindex dl.even { - background-color: var(--index-even-item-bg-color); -} - .classindex dl.odd { - background-color: var(--index-odd-item-bg-color); + background-color: #F8F9FC; } @media(min-width: 1120px) { @@ -590,23 +196,21 @@ dt.alphachar{ /* @group Link Styling */ a { - color: var(--page-link-color); + color: #3D578C; font-weight: normal; text-decoration: none; } .contents a:visited { - color: var(--page-visited-link-color); + color: #4665A2; } a:hover { - text-decoration: none; - background: linear-gradient(to bottom, transparent 0,transparent calc(100% - 1px), currentColor 100%); + text-decoration: underline; } -a:hover > span.arrow { - text-decoration: none; - background : var(--nav-background-color); +.contents a.qindexHL:visited { + color: #FFFFFF; } a.el { @@ -617,39 +221,12 @@ a.elRef { } a.code, a.code:visited, a.line, a.line:visited { - color: var(--code-link-color); + color: #4665A2; } a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: var(--code-external-link-color); -} - -a.code.hl_class { /* style for links to class names in code snippets */ } -a.code.hl_struct { /* style for links to struct names in code snippets */ } -a.code.hl_union { /* style for links to union names in code snippets */ } -a.code.hl_interface { /* style for links to interface names in code snippets */ } -a.code.hl_protocol { /* style for links to protocol names in code snippets */ } -a.code.hl_category { /* style for links to category names in code snippets */ } -a.code.hl_exception { /* style for links to exception names in code snippets */ } -a.code.hl_service { /* style for links to service names in code snippets */ } -a.code.hl_singleton { /* style for links to singleton names in code snippets */ } -a.code.hl_concept { /* style for links to concept names in code snippets */ } -a.code.hl_namespace { /* style for links to namespace names in code snippets */ } -a.code.hl_package { /* style for links to package names in code snippets */ } -a.code.hl_define { /* style for links to macro names in code snippets */ } -a.code.hl_function { /* style for links to function names in code snippets */ } -a.code.hl_variable { /* style for links to variable names in code snippets */ } -a.code.hl_typedef { /* style for links to typedef names in code snippets */ } -a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } -a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } -a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } -a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } -a.code.hl_friend { /* style for links to friend names in code snippets */ } -a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } -a.code.hl_property { /* style for links to property names in code snippets */ } -a.code.hl_event { /* style for links to event names in code snippets */ } -a.code.hl_sequence { /* style for links to sequence names in code snippets */ } -a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } + color: #4665A2; +} /* @end */ @@ -658,17 +235,7 @@ dl.el { } ul { - overflow: visible; -} - -ul.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; - column-count: 3; - list-style-type: none; + overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ } #side-nav ul { @@ -682,70 +249,35 @@ ul.multicol { .fragment { text-align: left; direction: ltr; - overflow-x: auto; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ overflow-y: hidden; - position: relative; - min-height: 12px; - margin: 10px 0px; - padding: 10px 10px; - border: 1px solid var(--fragment-border-color); - border-radius: 4px; - background-color: var(--fragment-background-color); - color: var(--fragment-foreground-color); } pre.fragment { - word-wrap: break-word; - font-size: 10pt; - line-height: 125%; - font-family: var(--font-family-monospace); -} - -.clipboard { - width: 24px; - height: 24px; - right: 5px; - top: 5px; - opacity: 0; - position: absolute; - display: inline; + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; overflow: auto; - fill: var(--fragment-foreground-color); - justify-content: center; - align-items: center; - cursor: pointer; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; } -.clipboard.success { - border: 1px solid var(--fragment-foreground-color); - border-radius: 4px; -} - -.fragment:hover .clipboard, .clipboard.success { - opacity: .28; -} - -.clipboard:hover, .clipboard.success { - opacity: 1 !important; -} - -.clipboard:active:not([class~=success]) svg { - transform: scale(.91); -} - -.clipboard.success svg { - fill: var(--fragment-copy-ok-color); -} - -.clipboard.success { - border-color: var(--fragment-copy-ok-color); +div.fragment { + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; } div.line { - font-family: var(--font-family-monospace); + font-family: monospace, fixed; font-size: 13px; min-height: 13px; - line-height: 1.2; + line-height: 1.0; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ @@ -774,40 +306,24 @@ div.line:after { } div.line.glow { - background-color: var(--glow-color); - box-shadow: 0 0 10px var(--glow-color); + background-color: cyan; + box-shadow: 0 0 10px cyan; } -span.fold { - margin-left: 5px; - margin-right: 1px; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; - display: inline-block; - width: 12px; - height: 12px; - background-repeat:no-repeat; - background-position:center; -} span.lineno { padding-right: 4px; - margin-right: 9px; text-align: right; - border-right: 2px solid var(--fragment-lineno-border-color); - color: var(--fragment-lineno-foreground-color); - background-color: var(--fragment-lineno-background-color); + border-right: 2px solid #0F0; + background-color: #E8E8E8; white-space: pre; } -span.lineno a, span.lineno a:visited { - color: var(--fragment-lineno-link-fg-color); - background-color: var(--fragment-lineno-link-bg-color); +span.lineno a { + background-color: #D8D8D8; } span.lineno a:hover { - color: var(--fragment-lineno-link-hover-fg-color); - background-color: var(--fragment-lineno-link-hover-bg-color); + background-color: #C8C8C8; } .lineno { @@ -819,6 +335,24 @@ span.lineno a:hover { user-select: none; } +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #FFFFFF; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + div.classindex ul { list-style: none; padding-left: 0; @@ -840,7 +374,8 @@ div.groupText { } body { - color: var(--page-foreground-color); + background-color: white; + color: black; margin: 0; } @@ -850,15 +385,33 @@ div.contents { margin-right: 8px; } +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + p.formulaDsp { text-align: center; } -img.dark-mode-visible { - display: none; -} -img.light-mode-visible { - display: none; +img.formulaDsp { + } img.formulaInl, img.inline { @@ -884,74 +437,89 @@ address.footer { img.footer { border: 0px; vertical-align: middle; - width: var(--footer-logo-width); -} - -.compoundTemplParams { - color: var(--memdecl-template-color); - font-size: 80%; - line-height: 120%; } /* @group Code Colorization */ span.keyword { - color: var(--code-keyword-color); + color: #008000 } span.keywordtype { - color: var(--code-type-keyword-color); + color: #604020 } span.keywordflow { - color: var(--code-flow-keyword-color); + color: #e08000 } span.comment { - color: var(--code-comment-color); + color: #800000 } span.preprocessor { - color: var(--code-preprocessor-color); + color: #806020 } span.stringliteral { - color: var(--code-string-literal-color); + color: #002080 } span.charliteral { - color: var(--code-char-literal-color); -} - -span.xmlcdata { - color: var(--code-xml-cdata-color); + color: #008080 } span.vhdldigit { - color: var(--code-vhdl-digit-color); + color: #ff00ff } span.vhdlchar { - color: var(--code-vhdl-char-color); + color: #000000 } span.vhdlkeyword { - color: var(--code-vhdl-keyword-color); + color: #700070 } span.vhdllogic { - color: var(--code-vhdl-logic-color); + color: #ff0000 } blockquote { - background-color: var(--blockquote-background-color); - border-left: 2px solid var(--blockquote-border-color); + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; margin: 0 24px 0 4px; padding: 0 12px 0 16px; } +blockquote.DocNodeRTL { + border-left: 0; + border-right: 2px solid #9CAFD4; + margin: 0 4px 0 24px; + padding: 0 16px 0 12px; +} + /* @end */ +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + td.tiny { font-size: 75%; } @@ -959,19 +527,18 @@ td.tiny { .dirtab { padding: 4px; border-collapse: collapse; - border: 1px solid var(--table-cell-border-color); + border: 1px solid #A3B4D7; } th.dirtab { - background-color: var(--table-header-background-color); - color: var(--table-header-foreground-color); + background: #EBEFF6; font-weight: bold; } hr { height: 0px; border: none; - border-top: 1px solid var(--separator-color); + border-top: 1px solid #4A6AAA; } hr.footer { @@ -999,14 +566,14 @@ table.memberdecls { } .memberdecls td.glow, .fieldtable tr.glow { - background-color: var(--glow-color); - box-shadow: 0 0 15px var(--glow-color); + background-color: cyan; + box-shadow: 0 0 15px cyan; } .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: var(--memdecl-background-color); + background-color: #F9FAFC; border: none; margin: 4px; padding: 1px 0 0 8px; @@ -1014,11 +581,11 @@ table.memberdecls { .mdescLeft, .mdescRight { padding: 0px 8px 4px 8px; - color: var(--memdecl-foreground-color); + color: #555; } .memSeparator { - border-bottom: 1px solid var(--memdecl-separator-color); + border-bottom: 1px solid #DEE4F0; line-height: 1px; margin: 0px; padding: 0px; @@ -1033,7 +600,7 @@ table.memberdecls { } .memTemplParams { - color: var(--memdecl-template-color); + color: #4665A2; white-space: nowrap; font-size: 80%; } @@ -1046,15 +613,15 @@ table.memberdecls { .memtitle { padding: 8px; - border-top: 1px solid var(--memdef-border-color); - border-left: 1px solid var(--memdef-border-color); - border-right: 1px solid var(--memdef-border-color); + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; border-top-right-radius: 4px; border-top-left-radius: 4px; margin-bottom: -1px; - background-image: var(--memdef-title-gradient-image); + background-image: url('nav_f.png'); background-repeat: repeat-x; - background-color: var(--memdef-title-background-color); + background-color: #E2E8F2; line-height: 1.25; font-weight: 300; float:left; @@ -1069,11 +636,20 @@ table.memberdecls { .memtemplate { font-size: 80%; - color: var(--memdef-template-color); + color: #4665A2; font-weight: normal; margin-left: 9px; } +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + .mempage { width: 100%; } @@ -1092,7 +668,7 @@ table.memberdecls { } .memitem.glow { - box-shadow: 0 0 15px var(--glow-color); + box-shadow: 0 0 15px cyan; } .memname { @@ -1105,32 +681,41 @@ table.memberdecls { } .memproto, dl.reflist dt { - border-top: 1px solid var(--memdef-border-color); - border-left: 1px solid var(--memdef-border-color); - border-right: 1px solid var(--memdef-border-color); + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; padding: 6px 0px 6px 0px; - color: var(--memdef-proto-text-color); + color: #253555; font-weight: bold; - text-shadow: var(--memdef-proto-text-shadow); - background-color: var(--memdef-proto-background-color); + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #DFE5F1; + /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); border-top-right-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + } .overload { - font-family: var(--font-family-monospace); + font-family: "courier new",courier,monospace; font-size: 65%; } .memdoc, dl.reflist dd { - border-bottom: 1px solid var(--memdef-border-color); - border-left: 1px solid var(--memdef-border-color); - border-right: 1px solid var(--memdef-border-color); + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; padding: 6px 10px 2px 10px; + background-color: #FBFCFD; border-top-width: 0; background-image:url('nav_g.png'); background-repeat:repeat-x; - background-color: var(--memdef-doc-background-color); + background-color: #FFFFFF; /* opera specific markup */ border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; @@ -1160,44 +745,36 @@ dl.reflist dd { .paramtype { white-space: nowrap; - padding: 0px; - padding-bottom: 1px; } .paramname { + color: #602020; white-space: nowrap; - padding: 0px; - padding-bottom: 1px; - margin-left: 2px; } - .paramname em { - color: var(--memdef-param-name-color); font-style: normal; - margin-right: 1px; } - -.paramname .paramdefval { - font-family: var(--font-family-monospace); +.paramname code { + line-height: 14px; } .params, .retval, .exception, .tparams { margin-left: 0px; padding-left: 0px; -} +} .params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { font-weight: bold; vertical-align: top; } - + .params .paramtype, .tparams .paramtype { font-style: italic; vertical-align: top; -} - +} + .params .paramdir, .tparams .paramdir { - font-family: var(--font-family-monospace); + font-family: "courier new",courier,monospace; vertical-align: top; } @@ -1221,13 +798,13 @@ span.mlabels { } span.mlabel { - background-color: var(--label-background-color); - border-top:1px solid var(--label-left-top-border-color); - border-left:1px solid var(--label-left-top-border-color); - border-right:1px solid var(--label-right-bottom-border-color); - border-bottom:1px solid var(--label-right-bottom-border-color); + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; text-shadow: none; - color: var(--label-foreground-color); + color: white; margin-right: 4px; padding: 2px 3px; border-radius: 3px; @@ -1244,8 +821,8 @@ span.mlabel { div.directory { margin: 10px 0px; - border-top: 1px solid var(--directory-separator-color); - border-bottom: 1px solid var(--directory-separator-color); + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; width: 100%; } @@ -1281,14 +858,9 @@ div.directory { border-left: 1px solid rgba(0,0,0,0.05); } -.directory tr.odd { - padding-left: 6px; - background-color: var(--index-odd-item-bg-color); -} - .directory tr.even { padding-left: 6px; - background-color: var(--index-even-item-bg-color); + background-color: #F7F8FB; } .directory img { @@ -1306,11 +878,11 @@ div.directory { cursor: pointer; padding-left: 2px; padding-right: 2px; - color: var(--page-link-color); + color: #3D578C; } .arrow { - color: var(--nav-arrow-color); + color: #9CAFD4; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; @@ -1324,15 +896,14 @@ div.directory { } .icon { - font-family: var(--font-family-icon); - line-height: normal; + font-family: Arial, Helvetica; font-weight: bold; font-size: 12px; height: 14px; width: 16px; display: inline-block; - background-color: var(--icon-background-color); - color: var(--icon-foreground-color); + background-color: #728DC1; + color: white; text-align: center; border-radius: 4px; margin-left: 2px; @@ -1349,7 +920,8 @@ div.directory { width: 24px; height: 18px; margin-bottom: 4px; - background-image:var(--icon-folder-open-image); + background-image:url('folderopen.png'); + background-position: 0px -4px; background-repeat: repeat-y; vertical-align:top; display: inline-block; @@ -1359,7 +931,8 @@ div.directory { width: 24px; height: 18px; margin-bottom: 4px; - background-image:var(--icon-folder-closed-image); + background-image:url('folderclosed.png'); + background-position: 0px -4px; background-repeat: repeat-y; vertical-align:top; display: inline-block; @@ -1369,13 +942,17 @@ div.directory { width: 24px; height: 18px; margin-bottom: 4px; - background-image:var(--icon-doc-image); + background-image:url('doc.png'); background-position: 0px -4px; background-repeat: repeat-y; vertical-align:top; display: inline-block; } +table.directory { + font: 400 14px Roboto,sans-serif; +} + /* @end */ div.dynheader { @@ -1390,7 +967,7 @@ div.dynheader { address { font-style: normal; - color: var(--footer-foreground-color); + color: #2A3D61; } table.doxtable caption { @@ -1404,23 +981,28 @@ table.doxtable { } table.doxtable td, table.doxtable th { - border: 1px solid var(--table-cell-border-color); + border: 1px solid #2D4068; padding: 3px 7px 2px; } table.doxtable th { - background-color: var(--table-header-background-color); - color: var(--table-header-foreground-color); + background-color: #374F7F; + color: #FFFFFF; font-size: 110%; padding-bottom: 4px; padding-top: 5px; } table.fieldtable { + /*width: 100%;*/ margin-bottom: 10px; - border: 1px solid var(--memdef-border-color); + border: 1px solid #A8B8D9; border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); } @@ -1430,8 +1012,8 @@ table.fieldtable { .fieldtable td.fieldtype, .fieldtable td.fieldname { white-space: nowrap; - border-right: 1px solid var(--memdef-border-color); - border-bottom: 1px solid var(--memdef-border-color); + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; vertical-align: top; } @@ -1440,13 +1022,14 @@ table.fieldtable { } .fieldtable td.fielddoc { - border-bottom: 1px solid var(--memdef-border-color); + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ } .fieldtable td.fielddoc p:first-child { margin-top: 0px; -} - +} + .fieldtable td.fielddoc p:last-child { margin-bottom: 2px; } @@ -1456,18 +1039,22 @@ table.fieldtable { } .fieldtable th { - background-image: var(--memdef-title-gradient-image); + background-image:url('nav_f.png'); background-repeat:repeat-x; - background-color: var(--memdef-title-background-color); + background-color: #E2E8F2; font-size: 90%; - color: var(--memdef-proto-text-color); + color: #253555; padding-bottom: 4px; padding-top: 5px; text-align:left; font-weight: 400; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; - border-bottom: 1px solid var(--memdef-border-color); + border-bottom: 1px solid #A8B8D9; } @@ -1475,7 +1062,7 @@ table.fieldtable { top: 0px; left: 10px; height: 36px; - background-image: var(--nav-gradient-image); + background-image: url('tab_b.png'); z-index: 101; overflow: hidden; font-size: 13px; @@ -1484,13 +1071,13 @@ table.fieldtable { .navpath ul { font-size: 11px; - background-image: var(--nav-gradient-image); + background-image:url('tab_b.png'); background-repeat:repeat-x; background-position: 0 -5px; height:30px; line-height:30px; - color:var(--nav-text-normal-color); - border:solid 1px var(--nav-breadcrumb-border-color); + color:#8AA0CC; + border:solid 1px #C2CDE4; overflow:hidden; margin:0px; padding:0px; @@ -1502,27 +1089,27 @@ table.fieldtable { float:left; padding-left:10px; padding-right:15px; - background-image:var(--nav-breadcrumb-image); + background-image:url('bc_s.png'); background-repeat:no-repeat; background-position:right; - color: var(--nav-foreground-color); + color:#364D7C; } .navpath li.navelem a { height:32px; display:block; - outline: none; - color: var(--nav-text-normal-color); - font-family: var(--font-family-nav); - text-shadow: var(--nav-text-normal-shadow); text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; } .navpath li.navelem a:hover { - color: var(--nav-text-hover-color); - text-shadow: var(--nav-text-hover-shadow); + color:#6884BD; } .navpath li.footer @@ -1534,7 +1121,7 @@ table.fieldtable { background-image:none; background-repeat:no-repeat; background-position:right; - color: var(--footer-foreground-color); + color:#364D7C; font-size: 8pt; } @@ -1546,7 +1133,7 @@ div.summary padding-right: 5px; width: 50%; text-align: right; -} +} div.summary a { @@ -1561,7 +1148,7 @@ table.classindex margin-right: 3%; width: 94%; border: 0; - border-spacing: 0; + border-spacing: 0; padding: 0; } @@ -1579,11 +1166,11 @@ div.ingroups a div.header { - background-image: var(--header-gradient-image); + background-image:url('nav_h.png'); background-repeat:repeat-x; - background-color: var(--header-background-color); + background-color: #F9FAFC; margin: 0px; - border-bottom: 1px solid var(--header-separator-color); + border-bottom: 1px solid #C4CFE5; } div.headertitle @@ -1600,13 +1187,17 @@ dl { padding: 0 0 0 0; } -/* - +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ dl.section { margin-left: 0px; padding-left: 0px; } +dl.section.DocNodeRTL { + margin-right: 0px; + padding-right: 0px; +} + dl.note { margin-left: -7px; padding-left: 3px; @@ -1614,6 +1205,16 @@ dl.note { border-color: #D0C000; } +dl.note.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #D0C000; +} + dl.warning, dl.attention { margin-left: -7px; padding-left: 3px; @@ -1621,6 +1222,16 @@ dl.warning, dl.attention { border-color: #FF0000; } +dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #FF0000; +} + dl.pre, dl.post, dl.invariant { margin-left: -7px; padding-left: 3px; @@ -1628,6 +1239,16 @@ dl.pre, dl.post, dl.invariant { border-color: #00D000; } +dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00D000; +} + dl.deprecated { margin-left: -7px; padding-left: 3px; @@ -1635,6 +1256,16 @@ dl.deprecated { border-color: #505050; } +dl.deprecated.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #505050; +} + dl.todo { margin-left: -7px; padding-left: 3px; @@ -1642,6 +1273,16 @@ dl.todo { border-color: #00C0E0; } +dl.todo.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00C0E0; +} + dl.test { margin-left: -7px; padding-left: 3px; @@ -1649,6 +1290,16 @@ dl.test { border-color: #3030E0; } +dl.test.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #3030E0; +} + dl.bug { margin-left: -7px; padding-left: 3px; @@ -1656,108 +1307,20 @@ dl.bug { border-color: #C08050; } -*/ - -dl.bug dt a, dl.deprecated dt a, dl.todo dt a, dl.test a { - font-weight: bold !important; -} - -dl.warning, dl.attention, dl.note, dl.deprecated, dl.bug, -dl.invariant, dl.pre, dl.post, dl.todo, dl.test, dl.remark { - padding: 10px; - margin: 10px 0px; - overflow: hidden; - margin-left: 0; - border-radius: 4px; +dl.bug.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #C08050; } dl.section dd { - margin-bottom: 2px; -} - -dl.warning, dl.attention { - background: var(--warning-color-bg); - border-left: 8px solid var(--warning-color-hl); - color: var(--warning-color-text); + margin-bottom: 6px; } -dl.warning dt, dl.attention dt { - color: var(--warning-color-hl); -} - -dl.note, dl.remark { - background: var(--note-color-bg); - border-left: 8px solid var(--note-color-hl); - color: var(--note-color-text); -} - -dl.note dt, dl.remark dt { - color: var(--note-color-hl); -} - -dl.todo { - background: var(--todo-color-bg); - border-left: 8px solid var(--todo-color-hl); - color: var(--todo-color-text); -} - -dl.todo dt { - color: var(--todo-color-hl); -} - -dl.test { - background: var(--test-color-bg); - border-left: 8px solid var(--test-color-hl); - color: var(--test-color-text); -} - -dl.test dt { - color: var(--test-color-hl); -} - -dl.bug dt a { - color: var(--bug-color-hl) !important; -} - -dl.bug { - background: var(--bug-color-bg); - border-left: 8px solid var(--bug-color-hl); - color: var(--bug-color-text); -} - -dl.bug dt a { - color: var(--bug-color-hl) !important; -} - -dl.deprecated { - background: var(--deprecated-color-bg); - border-left: 8px solid var(--deprecated-color-hl); - color: var(--deprecated-color-text); -} - -dl.deprecated dt a { - color: var(--deprecated-color-hl) !important; -} - -dl.section dd, dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd { - margin-inline-start: 0px; -} - -dl.invariant, dl.pre, dl.post { - background: var(--invariant-color-bg); - border-left: 8px solid var(--invariant-color-hl); - color: var(--invariant-color-text); -} - -dl.invariant dt, dl.pre dt, dl.post dt { - color: var(--invariant-color-hl); -} - - -#projectrow -{ - height: 56px; -} #projectlogo { @@ -1765,38 +1328,34 @@ dl.invariant dt, dl.pre dt, dl.post dt { vertical-align: bottom; border-collapse: separate; } - + #projectlogo img -{ +{ border: 0px none; } - + #projectalign { vertical-align: middle; - padding-left: 0.5em; } #projectname { - font-size: 200%; - font-family: var(--font-family-title); + font: 300% Tahoma, Arial,sans-serif; margin: 0px; padding: 2px 0px; } - + #projectbrief { - font-size: 90%; - font-family: var(--font-family-title); + font: 120% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #projectnumber { - font-size: 50%; - font-family: 50% var(--font-family-title); + font: 50% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } @@ -1806,8 +1365,7 @@ dl.invariant dt, dl.pre dt, dl.post dt { padding: 0px; margin: 0px; width: 100%; - border-bottom: 1px solid var(--title-separator-color); - background-color: var(--title-background-color); + border-bottom: 1px solid #5373B4; } .image @@ -1840,12 +1398,17 @@ dl.invariant dt, dl.pre dt, dl.post dt { font-weight: bold; } +div.zoom +{ + border: 1px solid #90A5CE; +} + dl.citelist { margin-bottom:50px; } dl.citelist dt { - color:var(--citation-label-color); + color:#334975; float:left; font-weight:bold; margin-right:10px; @@ -1861,8 +1424,8 @@ dl.citelist dd { div.toc { padding: 14px 25px; - background-color: var(--toc-background-color); - border: 1px solid var(--toc-border-color); + background-color: #F4F6FA; + border: 1px solid #D8DFEE; border-radius: 7px 7px 7px 7px; float: right; height: auto; @@ -1870,17 +1433,28 @@ div.toc { width: 200px; } +.PageDocRTL-title div.toc { + float: left !important; + text-align: right; +} + div.toc li { - background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; - font: 10px/1.2 var(--font-family-toc); + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; margin-top: 5px; padding-left: 10px; padding-top: 2px; } +.PageDocRTL-title div.toc li { + background-position-x: right !important; + padding-left: 0 !important; + padding-right: 10px; +} + div.toc h3 { - font: bold 12px/1.2 var(--font-family-toc); - color: var(--toc-header-color); + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; border-bottom: 0 none; margin: 0; } @@ -1889,7 +1463,7 @@ div.toc ul { list-style: none outside none; border: medium none; padding: 0px; -} +} div.toc li.level1 { margin-left: 0px; @@ -1900,11 +1474,11 @@ div.toc li.level2 { } div.toc li.level3 { - margin-left: 15px; + margin-left: 30px; } div.toc li.level4 { - margin-left: 15px; + margin-left: 45px; } span.emoji { @@ -1913,13 +1487,29 @@ span.emoji { */ } -span.obfuscator { - display: none; +.PageDocRTL-title div.toc li.level1 { + margin-left: 0 !important; + margin-right: 0; +} + +.PageDocRTL-title div.toc li.level2 { + margin-left: 0 !important; + margin-right: 15px; +} + +.PageDocRTL-title div.toc li.level3 { + margin-left: 0 !important; + margin-right: 30px; +} + +.PageDocRTL-title div.toc li.level4 { + margin-left: 0 !important; + margin-right: 45px; } .inherit_header { font-weight: bold; - color: var(--inherit-header-color); + color: gray; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; @@ -1951,12 +1541,11 @@ tr.heading h2 { #powerTip { cursor: default; - /*white-space: nowrap;*/ - color: var(--tooltip-foreground-color); - background-color: var(--tooltip-background-color); - border: 1px solid var(--tooltip-border-color); + white-space: nowrap; + background-color: white; + border: 1px solid gray; border-radius: 4px 4px 4px 4px; - box-shadow: var(--tooltip-shadow); + box-shadow: 1px 1px 7px gray; display: none; font-size: smaller; max-width: 80%; @@ -1967,7 +1556,7 @@ tr.heading h2 { } #powerTip div.ttdoc { - color: var(--tooltip-doc-color); + color: grey; font-style: italic; } @@ -1975,24 +1564,18 @@ tr.heading h2 { font-weight: bold; } -#powerTip a { - color: var(--tooltip-link-color); -} - #powerTip div.ttname { font-weight: bold; } #powerTip div.ttdeci { - color: var(--tooltip-declaration-color); + color: #006318; } #powerTip div { margin: 0px; padding: 0px; - font-size: 12px; - font-family: var(--font-family-tooltip); - line-height: 16px; + font: 12px/16px Roboto,sans-serif; } #powerTip:before, #powerTip:after { @@ -2037,12 +1620,12 @@ tr.heading h2 { } #powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { - border-top-color: var(--tooltip-background-color); + border-top-color: #FFFFFF; border-width: 10px; margin: 0px -10px; } -#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { - border-top-color: var(--tooltip-border-color); +#powerTip.n:before { + border-top-color: #808080; border-width: 11px; margin: 0px -11px; } @@ -2065,13 +1648,13 @@ tr.heading h2 { } #powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { - border-bottom-color: var(--tooltip-background-color); + border-bottom-color: #FFFFFF; border-width: 10px; margin: 0px -10px; } #powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { - border-bottom-color: var(--tooltip-border-color); + border-bottom-color: #808080; border-width: 11px; margin: 0px -11px; } @@ -2092,13 +1675,13 @@ tr.heading h2 { left: 100%; } #powerTip.e:after { - border-left-color: var(--tooltip-border-color); + border-left-color: #FFFFFF; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.e:before { - border-left-color: var(--tooltip-border-color); + border-left-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; @@ -2108,13 +1691,13 @@ tr.heading h2 { right: 100%; } #powerTip.w:after { - border-right-color: var(--tooltip-border-color); + border-right-color: #FFFFFF; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.w:before { - border-right-color: var(--tooltip-border-color); + border-right-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; @@ -2148,7 +1731,7 @@ table.markdownTable { } table.markdownTable td, table.markdownTable th { - border: 1px solid var(--table-cell-border-color); + border: 1px solid #2D4068; padding: 3px 7px 2px; } @@ -2156,8 +1739,8 @@ table.markdownTable tr { } th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { - background-color: var(--table-header-background-color); - color: var(--table-header-foreground-color); + background-color: #374F7F; + color: #FFFFFF; font-size: 110%; padding-bottom: 4px; padding-top: 5px; @@ -2175,51 +1758,36 @@ th.markdownTableHeadCenter, td.markdownTableBodyCenter { text-align: center } -tt, code, kbd, samp -{ - display: inline-block; -} -/* @end */ - -u { - text-decoration: underline; -} - -details>summary { - list-style-type: none; +.DocNodeRTL { + text-align: right; + direction: rtl; } -details > summary::-webkit-details-marker { - display: none; +.DocNodeLTR { + text-align: left; + direction: ltr; } -details>summary::before { - content: "\25ba"; - padding-right:4px; - font-size: 80%; +table.DocNodeRTL { + width: auto; + margin-right: 0; + margin-left: auto; } -details[open]>summary::before { - content: "\25bc"; - padding-right:4px; - font-size: 80%; +table.DocNodeLTR { + width: auto; + margin-right: auto; + margin-left: 0; } -body { - scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color); +tt, code, kbd, samp +{ + display: inline-block; + direction:ltr; } +/* @end */ -::-webkit-scrollbar { - background-color: var(--scrollbar-background-color); - height: 12px; - width: 12px; -} -::-webkit-scrollbar-thumb { - border-radius: 6px; - box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color); - border: solid 2px transparent; -} -::-webkit-scrollbar-corner { - background-color: var(--scrollbar-background-color); +u { + text-decoration: underline; } diff --git a/docs/doxygen.svg b/docs/doxygen.svg index 79a7635..d42dad5 100644 --- a/docs/doxygen.svg +++ b/docs/doxygen.svg @@ -1,6 +1,4 @@ - @@ -19,7 +17,7 @@ - + diff --git a/docs/dynsections.js b/docs/dynsections.js index 8f49326..3174bd7 100644 --- a/docs/dynsections.js +++ b/docs/dynsections.js @@ -22,173 +22,100 @@ @licend The above is the entire license notice for the JavaScript code in this file */ - -let dynsection = { - - // helper function - updateStripes : function() { - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); - $('table.directory tr'). - removeClass('odd').filter(':visible:odd').addClass('odd'); - }, - - toggleVisibility : function(linkObj) { - const base = $(linkObj).attr('id'); - const summary = $('#'+base+'-summary'); - const content = $('#'+base+'-content'); - const trigger = $('#'+base+'-trigger'); - const src=$(trigger).attr('src'); - if (content.is(':visible')===true) { - content.hide(); - summary.show(); - $(linkObj).addClass('closed').removeClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); - } else { - content.show(); - summary.hide(); - $(linkObj).removeClass('closed').addClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } - return false; - }, - - toggleLevel : function(level) { - $('table.directory tr').each(function() { - const l = this.id.split('_').length-1; - const i = $('#img'+this.id.substring(3)); - const a = $('#arr'+this.id.substring(3)); - if (l'); - // add vertical lines to other rows - $('span[class=lineno]').not(':eq(0)').append(''); - // add toggle controls to lines with fold divs - $('div[class=foldopen]').each(function() { - // extract specific id to use - const id = $(this).attr('id').replace('foldopen',''); - // extract start and end foldable fragment attributes - const start = $(this).attr('data-start'); - const end = $(this).attr('data-end'); - // replace normal fold span with controls for the first line of a foldable fragment - $(this).find('span[class=fold]:first').replaceWith(''); - // append div for folded (closed) representation - $(this).after(''); - // extract the first line from the "open" section to represent closed content - const line = $(this).children().first().clone(); - // remove any glow that might still be active on the original line - $(line).removeClass('glow'); - if (start) { - // if line already ends with a start marker (e.g. trailing {), remove it - $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); - } - // replace minus with plus symbol - $(line).find('span[class=fold]').css('background-image',codefold.plusImg[relPath]); - // append ellipsis - $(line).append(' '+start+''+end); - // insert constructed line into closed div - $('#foldclosed'+id).html(line); - }); - }, -}; + }); + updateStripes(); +} + +function toggleFolder(id) +{ + // the clicked row + var currentRow = $('#row_'+id); + + // all rows after the clicked row + var rows = currentRow.nextAll("tr"); + + var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub + + // only match elements AFTER this one (can't hide elements before) + var childRows = rows.filter(function() { return this.id.match(re); }); + + // first row is visible we are HIDING + if (childRows.filter(':first').is(':visible')===true) { + // replace down arrow by right arrow for current row + var currentRowSpans = currentRow.find("span"); + currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed"); + currentRowSpans.filter(".arrow").html('►'); + rows.filter("[id^=row_"+id+"]").hide(); // hide all children + } else { // we are SHOWING + // replace right arrow by down arrow for current row + var currentRowSpans = currentRow.find("span"); + currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen"); + currentRowSpans.filter(".arrow").html('▼'); + // replace down arrows by right arrows for child rows + var childRowsSpans = childRows.find("span"); + childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed"); + childRowsSpans.filter(".arrow").html('►'); + childRows.show(); //show all children + } + updateStripes(); +} + + +function toggleInherit(id) +{ + var rows = $('tr.inherit.'+id); + var img = $('tr.inherit_header.'+id+' img'); + var src = $(img).attr('src'); + if (rows.filter(':first').is(':visible')===true) { + rows.css('display','none'); + $(img).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + rows.css('display','table-row'); // using show() causes jump in firefox + $(img).attr('src',src.substring(0,src.length-10)+'open.png'); + } +} /* @license-end */ diff --git a/docs/files.html b/docs/files.html index bb148b0..c26f946 100644 --- a/docs/files.html +++ b/docs/files.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: File List - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */

@@ -61,32 +57,26 @@
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
-
File List
+
+
File List
Here is a list of all files with brief descriptions:
-
[detail level 12]
- - +
[detail level 12]
  include
 fluent_tray.hppFluent Design-based GUI Library for System Tray Applications
+ +
  include
 fluent_tray.hppFluent Design-based GUI Library for System Tray Applications
diff --git a/docs/fluent__tray_8hpp.html b/docs/fluent__tray_8hpp.html index 8f58a30..3752195 100644 --- a/docs/fluent__tray_8hpp.html +++ b/docs/fluent__tray_8hpp.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: include/fluent_tray.hpp File Reference - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
-
fluent_tray.hpp File Reference
+
+
fluent_tray.hpp File Reference

Fluent Design-based GUI Library for System Tray Applications. More...

#include <windows.h>
+#include <ntstatus.h>
#include <dwmapi.h>
#include <algorithm>
#include <chrono>
@@ -102,7 +93,7 @@

Go to the source code of this file.

- @@ -111,24 +102,24 @@

+

Classes

class  fluent_tray::FluentMenu
 Class with information on each menu. More...
 Class with information on the entire tray. More...
 
- - + - +

+

Namespaces

namespace  fluent_tray
 fluent_tray
 Base namespace.
 
namespace  fluent_tray::util
 fluent_tray::util
 Utility namespace.
 
- - - + +

+

Macros

#define FLUENT_TRAY_MESSAGE_ID_OFFSET   (25)
 Unique message identifier.
#define FLUENT_TRAY_MESSAGE_ID_OFFSET   (25)
 Unique message identifier. More...
 
- -

+

Enumerations

enum class  fluent_tray::TrayStatus : unsigned char { fluent_tray::RUNNING +
enum class  fluent_tray::TrayStatus : unsigned char { fluent_tray::RUNNING , fluent_tray::SHOULD_STOP , fluent_tray::FAILED , fluent_tray::STOPPED @@ -136,34 +127,34 @@
 Current tray status. More...
 
- - - + + - - + + - - + + - + - + - - - + + + - - - + + + - - + + - - + +

+

Functions

bool fluent_tray::util::string2wstring (const std::string &str, std::wstring &wstr)
 Converts a UTF-8 encoded string to a wide string.
bool fluent_tray::util::string2wstring (const std::string &str, std::wstring &wstr)
 Converts a UTF-8 encoded string to a wide string. More...
 
bool fluent_tray::util::wstring2string (const std::wstring &wstr, std::string &str)
 Converts a wide string to a UTF-8 encoded string.
bool fluent_tray::util::wstring2string (const std::wstring &wstr, std::string &str)
 Converts a wide string to a UTF-8 encoded string. More...
 
constexpr std::size_t fluent_tray::util::bit2mask (std::size_t bits) noexcept
 Generates a mask with the specified number of lower bits set to 1.
constexpr std::size_t fluent_tray::util::bit2mask (std::size_t bits) noexcept
 Generates a mask with the specified number of lower bits set to 1. More...
 
template<typename Type >
template<typename Type >
constexpr int fluent_tray::util::type2bit () noexcept
 Calculate the number of bits of type.
 Calculate the number of bits of type. More...
 
template<typename InType , typename OutType >
void fluent_tray::util::split_bits (InType input, OutType &upper, OutType &lower) noexcept
 Divides the input value into upper and lower bits.
template<typename InType , typename OutType >
void fluent_tray::util::split_bits (InType input, OutType &upper, OutType &lower) noexcept
 Divides the input value into upper and lower bits. More...
 
template<typename InType , typename OutType >
void fluent_tray::util::concatenate_bits (InType upper, InType lower, OutType &out) noexcept
 Generates a variable that combines the bits of two variables.
template<typename InType , typename OutType >
void fluent_tray::util::concatenate_bits (InType upper, InType lower, OutType &out) noexcept
 Generates a variable that combines the bits of two variables. More...
 
unsigned char fluent_tray::util::rgb2gray (const COLORREF &rgb)
 Calculate grayscale value from RGB.
unsigned char fluent_tray::util::rgb2gray (const COLORREF &rgb)
 Calculate grayscale value from RGB. More...
 
bool fluent_tray::util::exists (const std::wstring &path)
 Checks if the file exists.
bool fluent_tray::util::exists (const std::wstring &path)
 Checks if the file exists. More...
 

Detailed Description

@@ -171,8 +162,8 @@
Author
pit-ray
Date
2024

Macro Definition Documentation

- -

◆ FLUENT_TRAY_MESSAGE_ID_OFFSET

+ +

◆ FLUENT_TRAY_MESSAGE_ID_OFFSET

@@ -190,7 +181,7 @@

diff --git a/docs/fluent__tray_8hpp_source.html b/docs/fluent__tray_8hpp_source.html index eebdd64..0b73517 100644 --- a/docs/fluent__tray_8hpp_source.html +++ b/docs/fluent__tray_8hpp_source.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: include/fluent_tray.hpp Source File - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,28 +31,22 @@
- + +/* @license-end */ -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
-
fluent_tray.hpp
+
+
fluent_tray.hpp
-Go to the documentation of this file.
1
-
8#ifndef _FLUENT_TRAY_HPP
-
9#define _FLUENT_TRAY_HPP
-
10
-
11#include <windows.h>
-
12
-
13#if defined(_MSC_VER) && _MSC_VER >= 1500
-
14#pragma warning(disable : 4005)
-
15#include <ntstatus.h>
-
16#pragma warning(default : 4005)
-
17#endif
-
18
-
19#include <dwmapi.h>
-
20
-
21#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
22
-
23#ifndef DWMWA_COLOR_DEFAULT
-
24#define DWMWA_WINDOW_CORNER_PREFERENCE static_cast<DWMWINDOWATTRIBUTE>(33)
-
25typedef enum {
-
26 DWMWCP_DEFAULT = 0,
-
27 DWMWCP_DONOTROUND = 1,
-
28 DWMWCP_ROUND = 2,
-
29 DWMWCP_ROUNDSMALL = 3
-
30} DWM_WINDOW_CORNER_PREFERENCE;
-
31#endif /* DWMWA_COLOR_DEFAULT */
-
32
-
33#if defined(DEBUG)
-
34#include <iostream>
-
35#endif
-
36
-
37#endif /* DOXYGEN_SHOULD_SKIP_THIS */
-
38
-
39#pragma comment(lib, "Dwmapi")
-
40
-
41#include <algorithm>
-
42#include <chrono>
-
43#include <cmath>
-
44#include <functional>
-
45#include <memory>
-
46#include <string>
-
47#include <vector>
-
48
-
49#ifndef FLUENT_TRAY_MESSAGE_ID_OFFSET
-
53#define FLUENT_TRAY_MESSAGE_ID_OFFSET (25)
-
54#endif
-
55
-
60namespace fluent_tray
-
61{
-
62 static constexpr int MESSAGE_ID = WM_APP + FLUENT_TRAY_MESSAGE_ID_OFFSET ;
-
63
-
68 namespace util
-
69 {
-
-
77 bool string2wstring(const std::string& str, std::wstring& wstr) {
-
78 if(str.empty()) {
-
79 wstr.clear() ;
-
80 return true ;
-
81 }
-
82
-
83 auto needed_size = MultiByteToWideChar(
-
84 CP_UTF8, 0,
-
85 str.c_str(), static_cast<int>(str.length()),
-
86 NULL, 0) ;
-
87 if(needed_size <= 0) {
-
88 return false ;
-
89 }
-
90
-
91 wstr.resize(needed_size) ;
-
92 if(MultiByteToWideChar(
-
93 CP_UTF8, 0,
-
94 str.c_str(), static_cast<int>(str.length()),
-
95 &wstr[0], static_cast<int>(wstr.length())) <= 0) {
-
96 return false;
-
97 }
-
98 return true ;
-
99 }
-
-
100
-
-
108 bool wstring2string(const std::wstring& wstr, std::string& str) {
-
109 if(wstr.empty()) {
-
110 str.clear() ;
-
111 return true ;
-
112 }
-
113
-
114 auto needed_size = WideCharToMultiByte(
-
115 CP_UTF8, 0,
-
116 wstr.c_str(), static_cast<int>(wstr.length()),
-
117 NULL, 0,
-
118 NULL, NULL) ;
-
119 if(needed_size <= 0) {
-
120 return false ;
-
121 }
-
122
-
123 str.resize(needed_size) ;
-
124 if(WideCharToMultiByte(
-
125 CP_UTF8, 0,
-
126 wstr.c_str(), static_cast<int>(wstr.length()),
-
127 &str[0], static_cast<int>(str.size()),
-
128 NULL, NULL) <= 0) {
-
129 return false ;
-
130 }
-
131 return true ;
-
132 }
-
-
133
-
-
139 inline constexpr std::size_t bit2mask(std::size_t bits) noexcept {
-
140 return (static_cast<std::size_t>(1) << bits) - 1 ;
-
141 }
-
-
142
-
147 template <typename Type>
-
-
148 inline constexpr int type2bit() noexcept {
-
149 return static_cast<int>(sizeof(Type) * CHAR_BIT) ;
-
150 }
-
-
151
-
160 template <typename InType, typename OutType>
-
-
161 inline void split_bits(InType input, OutType& upper, OutType& lower) noexcept {
-
162 constexpr auto bits = type2bit<OutType>() ;
- -
164
-
165 upper = static_cast<OutType>(reinterpret_cast<std::size_t>(input) >> bits) ;
-
166 lower = static_cast<OutType>(reinterpret_cast<std::size_t>(input) & lower_mask) ;
-
167 }
-
-
168
-
176 template <typename InType, typename OutType>
-
- -
178 constexpr auto bits = type2bit<InType>() ;
- -
180
-
181 auto out_upper = static_cast<std::size_t>(upper) << bits ;
-
182 auto out_lower = static_cast<std::size_t>(lower) & lower_mask ;
-
183 out = reinterpret_cast<OutType>(out_upper | out_lower) ;
-
184 }
-
-
-
190 inline unsigned char rgb2gray(const COLORREF& rgb) {
-
191 auto r = GetRValue(rgb) ;
-
192 auto g = GetGValue(rgb) ;
-
193 auto b = GetBValue(rgb) ;
-
194 return static_cast<unsigned char>(0.2126 * r + 0.7152 * g + 0.0722 * b) ;
-
195 }
-
-
196
-
-
202 inline bool exists(const std::wstring& path) {
-
203 struct _stat buffer ;
-
204 return _wstat(path.c_str(), &buffer) == 0 ;
-
205 }
-
-
206 }
-
207
-
-
211 enum class TrayStatus : unsigned char
-
212 {
-
214 RUNNING,
-
215
- -
218
-
220 FAILED,
-
221
-
223 STOPPED,
-
224 } ;
-
-
225
-
- -
230 private:
-
231 std::wstring label_ ;
-
232 HICON hicon_ ;
-
233
-
234 bool toggleable_ ;
-
235 bool checked_ ;
-
236 std::wstring checkmark_ ;
-
237
-
238 HWND hwnd_ ;
-
239 HMENU hmenu_ ;
-
240
-
241 bool under_line_ ;
-
242
-
243 COLORREF text_color_ ;
-
244 COLORREF back_color_ ;
-
245 COLORREF border_color_ ;
-
246 HBRUSH back_brush_ ;
-
247
-
248 std::function<bool(void)> callback_ ;
-
249 std::function<bool(void)> unchecked_callback_ ;
-
250
-
251 public:
-
-
259 explicit FluentMenu(
-
260 bool toggleable=false,
-
261 const std::function<bool(void)>& callback=[] {return true ;},
-
262 const std::function<bool(void)>& unchecked_callback=[] {return true ;})
-
263 : label_(),
-
264 hicon_(NULL),
-
265 toggleable_(toggleable),
-
266 checked_(false),
-
267 checkmark_(),
-
268 hwnd_(NULL),
-
269 hmenu_(NULL),
-
270 under_line_(false),
-
271 text_color_(RGB(0, 0, 0)),
-
272 back_color_(RGB(255, 255, 255)),
-
273 border_color_(RGB(128, 128, 128)),
-
274 back_brush_(NULL),
-
275 callback_(callback),
-
276 unchecked_callback_(unchecked_callback)
-
277 {}
-
-
278
-
279 FluentMenu(const FluentMenu&) = default ;
-
280 FluentMenu& operator=(const FluentMenu&) = default ;
-
281
-
282 FluentMenu(FluentMenu&&) = default ;
- -
284
-
-
285 ~FluentMenu() noexcept {
-
286 if(back_brush_) {
-
287 DeleteObject(back_brush_) ;
-
288 }
-
289 }
-
-
290
-
- -
302 HINSTANCE hinstance,
-
303 HWND parent_hwnd,
-
304 std::size_t id,
-
305 const std::string& label_text="",
-
306 const std::string& icon_path="",
-
307 const std::string& checkmark="✓") {
-
308
-
309 // Convert strings to the wide-strings
-
310 if(!util::string2wstring(label_text, label_)) {
-
311 return false ;
-
312 }
-
313 if(!util::string2wstring(checkmark, checkmark_)) {
-
314 return false ;
-
315 }
-
316
-
317 auto style = WS_CHILD | WS_VISIBLE | BS_FLAT | BS_LEFT | BS_OWNERDRAW ;
-
318
-
319 hmenu_ = reinterpret_cast<HMENU>(id) ;
-
320 hwnd_ = CreateWindowW(
-
321 TEXT("BUTTON"), label_.c_str(), style,
-
322 0, 0, 100, 100,
-
323 parent_hwnd, hmenu_,
-
324 hinstance, NULL) ;
-
325 if(!hwnd_) {
-
326 return false ;
-
327 }
-
328
-
329 // Hide dash lines when selecting.
-
330 SendMessageW(
-
331 hwnd_, WM_CHANGEUISTATE,
-
332 WPARAM(MAKELONG(UIS_SET, UISF_HIDEFOCUS)), 0) ;
-
333
-
334 if(!icon_path.empty()) {
-
335 std::wstring icon_path_wide ;
-
336 if(!util::string2wstring(icon_path, icon_path_wide)) {
-
337 return false ;
-
338 }
-
339
-
340 if(!util::exists(icon_path_wide)) {
-
341 return false ;
-
342 }
-
343
-
344 hicon_ = static_cast<HICON>(LoadImageW(
-
345 NULL, icon_path_wide.c_str(),
-
346 IMAGE_ICON, 0, 0, LR_LOADFROMFILE)) ;
-
347 if(!hicon_) {
-
348 return false ;
-
349 }
-
350 }
-
351
-
352 return true ;
-
353 }
-
-
354
-
- -
361 if(toggleable_) {
-
362 checked_ = !checked_ ;
-
363 if(!checked_) {
-
364 return unchecked_callback_() ;
-
365 }
-
366 }
-
367 return callback_() ;
-
368 }
-
-
369
-
-
374 bool is_mouse_over() const {
-
375 POINT pos ;
-
376 if(!GetCursorPos(&pos)) {
-
377 return false ;
-
378 }
-
379 auto detected_hwnd = WindowFromPoint(pos) ;
-
380 if(!detected_hwnd) {
-
381 return false ;
-
382 }
-
383 return detected_hwnd == hwnd_ ;
-
384 }
-
-
385
-
-
390 void check() noexcept {
-
391 if(toggleable_) {
-
392 checked_ = true ;
-
393 }
-
394 }
-
-
395
-
-
400 void uncheck() noexcept {
-
401 if(toggleable_) {
-
402 checked_ = false ;
-
403 }
-
404 }
-
-
405
-
-
410 bool is_checked() const noexcept {
-
411 if(!toggleable_) {
-
412 return false ;
-
413 }
-
414 return checked_ ;
-
415 }
-
-
416
-
-
421 bool is_toggleable() const noexcept {
-
422 return toggleable_ ;
-
423 }
-
-
424
-
-
429 HWND window_handle() const noexcept {
-
430 return hwnd_ ;
-
431 }
-
-
432
-
-
437 HMENU menu_handle() const noexcept {
-
438 return hmenu_ ;
-
439 }
-
-
440
-
-
445 std::size_t id() const noexcept {
-
446 return reinterpret_cast<std::size_t>(hmenu_) ;
-
447 }
-
-
-
453 bool get_label(std::string& str) const {
-
454 return util::wstring2string(label_, str) ;
-
455 }
-
-
456
-
-
460 void show_separator_line() noexcept {
-
461 under_line_ = true ;
-
462 }
-
-
463
-
-
467 void hide_separator_line() noexcept {
-
468 under_line_ = false ;
-
469 }
-
-
470
-
- -
480 const COLORREF& text_color=CLR_INVALID,
-
481 const COLORREF& back_color=CLR_INVALID,
-
482 const COLORREF& border_color=CLR_INVALID) noexcept {
-
483 if(text_color != CLR_INVALID) {
-
484 text_color_ = text_color ;
-
485 }
-
486 if(back_color != CLR_INVALID) {
-
487 back_color_ = back_color ;
-
488 }
-
489 if(border_color != CLR_INVALID) {
-
490 border_color_ = border_color ;
-
491 }
-
492
-
493 // Create brush handle to draw a background of window.
-
494 if(back_brush_) {
-
495 // Release old handle.
-
496 if(!DeleteObject(back_brush_)) {
-
497 return false ;
-
498 }
-
499 }
-
500 back_brush_ = CreateSolidBrush(back_color_) ;
-
501 if(back_brush_ == NULL) {
-
502 return false ;
-
503 }
-
504
-
505 return true ;
-
506 }
-
-
507
-
-
515 bool draw_menu(LPDRAWITEMSTRUCT info, HFONT font) const {
-
516 if(SetTextColor(info->hDC, text_color_) == CLR_INVALID) {
-
517 return false ;
-
518 }
-
519
-
520 if(SetBkColor(info->hDC, back_color_) == CLR_INVALID) {
-
521 return false ;
-
522 }
-
523
-
524 if(font) {
-
525 if(!SelectObject(info->hDC, font)) {
-
526 return false ;
-
527 }
-
528 }
-
529
-
530 LONG checkmark_size, label_height, icon_size, margin ;
-
531 if(!calculate_layouts(
-
532 info->hDC,
-
533 checkmark_size, label_height, icon_size, margin)) {
-
534 return false ;
-
535 }
-
536
-
537 auto& rect = info->rcItem ;
-
538
-
539 auto y_center = rect.top + (rect.bottom - rect.top) / 2 ;
-
540 auto x = rect.left + margin ;
-
541
-
542 if(toggleable_ && checked_) {
-
543 if(!TextOutW(
-
544 info->hDC, x, y_center - label_height / 2, checkmark_.c_str(),
-
545 static_cast<int>(checkmark_.length()))) {
-
546 return false ;
-
547 }
-
548 }
-
549 x += checkmark_size + margin ;
-
550
-
551 if(hicon_) {
-
552 if(!DrawIconEx(
-
553 info->hDC, x, y_center - SM_CYICON / 2, hicon_,
-
554 icon_size, icon_size, 0, NULL, DI_NORMAL)) {
-
555 return false ;
-
556 }
-
557 }
-
558 x += icon_size + margin ;
-
559
-
560 if(!TextOutW(
-
561 info->hDC, x, y_center - label_height / 2, label_.c_str(),
-
562 static_cast<int>(label_.length()))) {
-
563 return false ;
-
564 }
-
565
-
566 if(under_line_) {
-
567 auto original_obj = SelectObject(info->hDC, GetStockObject(DC_PEN)) ;
-
568 if(SetDCPenColor(info->hDC, border_color_) == CLR_INVALID) {
-
569 return false ;
-
570 }
-
571
-
572 auto lx = info->rcItem.left ;
-
573 auto ly = info->rcItem.bottom - 1 ;
-
574 auto rx = info->rcItem.right ;
-
575 auto ry = ly + 1 ;
-
576 if(!Rectangle(info->hDC, lx, ly, rx, ry)) {
-
577 return false ;
-
578 }
-
579
-
580 if(!SelectObject(info->hDC, original_obj)) {
-
581 return false ;
-
582 }
-
583 }
-
584
-
585 return true ;
-
586 }
-
-
-
592 HBRUSH background_brush() const noexcept {
-
593 return back_brush_ ;
-
594 }
-
-
-
601 bool calculate_required_dims(HFONT font, SIZE& size) const {
-
602 auto hdc = GetDC(hwnd_) ;
-
603 if(font) {
-
604 if(!SelectObject(hdc, font)) {
-
605 return false ;
-
606 }
-
607 }
-
608
-
609 if(!GetTextExtentPoint32W(
-
610 hdc, label_.c_str(),
-
611 static_cast<int>(label_.length()), &size)) {
-
612 return false ;
-
613 }
-
614
-
615 LONG checkmark_size, label_height, icon_size, margin ;
-
616 if(!calculate_layouts(
-
617 hdc, checkmark_size, label_height, icon_size, margin)) {
-
618 return false ;
-
619 }
-
620
-
621 size.cx += margin + checkmark_size + margin + icon_size + margin ;
-
622
-
623 return true ;
-
624 }
-
-
625
-
626
-
627 private:
-
628 bool calculate_layouts(
-
629 HDC hdc,
-
630 LONG& checkmark_size,
-
631 LONG& label_height,
-
632 LONG& icon_size,
-
633 LONG& margin) const {
-
634 SIZE size ;
-
635 if(!GetTextExtentPoint32W(hdc, L" ", 1, &size)) {
-
636 return false ;
-
637 }
-
638 checkmark_size = size.cy ;
-
639 margin = size.cy / 2 ;
-
640 label_height = size.cy ;
-
641 icon_size = 4 * label_height / 5 ;
-
642 return true ;
-
643 }
-
644
-
645 } ;
-
-
646
-
647
-
- -
652 private:
-
653 std::vector<FluentMenu> menus_ ;
-
654 std::vector<bool> mouse_is_over_ ;
-
655
-
656 std::wstring app_name_ ;
-
657
-
658 HWND hwnd_ ;
-
659 bool visible_ ;
-
660 HINSTANCE hinstance_ ;
-
661 NOTIFYICONDATAW icon_data_ ;
-
662
-
663 TrayStatus status_ ;
-
664
-
665 std::size_t next_menu_id_ ;
-
666
-
667 LONG menu_x_margin_ ;
-
668 LONG menu_y_margin_ ;
-
669
-
670 LONG menu_x_pad_ ;
-
671 LONG menu_y_pad_ ;
-
672
-
673 COLORREF text_color_ ;
-
674 COLORREF back_color_ ;
-
675 COLORREF ash_color_ ;
-
676 HBRUSH back_brush_ ;
-
677
-
678 LONG menu_font_size_ ;
-
679 HFONT font_ ;
-
680
-
681 public:
-
-
685 explicit FluentTray()
-
686 : menus_(),
-
687 mouse_is_over_(),
-
688 app_name_(),
-
689 hinstance_(reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL))),
-
690 hwnd_(NULL),
-
691 visible_(false),
-
692 icon_data_(),
-
693 status_(TrayStatus::STOPPED),
-
694 next_menu_id_(1),
-
695 menu_x_margin_(5),
-
696 menu_y_margin_(5),
-
697 menu_x_pad_(5),
-
698 menu_y_pad_(5),
-
699 text_color_(RGB(30, 30, 30)),
-
700 back_color_(RGB(200, 200, 200)),
-
701 ash_color_(RGB(100, 100, 100)),
-
702 back_brush_(NULL),
-
703 menu_font_size_(0),
-
704 font_(NULL)
-
705 {}
-
-
706
-
707 // Copy
-
708 FluentTray(const FluentTray&) = delete ;
-
709 FluentTray& operator=(const FluentTray&) = delete ;
-
710
-
711 // Move
-
712 FluentTray(FluentTray&&) = default ;
- -
714
-
-
715 virtual ~FluentTray() noexcept {
-
716 if(font_ != NULL) {
-
717 DeleteObject(font_) ;
-
718 }
-
719 if(back_brush_ != NULL) {
-
720 DeleteObject(back_brush_) ;
-
721 }
-
722 }
-
-
723
-
- -
737 const std::string& app_name,
-
738 const std::string& icon_path="",
-
739 LONG menu_x_margin=5,
-
740 LONG menu_y_margin=5,
-
741 LONG menu_x_pad=5,
-
742 LONG menu_y_pad=5,
-
743 unsigned char opacity=255,
-
744 bool round_corner=true) {
-
745 if(!util::string2wstring(app_name, app_name_)) {
-
746 return false ;
-
747 }
-
748
-
749 menu_x_margin_ = menu_x_margin ;
-
750 menu_y_margin_ = menu_y_margin ;
-
751 menu_x_pad_ = menu_x_pad ;
-
752 menu_y_pad_ = menu_y_pad ;
-
753
-
754 WNDCLASSW winc ;
-
755 winc.style = CS_HREDRAW | CS_VREDRAW ;
-
756 winc.lpfnWndProc = &FluentTray::callback ;
-
757 winc.cbClsExtra = 0 ;
-
758 winc.cbWndExtra = sizeof(LONG) * 2 ; // To store two-part address.
-
759 winc.hInstance = hinstance_ ;
-
760 winc.hIcon = LoadIcon(NULL, IDI_APPLICATION) ;
-
761 winc.hCursor = LoadCursor(NULL, IDC_ARROW) ;
-
762 winc.hbrBackground = GetSysColorBrush(COLOR_WINDOW) ;
-
763 winc.lpszMenuName = NULL ;
-
764 winc.lpszClassName = app_name_.c_str() ;
-
765
-
766 if(!RegisterClassW(&winc)) {
-
767 return false ;
-
768 }
-
769
-
770 hwnd_ = CreateWindowExW(
-
771 WS_EX_TOOLWINDOW | WS_EX_LAYERED,
-
772 app_name_.c_str(),
-
773 app_name_.c_str(),
-
774 WS_POPUPWINDOW,
-
775 0, 0, 100, 100,
-
776 NULL, NULL,
-
777 hinstance_, NULL
-
778 ) ;
-
779 if(!hwnd_) {
-
780 return false ;
-
781 }
-
782
-
783 // To access the this pointer inside the callback function,
-
784 // the address divide into the two part address.
-
785 LONG upper_addr, lower_addr ;
-
786 util::split_bits(this, upper_addr, lower_addr) ;
-
787
-
788 SetLastError(0) ;
-
789 if(!SetWindowLongW(hwnd_, 0, upper_addr) && GetLastError() != 0) {
-
790 return false ;
-
791 }
-
792 SetLastError(0) ;
-
793 if(!SetWindowLongW(hwnd_, sizeof(LONG), lower_addr) && GetLastError() != 0) {
-
794 return false ;
-
795 }
-
796
-
797 if(!SetLayeredWindowAttributes(hwnd_, 0, opacity, LWA_ALPHA)) {
-
798 return false ;
-
799 }
-
800
-
801 // Set rounded window for Windows 11 only.
-
802 if(round_corner) {
-
803 using RtlGetVersionType = NTSTATUS (WINAPI*)(PRTL_OSVERSIONINFOW) ;
-
804 const auto hmodule = LoadLibraryW(L"ntdll.dll") ;
-
805 if(!hmodule) {
-
806 return false ;
-
807 }
-
808
-
809 // cast to void* once to avoid warnings about type conversion.
-
810 const auto RtlGetVersion = reinterpret_cast<RtlGetVersionType>(
-
811 reinterpret_cast<void*>(GetProcAddress(hmodule, "RtlGetVersion"))) ;
-
812 if(!RtlGetVersion) {
-
813 FreeLibrary(hmodule) ;
-
814 return false ;
-
815 }
-
816
-
817 OSVERSIONINFOW vinfo ;
-
818 vinfo.dwOSVersionInfoSize = sizeof(decltype(vinfo)) ;
-
819 auto result = RtlGetVersion(&vinfo) ;
-
820 if(!FreeLibrary(hmodule)) {
-
821 return false ;
-
822 }
-
823
-
824 if(result != STATUS_SUCCESS) {
-
825 return false ;
-
826 }
-
827
-
828 // Check if the OS is Windows11
-
829 if(vinfo.dwBuildNumber >= 22000) {
-
830 auto pref = DWMWCP_ROUND ;
-
831 if(DwmSetWindowAttribute(
-
832 hwnd_,
-
833 DWMWA_WINDOW_CORNER_PREFERENCE,
-
834 &pref, sizeof(pref)) != S_OK) {
-
835 return false ;
-
836 }
-
837 }
-
838 }
-
839
-
840 if(!change_icon(icon_path)) {
-
841 return false ;
-
842 }
-
843
-
844 if(!set_font()) {
-
845 return false ;
-
846 }
-
847
-
848 if(!set_color()) {
-
849 return false ;
-
850 }
-
851
-
852 status_ = TrayStatus::RUNNING ;
-
853
-
854 return true ;
-
855 }
-
-
856
-
- -
868 const std::string& label_text="",
-
869 const std::string& icon_path="",
-
870 bool toggleable=false,
-
871 const std::string& checkmark="✓",
-
872 const std::function<bool(void)>& callback=[] {return true ;},
-
873 const std::function<bool(void)>& unchecked_callback=[] {return true ;}) {
-
874 FluentMenu menu(toggleable, callback, unchecked_callback) ;
-
875 if(!menu.create_menu(
-
876 hinstance_, hwnd_, next_menu_id_,
-
877 label_text, icon_path, checkmark)) {
-
878 return false ;
-
879 }
-
880
-
881 menus_.push_back(std::move(menu)) ;
-
882 mouse_is_over_.push_back(false) ;
-
883 next_menu_id_ ++ ;
-
884 return true ;
-
885 }
-
-
886
-
- -
891 if(!menus_.empty()) {
-
892 menus_.back().show_separator_line() ;
-
893 }
-
894 }
-
-
895
-
-
900 bool update() {
-
901 if(status_ == TrayStatus::FAILED) {
-
902 return false ;
-
903 }
-
904
-
905 MSG msg ;
-
906 get_message(msg) ;
-
907
-
908 if(GetForegroundWindow() != hwnd_ && visible_) {
- -
910 }
-
911
-
912 for(std::size_t i = 0 ; i < menus_.size() ; i ++) {
-
913 auto& menu = menus_[i] ;
-
914 if(menu.is_mouse_over()) {
-
915 if(!mouse_is_over_[i]) {
-
916 if(!change_menu_back_color(menu, ash_color_)) {
-
917 return false ;
-
918 }
-
919 }
-
920 mouse_is_over_[i] = true ;
-
921 }
-
922 else {
-
923 if(mouse_is_over_[i]) {
-
924 if(!change_menu_back_color(menu, back_color_)) {
-
925 return false ;
-
926 }
-
927 }
-
928 mouse_is_over_[i] = false ;
-
929 }
-
930 }
-
931
-
932 return true ;
-
933 }
-
-
934
-
- -
941 std::chrono::milliseconds sleep_time=std::chrono::milliseconds(1)) {
-
942
-
943 while(true) {
-
944 if(status_ == TrayStatus::SHOULD_STOP) {
-
945 status_ = TrayStatus::STOPPED ;
-
946 break ;
-
947 }
-
948
-
949 if(!update()) {
-
950 return false ;
-
951 }
-
952
-
953 Sleep(static_cast<int>(sleep_time.count())) ;
-
954 }
-
955 return true ;
-
956 }
-
-
957
-
-
962 HWND window_handle() const noexcept {
-
963 return hwnd_ ;
-
964 }
-
-
965
-
- -
971 LONG max_label_size = 0 ;
-
972 for(auto& menu : menus_) {
-
973 SIZE size ;
-
974 if(!menu.calculate_required_dims(font_, size)) {
-
975 return false ;
-
976 }
-
977 if(max_label_size < size.cx) {
-
978 max_label_size = size.cx ;
-
979 }
-
980 }
-
981
-
982 // Update the sizes
-
983 auto menu_width = max_label_size + 2 * menu_x_pad_ ;
-
984 auto menu_height = menu_font_size_ + 2 * menu_y_pad_ ;
-
985 auto popup_width = 2 * menu_x_margin_ + menu_width ;
-
986 auto popup_height = static_cast<LONG>(
-
987 menus_.size() * (menu_y_margin_ + menu_height) + menu_y_margin_) ;
-
988
-
989 POINT cursor_pos ;
-
990 if(!GetCursorPos(&cursor_pos)) {
-
991 return false ;
-
992 }
-
993
-
994 RECT work_rect ;
-
995 if(!SystemParametersInfo(
-
996 SPI_GETWORKAREA, 0, reinterpret_cast<PVOID>(&work_rect), 0)) {
-
997 return false ;
-
998 }
-
999
-
1000 auto screen_width = GetSystemMetrics(SM_CXSCREEN) ;
-
1001 auto screen_height = GetSystemMetrics(SM_CYSCREEN) ;
-
1002
-
1003 auto work_width = work_rect.right - work_rect.left ;
-
1004 auto work_height = work_rect.bottom - work_rect.top ;
-
1005
-
1006 auto taskbar_width = screen_width - work_width ;
-
1007 auto taskbar_height = screen_height - work_height ;
-
1008
-
1009 auto pos = cursor_pos ;
-
1010 if(taskbar_width == 0) { // horizontal taskbar
-
1011 if(cursor_pos.y <= taskbar_height) {
-
1012 //top
-
1013 pos.y = taskbar_height ;
-
1014 }
-
1015 else {
-
1016 //bottom
-
1017 // add 20% offset
-
1018 pos.y = screen_height - (popup_height + 12 * taskbar_height / 10) ;
-
1019 }
-
1020 pos.x = cursor_pos.x - popup_width / 2 ;
-
1021 }
-
1022 else { // vertical taskbar
-
1023 if(pos.x <= taskbar_width) {
-
1024 //left
-
1025 pos.x = taskbar_width ;
-
1026 }
-
1027 else {
-
1028 //right
-
1029 // add 20% offset
-
1030 pos.x = popup_width + 12 * taskbar_width / 10 ;
-
1031 }
-
1032
-
1033 pos.y = cursor_pos.y - popup_height / 2 ;
-
1034 }
-
1035
-
1036 if(!SetWindowPos(
-
1037 hwnd_, HWND_TOP,
-
1038 pos.x, pos.y, popup_width, popup_height,
-
1039 SWP_SHOWWINDOW)) {
-
1040 return false ;
-
1041 }
-
1042
-
1043 for(LONG i = 0 ; i < menus_.size() ; i ++) {
-
1044 auto& menu = menus_[i] ;
-
1045 auto y = menu_y_margin_ + i * (menu_height + menu_y_margin_) ;
-
1046 if(!SetWindowPos(
-
1047 menu.window_handle(), HWND_TOP,
-
1048 menu_x_margin_, y,
-
1049 menu_width, menu_height,
-
1050 SWP_SHOWWINDOW)) {
-
1051 return false ;
-
1052 }
-
1053
-
1054 if(!menu.set_color(text_color_, back_color_, ash_color_)) {
-
1055 return false ;
-
1056 }
-
1057 }
-
1058 std::fill(mouse_is_over_.begin(), mouse_is_over_.end(), false) ;
-
1059
-
1060 if(!SetForegroundWindow(hwnd_)) {
-
1061 return false ;
-
1062 }
-
1063
-
1064 visible_ = true ;
-
1065
-
1066 return true ;
-
1067 }
-
-
1068
-
- -
1074 if(!ShowWindow(hwnd_, SW_HIDE)) {
-
1075 return false ;
-
1076 }
-
1077 visible_ = false ;
-
1078
-
1079 std::fill(mouse_is_over_.begin(), mouse_is_over_.end(), false) ;
-
1080 return true ;
-
1081 }
-
-
1082
-
-
1087 TrayStatus status() const noexcept {
-
1088 return status_ ;
-
1089 }
-
-
1090
-
-
1094 void stop() noexcept {
-
1095 status_ = TrayStatus::SHOULD_STOP ;
-
1096 }
-
-
1097
-
-
1102 std::vector<FluentMenu>::iterator begin() noexcept {
-
1103 return menus_.begin() ;
-
1104 }
-
-
1105
-
-
1110 std::vector<FluentMenu>::iterator end() noexcept {
-
1111 return menus_.end() ;
-
1112 }
-
-
1113
-
-
1118 std::vector<FluentMenu>::const_iterator cbegin() const noexcept {
-
1119 return menus_.cbegin() ;
-
1120 }
-
-
1121
-
-
1126 std::vector<FluentMenu>::const_iterator cend() const noexcept {
-
1127 return menus_.cend() ;
-
1128 }
-
-
1129
-
-
1134 std::size_t count_menus() const noexcept {
-
1135 return menus_.size() ;
-
1136 }
-
-
1137
-
- -
1147 LONG font_size=0,
-
1148 LONG font_weight=0,
-
1149 const std::string& font_name="") {
-
1150 NONCLIENTMETRICS metrics ;
-
1151 metrics.cbSize = sizeof(metrics) ;
-
1152
-
1153 if(!SystemParametersInfo(
-
1154 SPI_GETNONCLIENTMETRICS,
-
1155 metrics.cbSize, &metrics, 0)) {
-
1156 return false ;
-
1157 }
-
1158
-
1159 auto& logfont = metrics.lfCaptionFont ;
-
1160 if(font_size != 0) {
-
1161 logfont.lfHeight = font_size ;
-
1162 }
-
1163 else {
-
1164 logfont.lfHeight = 20 ;
-
1165 }
-
1166 if(font_weight != 0) {
-
1167 logfont.lfWeight = font_weight ;
-
1168 }
-
1169 else {
-
1170 logfont.lfWeight = FW_MEDIUM ;
-
1171 }
-
1172
-
1173 if(!font_name.empty()) {
-
1174 std::wstring font_name_wide ;
-
1175 if(!util::string2wstring(font_name, font_name_wide)) {
-
1176 return false ;
-
1177 }
-
1178 auto dst = logfont.lfFaceName ;
-
1179
-
1180 if(font_name_wide.size() < LF_FACESIZE) {
-
1181 std::memcpy(dst, font_name_wide.c_str(), sizeof(WCHAR) * font_name_wide.length()) ;
-
1182 dst[font_name_wide.size()] = L'\0' ;
-
1183 }
-
1184 else {
-
1185 std::memcpy(dst, font_name_wide.c_str(), sizeof(WCHAR) * (LF_FACESIZE - 1)) ;
-
1186 dst[LF_FACESIZE - 1] = L'\0' ;
-
1187 }
-
1188 }
-
1189
-
1190 auto font = CreateFontIndirectW(&logfont) ;
-
1191 if(!font) {
-
1192 return false ;
-
1193 }
-
1194 font_ = font ;
-
1195 menu_font_size_ = std::abs(logfont.lfHeight) ;
-
1196
-
1197 return true;
-
1198 }
-
-
1199
-
- -
1208 const COLORREF& text_color=CLR_INVALID,
-
1209 const COLORREF& back_color=CLR_INVALID,
-
1210 unsigned char color_decay=10) {
-
1211 if(back_color == CLR_INVALID) {
-
1212 // Get Taskbar color
-
1213 APPBARDATA abd ;
-
1214 abd.cbSize = sizeof(abd) ;
-
1215 if(!SHAppBarMessage(ABM_GETTASKBARPOS, &abd)) {
-
1216 return false ;
-
1217 }
-
1218
-
1219 if(auto dc = GetDC(NULL)) {
-
1220 // Get Taskbar color
-
1221 back_color_ = GetPixel(dc, abd.rc.left + 1, abd.rc.top + 1) ;
-
1222 if(back_color_ == CLR_INVALID) {
-
1223 // if failed, use COLOR_WINDOW color.
-
1224 back_color_ = GetSysColor(COLOR_WINDOW) ;
-
1225 }
-
1226 if(!ReleaseDC(NULL, dc)) {
-
1227 return false ;
-
1228 }
-
1229 }
-
1230 }
-
1231 else {
-
1232 back_color_ = back_color ;
-
1233 }
-
1234
-
1235 auto back_gray_color_ = util::rgb2gray(back_color_) ;
-
1236
-
1237 unsigned char ash_value = back_gray_color_ ;
-
1238 if(back_gray_color_ < 128) {
-
1239 ash_value = static_cast<decltype(ash_value)>(
-
1240 (std::min)(ash_value + color_decay, 255)) ;
-
1241 }
-
1242 else {
-
1243 ash_value = static_cast<decltype(ash_value)>(
-
1244 (std::max)(ash_value - color_decay, 0)) ;
-
1245 }
-
1246 ash_color_ = RGB(ash_value, ash_value, ash_value) ;
-
1247
-
1248 if(text_color == CLR_INVALID) {
-
1249 text_color_ = GetSysColor(COLOR_WINDOWTEXT) ;
-
1250 if(back_gray_color_ < 128) {
-
1251 // if dark background, use light text color.
-
1252 text_color_ = 0x00FFFFFF & ~text_color_ ;
-
1253 }
-
1254 }
-
1255 else {
-
1256 text_color_ = text_color ;
-
1257 }
-
1258
-
1259 if(back_brush_) {
-
1260 // Release old handle.
-
1261 if(!DeleteObject(back_brush_)) {
-
1262 return false ;
-
1263 }
-
1264 }
-
1265 back_brush_ = CreateSolidBrush(back_color_) ;
-
1266 if(back_brush_ == NULL) {
-
1267 return false ;
-
1268 }
-
1269
-
1270 if(!SetClassLongPtr(
-
1271 hwnd_, GCLP_HBRBACKGROUND,
-
1272 reinterpret_cast<LONG_PTR>(back_brush_))) {
-
1273 return false ;
-
1274 }
-
1275
-
1276 return true ;
-
1277 }
-
-
1278
-
-
1283 bool change_icon(const std::string& icon_path) {
-
1284 if(icon_data_.cbSize > 0) {
-
1285 if(!Shell_NotifyIconW(NIM_DELETE, &icon_data_)) {
-
1286 return false ;
-
1287 }
-
1288 }
-
1289
-
1290 ZeroMemory(&icon_data_, sizeof(icon_data_)) ;
-
1291
-
1292 if(icon_path.empty()) {
-
1293 icon_data_.cbSize = 0 ;
-
1294 return true ;
-
1295 }
-
1296
-
1297 std::wstring icon_path_wide ;
-
1298 if(!util::string2wstring(icon_path, icon_path_wide)) {
-
1299 return false ;
-
1300 }
-
1301
-
1302 if(!util::exists(icon_path_wide)) {
-
1303 return false ;
-
1304 }
-
1305
-
1306 icon_data_.cbSize = sizeof(icon_data_) ;
-
1307 icon_data_.hWnd = hwnd_ ;
-
1308 icon_data_.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP ;
-
1309 icon_data_.uCallbackMessage = MESSAGE_ID ;
-
1310 icon_data_.hIcon = static_cast<HICON>(
-
1311 LoadImageW(
-
1312 NULL, icon_path_wide.c_str(),
-
1313 IMAGE_ICON, 0, 0, LR_LOADFROMFILE)) ;
-
1314 wcscpy_s(icon_data_.szTip, app_name_.c_str()) ;
-
1315 icon_data_.dwState = NIS_SHAREDICON ;
-
1316 icon_data_.dwStateMask = NIS_SHAREDICON ;
-
1317
-
1318 if(!Shell_NotifyIconW(NIM_ADD, &icon_data_)) {
-
1319 return false ;
-
1320 }
- -
1322
-
1323 return true ;
-
1324 }
-
-
1325
-
1326 private:
-
1327 static LRESULT CALLBACK callback(
-
1328 HWND hwnd,
-
1329 UINT msg,
-
1330 WPARAM wparam,
-
1331 LPARAM lparam) {
-
1332 auto get_instance = [hwnd]() {
-
1333 auto upper_addr = GetWindowLongW(hwnd, 0) ;
-
1334 if(!upper_addr) {
-
1335 return reinterpret_cast<FluentTray*>(nullptr) ;
-
1336 }
-
1337
-
1338 auto lower_addr = GetWindowLongW(hwnd, sizeof(LONG)) ;
-
1339 if(!lower_addr) {
-
1340 return reinterpret_cast<FluentTray*>(nullptr) ;
-
1341 }
-
1342
-
1343 FluentTray* self ;
-
1344 util::concatenate_bits(upper_addr, lower_addr, self) ;
-
1345 return self ;
-
1346 } ;
-
1347
-
1348 if(msg == WM_DESTROY || msg == WM_QUIT || msg == WM_CLOSE) {
-
1349 if(auto self = get_instance()) {
-
1350 self->stop() ;
-
1351 return 0 ;
-
1352 }
-
1353 }
-
1354 else if(msg == WM_ACTIVATE && wparam == WA_INACTIVE) {
-
1355 if(auto self = get_instance()) {
-
1356 if(!self->hide_menu_window()) {
-
1357 self->fail() ;
-
1358 }
-
1359 return 0 ;
-
1360 }
-
1361 }
-
1362 else if(msg == WM_DRAWITEM) {
-
1363 if(auto self = get_instance()) {
-
1364 auto item = reinterpret_cast<LPDRAWITEMSTRUCT>(lparam) ;
-
1365 auto menu_idx = self->get_menu_index_from_window(item->hwndItem) ;
-
1366 if(menu_idx < 0) {
-
1367 return FALSE ;
-
1368 }
-
1369 auto& menu = self->menus_[menu_idx] ;
-
1370 if(!menu.draw_menu(item, self->font_)) {
-
1371 self->fail() ;
-
1372 return FALSE ;
-
1373 }
-
1374 return TRUE ;
-
1375 }
-
1376 }
-
1377 else if(msg == WM_CTLCOLORBTN) {
-
1378 if(auto self = get_instance()) {
-
1379 auto menu_idx = self->get_menu_index_from_window(reinterpret_cast<HWND>(lparam)) ;
-
1380 if(menu_idx < 0) {
-
1381 return DefWindowProc(hwnd, msg, wparam, lparam) ;
-
1382 }
-
1383 auto& menu = self->menus_[menu_idx] ;
-
1384 return reinterpret_cast<LRESULT>(menu.background_brush()) ;
-
1385 }
-
1386 }
-
1387 else if(msg == WM_COMMAND) {
-
1388 if(auto self = get_instance()) {
-
1389 auto menu_idx = self->get_menu_index_from_id(LOWORD(wparam)) ;
-
1390 if(menu_idx < 0) {
-
1391 return FALSE ;
-
1392 }
-
1393 auto& menu = self->menus_[menu_idx] ;
-
1394 if(!menu.process_click_event()) {
-
1395 self->stop() ;
-
1396 return FALSE ;
-
1397 }
-
1398 if(menu.is_toggleable()) {
-
1399 // Update the toggle menu for checkmark
-
1400 if(!InvalidateRect(menu.window_handle(), NULL, TRUE)) {
-
1401 return false ;
-
1402 }
-
1403 }
-
1404 return TRUE ;
-
1405 }
-
1406 }
-
1407 else if(msg == MESSAGE_ID) { //On NotifyIcon
-
1408 if(auto self = get_instance()) {
-
1409 if(lparam == WM_LBUTTONUP || lparam == WM_RBUTTONUP) {
-
1410 self->show_menu_window() ;
-
1411 return 0 ;
-
1412 }
-
1413 }
-
1414 }
-
1415
-
1416 return DefWindowProc(hwnd, msg, wparam, lparam) ;
-
1417 }
-
1418
-
1419 int get_menu_index_from_window(HWND hwnd) {
-
1420 int i = 0 ;
-
1421 for(auto& m : menus_) {
-
1422 if(m.window_handle() == hwnd) {
-
1423 return i ;
-
1424 }
-
1425 i ++ ;
-
1426 }
-
1427 return -1 ;
-
1428 }
-
1429
-
1430 int get_menu_index_from_id(WORD id) {
-
1431 int i = 0 ;
-
1432 for(auto& m : menus_) {
-
1433 if(m.id() == static_cast<std::size_t>(id)) {
-
1434 return i ;
-
1435 }
-
1436 i ++ ;
-
1437 }
-
1438 return -1 ;
-
1439 }
-
1440
-
1441 void get_message(MSG& message) {
-
1442 if(PeekMessage(&message, hwnd_, 0, 0, PM_REMOVE)) {
-
1443 DispatchMessage(&message) ;
-
1444 }
-
1445 }
-
1446
-
1447 void fail() noexcept {
-
1448 status_ = TrayStatus::FAILED ;
-
1449 }
-
1450
-
1451 bool change_menu_back_color(FluentMenu& menu, COLORREF new_color) {
-
1452 if(!menu.set_color(
-
1453 text_color_, new_color, ash_color_)) {
-
1454 return false ;
-
1455 }
-
1456 // Redraw
-
1457 if(!InvalidateRect(menu.window_handle(), NULL, TRUE)) {
-
1458 return false ;
-
1459 }
-
1460 return true ;
-
1461 }
-
1462 } ;
-
-
1463}
-
1464
-
1465#endif
-
Class with information on each menu.
Definition fluent_tray.hpp:229
-
bool is_mouse_over() const
Checks whether the mouse cursor is over the menu or not.
Definition fluent_tray.hpp:374
-
bool set_color(const COLORREF &text_color=CLR_INVALID, const COLORREF &back_color=CLR_INVALID, const COLORREF &border_color=CLR_INVALID) noexcept
Set the menu color.
Definition fluent_tray.hpp:479
-
FluentMenu(bool toggleable=false, const std::function< bool(void)> &callback=[] {return true ;}, const std::function< bool(void)> &unchecked_callback=[] {return true ;})
Create menu object.
Definition fluent_tray.hpp:259
-
FluentMenu & operator=(FluentMenu &&)=default
-
bool draw_menu(LPDRAWITEMSTRUCT info, HFONT font) const
Draws a menu using drawing information and the specified font.
Definition fluent_tray.hpp:515
+Go to the documentation of this file.
1 
+
8 #ifndef _FLUENT_TRAY_HPP
+
9 #define _FLUENT_TRAY_HPP
+
10 
+
11 #include <windows.h>
+
12 
+
13 #if defined(_MSC_VER) && _MSC_VER >= 1500
+
14 #pragma warning(disable : 4005)
+
15 #endif
+
16 
+
17 #include <ntstatus.h>
+
18 
+
19 #if defined(_MSC_VER) && _MSC_VER >= 1500
+
20 #pragma warning(default : 4005)
+
21 #endif
+
22 
+
23 #include <dwmapi.h>
+
24 
+
25 #ifndef DOXYGEN_SHOULD_SKIP_THIS
+
26 
+
27 #ifndef DWMWA_COLOR_DEFAULT
+
28 #define DWMWA_WINDOW_CORNER_PREFERENCE static_cast<DWMWINDOWATTRIBUTE>(33)
+
29 typedef enum {
+
30  DWMWCP_DEFAULT = 0,
+
31  DWMWCP_DONOTROUND = 1,
+
32  DWMWCP_ROUND = 2,
+
33  DWMWCP_ROUNDSMALL = 3
+
34 } DWM_WINDOW_CORNER_PREFERENCE;
+
35 #endif /* DWMWA_COLOR_DEFAULT */
+
36 
+
37 #if defined(DEBUG)
+
38 #include <iostream>
+
39 #endif
+
40 
+
41 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
42 
+
43 #pragma comment(lib, "Dwmapi")
+
44 
+
45 #include <algorithm>
+
46 #include <chrono>
+
47 #include <cmath>
+
48 #include <functional>
+
49 #include <memory>
+
50 #include <string>
+
51 #include <vector>
+
52 
+
53 #ifndef FLUENT_TRAY_MESSAGE_ID_OFFSET
+
57 #define FLUENT_TRAY_MESSAGE_ID_OFFSET (25)
+
58 #endif
+
59 
+
64 namespace fluent_tray
+
65 {
+
66  static constexpr int MESSAGE_ID = WM_APP + FLUENT_TRAY_MESSAGE_ID_OFFSET ;
+
67 
+
72  namespace util
+
73  {
+
81  bool string2wstring(const std::string& str, std::wstring& wstr) {
+
82  if(str.empty()) {
+
83  wstr.clear() ;
+
84  return true ;
+
85  }
+
86 
+
87  auto needed_size = MultiByteToWideChar(
+
88  CP_UTF8, 0,
+
89  str.c_str(), static_cast<int>(str.length()),
+
90  NULL, 0) ;
+
91  if(needed_size <= 0) {
+
92  return false ;
+
93  }
+
94 
+
95  wstr.resize(needed_size) ;
+
96  if(MultiByteToWideChar(
+
97  CP_UTF8, 0,
+
98  str.c_str(), static_cast<int>(str.length()),
+
99  &wstr[0], static_cast<int>(wstr.length())) <= 0) {
+
100  return false;
+
101  }
+
102  return true ;
+
103  }
+
104 
+
112  bool wstring2string(const std::wstring& wstr, std::string& str) {
+
113  if(wstr.empty()) {
+
114  str.clear() ;
+
115  return true ;
+
116  }
+
117 
+
118  auto needed_size = WideCharToMultiByte(
+
119  CP_UTF8, 0,
+
120  wstr.c_str(), static_cast<int>(wstr.length()),
+
121  NULL, 0,
+
122  NULL, NULL) ;
+
123  if(needed_size <= 0) {
+
124  return false ;
+
125  }
+
126 
+
127  str.resize(needed_size) ;
+
128  if(WideCharToMultiByte(
+
129  CP_UTF8, 0,
+
130  wstr.c_str(), static_cast<int>(wstr.length()),
+
131  &str[0], static_cast<int>(str.size()),
+
132  NULL, NULL) <= 0) {
+
133  return false ;
+
134  }
+
135  return true ;
+
136  }
+
137 
+
143  inline constexpr std::size_t bit2mask(std::size_t bits) noexcept {
+
144  return (static_cast<std::size_t>(1) << bits) - 1 ;
+
145  }
+
146 
+
151  template <typename Type>
+
152  inline constexpr int type2bit() noexcept {
+
153  return static_cast<int>(sizeof(Type) * CHAR_BIT) ;
+
154  }
+
155 
+
164  template <typename InType, typename OutType>
+
165  inline void split_bits(InType input, OutType& upper, OutType& lower) noexcept {
+
166  constexpr auto bits = type2bit<OutType>() ;
+
167  auto lower_mask = util::bit2mask(bits) ;
+
168 
+
169  upper = static_cast<OutType>(reinterpret_cast<std::size_t>(input) >> bits) ;
+
170  lower = static_cast<OutType>(reinterpret_cast<std::size_t>(input) & lower_mask) ;
+
171  }
+
172 
+
180  template <typename InType, typename OutType>
+
181  inline void concatenate_bits(InType upper, InType lower, OutType& out) noexcept {
+
182  constexpr auto bits = type2bit<InType>() ;
+
183  auto lower_mask = util::bit2mask(bits) ;
+
184 
+
185  auto out_upper = static_cast<std::size_t>(upper) << bits ;
+
186  auto out_lower = static_cast<std::size_t>(lower) & lower_mask ;
+
187  out = reinterpret_cast<OutType>(out_upper | out_lower) ;
+
188  }
+
194  inline unsigned char rgb2gray(const COLORREF& rgb) {
+
195  auto r = GetRValue(rgb) ;
+
196  auto g = GetGValue(rgb) ;
+
197  auto b = GetBValue(rgb) ;
+
198  return static_cast<unsigned char>(0.2126 * r + 0.7152 * g + 0.0722 * b) ;
+
199  }
+
200 
+
206  inline bool exists(const std::wstring& path) {
+
207  struct _stat buffer ;
+
208  return _wstat(path.c_str(), &buffer) == 0 ;
+
209  }
+
210  }
+
211 
+
215  enum class TrayStatus : unsigned char
+
216  {
+
218  RUNNING,
+
219 
+
221  SHOULD_STOP,
+
222 
+
224  FAILED,
+
225 
+
227  STOPPED,
+
228  } ;
+
229 
+
233  class FluentMenu {
+
234  private:
+
235  std::wstring label_ ;
+
236  HICON hicon_ ;
+
237 
+
238  bool toggleable_ ;
+
239  bool checked_ ;
+
240  std::wstring checkmark_ ;
+
241 
+
242  HWND hwnd_ ;
+
243  HMENU hmenu_ ;
+
244 
+
245  bool under_line_ ;
+
246 
+
247  COLORREF text_color_ ;
+
248  COLORREF back_color_ ;
+
249  COLORREF border_color_ ;
+
250  HBRUSH back_brush_ ;
+
251 
+
252  std::function<bool(void)> callback_ ;
+
253  std::function<bool(void)> unchecked_callback_ ;
+
254 
+
255  public:
+
263  explicit FluentMenu(
+
264  bool toggleable=false,
+
265  const std::function<bool(void)>& callback=[] {return true ;},
+
266  const std::function<bool(void)>& unchecked_callback=[] {return true ;})
+
267  : label_(),
+
268  hicon_(NULL),
+
269  toggleable_(toggleable),
+
270  checked_(false),
+
271  checkmark_(),
+
272  hwnd_(NULL),
+
273  hmenu_(NULL),
+
274  under_line_(false),
+
275  text_color_(RGB(0, 0, 0)),
+
276  back_color_(RGB(255, 255, 255)),
+
277  border_color_(RGB(128, 128, 128)),
+
278  back_brush_(NULL),
+
279  callback_(callback),
+
280  unchecked_callback_(unchecked_callback)
+
281  {}
+
282 
+
283  FluentMenu(const FluentMenu&) = default ;
+
284  FluentMenu& operator=(const FluentMenu&) = default ;
+
285 
+
286  FluentMenu(FluentMenu&&) = default ;
+ +
288 
+
289  ~FluentMenu() noexcept {
+
290  if(back_brush_) {
+
291  DeleteObject(back_brush_) ;
+
292  }
+
293  }
+
294 
+ +
306  HINSTANCE hinstance,
+
307  HWND parent_hwnd,
+
308  std::size_t id,
+
309  const std::string& label_text="",
+
310  const std::string& icon_path="",
+
311  const std::string& checkmark="✓") {
+
312 
+
313  // Convert strings to the wide-strings
+
314  if(!util::string2wstring(label_text, label_)) {
+
315  return false ;
+
316  }
+
317  if(!util::string2wstring(checkmark, checkmark_)) {
+
318  return false ;
+
319  }
+
320 
+
321  auto style = WS_CHILD | WS_VISIBLE | BS_FLAT | BS_LEFT | BS_OWNERDRAW ;
+
322 
+
323  hmenu_ = reinterpret_cast<HMENU>(id) ;
+
324  hwnd_ = CreateWindowW(
+
325  TEXT("BUTTON"), label_.c_str(), style,
+
326  0, 0, 100, 100,
+
327  parent_hwnd, hmenu_,
+
328  hinstance, NULL) ;
+
329  if(!hwnd_) {
+
330  return false ;
+
331  }
+
332 
+
333  // Hide dash lines when selecting.
+
334  SendMessageW(
+
335  hwnd_, WM_CHANGEUISTATE,
+
336  WPARAM(MAKELONG(UIS_SET, UISF_HIDEFOCUS)), 0) ;
+
337 
+
338  if(!icon_path.empty()) {
+
339  std::wstring icon_path_wide ;
+
340  if(!util::string2wstring(icon_path, icon_path_wide)) {
+
341  return false ;
+
342  }
+
343 
+
344  if(!util::exists(icon_path_wide)) {
+
345  return false ;
+
346  }
+
347 
+
348  hicon_ = static_cast<HICON>(LoadImageW(
+
349  NULL, icon_path_wide.c_str(),
+
350  IMAGE_ICON, 0, 0, LR_LOADFROMFILE)) ;
+
351  if(!hicon_) {
+
352  return false ;
+
353  }
+
354  }
+
355 
+
356  return true ;
+
357  }
+
358 
+ +
365  if(toggleable_) {
+
366  checked_ = !checked_ ;
+
367  if(!checked_) {
+
368  return unchecked_callback_() ;
+
369  }
+
370  }
+
371  return callback_() ;
+
372  }
+
373 
+
378  bool is_mouse_over() const {
+
379  POINT pos ;
+
380  if(!GetCursorPos(&pos)) {
+
381  return false ;
+
382  }
+
383  auto detected_hwnd = WindowFromPoint(pos) ;
+
384  if(!detected_hwnd) {
+
385  return false ;
+
386  }
+
387  return detected_hwnd == hwnd_ ;
+
388  }
+
389 
+
394  void check() noexcept {
+
395  if(toggleable_) {
+
396  checked_ = true ;
+
397  }
+
398  }
+
399 
+
404  void uncheck() noexcept {
+
405  if(toggleable_) {
+
406  checked_ = false ;
+
407  }
+
408  }
+
409 
+
414  bool is_checked() const noexcept {
+
415  if(!toggleable_) {
+
416  return false ;
+
417  }
+
418  return checked_ ;
+
419  }
+
420 
+
425  bool is_toggleable() const noexcept {
+
426  return toggleable_ ;
+
427  }
+
428 
+
433  HWND window_handle() const noexcept {
+
434  return hwnd_ ;
+
435  }
+
436 
+
441  HMENU menu_handle() const noexcept {
+
442  return hmenu_ ;
+
443  }
+
444 
+
449  std::size_t id() const noexcept {
+
450  return reinterpret_cast<std::size_t>(hmenu_) ;
+
451  }
+
457  bool get_label(std::string& str) const {
+
458  return util::wstring2string(label_, str) ;
+
459  }
+
460 
+
464  void show_separator_line() noexcept {
+
465  under_line_ = true ;
+
466  }
+
467 
+
471  void hide_separator_line() noexcept {
+
472  under_line_ = false ;
+
473  }
+
474 
+
483  bool set_color(
+
484  const COLORREF& text_color=CLR_INVALID,
+
485  const COLORREF& back_color=CLR_INVALID,
+
486  const COLORREF& border_color=CLR_INVALID) noexcept {
+
487  if(text_color != CLR_INVALID) {
+
488  text_color_ = text_color ;
+
489  }
+
490  if(back_color != CLR_INVALID) {
+
491  back_color_ = back_color ;
+
492  }
+
493  if(border_color != CLR_INVALID) {
+
494  border_color_ = border_color ;
+
495  }
+
496 
+
497  // Create brush handle to draw a background of window.
+
498  if(back_brush_) {
+
499  // Release old handle.
+
500  if(!DeleteObject(back_brush_)) {
+
501  return false ;
+
502  }
+
503  }
+
504  back_brush_ = CreateSolidBrush(back_color_) ;
+
505  if(back_brush_ == NULL) {
+
506  return false ;
+
507  }
+
508 
+
509  return true ;
+
510  }
+
511 
+
519  bool draw_menu(LPDRAWITEMSTRUCT info, HFONT font) const {
+
520  if(SetTextColor(info->hDC, text_color_) == CLR_INVALID) {
+
521  return false ;
+
522  }
+
523 
+
524  if(SetBkColor(info->hDC, back_color_) == CLR_INVALID) {
+
525  return false ;
+
526  }
+
527 
+
528  if(font) {
+
529  if(!SelectObject(info->hDC, font)) {
+
530  return false ;
+
531  }
+
532  }
+
533 
+
534  LONG checkmark_size, label_height, icon_size, margin ;
+
535  if(!calculate_layouts(
+
536  info->hDC,
+
537  checkmark_size, label_height, icon_size, margin)) {
+
538  return false ;
+
539  }
+
540 
+
541  auto& rect = info->rcItem ;
+
542 
+
543  auto y_center = rect.top + (rect.bottom - rect.top) / 2 ;
+
544  auto x = rect.left + margin ;
+
545 
+
546  if(toggleable_ && checked_) {
+
547  if(!TextOutW(
+
548  info->hDC, x, y_center - label_height / 2, checkmark_.c_str(),
+
549  static_cast<int>(checkmark_.length()))) {
+
550  return false ;
+
551  }
+
552  }
+
553  x += checkmark_size + margin ;
+
554 
+
555  if(hicon_) {
+
556  if(!DrawIconEx(
+
557  info->hDC, x, y_center - SM_CYICON / 2, hicon_,
+
558  icon_size, icon_size, 0, NULL, DI_NORMAL)) {
+
559  return false ;
+
560  }
+
561  }
+
562  x += icon_size + margin ;
+
563 
+
564  if(!TextOutW(
+
565  info->hDC, x, y_center - label_height / 2, label_.c_str(),
+
566  static_cast<int>(label_.length()))) {
+
567  return false ;
+
568  }
+
569 
+
570  if(under_line_) {
+
571  auto original_obj = SelectObject(info->hDC, GetStockObject(DC_PEN)) ;
+
572  if(SetDCPenColor(info->hDC, border_color_) == CLR_INVALID) {
+
573  return false ;
+
574  }
+
575 
+
576  auto lx = info->rcItem.left ;
+
577  auto ly = info->rcItem.bottom - 1 ;
+
578  auto rx = info->rcItem.right ;
+
579  auto ry = ly + 1 ;
+
580  if(!Rectangle(info->hDC, lx, ly, rx, ry)) {
+
581  return false ;
+
582  }
+
583 
+
584  if(!SelectObject(info->hDC, original_obj)) {
+
585  return false ;
+
586  }
+
587  }
+
588 
+
589  return true ;
+
590  }
+
596  HBRUSH background_brush() const noexcept {
+
597  return back_brush_ ;
+
598  }
+
605  bool calculate_required_dims(HFONT font, SIZE& size) const {
+
606  auto hdc = GetDC(hwnd_) ;
+
607  if(font) {
+
608  if(!SelectObject(hdc, font)) {
+
609  return false ;
+
610  }
+
611  }
+
612 
+
613  if(!GetTextExtentPoint32W(
+
614  hdc, label_.c_str(),
+
615  static_cast<int>(label_.length()), &size)) {
+
616  return false ;
+
617  }
+
618 
+
619  LONG checkmark_size, label_height, icon_size, margin ;
+
620  if(!calculate_layouts(
+
621  hdc, checkmark_size, label_height, icon_size, margin)) {
+
622  return false ;
+
623  }
+
624 
+
625  size.cx += margin + checkmark_size + margin + icon_size + margin ;
+
626 
+
627  return true ;
+
628  }
+
629 
+
630 
+
631  private:
+
632  bool calculate_layouts(
+
633  HDC hdc,
+
634  LONG& checkmark_size,
+
635  LONG& label_height,
+
636  LONG& icon_size,
+
637  LONG& margin) const {
+
638  SIZE size ;
+
639  if(!GetTextExtentPoint32W(hdc, L" ", 1, &size)) {
+
640  return false ;
+
641  }
+
642  checkmark_size = size.cy ;
+
643  margin = size.cy / 2 ;
+
644  label_height = size.cy ;
+
645  icon_size = 4 * label_height / 5 ;
+
646  return true ;
+
647  }
+
648 
+
649  } ;
+
650 
+
651 
+
655  class FluentTray {
+
656  private:
+
657  std::vector<FluentMenu> menus_ ;
+
658  std::vector<bool> mouse_is_over_ ;
+
659 
+
660  std::wstring app_name_ ;
+
661 
+
662  HINSTANCE hinstance_ ;
+
663  HWND hwnd_ ;
+
664  bool visible_ ;
+
665  NOTIFYICONDATAW icon_data_ ;
+
666 
+
667  TrayStatus status_ ;
+
668 
+
669  std::size_t next_menu_id_ ;
+
670 
+
671  LONG menu_x_margin_ ;
+
672  LONG menu_y_margin_ ;
+
673 
+
674  LONG menu_x_pad_ ;
+
675  LONG menu_y_pad_ ;
+
676 
+
677  COLORREF text_color_ ;
+
678  COLORREF back_color_ ;
+
679  COLORREF ash_color_ ;
+
680  HBRUSH back_brush_ ;
+
681 
+
682  LONG menu_font_size_ ;
+
683  HFONT font_ ;
+
684 
+
685  public:
+
689  explicit FluentTray()
+
690  : menus_(),
+
691  mouse_is_over_(),
+
692  app_name_(),
+
693  hinstance_(GetModuleHandle(NULL)),
+
694  hwnd_(NULL),
+
695  visible_(false),
+
696  icon_data_(),
+
697  status_(TrayStatus::STOPPED),
+
698  next_menu_id_(1),
+
699  menu_x_margin_(5),
+
700  menu_y_margin_(5),
+
701  menu_x_pad_(5),
+
702  menu_y_pad_(5),
+
703  text_color_(RGB(30, 30, 30)),
+
704  back_color_(RGB(200, 200, 200)),
+
705  ash_color_(RGB(100, 100, 100)),
+
706  back_brush_(NULL),
+
707  menu_font_size_(0),
+
708  font_(NULL)
+
709  {}
+
710 
+
711  // Copy
+
712  FluentTray(const FluentTray&) = delete ;
+
713  FluentTray& operator=(const FluentTray&) = delete ;
+
714 
+
715  // Move
+
716  FluentTray(FluentTray&&) = default ;
+ +
718 
+
719  virtual ~FluentTray() noexcept {
+
720  if(font_ != NULL) {
+
721  DeleteObject(font_) ;
+
722  }
+
723  if(back_brush_ != NULL) {
+
724  DeleteObject(back_brush_) ;
+
725  }
+
726  }
+
727 
+ +
741  const std::string& app_name,
+
742  const std::string& icon_path="",
+
743  LONG menu_x_margin=5,
+
744  LONG menu_y_margin=5,
+
745  LONG menu_x_pad=5,
+
746  LONG menu_y_pad=5,
+
747  unsigned char opacity=255,
+
748  bool round_corner=true) {
+
749  if(!util::string2wstring(app_name, app_name_)) {
+
750  return false ;
+
751  }
+
752 
+
753  menu_x_margin_ = menu_x_margin ;
+
754  menu_y_margin_ = menu_y_margin ;
+
755  menu_x_pad_ = menu_x_pad ;
+
756  menu_y_pad_ = menu_y_pad ;
+
757 
+
758  WNDCLASSW winc ;
+
759  winc.style = CS_HREDRAW | CS_VREDRAW ;
+
760  winc.lpfnWndProc = &FluentTray::callback ;
+
761  winc.cbClsExtra = 0 ;
+
762  winc.cbWndExtra = sizeof(LONG) * 2 ; // To store two-part address.
+
763  winc.hInstance = hinstance_ ;
+
764  winc.hIcon = LoadIcon(NULL, IDI_APPLICATION) ;
+
765  winc.hCursor = LoadCursor(NULL, IDC_ARROW) ;
+
766  winc.hbrBackground = GetSysColorBrush(COLOR_WINDOW) ;
+
767  winc.lpszMenuName = NULL ;
+
768  winc.lpszClassName = app_name_.c_str() ;
+
769 
+
770  if(!RegisterClassW(&winc)) {
+
771  return false ;
+
772  }
+
773 
+
774  hwnd_ = CreateWindowExW(
+
775  WS_EX_TOOLWINDOW | WS_EX_LAYERED,
+
776  app_name_.c_str(),
+
777  app_name_.c_str(),
+
778  WS_POPUPWINDOW,
+
779  0, 0, 100, 100,
+
780  NULL, NULL,
+
781  hinstance_, NULL
+
782  ) ;
+
783  if(!hwnd_) {
+
784  return false ;
+
785  }
+
786 
+
787  // To access the this pointer inside the callback function,
+
788  // the address divide into the two part address.
+
789  LONG upper_addr, lower_addr ;
+
790  util::split_bits(this, upper_addr, lower_addr) ;
+
791 
+
792  SetLastError(0) ;
+
793  if(!SetWindowLongW(hwnd_, 0, upper_addr) && GetLastError() != 0) {
+
794  return false ;
+
795  }
+
796  SetLastError(0) ;
+
797  if(!SetWindowLongW(hwnd_, sizeof(LONG), lower_addr) && GetLastError() != 0) {
+
798  return false ;
+
799  }
+
800 
+
801  if(!SetLayeredWindowAttributes(hwnd_, 0, opacity, LWA_ALPHA)) {
+
802  return false ;
+
803  }
+
804 
+
805  // Set rounded window for Windows 11 only.
+
806  if(round_corner) {
+
807 #if defined(_MSC_VER) && _MSC_VER >= 1500
+
808  using RtlGetVersionType = NTSTATUS (WINAPI*)(PRTL_OSVERSIONINFOW) ;
+
809  const auto hmodule = LoadLibraryW(L"ntdll.dll") ;
+
810  if(!hmodule) {
+
811  return false ;
+
812  }
+
813 
+
814  // cast to void* once to avoid warnings about type conversion.
+
815  const auto RtlGetVersion = reinterpret_cast<RtlGetVersionType>(
+
816  reinterpret_cast<void*>(GetProcAddress(hmodule, "RtlGetVersion"))) ;
+
817  if(!RtlGetVersion) {
+
818  FreeLibrary(hmodule) ;
+
819  return false ;
+
820  }
+
821 
+
822  OSVERSIONINFOW vinfo ;
+
823  vinfo.dwOSVersionInfoSize = sizeof(decltype(vinfo)) ;
+
824  auto result = RtlGetVersion(&vinfo) ;
+
825  if(!FreeLibrary(hmodule)) {
+
826  return false ;
+
827  }
+
828 
+
829  if(result != STATUS_SUCCESS) {
+
830  return false ;
+
831  }
+
832 
+
833  // Check if the OS is Windows11
+
834  if(vinfo.dwBuildNumber >= 22000) {
+
835  auto pref = DWMWCP_ROUND ;
+
836  if(DwmSetWindowAttribute(
+
837  hwnd_,
+
838  DWMWA_WINDOW_CORNER_PREFERENCE,
+
839  &pref, sizeof(pref)) != S_OK) {
+
840  return false ;
+
841  }
+
842  }
+
843 #endif // defined(_MSC_VER) && _MSC_VER >= 1500
+
844  }
+
845 
+
846  if(!change_icon(icon_path)) {
+
847  return false ;
+
848  }
+
849 
+
850  if(!set_font()) {
+
851  return false ;
+
852  }
+
853 
+
854  if(!set_color()) {
+
855  return false ;
+
856  }
+
857 
+
858  status_ = TrayStatus::RUNNING ;
+
859 
+
860  return true ;
+
861  }
+
862 
+
873  bool add_menu(
+
874  const std::string& label_text="",
+
875  const std::string& icon_path="",
+
876  bool toggleable=false,
+
877  const std::string& checkmark="✓",
+
878  const std::function<bool(void)>& callback=[] {return true ;},
+
879  const std::function<bool(void)>& unchecked_callback=[] {return true ;}) {
+
880  FluentMenu menu(toggleable, callback, unchecked_callback) ;
+
881  if(!menu.create_menu(
+
882  hinstance_, hwnd_, next_menu_id_,
+
883  label_text, icon_path, checkmark)) {
+
884  return false ;
+
885  }
+
886 
+
887  menus_.push_back(std::move(menu)) ;
+
888  mouse_is_over_.push_back(false) ;
+
889  next_menu_id_ ++ ;
+
890  return true ;
+
891  }
+
892 
+
896  void add_separator() {
+
897  if(!menus_.empty()) {
+
898  menus_.back().show_separator_line() ;
+
899  }
+
900  }
+
901 
+
906  bool update() {
+
907  if(status_ == TrayStatus::FAILED) {
+
908  return false ;
+
909  }
+
910 
+
911  MSG msg ;
+
912  get_message(msg) ;
+
913 
+
914  if(GetForegroundWindow() != hwnd_ && visible_) {
+
915  hide_menu_window() ;
+
916  }
+
917 
+
918  for(std::size_t i = 0 ; i < menus_.size() ; i ++) {
+
919  auto& menu = menus_[i] ;
+
920  if(menu.is_mouse_over()) {
+
921  if(!mouse_is_over_[i]) {
+
922  if(!change_menu_back_color(menu, ash_color_)) {
+
923  return false ;
+
924  }
+
925  }
+
926  mouse_is_over_[i] = true ;
+
927  }
+
928  else {
+
929  if(mouse_is_over_[i]) {
+
930  if(!change_menu_back_color(menu, back_color_)) {
+
931  return false ;
+
932  }
+
933  }
+
934  mouse_is_over_[i] = false ;
+
935  }
+
936  }
+
937 
+
938  return true ;
+
939  }
+
940 
+ +
947  std::chrono::milliseconds sleep_time=std::chrono::milliseconds(1)) {
+
948 
+
949  while(true) {
+
950  if(status_ == TrayStatus::SHOULD_STOP) {
+
951  status_ = TrayStatus::STOPPED ;
+
952  break ;
+
953  }
+
954 
+
955  if(!update()) {
+
956  return false ;
+
957  }
+
958 
+
959  Sleep(static_cast<int>(sleep_time.count())) ;
+
960  }
+
961  return true ;
+
962  }
+
963 
+
968  HWND window_handle() const noexcept {
+
969  return hwnd_ ;
+
970  }
+
971 
+ +
977  LONG max_label_size = 0 ;
+
978  for(auto& menu : menus_) {
+
979  SIZE size ;
+
980  if(!menu.calculate_required_dims(font_, size)) {
+
981  return false ;
+
982  }
+
983  if(max_label_size < size.cx) {
+
984  max_label_size = size.cx ;
+
985  }
+
986  }
+
987 
+
988  // Update the sizes
+
989  auto menu_width = max_label_size + 2 * menu_x_pad_ ;
+
990  auto menu_height = menu_font_size_ + 2 * menu_y_pad_ ;
+
991  auto popup_width = 2 * menu_x_margin_ + menu_width ;
+
992  auto popup_height = static_cast<LONG>(
+
993  menus_.size() * (menu_y_margin_ + menu_height) + menu_y_margin_) ;
+
994 
+
995  POINT cursor_pos ;
+
996  if(!GetCursorPos(&cursor_pos)) {
+
997  return false ;
+
998  }
+
999 
+
1000  RECT work_rect ;
+
1001  if(!SystemParametersInfo(
+
1002  SPI_GETWORKAREA, 0, reinterpret_cast<PVOID>(&work_rect), 0)) {
+
1003  return false ;
+
1004  }
+
1005 
+
1006  auto screen_width = GetSystemMetrics(SM_CXSCREEN) ;
+
1007  auto screen_height = GetSystemMetrics(SM_CYSCREEN) ;
+
1008 
+
1009  auto work_width = work_rect.right - work_rect.left ;
+
1010  auto work_height = work_rect.bottom - work_rect.top ;
+
1011 
+
1012  auto taskbar_width = screen_width - work_width ;
+
1013  auto taskbar_height = screen_height - work_height ;
+
1014 
+
1015  auto pos = cursor_pos ;
+
1016  if(taskbar_width == 0) { // horizontal taskbar
+
1017  if(cursor_pos.y <= taskbar_height) {
+
1018  //top
+
1019  pos.y = taskbar_height ;
+
1020  }
+
1021  else {
+
1022  //bottom
+
1023  // add 20% offset
+
1024  pos.y = screen_height - (popup_height + 12 * taskbar_height / 10) ;
+
1025  }
+
1026  pos.x = cursor_pos.x - popup_width / 2 ;
+
1027  }
+
1028  else { // vertical taskbar
+
1029  if(pos.x <= taskbar_width) {
+
1030  //left
+
1031  pos.x = taskbar_width ;
+
1032  }
+
1033  else {
+
1034  //right
+
1035  // add 20% offset
+
1036  pos.x = popup_width + 12 * taskbar_width / 10 ;
+
1037  }
+
1038 
+
1039  pos.y = cursor_pos.y - popup_height / 2 ;
+
1040  }
+
1041 
+
1042  if(!SetWindowPos(
+
1043  hwnd_, HWND_TOP,
+
1044  pos.x, pos.y, popup_width, popup_height,
+
1045  SWP_SHOWWINDOW)) {
+
1046  return false ;
+
1047  }
+
1048 
+
1049  for(std::size_t i = 0 ; i < menus_.size() ; i ++) {
+
1050  auto& menu = menus_[i] ;
+
1051  auto y = \
+
1052  menu_y_margin_
+
1053  + static_cast<LONG>(i) * (menu_height + menu_y_margin_) ;
+
1054  if(!SetWindowPos(
+
1055  menu.window_handle(), HWND_TOP,
+
1056  menu_x_margin_, y,
+
1057  menu_width, menu_height,
+
1058  SWP_SHOWWINDOW)) {
+
1059  return false ;
+
1060  }
+
1061 
+
1062  if(!menu.set_color(text_color_, back_color_, ash_color_)) {
+
1063  return false ;
+
1064  }
+
1065  }
+
1066  std::fill(mouse_is_over_.begin(), mouse_is_over_.end(), false) ;
+
1067 
+
1068  if(!SetForegroundWindow(hwnd_)) {
+
1069  return false ;
+
1070  }
+
1071 
+
1072  visible_ = true ;
+
1073 
+
1074  return true ;
+
1075  }
+
1076 
+ +
1082  if(!ShowWindow(hwnd_, SW_HIDE)) {
+
1083  return false ;
+
1084  }
+
1085  visible_ = false ;
+
1086 
+
1087  std::fill(mouse_is_over_.begin(), mouse_is_over_.end(), false) ;
+
1088  return true ;
+
1089  }
+
1090 
+
1095  TrayStatus status() const noexcept {
+
1096  return status_ ;
+
1097  }
+
1098 
+
1102  void stop() noexcept {
+
1103  status_ = TrayStatus::SHOULD_STOP ;
+
1104  }
+
1105 
+
1110  std::vector<FluentMenu>::iterator begin() noexcept {
+
1111  return menus_.begin() ;
+
1112  }
+
1113 
+
1118  std::vector<FluentMenu>::iterator end() noexcept {
+
1119  return menus_.end() ;
+
1120  }
+
1121 
+
1126  std::vector<FluentMenu>::const_iterator cbegin() const noexcept {
+
1127  return menus_.cbegin() ;
+
1128  }
+
1129 
+
1134  std::vector<FluentMenu>::const_iterator cend() const noexcept {
+
1135  return menus_.cend() ;
+
1136  }
+
1137 
+
1142  std::size_t count_menus() const noexcept {
+
1143  return menus_.size() ;
+
1144  }
+
1145 
+
1154  bool set_font(
+
1155  LONG font_size=0,
+
1156  LONG font_weight=0,
+
1157  const std::string& font_name="") {
+
1158  NONCLIENTMETRICS metrics ;
+
1159  metrics.cbSize = sizeof(metrics) ;
+
1160 
+
1161  if(!SystemParametersInfo(
+
1162  SPI_GETNONCLIENTMETRICS,
+
1163  metrics.cbSize, &metrics, 0)) {
+
1164  return false ;
+
1165  }
+
1166 
+
1167  auto& logfont = metrics.lfCaptionFont ;
+
1168  if(font_size != 0) {
+
1169  logfont.lfHeight = font_size ;
+
1170  }
+
1171  else {
+
1172  logfont.lfHeight = 20 ;
+
1173  }
+
1174  if(font_weight != 0) {
+
1175  logfont.lfWeight = font_weight ;
+
1176  }
+
1177  else {
+
1178  logfont.lfWeight = FW_MEDIUM ;
+
1179  }
+
1180 
+
1181  if(!font_name.empty()) {
+
1182  std::wstring font_name_wide ;
+
1183  if(!util::string2wstring(font_name, font_name_wide)) {
+
1184  return false ;
+
1185  }
+
1186  auto dst = logfont.lfFaceName ;
+
1187 
+
1188  if(font_name_wide.size() < LF_FACESIZE) {
+
1189  std::wmemcpy(dst, font_name_wide.c_str(), sizeof(WCHAR) * font_name_wide.length()) ;
+
1190  dst[font_name_wide.size()] = L'\0' ;
+
1191  }
+
1192  else {
+
1193  std::wmemcpy(dst, font_name_wide.c_str(), sizeof(WCHAR) * (LF_FACESIZE - 1)) ;
+
1194  dst[LF_FACESIZE - 1] = L'\0' ;
+
1195  }
+
1196  }
+
1197 
+
1198  auto font = CreateFontIndirectW(&logfont) ;
+
1199  if(!font) {
+
1200  return false ;
+
1201  }
+
1202  font_ = font ;
+
1203  menu_font_size_ = std::abs(logfont.lfHeight) ;
+
1204 
+
1205  return true;
+
1206  }
+
1207 
+ +
1216  const COLORREF& text_color=CLR_INVALID,
+
1217  const COLORREF& back_color=CLR_INVALID,
+
1218  unsigned char color_decay=10) {
+
1219  if(back_color == CLR_INVALID) {
+
1220  // Get Taskbar color
+
1221  APPBARDATA abd ;
+
1222  abd.cbSize = sizeof(abd) ;
+
1223  if(!SHAppBarMessage(ABM_GETTASKBARPOS, &abd)) {
+
1224  return false ;
+
1225  }
+
1226 
+
1227  if(auto dc = GetDC(NULL)) {
+
1228  // Get Taskbar color
+
1229  back_color_ = GetPixel(dc, abd.rc.left + 1, abd.rc.top + 1) ;
+
1230  if(back_color_ == CLR_INVALID) {
+
1231  // if failed, use COLOR_WINDOW color.
+
1232  back_color_ = GetSysColor(COLOR_WINDOW) ;
+
1233  }
+
1234  if(!ReleaseDC(NULL, dc)) {
+
1235  return false ;
+
1236  }
+
1237  }
+
1238  }
+
1239  else {
+
1240  back_color_ = back_color ;
+
1241  }
+
1242 
+
1243  auto back_gray_color_ = util::rgb2gray(back_color_) ;
+
1244 
+
1245  unsigned char ash_value = back_gray_color_ ;
+
1246  if(back_gray_color_ < 128) {
+
1247  ash_value = static_cast<decltype(ash_value)>(
+
1248  (std::min)(ash_value + color_decay, 255)) ;
+
1249  }
+
1250  else {
+
1251  ash_value = static_cast<decltype(ash_value)>(
+
1252  (std::max)(ash_value - color_decay, 0)) ;
+
1253  }
+
1254  ash_color_ = RGB(ash_value, ash_value, ash_value) ;
+
1255 
+
1256  if(text_color == CLR_INVALID) {
+
1257  text_color_ = GetSysColor(COLOR_WINDOWTEXT) ;
+
1258  if(back_gray_color_ < 128) {
+
1259  // if dark background, use light text color.
+
1260  text_color_ = 0x00FFFFFF & ~text_color_ ;
+
1261  }
+
1262  }
+
1263  else {
+
1264  text_color_ = text_color ;
+
1265  }
+
1266 
+
1267  if(back_brush_) {
+
1268  // Release old handle.
+
1269  if(!DeleteObject(back_brush_)) {
+
1270  return false ;
+
1271  }
+
1272  }
+
1273  back_brush_ = CreateSolidBrush(back_color_) ;
+
1274  if(back_brush_ == NULL) {
+
1275  return false ;
+
1276  }
+
1277 
+
1278  if(!SetClassLongPtr(
+
1279  hwnd_, GCLP_HBRBACKGROUND,
+
1280  reinterpret_cast<LONG_PTR>(back_brush_))) {
+
1281  return false ;
+
1282  }
+
1283 
+
1284  return true ;
+
1285  }
+
1286 
+
1291  bool change_icon(const std::string& icon_path) {
+
1292  if(icon_data_.cbSize > 0) {
+
1293  if(!Shell_NotifyIconW(NIM_DELETE, &icon_data_)) {
+
1294  return false ;
+
1295  }
+
1296  }
+
1297 
+
1298  ZeroMemory(&icon_data_, sizeof(icon_data_)) ;
+
1299 
+
1300  if(icon_path.empty()) {
+
1301  icon_data_.cbSize = 0 ;
+
1302  return true ;
+
1303  }
+
1304 
+
1305  std::wstring icon_path_wide ;
+
1306  if(!util::string2wstring(icon_path, icon_path_wide)) {
+
1307  return false ;
+
1308  }
+
1309 
+
1310  if(!util::exists(icon_path_wide)) {
+
1311  return false ;
+
1312  }
+
1313 
+
1314  icon_data_.cbSize = sizeof(icon_data_) ;
+
1315  icon_data_.hWnd = hwnd_ ;
+
1316  icon_data_.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP ;
+
1317  icon_data_.uCallbackMessage = MESSAGE_ID ;
+
1318  icon_data_.hIcon = static_cast<HICON>(
+
1319  LoadImageW(
+
1320  NULL, icon_path_wide.c_str(),
+
1321  IMAGE_ICON, 0, 0, LR_LOADFROMFILE)) ;
+
1322  wcscpy_s(icon_data_.szTip, app_name_.c_str()) ;
+
1323  icon_data_.dwState = NIS_SHAREDICON ;
+
1324  icon_data_.dwStateMask = NIS_SHAREDICON ;
+
1325 
+
1326  if(!Shell_NotifyIconW(NIM_ADD, &icon_data_)) {
+
1327  return false ;
+
1328  }
+
1329  hide_menu_window() ;
+
1330 
+
1331  return true ;
+
1332  }
+
1333 
+
1334  private:
+
1335  static LRESULT CALLBACK callback(
+
1336  HWND hwnd,
+
1337  UINT msg,
+
1338  WPARAM wparam,
+
1339  LPARAM lparam) {
+
1340  auto get_instance = [hwnd]() -> FluentTray* {
+
1341  auto upper_addr = GetWindowLongW(hwnd, 0) ;
+
1342  if(!upper_addr) {
+
1343  return nullptr ;
+
1344  }
+
1345 
+
1346  auto lower_addr = GetWindowLongW(hwnd, sizeof(LONG)) ;
+
1347  if(!lower_addr) {
+
1348  return nullptr ;
+
1349  }
+
1350 
+
1351  FluentTray* self ;
+
1352  util::concatenate_bits(upper_addr, lower_addr, self) ;
+
1353  return self ;
+
1354  } ;
+
1355 
+
1356  if(msg == WM_DESTROY || msg == WM_QUIT || msg == WM_CLOSE) {
+
1357  if(auto self = get_instance()) {
+
1358  self->stop() ;
+
1359  return 0 ;
+
1360  }
+
1361  }
+
1362  else if(msg == WM_ACTIVATE && wparam == WA_INACTIVE) {
+
1363  if(auto self = get_instance()) {
+
1364  if(!self->hide_menu_window()) {
+
1365  self->fail() ;
+
1366  }
+
1367  return 0 ;
+
1368  }
+
1369  }
+
1370  else if(msg == WM_DRAWITEM) {
+
1371  if(auto self = get_instance()) {
+
1372  auto item = reinterpret_cast<LPDRAWITEMSTRUCT>(lparam) ;
+
1373  auto menu_idx = self->get_menu_index_from_window(item->hwndItem) ;
+
1374  if(menu_idx < 0) {
+
1375  return FALSE ;
+
1376  }
+
1377  auto& menu = self->menus_[menu_idx] ;
+
1378  if(!menu.draw_menu(item, self->font_)) {
+
1379  self->fail() ;
+
1380  return FALSE ;
+
1381  }
+
1382  return TRUE ;
+
1383  }
+
1384  }
+
1385  else if(msg == WM_CTLCOLORBTN) {
+
1386  if(auto self = get_instance()) {
+
1387  auto menu_idx = self->get_menu_index_from_window(reinterpret_cast<HWND>(lparam)) ;
+
1388  if(menu_idx < 0) {
+
1389  return DefWindowProc(hwnd, msg, wparam, lparam) ;
+
1390  }
+
1391  auto& menu = self->menus_[menu_idx] ;
+
1392  return reinterpret_cast<LRESULT>(menu.background_brush()) ;
+
1393  }
+
1394  }
+
1395  else if(msg == WM_COMMAND) {
+
1396  if(auto self = get_instance()) {
+
1397  auto menu_idx = self->get_menu_index_from_id(LOWORD(wparam)) ;
+
1398  if(menu_idx < 0) {
+
1399  return FALSE ;
+
1400  }
+
1401  auto& menu = self->menus_[menu_idx] ;
+
1402  if(!menu.process_click_event()) {
+
1403  self->stop() ;
+
1404  return FALSE ;
+
1405  }
+
1406  if(menu.is_toggleable()) {
+
1407  // Update the toggle menu for checkmark
+
1408  if(!InvalidateRect(menu.window_handle(), NULL, TRUE)) {
+
1409  return false ;
+
1410  }
+
1411  }
+
1412  return TRUE ;
+
1413  }
+
1414  }
+
1415  else if(msg == MESSAGE_ID) { //On NotifyIcon
+
1416  if(auto self = get_instance()) {
+
1417  if(lparam == WM_LBUTTONUP || lparam == WM_RBUTTONUP) {
+
1418  self->show_menu_window() ;
+
1419  return 0 ;
+
1420  }
+
1421  }
+
1422  }
+
1423 
+
1424  return DefWindowProc(hwnd, msg, wparam, lparam) ;
+
1425  }
+
1426 
+
1427  int get_menu_index_from_window(HWND hwnd) {
+
1428  int i = 0 ;
+
1429  for(auto& m : menus_) {
+
1430  if(m.window_handle() == hwnd) {
+
1431  return i ;
+
1432  }
+
1433  i ++ ;
+
1434  }
+
1435  return -1 ;
+
1436  }
+
1437 
+
1438  int get_menu_index_from_id(WORD id) {
+
1439  int i = 0 ;
+
1440  for(auto& m : menus_) {
+
1441  if(m.id() == static_cast<std::size_t>(id)) {
+
1442  return i ;
+
1443  }
+
1444  i ++ ;
+
1445  }
+
1446  return -1 ;
+
1447  }
+
1448 
+
1449  void get_message(MSG& message) {
+
1450  if(PeekMessage(&message, hwnd_, 0, 0, PM_REMOVE)) {
+
1451  DispatchMessage(&message) ;
+
1452  }
+
1453  }
+
1454 
+
1455  void fail() noexcept {
+
1456  status_ = TrayStatus::FAILED ;
+
1457  }
+
1458 
+
1459  bool change_menu_back_color(FluentMenu& menu, COLORREF new_color) {
+
1460  if(!menu.set_color(
+
1461  text_color_, new_color, ash_color_)) {
+
1462  return false ;
+
1463  }
+
1464  // Redraw
+
1465  if(!InvalidateRect(menu.window_handle(), NULL, TRUE)) {
+
1466  return false ;
+
1467  }
+
1468  return true ;
+
1469  }
+
1470  } ;
+
1471 }
+
1472 
+
1473 #endif
+
Class with information on each menu.
Definition: fluent_tray.hpp:233
+
FluentMenu & operator=(FluentMenu &&)=default
+
bool is_mouse_over() const
Checks whether the mouse cursor is over the menu or not.
Definition: fluent_tray.hpp:378
+
bool set_color(const COLORREF &text_color=CLR_INVALID, const COLORREF &back_color=CLR_INVALID, const COLORREF &border_color=CLR_INVALID) noexcept
Set the menu color.
Definition: fluent_tray.hpp:483
+
FluentMenu & operator=(const FluentMenu &)=default
+
FluentMenu(bool toggleable=false, const std::function< bool(void)> &callback=[] {return true ;}, const std::function< bool(void)> &unchecked_callback=[] {return true ;})
Create menu object.
Definition: fluent_tray.hpp:263
+
bool draw_menu(LPDRAWITEMSTRUCT info, HFONT font) const
Draws a menu using drawing information and the specified font.
Definition: fluent_tray.hpp:519
FluentMenu(FluentMenu &&)=default
-
void show_separator_line() noexcept
Show a separator line under the menu.
Definition fluent_tray.hpp:460
-
HMENU menu_handle() const noexcept
Refer to the menu handle.
Definition fluent_tray.hpp:437
-
FluentMenu & operator=(const FluentMenu &)=default
-
std::size_t id() const noexcept
Refer to the menu identifier.
Definition fluent_tray.hpp:445
-
bool is_checked() const noexcept
Refer to the check status of the menu.
Definition fluent_tray.hpp:410
-
bool is_toggleable() const noexcept
Check if the menu is toggleable.
Definition fluent_tray.hpp:421
-
~FluentMenu() noexcept
Definition fluent_tray.hpp:285
-
bool create_menu(HINSTANCE hinstance, HWND parent_hwnd, std::size_t id, const std::string &label_text="", const std::string &icon_path="", const std::string &checkmark="✓")
Creates a menu window.
Definition fluent_tray.hpp:301
-
void uncheck() noexcept
Unchecks the menu if it is toggleable.
Definition fluent_tray.hpp:400
-
bool calculate_required_dims(HFONT font, SIZE &size) const
Calculates the size of the bounding box surrounding the menu based on the font information and the le...
Definition fluent_tray.hpp:601
-
HWND window_handle() const noexcept
Refer to the menu window handle.
Definition fluent_tray.hpp:429
-
void hide_separator_line() noexcept
Hide a separator line under the menu.
Definition fluent_tray.hpp:467
-
bool process_click_event()
Execute the process when clicked on the menu.
Definition fluent_tray.hpp:360
-
HBRUSH background_brush() const noexcept
Refer to the brush for drawing the background.
Definition fluent_tray.hpp:592
-
bool get_label(std::string &str) const
Get menu label as UTF-8 string.
Definition fluent_tray.hpp:453
-
void check() noexcept
Checks the menu if it is toggleable.
Definition fluent_tray.hpp:390
+
void show_separator_line() noexcept
Show a separator line under the menu.
Definition: fluent_tray.hpp:464
+
HMENU menu_handle() const noexcept
Refer to the menu handle.
Definition: fluent_tray.hpp:441
+
std::size_t id() const noexcept
Refer to the menu identifier.
Definition: fluent_tray.hpp:449
+
bool is_checked() const noexcept
Refer to the check status of the menu.
Definition: fluent_tray.hpp:414
+
bool is_toggleable() const noexcept
Check if the menu is toggleable.
Definition: fluent_tray.hpp:425
+
~FluentMenu() noexcept
Definition: fluent_tray.hpp:289
+
bool create_menu(HINSTANCE hinstance, HWND parent_hwnd, std::size_t id, const std::string &label_text="", const std::string &icon_path="", const std::string &checkmark="✓")
Creates a menu window.
Definition: fluent_tray.hpp:305
+
void uncheck() noexcept
Unchecks the menu if it is toggleable.
Definition: fluent_tray.hpp:404
+
bool calculate_required_dims(HFONT font, SIZE &size) const
Calculates the size of the bounding box surrounding the menu based on the font information and the le...
Definition: fluent_tray.hpp:605
+
HWND window_handle() const noexcept
Refer to the menu window handle.
Definition: fluent_tray.hpp:433
+
void hide_separator_line() noexcept
Hide a separator line under the menu.
Definition: fluent_tray.hpp:471
+
bool process_click_event()
Execute the process when clicked on the menu.
Definition: fluent_tray.hpp:364
+
HBRUSH background_brush() const noexcept
Refer to the brush for drawing the background.
Definition: fluent_tray.hpp:596
+
bool get_label(std::string &str) const
Get menu label as UTF-8 string.
Definition: fluent_tray.hpp:457
+
void check() noexcept
Checks the menu if it is toggleable.
Definition: fluent_tray.hpp:394
FluentMenu(const FluentMenu &)=default
-
Class with information on the entire tray.
Definition fluent_tray.hpp:651
-
virtual ~FluentTray() noexcept
Definition fluent_tray.hpp:715
-
std::vector< FluentMenu >::iterator end() noexcept
Returns an iterator to the end of menus.
Definition fluent_tray.hpp:1110
-
FluentTray & operator=(const FluentTray &)=delete
-
bool show_menu_window()
Show the menu window above the tray icon.
Definition fluent_tray.hpp:970
-
bool create_tray(const std::string &app_name, const std::string &icon_path="", 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)
Initialize tray and create icon on tray.
Definition fluent_tray.hpp:736
-
void stop() noexcept
Exit the tray successfully.
Definition fluent_tray.hpp:1094
-
FluentTray & operator=(FluentTray &&)=default
-
bool add_menu(const std::string &label_text="", const std::string &icon_path="", bool toggleable=false, const std::string &checkmark="✓", const std::function< bool(void)> &callback=[] {return true ;}, const std::function< bool(void)> &unchecked_callback=[] {return true ;})
Add a menu in order from the top.
Definition fluent_tray.hpp:867
-
bool set_font(LONG font_size=0, LONG font_weight=0, const std::string &font_name="")
Set font information to draw menus.
Definition fluent_tray.hpp:1146
-
TrayStatus status() const noexcept
Get the current status of tray.
Definition fluent_tray.hpp:1087
-
bool change_icon(const std::string &icon_path)
Load the image file and change the icon.
Definition fluent_tray.hpp:1283
-
FluentTray()
Create tray object.
Definition fluent_tray.hpp:685
-
std::size_t count_menus() const noexcept
Returns the number of menus.
Definition fluent_tray.hpp:1134
-
bool update_with_loop(std::chrono::milliseconds sleep_time=std::chrono::milliseconds(1))
Create a message loop to update the tray.
Definition fluent_tray.hpp:940
-
std::vector< FluentMenu >::const_iterator cbegin() const noexcept
Returns a constant iterator to the beginning of menus.
Definition fluent_tray.hpp:1118
-
std::vector< FluentMenu >::const_iterator cend() const noexcept
Returns a constant iterator to the end of menus.
Definition fluent_tray.hpp:1126
-
bool set_color(const COLORREF &text_color=CLR_INVALID, const COLORREF &back_color=CLR_INVALID, unsigned char color_decay=10)
Set colors to draw menus.
Definition fluent_tray.hpp:1207
-
void add_separator()
Add a separator line under the last menu item added.
Definition fluent_tray.hpp:890
-
bool hide_menu_window()
Hide the menu window above the tray icon.
Definition fluent_tray.hpp:1073
+
Class with information on the entire tray.
Definition: fluent_tray.hpp:655
+
std::vector< FluentMenu >::const_iterator cbegin() const noexcept
Returns a constant iterator to the beginning of menus.
Definition: fluent_tray.hpp:1126
+
virtual ~FluentTray() noexcept
Definition: fluent_tray.hpp:719
+
bool show_menu_window()
Show the menu window above the tray icon.
Definition: fluent_tray.hpp:976
+
bool create_tray(const std::string &app_name, const std::string &icon_path="", 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)
Initialize tray and create icon on tray.
Definition: fluent_tray.hpp:740
+
void stop() noexcept
Exit the tray successfully.
Definition: fluent_tray.hpp:1102
+
bool add_menu(const std::string &label_text="", const std::string &icon_path="", bool toggleable=false, const std::string &checkmark="✓", const std::function< bool(void)> &callback=[] {return true ;}, const std::function< bool(void)> &unchecked_callback=[] {return true ;})
Add a menu in order from the top.
Definition: fluent_tray.hpp:873
+
bool set_font(LONG font_size=0, LONG font_weight=0, const std::string &font_name="")
Set font information to draw menus.
Definition: fluent_tray.hpp:1154
+
std::vector< FluentMenu >::iterator begin() noexcept
Returns an iterator to the beginning of menus.
Definition: fluent_tray.hpp:1110
+
TrayStatus status() const noexcept
Get the current status of tray.
Definition: fluent_tray.hpp:1095
+
std::vector< FluentMenu >::iterator end() noexcept
Returns an iterator to the end of menus.
Definition: fluent_tray.hpp:1118
+
bool change_icon(const std::string &icon_path)
Load the image file and change the icon.
Definition: fluent_tray.hpp:1291
+
FluentTray()
Create tray object.
Definition: fluent_tray.hpp:689
+
std::size_t count_menus() const noexcept
Returns the number of menus.
Definition: fluent_tray.hpp:1142
+
bool update_with_loop(std::chrono::milliseconds sleep_time=std::chrono::milliseconds(1))
Create a message loop to update the tray.
Definition: fluent_tray.hpp:946
+
FluentTray & operator=(const FluentTray &)=delete
+
FluentTray & operator=(FluentTray &&)=default
+
std::vector< FluentMenu >::const_iterator cend() const noexcept
Returns a constant iterator to the end of menus.
Definition: fluent_tray.hpp:1134
+
bool set_color(const COLORREF &text_color=CLR_INVALID, const COLORREF &back_color=CLR_INVALID, unsigned char color_decay=10)
Set colors to draw menus.
Definition: fluent_tray.hpp:1215
+
void add_separator()
Add a separator line under the last menu item added.
Definition: fluent_tray.hpp:896
+
bool hide_menu_window()
Hide the menu window above the tray icon.
Definition: fluent_tray.hpp:1081
FluentTray(const FluentTray &)=delete
FluentTray(FluentTray &&)=default
-
HWND window_handle() const noexcept
Refer to the handle of menu window.
Definition fluent_tray.hpp:962
-
std::vector< FluentMenu >::iterator begin() noexcept
Returns an iterator to the beginning of menus.
Definition fluent_tray.hpp:1102
-
bool update()
Get window message and update tray.
Definition fluent_tray.hpp:900
-
#define FLUENT_TRAY_MESSAGE_ID_OFFSET
Unique message identifier.
Definition fluent_tray.hpp:53
-
bool exists(const std::wstring &path)
Checks if the file exists.
Definition fluent_tray.hpp:202
-
constexpr std::size_t bit2mask(std::size_t bits) noexcept
Generates a mask with the specified number of lower bits set to 1.
Definition fluent_tray.hpp:139
-
bool wstring2string(const std::wstring &wstr, std::string &str)
Converts a wide string to a UTF-8 encoded string.
Definition fluent_tray.hpp:108
-
void concatenate_bits(InType upper, InType lower, OutType &out) noexcept
Generates a variable that combines the bits of two variables.
Definition fluent_tray.hpp:177
-
bool string2wstring(const std::string &str, std::wstring &wstr)
Converts a UTF-8 encoded string to a wide string.
Definition fluent_tray.hpp:77
-
void split_bits(InType input, OutType &upper, OutType &lower) noexcept
Divides the input value into upper and lower bits.
Definition fluent_tray.hpp:161
-
constexpr int type2bit() noexcept
Calculate the number of bits of type.
Definition fluent_tray.hpp:148
-
unsigned char rgb2gray(const COLORREF &rgb)
Calculate grayscale value from RGB.
Definition fluent_tray.hpp:190
+
HWND window_handle() const noexcept
Refer to the handle of menu window.
Definition: fluent_tray.hpp:968
+
bool update()
Get window message and update tray.
Definition: fluent_tray.hpp:906
+
#define FLUENT_TRAY_MESSAGE_ID_OFFSET
Unique message identifier.
Definition: fluent_tray.hpp:57
+
bool exists(const std::wstring &path)
Checks if the file exists.
Definition: fluent_tray.hpp:206
+
constexpr std::size_t bit2mask(std::size_t bits) noexcept
Generates a mask with the specified number of lower bits set to 1.
Definition: fluent_tray.hpp:143
+
bool wstring2string(const std::wstring &wstr, std::string &str)
Converts a wide string to a UTF-8 encoded string.
Definition: fluent_tray.hpp:112
+
void concatenate_bits(InType upper, InType lower, OutType &out) noexcept
Generates a variable that combines the bits of two variables.
Definition: fluent_tray.hpp:181
+
bool string2wstring(const std::string &str, std::wstring &wstr)
Converts a UTF-8 encoded string to a wide string.
Definition: fluent_tray.hpp:81
+
void split_bits(InType input, OutType &upper, OutType &lower) noexcept
Divides the input value into upper and lower bits.
Definition: fluent_tray.hpp:165
+
constexpr int type2bit() noexcept
Calculate the number of bits of type.
Definition: fluent_tray.hpp:152
+
unsigned char rgb2gray(const COLORREF &rgb)
Calculate grayscale value from RGB.
Definition: fluent_tray.hpp:194
Base namespace.
-
TrayStatus
Current tray status.
Definition fluent_tray.hpp:212
+
TrayStatus
Current tray status.
Definition: fluent_tray.hpp:216
@ STOPPED
The tray is stopped successfully.
@ RUNNING
The tray is working properly.
@ SHOULD_STOP
The tray is trying to exit successfully.
@@ -1454,7 +1347,7 @@
diff --git a/docs/folderclosed.png b/docs/folderclosed.png new file mode 100644 index 0000000..bb8ab35 Binary files /dev/null and b/docs/folderclosed.png differ diff --git a/docs/folderopen.png b/docs/folderopen.png new file mode 100644 index 0000000..d6c7f67 Binary files /dev/null and b/docs/folderopen.png differ diff --git a/docs/functions.html b/docs/functions.html index 8d8e478..7c3891b 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: Class Members - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */
@@ -61,125 +57,197 @@
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
Here is a list of all class members with links to the classes they belong to:
-

- a -

diff --git a/docs/functions_func.html b/docs/functions_func.html index a59b803..a243577 100644 --- a/docs/functions_func.html +++ b/docs/functions_func.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: Class Members - Functions - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */

@@ -61,125 +57,197 @@
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
-
Here is a list of all functions with links to the classes they belong to:
+  -

- a -

diff --git a/docs/globals.html b/docs/globals.html index 7a65989..323b122 100644 --- a/docs/globals.html +++ b/docs/globals.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: File Members - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */
@@ -61,26 +57,21 @@
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
Here is a list of all file members with links to the files they belong to:
diff --git a/docs/globals_defs.html b/docs/globals_defs.html index 45c9ff6..69b3fbd 100644 --- a/docs/globals_defs.html +++ b/docs/globals_defs.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: File Members - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */
@@ -61,26 +57,21 @@
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
-
Here is a list of all macros with links to the files they belong to:
diff --git a/docs/index.html b/docs/index.html index 4ed867a..d7856b5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,17 +1,14 @@ - + - - + + -fluent-tray: fluent-tray - +fluent-tray: Main Page - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */

@@ -61,23 +57,17 @@
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+
-
-
fluent-tray
+
+
+
fluent-tray Documentation
-

+

fluent-tray

@@ -86,9 +76,9 @@

fluent-tray

:fire:Warning: This project is still under development. Do not use it in a production environment.:fire:

-

Coverity Scan Build Status
+

Coverity Scan Build Status Coveralls

-

+

Concept

fluent-tray provides a simple system tray icon and menu to easily create resident applications that do not require complex windows. Since only the native API is used, all you have to do is include a single header file.

@@ -103,12 +93,12 @@

int main()
{
-
using namespace fluent_tray ;
+
using namespace fluent_tray ;
-
FluentTray tray{} ;
+
FluentTray tray{} ;
// Initialize the tray icon.
-
tray.create_tray("demo", "demo/assets/icon.ico") ;
+
tray.create_tray("demo", "demo/assets/icon.ico") ;
// Add menus in order from the top.
tray.add_menu("Home", "demo/assets/fa-home.ico") ;
@@ -129,8 +119,6 @@

return 0 ;
}
-
Class with information on the entire tray.
Definition fluent_tray.hpp:651
-
bool create_tray(const std::string &app_name, const std::string &icon_path="", 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)
Initialize tray and create icon on tray.
Definition fluent_tray.hpp:736
Fluent Design-based GUI Library for System Tray Applications.
Base namespace.

@@ -141,18 +129,17 @@

$ ./build/Debug/fluent-tray-demo.exe

Test

-
$ cmake -B build_test test
+
$ cmake -B build_test tests
$ cmake --build build_test
$ ctest -C Debug --test-dir build_test --output-on-failure

License

This library is provided by pit-ray under the MIT License.

-
diff --git a/docs/jquery.js b/docs/jquery.js index 1dffb65..103c32d 100644 --- a/docs/jquery.js +++ b/docs/jquery.js @@ -1,11 +1,12 @@ -/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=y.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return y("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),h.offset(y.extend(l,{using:t}))})},y.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,h=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),y.ui.plugin={add:function(t,e,i){var s,n=y.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n
").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&y(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){y(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,h=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this._addedHandles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=y(this.handles[e]),this._on(this.handles[e],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=y(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=y(this.handles[e])[0])!==t.target&&!y.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=y(s.containment).scrollLeft()||0,i+=y(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(y.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,h=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,r=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),h&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),h&&i&&(t.top=r-e.minHeight),n&&i&&(t.top=r-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e
").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){y.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(e){var i=y(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=n?0:i.sizeDiff.width,n={width:i.size.width-h,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(y.extend(n,o&&h?{top:o,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&y(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=y(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,h=o instanceof y?o.get(0):/parent/.test(o)?e.parent().get(0):o;h&&(n.containerElement=y(h),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(i=y(h),s=[],y(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(h,"left")?h.scrollWidth:o,e=n._hasScroll(h)?h.scrollHeight:e,n.parentData={element:h,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=y(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,h={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(h=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-h.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-h.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-h.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=y(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=y(t.helper),h=o.offset(),a=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var t=y(this).resizable("instance").options;y(t.alsoResize).each(function(){var t=y(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=y(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,h={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};y(s.alsoResize).each(function(){var t=y(this),s=y(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(e,function(t,e){var i=(s[e]||0)+(h[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var t=y(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=y(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=y(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var t,e=y(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,h=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,r=a[0]||1,l=a[1]||1,u=Math.round((s.width-n.width)/r)*r,p=Math.round((s.height-n.height)/l)*l,d=n.width+u,c=n.height+p,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>c;i.grid=a,m&&(d+=r),s&&(c+=l),f&&(d-=r),g&&(c-=l),/^(se|s|e)$/.test(h)?(e.size.width=d,e.size.height=c):/^(ne)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.top=o.top-p):/^(sw)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.left=o.left-u):((c-l<=0||d-r<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element +},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/** * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler * Licensed under MIT * @author Ariel Flesler diff --git a/docs/menu.js b/docs/menu.js index 717761d..2fe2214 100644 --- a/docs/menu.js +++ b/docs/menu.js @@ -24,18 +24,11 @@ */ function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { function makeTree(data,relPath) { - let result=''; + var result=''; if ('children' in data) { result+='
    '; - for (let i in data.children) { - let url; - const link = data.children[i].url; - if (link.substring(0,1)=='^') { - url = link.substring(1); - } else { - url = relPath+link; - } - result+='
  • '+ + for (var i in data.children) { + result+='
  • '+ data.children[i].text+''+ makeTree(data.children[i],relPath)+'
  • '; } @@ -43,91 +36,15 @@ function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { } return result; } - let searchBoxHtml; - if (searchEnabled) { - if (serverSide) { - searchBoxHtml='
    '+ - '
    '+ - '
     '+ - ''+ - '
    '+ - '
    '+ - '
    '+ - '
    '; - } else { - searchBoxHtml='
    '+ - ''+ - ' '+ - ''+ - ''+ - ''+ - ''+ - ''+ - '
    '; - } - } - $('#main-nav').before('
    '+ - ''+ - ''+ - '
    '); $('#main-nav').append(makeTree(menudata,relPath)); $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); - if (searchBoxHtml) { - $('#main-menu').append('
  • '); - } - const $mainMenuState = $('#main-menu-state'); - let prevWidth = 0; - if ($mainMenuState.length) { - const initResizableIfExists = function() { - if (typeof initResizable==='function') initResizable(); - } - // animate mobile menu - $mainMenuState.change(function() { - const $menu = $('#main-menu'); - let options = { duration: 250, step: initResizableIfExists }; - if (this.checked) { - options['complete'] = () => $menu.css('display', 'block'); - $menu.hide().slideDown(options); - } else { - options['complete'] = () => $menu.css('display', 'none'); - $menu.show().slideUp(options); - } - }); - // set default menu visibility - const resetState = function() { - const $menu = $('#main-menu'); - const newWidth = $(window).outerWidth(); - if (newWidth!=prevWidth) { - if ($(window).outerWidth()<768) { - $mainMenuState.prop('checked',false); $menu.hide(); - $('#searchBoxPos1').html(searchBoxHtml); - $('#searchBoxPos2').hide(); - } else { - $menu.show(); - $('#searchBoxPos1').empty(); - $('#searchBoxPos2').html(searchBoxHtml); - $('#searchBoxPos2').show(); - } - if (typeof searchBox!=='undefined') { - searchBox.CloseResultsWindow(); - } - prevWidth = newWidth; - } + if (searchEnabled) { + if (serverSide) { + $('#main-menu').append('
  • '); + } else { + $('#main-menu').append('
  • '); } - $(window).ready(function() { resetState(); initResizableIfExists(); }); - $(window).resize(resetState); } $('#main-menu').smartmenus(); } diff --git a/docs/namespacefluent__tray.html b/docs/namespacefluent__tray.html index a6d7466..4ff7c89 100644 --- a/docs/namespacefluent__tray.html +++ b/docs/namespacefluent__tray.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: fluent_tray Namespace Reference - - - @@ -22,9 +19,9 @@
    - + -
    +
    fluent-tray
    Fluent Design-based GUI Library for System Tray Applications
    @@ -34,22 +31,21 @@
    - + +/* @license-end */
    -
    -
    -
    -
    -
    Loading...
    -
    Searching...
    -
    No Matches
    -
    -
    -
    +
    @@ -78,20 +67,21 @@ Namespaces | Classes | Enumerations
-
fluent_tray Namespace Reference
+
+
fluent_tray Namespace Reference

Base namespace. -More...

+More...

- - +

+

Namespaces

namespace  util
 util
 Utility namespace.
 
- @@ -100,21 +90,21 @@

+

Classes

class  FluentMenu
 Class with information on each menu. More...
 Class with information on the entire tray. More...
 
- - - +

+

Enumerations

enum class  TrayStatus : unsigned char { RUNNING -, SHOULD_STOP -, FAILED -, STOPPED +
enum class  TrayStatus : unsigned char { RUNNING +, SHOULD_STOP +, FAILED +, STOPPED }
 Current tray status. More...
 Current tray status. More...
 

Detailed Description

Base namespace.

Enumeration Type Documentation

- -

◆ TrayStatus

+ +

◆ TrayStatus

@@ -123,7 +113,7 @@

- +
enum class fluent_tray::TrayStatus : unsigned charenum fluent_tray::TrayStatus : unsigned char
@@ -135,13 +125,13 @@

-EnumeratorRUNNING 

The tray is working properly.

+EnumeratorRUNNING 

The tray is working properly.

-SHOULD_STOP 

The tray is trying to exit successfully.

+SHOULD_STOP 

The tray is trying to exit successfully.

-FAILED 

The tray has errors.

+FAILED 

The tray has errors.

-STOPPED 

The tray is stopped successfully.

+STOPPED 

The tray is stopped successfully.

@@ -150,7 +140,7 @@

diff --git a/docs/namespacefluent__tray_1_1util.html b/docs/namespacefluent__tray_1_1util.html index f6be9a5..0722e91 100644 --- a/docs/namespacefluent__tray_1_1util.html +++ b/docs/namespacefluent__tray_1_1util.html @@ -1,17 +1,14 @@ - + - - + + fluent-tray: fluent_tray::util Namespace Reference - - - @@ -22,9 +19,9 @@
- + -
+
fluent-tray
Fluent Design-based GUI Library for System Tray Applications
@@ -34,22 +31,21 @@
- + +/* @license-end */
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
+