#include "wx/dcmemory.h"
#include "wx/timer.h"
#include "wx/settings.h"
+ #include "wx/dataobj.h"
#endif
#include "wx/html/htmlwin.h"
#include "wx/html/htmlproc.h"
#include "wx/clipbrd.h"
-#include "wx/dataobj.h"
#include "wx/arrimpl.cpp"
#include "wx/listimpl.cpp"
m_HistoryOn = true;
m_History = new wxHtmlHistoryArray;
m_Processors = NULL;
- m_Style = 0;
SetBorders(10);
m_selection = NULL;
m_makingSelection = false;
name))
return false;
- m_Style = style;
SetPage(wxT("<html><body></body></html>"));
return true;
}
if (!m_Cell) return;
- if (m_Style & wxHW_SCROLLBAR_NEVER)
+ if ( HasFlag(wxHW_SCROLLBAR_NEVER) )
{
SetScrollbars(1, 1, 0, 0); // always off
GetClientSize(&ClientWidth, &ClientHeight);
m_Cell->Layout(ClientWidth);
}
-
- else {
+ else // !wxHW_SCROLLBAR_NEVER
+ {
GetClientSize(&ClientWidth, &ClientHeight);
m_Cell->Layout(ClientWidth);
if (ClientHeight < m_Cell->GetHeight() + GetCharHeight())
bool wxHtmlWindow::IsSelectionEnabled() const
{
#if wxUSE_CLIPBOARD
- return !(m_Style & wxHW_NO_SELECTION);
+ return !HasFlag(wxHW_NO_SELECTION);
#else
return false;
#endif
wxHtmlWindowMouseHelper::HandleMouseClick(m_Cell, pos, event);
}
+#if wxUSE_CLIPBOARD
+void wxHtmlWindow::OnMouseCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event))
+{
+ if ( !m_makingSelection )
+ return;
+
+ // discard the selecting operation
+ m_makingSelection = false;
+ wxDELETE(m_selection);
+ m_tmpSelFromCell = NULL;
+ Refresh();
+}
+#endif // wxUSE_CLIPBOARD
void wxHtmlWindow::OnInternalIdle()
EVT_LEFT_DCLICK(wxHtmlWindow::OnDoubleClick)
EVT_ENTER_WINDOW(wxHtmlWindow::OnMouseEnter)
EVT_LEAVE_WINDOW(wxHtmlWindow::OnMouseLeave)
+ EVT_MOUSE_CAPTURE_LOST(wxHtmlWindow::OnMouseCaptureLost)
EVT_KEY_UP(wxHtmlWindow::OnKeyUp)
EVT_MENU(wxID_COPY, wxHtmlWindow::OnCopy)
#endif // wxUSE_CLIPBOARD
#if wxUSE_STATUSBAR
if (m_RelatedStatusBar != -1)
m_RelatedFrame->SetStatusText(text, m_RelatedStatusBar);
+#else
+ wxUnusedVar(text);
#endif // wxUSE_STATUSBAR
}