41 int d = int(sqrt(dist)/4);
42 int r = col.
Red() + d;
43 int g = col.
Green() + d;
44 int b = col.
Blue() + d;
45 return wxColour( r>255 ? 255 : r, g>255 ? 255 : g, b>255 ? 255 : b );
51 control(
nullptr), fixed(fixedPitchFont)
77 int size = cfgman->
ReadInt(
_T(
"/log_font_size"), platform::macosx ? 10 : 8);
80 wxFont bold_font(default_font);
81 wxFont italic_font(default_font);
85 wxFont bigger_font(bold_font);
88 wxFont small_font(default_font);
99 style[i].SetFont(default_font);
101 style[i].SetTextColour(default_text_colour);
128 control->SetFont(default_font);
136 fputs(wxSafeConvertWX2MB(msg.
wc_str()), lv <
error ? stdout : stderr);
137 fputs(::newline_string.mb_str(), lv <
error ? stdout : stderr);
141 ::temp_string.assign(msg);
142 ::temp_string.append(
_T(
"\n"));
147 control->AppendText(::newline_string);
150 control->AppendText(::temp_string);
153 control->AppendText(::newline_string);
158 control->AppendText(::temp_string);
195 long ctrl_style =
control->GetWindowStyle();
204 long ctrl_style =
control->GetWindowStyle();
221 control->SetWindowStyleFlag(ctrl_style);
227 control->SetWindowStyleFlag(ctrl_style);
231 control->SetWindowStyleFlag(ctrl_style);
244 control->AppendText(::temp_string);
249 fixed(fixedPitchFont),
276 if (platform::windows)
296 li_info.m_itemId = item;
303 text << li_info.m_text <<
_T(
'|');
314 int size = cfgman->
ReadInt(
_T(
"/log_font_size"), platform::macosx ? 10 : 8);
316 wxFont bold_font(default_font);
317 wxFont italic_font(default_font);
321 wxFont bigger_font(bold_font);
324 wxFont small_font(default_font);
354 control->SetFont(default_font);
388 for (
size_t i = 1; i < colValues.
GetCount(); ++i)
441 error (
_T(
"margin-left: 2em; border-left: 1px solid ")),
446 asterisk (
_T(
"font-family: Arial, Helvetica, \"Bitstream Vera Sans\", sans;"))
468 fputs(wxSafeConvertWX2MB(msg.
wc_str()), f.fp());
469 fputs(::newline_string.mb_str(), f.fp());
478 fputs(
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-US\" lang=\"en-US\">\n<head>\n<title>Build log</title>\n<style>\n", f.fp());
481 fprintf(f.fp(),
"* { %s }\n", (
wxStringSucks) wxSafeConvertWX2MB(css.asterisk.wc_str()));
483 fprintf(f.fp(),
"h1 { %s }\n", (
wxStringSucks) wxSafeConvertWX2MB(css.pagetitle.wc_str()));
485 fprintf(f.fp(),
"h2 { %s }\n", (
wxStringSucks) wxSafeConvertWX2MB(css.caption.wc_str()));
487 fprintf(f.fp(),
".info { %s }\n", (
wxStringSucks) wxSafeConvertWX2MB(css.info.wc_str()));
489 fprintf(f.fp(),
".warn { %s }\n", (
wxStringSucks) wxSafeConvertWX2MB(css.warning.wc_str()));
491 fprintf(f.fp(),
".error { %s }\n", (
wxStringSucks) wxSafeConvertWX2MB(css.error.wc_str()));
493 fprintf(f.fp(),
".success { %s }\n", (
wxStringSucks) wxSafeConvertWX2MB(css.success.wc_str()));
495 fprintf(f.fp(),
".failure { %s }\n", (
wxStringSucks) wxSafeConvertWX2MB(css.failure.wc_str()));
497 fprintf(f.fp(),
".critical { %s }\n", (
wxStringSucks) wxSafeConvertWX2MB(css.critical.wc_str()));
498 fputs(
"</style>\n</head>\n\n<body>", f.fp());
503 fputs(
"</body>\n</html>\n", f.fp());
void Append(const wxString &msg, Logger::level lv=info) override
const char * wxStringSucks
wxString GetItemAsText(long item) const
ConfigManager * GetConfigManager(const wxString &name_space) const
int ReadInt(const wxString &name, int defaultVal=0)
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
long GetNextItem(long item, int geometry=wxLIST_NEXT_ALL, int state=wxLIST_STATE_DONTCARE) const
virtual unsigned char Red() const
virtual void ToggleWrapMode()
#define wxLIST_STATE_SELECTED
wxWindow * CreateControl(wxWindow *parent) override
virtual void SetPointSize(int pointSize)
void Append(const wxString &msg, Logger::level lv=info) override
virtual size_t GetItemsCount() const
wxFont GetItemFont(long item) const
virtual void SetWeight(wxFontWeight weight)
virtual void Open(const wxString &filename)
~TextCtrlLogger() override
long InsertItem(wxListItem &info)
void SetItemFont(long item, const wxFont &font)
void Append(const wxString &msg, Logger::level lv=info) override
bool HasFeature(Feature::Enum feature) const override
void CopyContentsToClipboard(bool selectionOnly=false) override
bool HasFeature(Feature::Enum feature) const override
wxColour GetColour(const wxString &id) const
void Open(const wxString &filename) override
TextCtrlLogger(bool fixedPitchFont=false)
void Append(const wxString &msg, Logger::level lv) override
virtual unsigned char Green() const
void SetItemTextColour(long item, const wxColour &col)
const wxSize wxDefaultSize
const wxPoint wxDefaultPosition
unsigned short GetSecond(const TimeZone &tz=Local) const
bool GetWrapMode() const override
void UpdateSettings() override
static wxColour GetColour(wxSystemColour index)
HTMLFileLogger(const wxString &filename)
virtual unsigned char Blue() const
const wchar_t * wc_str() const
~ListCtrlLogger() override
virtual void SetUnderlined(bool underlined)
wxWindow * CreateControl(wxWindow *parent) override
wxArray< int > wxArrayInt
ListCtrlLogger(const wxArrayString &titles, const wxArrayInt &widths, bool fixedPitchFont=false)
ColourManager * GetColourManager() const
unsigned short GetMillisecond(const TimeZone &tz=Local) const
virtual void SetStyle(wxFontStyle style)
unsigned short GetMinute(const TimeZone &tz=Local) const
ListStyles style[num_levels]
long InsertColumn(long col, const wxListItem &info)
virtual void AutoFitColumns(int column)
bool SetItem(wxListItem &info)
bool SetColumnWidth(int col, int width)
wxTextAttr style[num_levels]
unsigned short GetHour(const TimeZone &tz=Local) const
virtual wxString GetAsString(long flags=wxC2S_NAME|wxC2S_CSS_SYNTAX) const
void UpdateSettings() override
void CopyContentsToClipboard(bool selectionOnly=false) override
wxColour BlendTextColour(wxColour col)
bool GetItem(wxListItem &info) const