wxWidgets 에서 wxHtmlWindow 에
tag를 추가 하는 cpp 만들기.
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_HTML && wxUSE_STREAMS
#ifndef WX_PRECOMP
#include "wx/textctrl.h"
#include "wx/html/htmlwin.h"
#include "wx/html/m_templ.h"
#endif
TAG_HANDLER_BEGIN(MYBIND, "MYBIND")
TAG_HANDLER_PROC(tag)
{
wxWindow *wnd;
int ax, ay;
int fl = 0;
tag.ScanParam(wxT("X"), wxT("%i"), &ax);
tag.ScanParam(wxT("Y"), wxT("%i"), &ay);
if (tag.HasParam(wxT("FLOAT"))) fl = ax;
wnd = new wxTextCtrl(
m_WParser->GetWindow(),
wxID_ANY,
tag.GetParam(wxT("NAME")),
wxPoint(0,0),
wxSize(ax, ay),
wxTE_MULTILINE
);
wnd->Show(true);
m_WParser->GetContainer()->InsertCell(new wxHtmlWidgetCell(wnd, fl));
return false;
}
TAG_HANDLER_END(MYBIND)
TAGS_MODULE_BEGIN(MyBind)
TAGS_MODULE_ADD(MYBIND)
TAGS_MODULE_END(MyBind)
#endif
tag를 추가 하는 cpp 만들기.
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_HTML && wxUSE_STREAMS
#ifndef WX_PRECOMP
#include "wx/textctrl.h"
#include "wx/html/htmlwin.h"
#include "wx/html/m_templ.h"
#endif
TAG_HANDLER_BEGIN(MYBIND, "MYBIND")
TAG_HANDLER_PROC(tag)
{
wxWindow *wnd;
int ax, ay;
int fl = 0;
tag.ScanParam(wxT("X"), wxT("%i"), &ax);
tag.ScanParam(wxT("Y"), wxT("%i"), &ay);
if (tag.HasParam(wxT("FLOAT"))) fl = ax;
wnd = new wxTextCtrl(
m_WParser->GetWindow(),
wxID_ANY,
tag.GetParam(wxT("NAME")),
wxPoint(0,0),
wxSize(ax, ay),
wxTE_MULTILINE
);
wnd->Show(true);
m_WParser->GetContainer()->InsertCell(new wxHtmlWidgetCell(wnd, fl));
return false;
}
TAG_HANDLER_END(MYBIND)
TAGS_MODULE_BEGIN(MyBind)
TAGS_MODULE_ADD(MYBIND)
TAGS_MODULE_END(MyBind)
#endif