예제 #1
0
파일: LogPanel.cpp 프로젝트: evgs/bombus-ng
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);
}
예제 #2
0
bool VirtualListView::moveCursorEnd() {
    if (odrlist.get()==NULL) return false;
    if (odrlist->empty()) {
        cursorPos=ODRRef();
    } else {
        cursorPos=odrlist->back();
    }
    cursorFit();
    return true;
}
예제 #3
0
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());
}
예제 #4
0
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();
}
예제 #5
0
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);
}
예제 #6
0
파일: ChatView.cpp 프로젝트: evgs/bombus-ng
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);
}