Browse CVS Repository
Contents of /malonnote/mnHtmlWindow.cpp
Parent Directory
| Revision Log
| Revision Graph
Revision 1.4 -
( show annotations)
( download)
( as text)
Wed Dec 28 01:49:51 2005 UTC
(18 years, 2 months ago)
by maloninc
Branch: MAIN
CVS Tags: rel_1_7_1, dev_1_6-0005, dev_1_6-0004, dev_1_6-0003, dev_1_6-0002, HEAD
Changes since 1.3: +14 -1 lines
File MIME type: text/x-c++src
Error occurred while calculating annotation data.
for WebKitCtrl
| 1 |
#include <wx/wx.h> |
| 2 |
#include "mnHtmlWindow.h" |
| 3 |
|
| 4 |
DEFINE_EVENT_TYPE(mnEVT_LINK_CLICK) |
| 5 |
|
| 6 |
#ifdef __WXMAC__ |
| 7 |
IMPLEMENT_DYNAMIC_CLASS(mnHtmlWindow, wxWebKitCtrl) |
| 8 |
#else |
| 9 |
IMPLEMENT_DYNAMIC_CLASS(mnHtmlWindow, wxHtmlWindow) |
| 10 |
#endif |
| 11 |
|
| 12 |
void mnHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) |
| 13 |
{ |
| 14 |
wxCommandEvent event(mnEVT_LINK_CLICK, GetId()); |
| 15 |
event.SetEventObject(this); |
| 16 |
event.SetString(link.GetHref()); |
| 17 |
GetEventHandler()->ProcessEvent(event); |
| 18 |
} |
| 19 |
|
| 20 |
#ifdef __WXMAC__ |
| 21 |
bool mnHtmlWindow::SetPage(const wxString& source) |
| 22 |
{ |
| 23 |
//wxLogMessage(wxT("[%s]"), source.c_str()); |
| 24 |
|
| 25 |
FILE* fp; |
| 26 |
fp = fopen("/tmp/malonnote.tmp", "w"); |
| 27 |
fwrite(source.mb_str(), source.Length(), 1, fp); |
| 28 |
fclose(fp); |
| 29 |
//SetPageSource((wxString&)source); |
| 30 |
LoadURL(wxT("file:///tmp/malonnote.tmp")); |
| 31 |
} |
| 32 |
#endif |
| |