CComponents: add member CheckFbData() for fbdata check

This check happens several times, therefore it is senseful, to move into own member.
Function returns false on error and is used here to show an error message if
something was wrong.
Such errors can happen on position or dimension errors e.g. out of screen or
too large display values.

Note: this is only an emergency helper for debugging on
fatal errors during developing of window stuff. Mostly errors
of this kind causing crashes and must be fixed.


Origin commit data
------------------
Branch: ni/coolstream
Commit: f813b9ea98
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-02-23 (Sun, 23 Feb 2014)

Origin message was:
------------------
CComponents: add member CheckFbData() for fbdata check

This check happens several times, therefore it is senseful, to move into own member.
Function returns false on error and is used here to show an error message if
something was wrong.
Such errors can happen on position or dimension errors e.g. out of screen or
too large display values.

Note: this is only an emergency helper for debugging on
fatal errors during developing of window stuff. Mostly errors
of this kind causing crashes and must be fixed.


------------------
This commit was generated by Migit
This commit is contained in:
2014-02-23 16:25:16 +01:00
parent 09bdd6f5a1
commit aa87ed10aa
2 changed files with 35 additions and 21 deletions

View File

@@ -104,6 +104,9 @@ class CComponents
///parameter do_save_bg=true, saves background of element to pixel buffer, this can be restore with hide()
void paintFbItems(bool do_save_bg = true);
///check current fbdtata position and dimensions, parameter fbdata is an element of v_fbdata, returns false on error
bool CheckFbData(const comp_fbdata_t& fbdata);
///clean up old screen buffer saved in v_fbdata
virtual void clearFbData();