2006-07-05 21:36:56 +00:00
|
|
|
#ifndef _STATIMAGELOADER_H_
|
|
|
|
#define _STATIMAGELOADER_H_
|
|
|
|
|
2006-07-10 13:41:10 +00:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
|
|
#pragma interface "sg_StatImageLoader.cpp"
|
|
|
|
#endif
|
2006-07-05 21:36:56 +00:00
|
|
|
|
|
|
|
#include "sg_SkinClass.h"
|
|
|
|
|
|
|
|
class StatImageLoader : public wxWindow
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//members
|
|
|
|
wxMenu *statPopUpMenu;
|
|
|
|
//Skin Class
|
|
|
|
SkinClass *appSkin;
|
2006-07-11 23:19:53 +00:00
|
|
|
std::string m_prjUrl;
|
2006-07-05 21:36:56 +00:00
|
|
|
/// Constructors
|
2006-07-31 13:59:21 +00:00
|
|
|
StatImageLoader(wxWindow* parent, std::string url);
|
2006-09-15 16:47:04 +00:00
|
|
|
void LoadImage(std::string project_icon, wxBitmap* defaultImage);
|
2006-07-10 13:41:10 +00:00
|
|
|
void CreateMenu();
|
|
|
|
void OnMenuLinkClicked(wxCommandEvent& event);
|
2006-07-20 17:57:23 +00:00
|
|
|
void OnProjectDetach();
|
2006-07-05 21:36:56 +00:00
|
|
|
void PopUpMenu(wxMouseEvent& event);
|
2006-09-08 21:48:06 +00:00
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
void RebuildMenu();
|
|
|
|
void UpdateInterface();
|
2006-07-05 21:36:56 +00:00
|
|
|
private:
|
|
|
|
//private memb
|
|
|
|
wxBitmap Bitmap;
|
2006-08-26 04:17:56 +00:00
|
|
|
std::string projectIcon;
|
|
|
|
int numReloadTries;
|
2006-09-08 21:48:06 +00:00
|
|
|
size_t urlCount;
|
2006-08-26 04:17:56 +00:00
|
|
|
wxTimer* attemptToReloadTimer;
|
2006-09-15 16:47:04 +00:00
|
|
|
void LoadStatIcon(wxBitmap& image);
|
2006-08-26 04:17:56 +00:00
|
|
|
void CheckForProjectIconDownloaded(wxTimerEvent& WXUNUSED(event));
|
2006-07-05 21:36:56 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|