|
KiCad PCB EDA Suite
|
wxDataViewCtrl renderer that draws [label](url) markup as clickable link runs inline with plain text. More...
#include <wx_data_view_hyperlink_renderer.h>
Classes | |
| struct | RUN |
Public Member Functions | |
| HYPERLINK_DV_RENDERER () | |
| bool | SetValue (const wxVariant &aValue) override |
| bool | GetValue (wxVariant &aValue) const override |
| wxSize | GetSize () const override |
| bool | Render (wxRect aCell, wxDC *aDC, int aState) override |
| bool | HitTestRunsForCell (const wxString &aValue, const wxRect &aCell, const wxPoint &aPoint, wxString *aHref) const |
| Hit-test aPoint against the link runs of aValue laid out in aCell. | |
Static Public Member Functions | |
| static void | ParseRuns (const wxString &aValue, std::vector< RUN > &aRuns) |
| Split aValue into plain text and link runs. | |
| static bool | IsSafeUrl (const wxString &aHref) |
| Accept only schemes that wxLaunchDefaultBrowser cannot turn into program execution. | |
| static wxString | StripMarkup (const wxString &aValue) |
| Flatten [label](url) markup, keeping just the label. | |
Private Attributes | |
| wxString | m_value |
| std::vector< RUN > | m_runs |
| wxFont | m_renderFont |
wxDataViewCtrl renderer that draws [label](url) markup as clickable link runs inline with plain text.
Definition at line 35 of file wx_data_view_hyperlink_renderer.h.
| HYPERLINK_DV_RENDERER::HYPERLINK_DV_RENDERER | ( | ) |
Definition at line 168 of file wx_data_view_hyperlink_renderer.cpp.
|
override |
Definition at line 189 of file wx_data_view_hyperlink_renderer.cpp.
|
override |
Definition at line 182 of file wx_data_view_hyperlink_renderer.cpp.
References m_value.
| bool HYPERLINK_DV_RENDERER::HitTestRunsForCell | ( | const wxString & | aValue, |
| const wxRect & | aCell, | ||
| const wxPoint & | aPoint, | ||
| wxString * | aHref ) const |
Hit-test aPoint against the link runs of aValue laid out in aCell.
Definition at line 263 of file wx_data_view_hyperlink_renderer.cpp.
References m_renderFont, and ParseRuns().
|
static |
Accept only schemes that wxLaunchDefaultBrowser cannot turn into program execution.
Definition at line 85 of file wx_data_view_hyperlink_renderer.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), and ParseRuns().
|
static |
Split aValue into plain text and link runs.
Definition at line 128 of file wx_data_view_hyperlink_renderer.cpp.
References end, and IsSafeUrl().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), HitTestRunsForCell(), SetValue(), and StripMarkup().
|
override |
Definition at line 212 of file wx_data_view_hyperlink_renderer.cpp.
References m_renderFont, and m_runs.
|
override |
Definition at line 174 of file wx_data_view_hyperlink_renderer.cpp.
References m_runs, m_value, and ParseRuns().
|
static |
Flatten [label](url) markup, keeping just the label.
Definition at line 114 of file wx_data_view_hyperlink_renderer.cpp.
References ParseRuns(), and result.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), RC_ITEM::GetJsonViolation(), PCB_MARKER::GetMsgPanelInfo(), SCH_MARKER::GetMsgPanelInfo(), RC_ITEM::ShowReport(), DRC_REPORT::WriteJsonReport(), and DRC_REPORT::WriteTextReport().
|
private |
Definition at line 68 of file wx_data_view_hyperlink_renderer.h.
Referenced by HitTestRunsForCell(), and Render().
|
private |
Definition at line 67 of file wx_data_view_hyperlink_renderer.h.
Referenced by GetSize(), Render(), and SetValue().
|
private |
Definition at line 66 of file wx_data_view_hyperlink_renderer.h.
Referenced by GetSize(), GetValue(), and SetValue().