const wxPoint& pos,
const wxMouseEvent& event)
{
- wxCHECK_MSG( window, false, _T("window interface must be provided") );
+ wxCHECK_MSG( window, false, wxT("window interface must be provided") );
#if WXWIN_COMPATIBILITY_2_6
// NB: this hack puts the body of ProcessMouseClick() into OnMouseClick()
void wxHtmlCell::OnMouseClick(wxWindow *, int, int, const wxMouseEvent& event)
{
- wxCHECK_RET( gs_helperOnMouseClick, _T("unexpected call to OnMouseClick") );
+ wxCHECK_RET( gs_helperOnMouseClick, wxT("unexpected call to OnMouseClick") );
wxHtmlWindowInterface *window = gs_helperOnMouseClick->window;
const wxPoint& pos = gs_helperOnMouseClick->pos;
#endif // WXWIN_COMPATIBILITY_2_6
void wxHtmlCell::SetLink(const wxHtmlLinkInfo& link)
{
- if (m_Link) delete m_Link;
- m_Link = NULL;
+ wxDELETE(m_Link);
if (link.GetHref() != wxEmptyString)
m_Link = new wxHtmlLinkInfo(link);
}
}
}
- wxFAIL_MSG(_T("Cells are in different trees"));
+ wxFAIL_MSG(wxT("Cells are in different trees"));
return false;
}
if (m_Border == 1)
{
- // draw thin border using lines
+ // draw thin border using lines
wxPen mypen1(m_BorderColour1, 1, wxPENSTYLE_SOLID);
wxPen mypen2(m_BorderColour2, 1, wxPENSTYLE_SOLID);
dc.DrawLine(xlocal, ylocal + m_Height - 1, xlocal + m_Width, ylocal + m_Height - 1);
}
else if (m_Border> 0)
- {
+ {
wxBrush mybrush1(m_BorderColour1, wxBRUSHSTYLE_SOLID);
wxBrush mybrush2(m_BorderColour2, wxBRUSHSTYLE_SOLID);
-
+
// draw upper left corner
// 0---------------5
// | /
// | |
// | 2
// |/
- // 1
+ // 1
wxPoint poly[6];
poly[0].x =m_PosX; poly[0].y = m_PosY ;
dc.SetBrush(mybrush1);
dc.SetPen(*wxTRANSPARENT_PEN);
dc.DrawPolygon(6, poly, x, y);
-
+
// draw lower right corner reusing point 1,2,4 and 5
// 5
// /|
poly[3].x = poly[4].x; poly[3].y = poly[2].y;
dc.DrawPolygon(6, poly, x, y);
- // smooth color transition like firefox
+ // smooth color transition like firefox
wxColour borderMediumColour(
(m_BorderColour1.Red() + m_BorderColour2.Red()) /2 ,
(m_BorderColour1.Green() + m_BorderColour2.Green()) /2 ,
- (m_BorderColour1.Blue() + m_BorderColour2.Blue()) /2
+ (m_BorderColour1.Blue() + m_BorderColour2.Blue()) /2
);
wxPen mypen3(borderMediumColour, 1, wxPENSTYLE_SOLID);
dc.SetPen(mypen3);
void wxHtmlContainerCell::OnMouseClick(wxWindow*,
int, int, const wxMouseEvent& event)
{
- wxCHECK_RET( gs_helperOnMouseClick, _T("unexpected call to OnMouseClick") );
+ wxCHECK_RET( gs_helperOnMouseClick, wxT("unexpected call to OnMouseClick") );
wxHtmlWindowInterface *window = gs_helperOnMouseClick->window;
const wxPoint& pos = gs_helperOnMouseClick->pos;
#endif // WXWIN_COMPATIBILITY_2_6
wxScrolledWindow *scrolwin =
wxDynamicCast(m_Wnd->GetParent(), wxScrolledWindow);
wxCHECK_RET( scrolwin,
- _T("widget cells can only be placed in wxHtmlWindow") );
+ wxT("widget cells can only be placed in wxHtmlWindow") );
scrolwin->GetViewStart(&stx, &sty);
m_Wnd->SetSize(absx - wxHTML_SCROLL_STEP * stx,