void LogPanel::addLog(const wchar_t * msg, int level) { if (level < this->level) return; Log::addLog(msg, level); //ListBox_AddString( logWnd->getListBoxHWnd(), msg); //ODRRef r=ODRRef(new IconTextElementContainer(std::wstring(msg), -1)); ODRRef r=ODRRef(new LogMessage(msg, level)); odrLog->addODR(r, true); }
bool VirtualListView::moveCursorEnd() { if (odrlist.get()==NULL) return false; if (odrlist->empty()) { cursorPos=ODRRef(); } else { cursorPos=odrlist->back(); } cursorFit(); return true; }
DiscoListView::DiscoListView( HWND parent, const std::string & title ) { parentHWnd=parent; init(); SetParent(thisHWnd, parent); this->title=utf8::utf8_wchar(title); wt=WndTitleRef(new WndTitle(this, 0)); cursorPos=ODRRef();//odrlist->front(); odrlist=ODRListRef(new ODRList()); }
ODRRef VirtualListView::moveCursorTo( int x, int y ) { y+=winTop; if (y<0) return ODRRef(); if (!odrlist) return ODRRef(); int yTop=0; for (ODRList::const_iterator i = odrlist->begin(); i!=odrlist->end(); i++ ) { int yBot=yTop+i->get()->getHeight(); if (yTop<=y) { if (yBot>y) { cursorPos=*i; cursorFit(); return cursorPos; } } yTop=yBot; } return ODRRef(); }
void LogPanel::addLog(const wchar_t * msg) { //ListBox_AddString( logWnd->getListBoxHWnd(), msg); //ODRRef r=ODRRef(new IconTextElementContainer(std::wstring(msg), -1)); ODRRef r=ODRRef(new LogMessage(msg)); odrLog->addODR(r, true); }
void ChatView::addMessage(const std::string & msg) { /*std::wstring umsg=utf8::utf8_wchar(msg); ODRRef r=ODRRef(new IconTextElementContainer(umsg, -1));*/ ODRRef r=ODRRef(new MessageElement(msg)); msgList->addODR(r, true); }