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 is contained in:
2014-02-23 16:25:16 +01:00
parent 2b65f1d1b3
commit f813b9ea98
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();