Add some missing methods to match other implementations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
8998887c22
commit
f2641bc2bf
@ -22,18 +22,21 @@ class WXDLLEXPORT wxMenu;
|
||||
class WXDLLEXPORT wxTaskBarIcon : public wxTaskBarIconBase
|
||||
{
|
||||
public:
|
||||
//type of taskbar item to create
|
||||
//type of taskbar item to create
|
||||
//TODO: currently only DOCK is implemented
|
||||
enum wxTaskBarIconType
|
||||
{
|
||||
DOCK,
|
||||
STATUSITEM,
|
||||
MENUEXTRA
|
||||
};
|
||||
|
||||
enum wxTaskBarIconType
|
||||
{
|
||||
DOCK,
|
||||
STATUSITEM,
|
||||
MENUEXTRA
|
||||
};
|
||||
|
||||
wxTaskBarIcon(const wxTaskBarIconType& nType = DOCK);
|
||||
virtual ~wxTaskBarIcon();
|
||||
|
||||
inline bool IsOk() const { return true; }
|
||||
inline bool IsIconInstalled() const { return m_iconAdded; }
|
||||
|
||||
//TODO: not tested extensively
|
||||
bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString);
|
||||
bool RemoveIcon();
|
||||
@ -43,14 +46,15 @@ public:
|
||||
bool PopupMenu(wxMenu *menu);
|
||||
|
||||
//internal functions - don't call
|
||||
void SetInternalEvent(void* pEvent);
|
||||
void SetInternalEvent(void* pEvent);
|
||||
wxMenu* GetCurrentMenu();
|
||||
|
||||
protected:
|
||||
wxTaskBarIconType m_nType;
|
||||
void* m_pEvent;
|
||||
wxTaskBarIconType m_nType;
|
||||
void* m_pEvent;
|
||||
wxMenu* m_pMenu;
|
||||
|
||||
bool m_iconAdded;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
|
||||
};
|
||||
#endif
|
||||
|
@ -103,7 +103,7 @@ pascal OSStatus wxDockEventHandler( EventHandlerCallRef inHandlerCallRef,
|
||||
DEFINE_ONE_SHOT_HANDLER_GETTER( wxDockEventHandler );
|
||||
|
||||
wxTaskBarIcon::wxTaskBarIcon(const wxTaskBarIconType& nType)
|
||||
: m_nType(nType), m_pEvent(NULL), m_pMenu(NULL)
|
||||
: m_nType(nType), m_pEvent(NULL), m_pMenu(NULL), m_iconAdded(false)
|
||||
{
|
||||
//Register the events that will return the dock menu
|
||||
EventTypeSpec tbEventList[] = { { kEventClassCommand, kEventProcessCommand },
|
||||
@ -166,6 +166,7 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
|
||||
|
||||
wxASSERT(err == 0);
|
||||
|
||||
m_iconAdded = true;
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
@ -206,4 +207,4 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu)
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif //wxHAS_TASK_BAR_ICON
|
||||
#endif //wxHAS_TASK_BAR_ICON
|
||||
|
Loading…
Reference in New Issue
Block a user