19 Function(
const std::function<
void()>& callable);
21 Function(
const std::string& functionName,
const std::string& moduleName);
30 std::vector<std::pair<uint32_t, Function>> popupMenuItems;
32 uint16_t trayIconResource;
33 bool alwaysShowTrayIcon;
36 virtual void onDestroyEvent();
38 virtual void createMarkup();
40 virtual LRESULT windowMessagesHandle(HWND handle, UINT message, WPARAM wparam, LPARAM lparam,
bool& isUsed)
override;
49 BaseMainWindow(
const std::wstring& className,
const std::wstring& titleName,
const utility::ComponentSettings& settings,
const std::string& windowFunctionName, uint16_t trayIconResource,
bool alwaysShowTray =
false,
bool maximize =
false,
bool minimize =
false,
const std::string& moduleName =
"", uint16_t smallIconResource = NULL, uint16_t largeIconResource = NULL);
51 void initTray(uint16_t trayIconResource,
bool alwaysShowTrayIcon);
56 bool addTrayMenuItem(
const std::wstring& text,
const std::function<
void()>& onClick, uint32_t* menuItemId =
nullptr);
61 bool addTrayMenuItem(
const std::wstring& text,
const std::string& functionName,
const std::string& moduleName, uint32_t* menuItemId =
nullptr);
66 bool removeTrayMenuItem(
const std::wstring& text);
72 void sendTrayMessage(uint32_t
id);
74 virtual size_t getHash()
const override;
76 virtual json::JSONBuilder getStructure()
const override;
Setup for main application window.
bool addTrayMenuItem(const std::wstring &text, const std::string &functionName, const std::string &moduleName, uint32_t *menuItemId=nullptr)
Add tray menu text item. Works only if non NULL value passed in trayIconResource in contructor.
bool addTrayMenuItem(const std::wstring &text, const std::function< void()> &onClick, uint32_t *menuItemId=nullptr)
Add tray menu text item. Works only if non NULL value passed in trayIconResource in contructor.
std::function< void()> callable
Function(const std::string &functionName, const std::string &moduleName)
Function(const std::function< void()> &callable)