fixed clearing of background areas

This commit is contained in:
louis 2016-03-06 07:42:29 +01:00
parent 85d260d292
commit c9be985391
11 changed files with 30 additions and 31 deletions

View File

@ -246,8 +246,8 @@ void cArea::Close(void) {
init = true;
}
void cArea::Clear(void) {
if (!init && isBackgroundArea) {
void cArea::Clear(bool forceClearBackground) {
if (!init && isBackgroundArea && !forceClearBackground) {
return;
}
StopBlinkers();
@ -685,9 +685,9 @@ void cAreaContainer::Close(void) {
}
}
void cAreaContainer::Clear(void) {
void cAreaContainer::Clear(bool forceClearBackground) {
for (cArea *area = areas.First(); area; area = areas.Next(area)) {
area->Clear();
area->Clear(forceClearBackground);
}
}

View File

@ -44,7 +44,7 @@ public:
virtual void Cache(void) {};
virtual void Close(void) {};
virtual void StopBlinkers(void) {};
virtual void Clear(void) {};
virtual void Clear(bool forceClearBackground = false) {};
virtual void Hide(void) {};
virtual void Show(void) {};
virtual void Render(void) {};
@ -104,7 +104,7 @@ public:
void Cache(void);
int GetWidth(void) { return attribs->Width(); };
void Close(void);
void Clear(void);
void Clear(bool forceClearBackground = false);
void Hide(void);
void Show(void);
void Render(void);
@ -162,7 +162,7 @@ public:
void SetHeight(int height);
void Cache(void);
void Close(void);
void Clear(void);
void Clear(bool forceClearBackground = false);
void Hide(void);
void Show(void);
void Render(void);

View File

@ -39,11 +39,11 @@ void cListElement::Close(void) {
dirty = false;
}
void cListElement::Clear(void) {
void cListElement::Clear(bool forceClearBackground) {
if (current && currentElement) {
currentElement->Close();
}
cViewElement::Clear();
cViewElement::Clear(forceClearBackground);
dirty = false;
}
@ -318,7 +318,7 @@ void cLeMenuDefault::CheckProgressBar(const char *text, int tab) {
tokenContainer->AddIntToken(32 + tab, len);
}
void cLeMenuDefault::Clear(void) {
void cLeMenuDefault::Clear(bool forceClearBackground) {
if (current && currentElement) {
currentElement->Close();
}

View File

@ -30,7 +30,7 @@ public:
bool DoScroll(void) { return current; };
virtual void RenderCurrent(void) { };
void Close(void);
virtual void Clear(void);
virtual void Clear(bool forceClearBackground = false);
};
/******************************************************************
@ -70,7 +70,7 @@ public:
void SetPlugin(const char *plugName) { this->plugName = plugName; };
void SetTokenContainer(void);
bool Parse(bool forced = true);
void Clear(void);
void Clear(bool forceClearBackground = false);
};
/******************************************************************

View File

@ -201,10 +201,10 @@ bool cView::Init(void) {
return sdOsd.CreateOsd(osdX, osdY, osdWidth, osdHeight);
}
void cView::Clear(int ve) {
void cView::Clear(int ve, bool forceClearBackground) {
if (!viewElements[ve])
return;
viewElements[ve]->Clear();
viewElements[ve]->Clear(forceClearBackground);
}
void cView::Render(int ve, bool force) {

View File

@ -74,7 +74,7 @@ public:
virtual int GetListWidth(void) { return 0; };
//View API
virtual bool Init(void);
void Clear(int ve);
void Clear(int ve, bool forceClearBackground = false);
void Render(int ve, bool force = false);
virtual void Close(void);
virtual void Flush(void);

View File

@ -37,7 +37,7 @@ void cViewDetail::ResetTabs(void) {
activeTabIndex = -1;
}
void cViewDetail::Clear(void) {
void cViewDetail::Clear(bool forceClearBackground) {
cViewElement::Close();
}

View File

@ -22,7 +22,7 @@ public:
void SetPlugMenuId(int id) { plugMenuId = id; };
int GetWidth(void);
void ResetTabs(void);
void Clear(void);
void Clear(bool forceClearBackground = false);
void Close(void);
void Render(void);
void Scrollbar(int &barheight, int &offset, bool &end);

View File

@ -123,16 +123,16 @@ void cViewChannel::SetChannel(const cChannel *channel, int number) {
veEcmInfo->Set(channel);
} else {
displayChannelGroups = true;
Clear((int)eVeDisplayChannel::channelinfo);
Clear((int)eVeDisplayChannel::epginfo);
Clear((int)eVeDisplayChannel::statusinfo);
Clear((int)eVeDisplayChannel::progressbar);
Clear((int)eVeDisplayChannel::screenresolution);
Clear((int)eVeDisplayChannel::signalquality);
Clear((int)eVeDisplayChannel::audioinfo);
Clear((int)eVeDisplayChannel::ecminfo);
Clear((int)eVeDisplayChannel::devices);
Clear((int)eVeDisplayChannel::customtokens);
Clear((int)eVeDisplayChannel::channelinfo, true);
Clear((int)eVeDisplayChannel::epginfo, true);
Clear((int)eVeDisplayChannel::statusinfo, true);
Clear((int)eVeDisplayChannel::progressbar, true);
Clear((int)eVeDisplayChannel::screenresolution, true);
Clear((int)eVeDisplayChannel::signalquality, true);
Clear((int)eVeDisplayChannel::audioinfo, true);
Clear((int)eVeDisplayChannel::ecminfo, true);
Clear((int)eVeDisplayChannel::devices, true);
Clear((int)eVeDisplayChannel::customtokens, true);
if (veChannelGroup)
veChannelGroup->Set(channel);
}
@ -169,7 +169,6 @@ void cViewChannel::Flush(void) {
if (init) {
sdOsd.LockFlush();
Render((int)eVeDisplayChannel::background);
Render((int)eVeDisplayChannel::progressbar);
Render((int)eVeDisplayChannel::currentweather);
}

View File

@ -265,12 +265,12 @@ bool cViewElement::Execute(void) {
return attribs->DoExecute();
}
void cViewElement::Clear(void) {
void cViewElement::Clear(bool forceClearBackground) {
tokenContainer->Clear();
for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) {
node->StopBlinkers();
sdOsd->Lock();
node->Clear();
node->Clear(forceClearBackground);
sdOsd->Unlock();
}
dirty = false;

View File

@ -62,7 +62,7 @@ public:
void Cache(void);
virtual void Close(void);
void StopBlinking(void);
virtual void Clear(void);
virtual void Clear(bool forceClearBackground = false);
void Hide(void);
void Show(void);
void WakeUp(void);