23#include <wx/settings.h>
24#include <wx/textctrl.h>
26#include <wx/clipbrd.h>
32 const wxSize& size,
long style ) :
35 m_immediateMode( false )
39 Bind( wxEVT_SYS_COLOUR_CHANGED,
66 popup.Append( wxID_COPY,
"Copy" );
73 if( event.GetId() == wxID_COPY )
77 if( wxTheClipboard->Open() )
79 bool primarySelection = wxTheClipboard->IsUsingPrimarySelection();
80 wxTheClipboard->UsePrimarySelection(
false );
81 wxTheClipboard->SetData(
new wxTextDataObject( SelectionToText() ) );
82 wxTheClipboard->Flush();
83 wxTheClipboard->Close();
84 wxTheClipboard->UsePrimarySelection( primarySelection );
98 GetScrollPixelsPerUnit( &px, &py );
99 GetVirtualSize( &x, &y );
100 Scroll( -1, y * py );
128 wxFont font = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
129 int additionalLineSpacing =
KiROUND( font.GetPixelSize().y * 0.6 );
131 return wxString::Format( wxT(
"<img align=texttop height=%d width=0 src=#>%s<br>" ),
132 additionalLineSpacing, aLine );
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
Add dark theme support to wxHtmlWindow.
bool SetPage(const wxString &aSource) override
A pure virtual class used to derive REPORTER objects from.
void onMenuEvent(wxMenuEvent &event)
void onRightClick(wxMouseEvent &event)
std::vector< wxString > m_messages
void Clear()
Delete the stored messages.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
bool m_immediateMode
copy of the report, stored for filtering
void Flush()
Build the HTML messages page.
WX_HTML_REPORT_BOX(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(500, 300), long style=wxTAB_TRAVERSAL)
wxString generateHtml(const wxString &aLine)
void onThemeChanged(wxSysColourChangedEvent &aEvent)