]> git.saurik.com Git - wxWidgets.git/blame - wxPython/contrib/iewin/readme.txt
compilation error fix (trailing comma in an enum)
[wxWidgets.git] / wxPython / contrib / iewin / readme.txt
CommitLineData
c731eb47
RD
1Lindsay Mathieson
2Email : <lmathieson@optusnet.com.au>
3
4This is prelimanary stuff - the controls need extra methods and events etc,
5feel free to email with suggestions &/or patches.
6
7Tested with wxWindows 2.3.2.
8Built with MS Visual C++ 6.0 & DevStudio
9Minor use of templates and STL
10
11-----------------------------------------------------------
12This sample illustrates using wxActiveX and wxIEHtmlWin too:
131. Host an arbitrary ActiveX control
142. Specifically host the MSHTML Control
15
16
17wxActiveX:
18==========
19wxActiveX is used to host and siplay any activeX control, all the wxWindows developer
20needs to know is either the ProgID or CLSID of the control in question.
21
22Derived From:
23- wxWindow
24
25Include Files:
26- wxactivex.h
27
28Source Files:
29- wxactivex.cpp
30
31Event Handling:
32---------------
33- None currently
34
35Members:
36--------
37wxActiveX::wxActiveX(wxWindow * parent, REFCLSID clsid, wxWindowID id = -1);
38- Creates a activeX control identified by clsid
39e.g
40 wxFrame *frame = new wxFrame(this, -1, "test");
41 wxActiveX *X = new wxActiveX(frame, CLSID_WebBrowser);
42
43wxActiveX::wxActiveX(wxWindow * parent, wxString progId, wxWindowID id = -1);
44- Creates a activeX control identified by progId
45e.g.
46 wxFrame *frame = new wxFrame(this, -1, "test");
47 wxActiveX *X = new wxActiveX(frame, "MSCAL.Calendar");
48
49
50wxActiveX::~wxActiveX();
51- Destroys the control
52- disconnects all connection points
53
54HRESULT wxActiveX::ConnectAdvise(REFIID riid, IUnknown *eventSink);
55- Connects a event sink. Connections are automaticlly diconnected in the destructor
56e.g.
57 FS_DWebBrowserEvents2 *events = new FS_DWebBrowserEvents2(iecontrol);
58 hret = iecontrol->ConnectAdvise(DIID_DWebBrowserEvents2, events);
59 if (! SUCCEEDED(hret))
60 delete events;
61
62
63
64
65wxIEHtmlWin:
66============
67wxIEHtmlWin is a specialisation of the wxActiveX control for hosting the MSHTML control.
68
69Derived From:
70- wxActiveX
71- wxWindow
72
73Event Handling:
74---------------
75- class wxMSHTMLEvent
76
77- EVT_MSHTML_BEFORENAVIGATE2
78* url = event.m_text1
79* event.Veto() to cancel
80Generated before an attempt to browse a new url
81
82- EVT_MSHTML_NEWWINDOW2
83* event.Veto() to cancel
84Generated when the control is asked create a new window (e.g a popup)
85
86- EVT_MSHTML_DOCUMENTCOMPLETE
87* url = event.m_text1
88Generated after the document has finished loading
89
90- EVT_MSHTML_PROGRESSCHANGE
91* event.m_long1 = progress so far
92* event.m_long2 = max range of progress
93
94- EVT_MSHTML_STATUSTEXTCHANGE
95* status = event.m_text1
96
97- EVT_MSHTML_TITLECHANGE
98* title = event.m_text1
99
100Members:
101--------
102wxIEHtmlWin::wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1);
103- Constructs and initialises the MSHTML control
104- LoadUrl("about:blank") is called
105
106wxIEHtmlWin::~wxIEHtmlWin();
107- destroys the control
108
109void wxIEHtmlWin::LoadUrl(const wxString&);
110- Attempts to browse to the url, the control uses its internal (MS)
111 network streams
112
113bool wxIEHtmlWin::LoadString(wxString html);
114- Load the passed HTML string
115
116bool wxIEHtmlWin::LoadStream(istream *strm);
117- load the passed HTML stream. The control takes ownership of
118 the pointer, deleting when finished.
119
120void wxIEHtmlWin::SetCharset(wxString charset);
121- Sets the charset of the loaded document
122
123void wxIEHtmlWin::SetEditMode(bool seton);
124- Sets edit mode.
125 NOTE: This does work, but is bare bones - we need more events exposed before
126 this is usable as an HTML editor.
127
128bool wxIEHtmlWin::GetEditMode();
129- Returns the edit mode setting
130
131wxString wxIEHtmlWin::GetStringSelection(bool asHTML = false);
132- Returns the currently selected text (plain or HTML text)
133
134wxString GetText(bool asHTML = false);
135- Returns the body text (plain or HTML text)
136
137Lindsay Mathieson
138Email : <lmathieson@optusnet.com.au>