mirror of
				https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
				synced 2023-10-19 15:58:31 +00:00 
			
		
		
		
	fixed clearing of background areas
This commit is contained in:
		| @@ -246,8 +246,8 @@ void cArea::Close(void) { | |||||||
|     init = true; |     init = true; | ||||||
| } | } | ||||||
|  |  | ||||||
| void cArea::Clear(void) { | void cArea::Clear(bool forceClearBackground) { | ||||||
|     if (!init && isBackgroundArea) { |     if (!init && isBackgroundArea && !forceClearBackground) { | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
|     StopBlinkers(); |     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)) { |     for (cArea *area = areas.First(); area; area = areas.Next(area)) { | ||||||
|         area->Clear(); |         area->Clear(forceClearBackground); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -44,7 +44,7 @@ public: | |||||||
|     virtual void Cache(void) {}; |     virtual void Cache(void) {}; | ||||||
|     virtual void Close(void) {}; |     virtual void Close(void) {}; | ||||||
|     virtual void StopBlinkers(void) {}; |     virtual void StopBlinkers(void) {}; | ||||||
|     virtual void Clear(void) {}; |     virtual void Clear(bool forceClearBackground = false) {}; | ||||||
|     virtual void Hide(void) {}; |     virtual void Hide(void) {}; | ||||||
|     virtual void Show(void) {}; |     virtual void Show(void) {}; | ||||||
|     virtual void Render(void) {}; |     virtual void Render(void) {}; | ||||||
| @@ -104,7 +104,7 @@ public: | |||||||
|     void Cache(void); |     void Cache(void); | ||||||
|     int GetWidth(void) { return attribs->Width(); }; |     int GetWidth(void) { return attribs->Width(); }; | ||||||
|     void Close(void); |     void Close(void); | ||||||
|     void Clear(void); |     void Clear(bool forceClearBackground = false); | ||||||
|     void Hide(void); |     void Hide(void); | ||||||
|     void Show(void); |     void Show(void); | ||||||
|     void Render(void); |     void Render(void); | ||||||
| @@ -162,7 +162,7 @@ public: | |||||||
|     void SetHeight(int height); |     void SetHeight(int height); | ||||||
|     void Cache(void); |     void Cache(void); | ||||||
|     void Close(void); |     void Close(void); | ||||||
|     void Clear(void); |     void Clear(bool forceClearBackground = false); | ||||||
|     void Hide(void); |     void Hide(void); | ||||||
|     void Show(void); |     void Show(void); | ||||||
|     void Render(void); |     void Render(void); | ||||||
|   | |||||||
| @@ -39,11 +39,11 @@ void cListElement::Close(void) { | |||||||
|     dirty = false; |     dirty = false; | ||||||
| } | } | ||||||
|  |  | ||||||
| void cListElement::Clear(void) { | void cListElement::Clear(bool forceClearBackground) { | ||||||
|     if (current && currentElement) { |     if (current && currentElement) { | ||||||
|         currentElement->Close(); |         currentElement->Close(); | ||||||
|     } |     } | ||||||
|     cViewElement::Clear(); |     cViewElement::Clear(forceClearBackground); | ||||||
|     dirty = false; |     dirty = false; | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -318,7 +318,7 @@ void cLeMenuDefault::CheckProgressBar(const char *text, int tab) { | |||||||
|     tokenContainer->AddIntToken(32 + tab, len); |     tokenContainer->AddIntToken(32 + tab, len); | ||||||
| } | } | ||||||
|  |  | ||||||
| void cLeMenuDefault::Clear(void) { | void cLeMenuDefault::Clear(bool forceClearBackground) { | ||||||
|     if (current && currentElement) { |     if (current && currentElement) { | ||||||
|         currentElement->Close(); |         currentElement->Close(); | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ public: | |||||||
|     bool DoScroll(void) { return current; }; |     bool DoScroll(void) { return current; }; | ||||||
|     virtual void RenderCurrent(void) { }; |     virtual void RenderCurrent(void) { }; | ||||||
|     void Close(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 SetPlugin(const char *plugName) { this->plugName = plugName; }; | ||||||
|     void SetTokenContainer(void); |     void SetTokenContainer(void); | ||||||
|     bool Parse(bool forced = true); |     bool Parse(bool forced = true); | ||||||
|     void Clear(void); |     void Clear(bool forceClearBackground = false); | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /****************************************************************** | /****************************************************************** | ||||||
|   | |||||||
| @@ -201,10 +201,10 @@ bool cView::Init(void) { | |||||||
|     return sdOsd.CreateOsd(osdX, osdY, osdWidth, osdHeight); |     return sdOsd.CreateOsd(osdX, osdY, osdWidth, osdHeight); | ||||||
| } | } | ||||||
|  |  | ||||||
| void cView::Clear(int ve) { | void cView::Clear(int ve, bool forceClearBackground) { | ||||||
|     if (!viewElements[ve]) |     if (!viewElements[ve]) | ||||||
|         return; |         return; | ||||||
|     viewElements[ve]->Clear();     |     viewElements[ve]->Clear(forceClearBackground); | ||||||
| } | } | ||||||
|  |  | ||||||
| void cView::Render(int ve, bool force) { | void cView::Render(int ve, bool force) { | ||||||
|   | |||||||
| @@ -74,7 +74,7 @@ public: | |||||||
|     virtual int GetListWidth(void) { return 0; }; |     virtual int GetListWidth(void) { return 0; }; | ||||||
|     //View API |     //View API | ||||||
|     virtual bool Init(void); |     virtual bool Init(void); | ||||||
|     void Clear(int ve); |     void Clear(int ve, bool forceClearBackground = false); | ||||||
|     void Render(int ve, bool force = false); |     void Render(int ve, bool force = false); | ||||||
|     virtual void Close(void); |     virtual void Close(void); | ||||||
|     virtual void Flush(void); |     virtual void Flush(void); | ||||||
|   | |||||||
| @@ -37,7 +37,7 @@ void cViewDetail::ResetTabs(void) { | |||||||
|     activeTabIndex = -1; |     activeTabIndex = -1; | ||||||
| } | } | ||||||
|  |  | ||||||
| void cViewDetail::Clear(void) { | void cViewDetail::Clear(bool forceClearBackground) { | ||||||
|     cViewElement::Close();     |     cViewElement::Close();     | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ public: | |||||||
|     void SetPlugMenuId(int id) { plugMenuId = id; }; |     void SetPlugMenuId(int id) { plugMenuId = id; }; | ||||||
|     int GetWidth(void); |     int GetWidth(void); | ||||||
|     void ResetTabs(void); |     void ResetTabs(void); | ||||||
|     void Clear(void); |     void Clear(bool forceClearBackground = false); | ||||||
|     void Close(void); |     void Close(void); | ||||||
|     void Render(void); |     void Render(void); | ||||||
|     void Scrollbar(int &barheight, int &offset, bool &end); |     void Scrollbar(int &barheight, int &offset, bool &end); | ||||||
|   | |||||||
| @@ -123,16 +123,16 @@ void cViewChannel::SetChannel(const cChannel *channel, int number) { | |||||||
|                 veEcmInfo->Set(channel); |                 veEcmInfo->Set(channel); | ||||||
|         } else { |         } else { | ||||||
|             displayChannelGroups = true; |             displayChannelGroups = true; | ||||||
|             Clear((int)eVeDisplayChannel::channelinfo); |             Clear((int)eVeDisplayChannel::channelinfo, true); | ||||||
|             Clear((int)eVeDisplayChannel::epginfo); |             Clear((int)eVeDisplayChannel::epginfo, true); | ||||||
|             Clear((int)eVeDisplayChannel::statusinfo); |             Clear((int)eVeDisplayChannel::statusinfo, true); | ||||||
|             Clear((int)eVeDisplayChannel::progressbar); |             Clear((int)eVeDisplayChannel::progressbar, true); | ||||||
|             Clear((int)eVeDisplayChannel::screenresolution); |             Clear((int)eVeDisplayChannel::screenresolution, true); | ||||||
|             Clear((int)eVeDisplayChannel::signalquality); |             Clear((int)eVeDisplayChannel::signalquality, true); | ||||||
|             Clear((int)eVeDisplayChannel::audioinfo); |             Clear((int)eVeDisplayChannel::audioinfo, true); | ||||||
|             Clear((int)eVeDisplayChannel::ecminfo); |             Clear((int)eVeDisplayChannel::ecminfo, true); | ||||||
|             Clear((int)eVeDisplayChannel::devices); |             Clear((int)eVeDisplayChannel::devices, true); | ||||||
|             Clear((int)eVeDisplayChannel::customtokens); |             Clear((int)eVeDisplayChannel::customtokens, true); | ||||||
|             if (veChannelGroup) |             if (veChannelGroup) | ||||||
|                 veChannelGroup->Set(channel); |                 veChannelGroup->Set(channel); | ||||||
|         } |         } | ||||||
| @@ -169,7 +169,6 @@ void cViewChannel::Flush(void) { | |||||||
|     if (init) { |     if (init) { | ||||||
|         sdOsd.LockFlush(); |         sdOsd.LockFlush(); | ||||||
|         Render((int)eVeDisplayChannel::background); |         Render((int)eVeDisplayChannel::background); | ||||||
|         Render((int)eVeDisplayChannel::progressbar); |  | ||||||
|         Render((int)eVeDisplayChannel::currentweather); |         Render((int)eVeDisplayChannel::currentweather); | ||||||
|     } |     } | ||||||
|      |      | ||||||
|   | |||||||
| @@ -265,12 +265,12 @@ bool cViewElement::Execute(void) { | |||||||
|     return attribs->DoExecute(); |     return attribs->DoExecute(); | ||||||
| } | } | ||||||
|  |  | ||||||
| void cViewElement::Clear(void) { | void cViewElement::Clear(bool forceClearBackground) { | ||||||
|     tokenContainer->Clear(); |     tokenContainer->Clear(); | ||||||
|     for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) { |     for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) { | ||||||
|         node->StopBlinkers(); |         node->StopBlinkers(); | ||||||
|         sdOsd->Lock(); |         sdOsd->Lock(); | ||||||
|         node->Clear(); |         node->Clear(forceClearBackground); | ||||||
|         sdOsd->Unlock(); |         sdOsd->Unlock(); | ||||||
|     } |     } | ||||||
|     dirty = false; |     dirty = false; | ||||||
|   | |||||||
| @@ -62,7 +62,7 @@ public: | |||||||
|     void Cache(void); |     void Cache(void); | ||||||
|     virtual void Close(void); |     virtual void Close(void); | ||||||
|     void StopBlinking(void); |     void StopBlinking(void); | ||||||
|     virtual void Clear(void); |     virtual void Clear(bool forceClearBackground = false); | ||||||
|     void Hide(void); |     void Hide(void); | ||||||
|     void Show(void); |     void Show(void); | ||||||
|     void WakeUp(void); |     void WakeUp(void); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user