summaryrefslogtreecommitdiff
path: root/views/displaychannelviewelements.c
blob: 7709b940b3edad90ff4686219be8c3153d13f498 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "displaychannelviewelements.h"

cViewElementDevices::cViewElementDevices(cTemplateViewElement *tmplViewElement) : cViewElement(tmplViewElement) {
    init = true;
}

void cViewElementDevices::Render(void) {
    map < string, vector< map< string, string > > > deviceLoopTokens;
    vector< map< string, string > > devices;

    if (init)
        InitDevices();
    bool changed = SetDevices(init, &intTokens, &devices);
    init = false;
    
    if (!changed)
        return;

    deviceLoopTokens.insert(pair< string, vector< map< string, string > > >("devices", devices));
    
    Clear();
    Draw(&deviceLoopTokens);
}