summaryrefslogtreecommitdiff
path: root/glcdskin/display.c
blob: a926bd931628facb6fb209b3606cd6b502e454e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
 * GraphLCD skin library
 *
 * display.c  -  display class
 *
 * This file is released under the GNU General Public License. Refer
 * to the COPYING file distributed with this package.
 *
 * based on text2skin
 *
 */

#include "display.h"

namespace GLCD
{

cSkinDisplay::cSkinDisplay(cSkin * parent)
:   mSkin(parent),
    mId("")
{
}

void cSkinDisplay::Render(cBitmap * screen)
{
    for (uint32_t i = 0; i < NumObjects(); ++i)
        GetObject(i)->Render(screen);
}


bool cSkinDisplay::NeedsUpdate(uint64_t CurrentTime)
{
    for (uint32_t i = 0; i < NumObjects(); ++i) {
        if ( GetObject(i)->NeedsUpdate(CurrentTime) ) {
            return true;
        }
    }
    return false;
}


cSkinDisplays::cSkinDisplays(void)
{
}

cSkinDisplays::~cSkinDisplays()
{
    iterator it = begin();
    while (it != end())
    {
        delete (*it);
        it++;
    }
}

} // end of namespace