: m_Filter(eShowAll), m_Cache(500)
87 if(!wxListCtrl::Create(parent,
id, pos,
size, style|wxLC_REPORT|wxLC_VIRTUAL))
90 #ifdef __WXOSX_COCOA__ 91SetBackgroundStyle(wxBG_STYLE_COLOUR);
92SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
95this->InsertColumn(0,
wxT(
"Message"));
96this->InsertColumn(1,
wxT(
"Time"));
97this->InsertColumn(2,
wxT(
"Source"));
99this->SetColumnWidth(0, 320);
100this->SetColumnWidth(1, 64);
101this->SetColumnWidth(2, 400);
126 for(
size_tpos = 0, pos2;; pos = pos2 + 1) {
127pos2 =
msg.find_first_of(wxChar(
'\n'), pos);
129 return msg.substr(pos, pos2 - pos);
132 if(pos2 == wxString::npos)
137 for(
i= 0;
i<
str.Length(); ++
i) {
138 if(
str[
i] == wxChar(
'\t'))
140 else if(
str[
i] == wxChar(
' '))
156 if(item < 0 || (
size_t)item >=
m_Items.size())
157 returnwxEmptyString;
162 if(get<1>(index) > 0)
170retVal =
wxT(
"Error: ") +
str;
173retVal =
wxT(
"Warning: ") +
str;
176retVal =
wxT(
"Info: ") +
str;
179retVal =
wxT(
"Other: ") +
str;
188 void*
data= anEvt.GetClientData();
189unique_ptr<wxMenu> menu(
data? (wxMenu*)
data:
newwxMenu());
194anEvt.SetClientData(menu.get());
199anEvt.SetClientData(
NULL);
202PopupMenu(menu.get());
207aMenu.Append( wxID_SEPARATOR,
wxT(
"Edit") );
214 if(item < 0 || (
size_t)item >=
m_Items.size())
223 if(item < 0 || (
size_t)item >=
m_Items.size())
224 returnwxEmptyString;
234 returnwxEmptyString;
243 size_t i, total, buffered;
248 for(
i= total - buffered;
i< total; ++
i) {
256 switch(
msg.severity) {
273 size_tlines =
s_CountLines(wxString::FromUTF8(
msg.message.c_str()));
279SetItemCount((
long)
m_Items.size());
280SetColumnWidth(1, wxLIST_AUTOSIZE);
282EnsureVisible((
long)(
m_Items.size()-1));
289 size_t i, total, buffered;
292 boolupdate =
false;
303 for(;
i< total; ++
i) {
311 switch(
msg.severity) {
328 size_tlines =
s_CountLines(wxString::FromUTF8(
msg.message.c_str()));
336SetItemCount((
long)
m_Items.size());
337SetColumnWidth(1, wxLIST_AUTOSIZE);
339EnsureVisible((
long)(
m_Items.size()-1));
406 if(it->second.m_AccessTime < it_erase->second.m_AccessTime)
418wxString
text= wxString::FromUTF8(
msg.message.c_str());
424 switch(
msg.severity) {
440item.
m_Message=
wxT(
"Wrong item requested (problem with the console view).");
444 return m_Data[index] = item;
CEvent - generic event implementation TODO TODO - Attachments.
void ConnectToControl(wxListCtrl &listCtrl)
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
static CGuiRegistry & GetInstance()
access the application-wide singleton
CRegistryReadView GetReadView(const string §ion) const
get a read-only view at a particular level.
class CRegistryReadView provides a nested hierarchical view at a particular key.
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
void Set(const string &key, int val)
access a named key at this level, with no recursion
static CUICommandRegistry & GetInstance()
the main instance associated with the application
wxMenuItem * AppendMenuItem(wxMenu &menu, TCmdID cmd_id) const
an event for child notification
CwxLogDiagHandler - provides a centralized logging facility that integrates both with C++ Toolkit (CD...
bool GetMessage(size_t index, SMessage &msg, size_t &total) const
void GetMsgCount(size_t &total, size_t &buffered)
static CwxLogDiagHandler * GetInstance()
container_type::iterator iterator
const_iterator begin() const
const_iterator end() const
const_iterator find(const key_type &key) const
static size_t s_CountLines(const wxString &msg)
static wxString s_GetLine(const wxString &msg, size_t line)
static const char * kFilterTag
static const char * str(char *buf, int n)
static const char * column
@ eDiag_Info
Informational message.
@ eDiag_Error
Error message.
@ eDiag_Warning
Warning message.
const CItem & x_GetItem(size_t index)
virtual wxString OnGetItemText(long item, long column) const
wxString GetItemRawMsg(long item) const
void OnContextMenu(wxContextMenuEvent &event)
CDiagConsoleCache m_Cache
virtual ~CDiagConsoleList()
void x_OnNewItem(CEvent *)
virtual void AppendMenuItems(wxMenu &aMenu)
int GetItemImage(size_t index)
CDiagConsoleCache.
wxString GetItemMessage(size_t index)
bool ShouldPropagateContextMenu() const
virtual void LoadSettings()
CFixGenericListCtrl m_FixGenericListCtrl
bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxBORDER_NONE)
Creation.
wxString GetItemTime(size_t index)
virtual int OnGetItemImage(long item) const
unsigned long m_AccessTime
void SetFilter(size_t filter)
virtual void SaveSettings() const
wxString GetItemSource(size_t index)
tuple< size_t, size_t > x_GetIndex(long item) const
virtual void RemoveListener(CEventHandler *listener)
Remove a listener.
#define ON_EVENT(type, id, handler)
#define END_EVENT_MAP()
Ends definition of Command Map.
#define BEGIN_EVENT_MAP(thisClass, baseClass)
Begins definition of Command Map for CEventHandler-derived class.
virtual void AddListener(CEventHandler *listener, int pool_name=ePool_Default)
Add a listener.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static void text(MDB_val *v)
const struct ncbi::grid::netcache::search::fields::SIZE size
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
wxString ToWxString(const string &s)
void CleanupSeparators(wxMenu &menu)
Removes extra separators (in the begining or at the end of the menu, ot those that precede other sepa...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4