Main Page Namespace List Class Hierarchy Alphabetical List Data Structures File List Data Fields Globals

# iehtmlwin.h

Go to the documentation of this file.

    00001
    00004 #ifndef _IEHTMLWIN_H_
    00005 #define _IEHTMLWIN_H_
    00006 #pragma warning( disable : 4101 4786)
    00007 #pragma warning( disable : 4786)
    00008
    00009
    00010 #include <wx/setup.h>
    00011 #include <wx/wx.h>
    00012 #include <exdisp.h>
    00013 #include <iostream>
    00014 using namespace std;
    00015
    00016 #include "wxactivex.h"
    00017
    00018
    00019 enum wxIEHtmlRefreshLevel
    00020 {
    00021         wxIEHTML_REFRESH_NORMAL = 0,
    00022         wxIEHTML_REFRESH_IFEXPIRED = 1,
    00023         wxIEHTML_REFRESH_CONTINUE = 2,
    00024         wxIEHTML_REFRESH_COMPLETELY = 3
    00025 };
    00026
    00027 class IStreamAdaptorBase;
    00028
    00029 class wxIEHtmlWin : public wxActiveX
    00030 {
    00031 public:
    00032     wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1,
    00033         const wxPoint& pos = wxDefaultPosition,
    00034         const wxSize& size = wxDefaultSize,
    00035         long style = 0,
    00036         const wxString& name = wxPanelNameStr);
    00037         virtual ~wxIEHtmlWin();
    00038
    00039         void LoadUrl(const wxString&);
    00040     bool LoadString(wxString html);
    00041     bool LoadStream(istream *strm);
    00042     bool LoadStream(wxInputStream *is);
    00043
    00044         void SetCharset(wxString charset);
    00045     void SetEditMode(bool seton);
    00046     bool GetEditMode();
    00047     wxString GetStringSelection(bool asHTML = false);
    00048         wxString GetText(bool asHTML = false);
    00049
    00050         bool GoBack();
    00051         bool GoForward();
    00052         bool GoHome();
    00053         bool GoSearch();
    00054         bool Refresh(wxIEHtmlRefreshLevel level);
    00055         bool Stop();
    00056
    00057         DECLARE_EVENT_TABLE();
    00058
    00059 protected:
    00060     void SetupBrowser();
    00061     bool LoadStream(IStreamAdaptorBase *pstrm);
    00062
    00063         wxAutoOleInterface<IWebBrowser2>                m_webBrowser;
    00064 };
    00065
    00066 #endif /* _IEHTMLWIN_H_ */