|
// ---------------------------------------------------------------------------
//
// Stool()
//
// Stool one element or the complete structure (if flag is > 0)
//
// param: trace_(int) Error_Fct trace level
// level (int) recursion level
// flag (int) recursion flag & counter
//
// return: (void)
//
// ----------------------------------------------------------------------------
void SliceO_Class::Stool( int trace, int level, unsigned char recurs )
{
// --- compute the indentation ---
char indent[80] = " " ;
for ( int i=0; i < MIN(level,16); i++ )
strcat( indent, " " ) ;
// --- Give some basic information (title, name...) ---
Error_Fct( hwnd, trace, "%s --> Class:\xF1%s\xF0 name:\xF1\001%s\002\xF0 (nb_child=\001%d\002)", indent,
this->Title_Get(), this->Name_Get(), m_child_nb ) ;
// --- Give the state of the "flag_lock" variable (only on if a problem has occurred) ---
if ( m_flag_lock )
Error_Fct( hwnd, trace, "%s ****** structure is locked! (lock=%d) ******", indent, m_flag_lock ) ;
// --- I need a pointer to the current window if there is one ---
SliceO_Window *Window_Cur = (SliceO_Window *) Fct_Variable_Value( "$WINDOW_CUR" ) ;
int window_id = 0 ;
if ( Window_Cur )
window_id = Window_Cur->Id_Get() ;
// --- If the class is visible, give its screen coord. inside the current window ---
if ( this->Flag_Get_Bit( CLASS_MODE_THIS, Window_Cur, CLASS_FLAG_VISIBLE ) )
Error_Fct( hwnd, trace, "%s inside: %.2f, %.2f, %.2f, %.2f", indent,
m_inside[window_id][0], m_inside[window_id][1], m_inside[window_id][2], m_inside[window_id][3] ) ;
else
Error_Fct( hwnd, trace, "%s not visible", indent ) ;
// --- Also stool any "User" structures and variables ---
User_Stool( trace, level ) ;
if ( recurs )
for ( int k=0; k < m_child_nb; k++ )
m_child_pt[k]->Stool( trace, level+1, recurs ) ;
}
|