added public methods to select parts of displayed page
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -185,7 +185,8 @@ bool wxHtmlWindow::Create(wxWindow *parent, wxWindowID id,
|
||||
long style, const wxString& name)
|
||||
{
|
||||
if (!wxScrolledWindow::Create(parent, id, pos, size,
|
||||
style | wxVSCROLL | wxHSCROLL, name))
|
||||
style | wxVSCROLL | wxHSCROLL,
|
||||
name))
|
||||
return FALSE;
|
||||
|
||||
m_Style = style;
|
||||
@@ -1242,6 +1243,8 @@ void wxHtmlWindow::OnDoubleClick(wxMouseEvent& event)
|
||||
}
|
||||
|
||||
void wxHtmlWindow::SelectWord(const wxPoint& pos)
|
||||
{
|
||||
if ( m_Cell )
|
||||
{
|
||||
wxHtmlCell *cell = m_Cell->FindCellByPos(pos.x, pos.y);
|
||||
if ( cell )
|
||||
@@ -1253,8 +1256,11 @@ void wxHtmlWindow::SelectWord(const wxPoint& pos)
|
||||
wxSize(cell->GetWidth(), cell->GetHeight())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void wxHtmlWindow::SelectLine(const wxPoint& pos)
|
||||
{
|
||||
if ( m_Cell )
|
||||
{
|
||||
wxHtmlCell *cell = m_Cell->FindCellByPos(pos.x, pos.y);
|
||||
if ( cell )
|
||||
@@ -1306,6 +1312,19 @@ void wxHtmlWindow::SelectLine(const wxPoint& pos)
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void wxHtmlWindow::SelectAll()
|
||||
{
|
||||
if ( m_Cell )
|
||||
{
|
||||
delete m_selection;
|
||||
m_selection = new wxHtmlSelection();
|
||||
m_selection->Set(m_Cell->GetFirstTerminal(), m_Cell->GetLastTerminal());
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_CLIPBOARD
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user