Rss::Blocks 0.2
a codeblocks plugin that shows rss feeds
|
00001 /*************************************************************** 00002 * Name: rsswindow.h 00003 * Purpose: rsswindow class definition 00004 * Author: Gabriel Espinoza 00005 * Created: 2011-02-27 00006 * Copyright: Gabriel Espinoza 00007 * License: GPLv3+ 00008 **************************************************************/ 00009 #ifndef RSSWINDOW_H 00010 #define RSSWINDOW_H 00011 00012 #include <wx/html/htmlwin.h> 00013 #include <wx/timer.h> 00014 #include "rsschannel.h" 00015 #include "virtuosonic.hpp" 00016 00017 namespace rssblocks { 00018 using virtuosonic::rsschannel; 00019 using virtuosonic::wxException; 00028 class rsswindow : public wxHtmlWindow 00029 { 00030 public: 00031 rsswindow(wxWindow* parent,wxWindowID id); 00032 ~rsswindow(); 00033 void InitUpdateTime(); 00034 00035 private: 00036 //event handlers 00037 void OnSearchUpdates(wxTimerEvent& event); 00038 //void OnNewFeed(wxCommandEvent& event); 00039 void OnLink(wxHtmlLinkEvent& event); 00040 void OnKey(wxKeyEvent& event); 00041 //private methods 00042 //downloads rss data 00043 void GetRss(const wxString& url); 00044 //update window 00045 void Update(rsschannel* channel); 00046 //generate html code 00047 wxString BuildHtml(rsschannel* channel) throw (wxException); 00048 //const 00049 static const long ID_RSSTIMER; 00050 static const long ID_RSSLINK; 00051 // 00052 rsschannel* m_channel; 00053 wxTimer timer1; 00054 DECLARE_EVENT_TABLE(); 00055 }; 00056 }//namespace rssblocks 00057 00058 #endif // RSSWINDOW_H