/*******************************************************************/
// "Меркурий"-"Правда" - open source переводчик
// распространяется в соответсвии с лицензией GNU v 2.0
//
// абстрактный класс окна
// Анисимов Д.В. сегодня
/*******************************************************************/
# include <string.h>
# include <video.h>
# include <color.h>
# include <window.h>
/***************************************************************************/
// абстрактный класс окна //
/***************************************************************************/
t_Win :: t_Win( void )
{
Name[0]=0 ;
set_pos( 0, 79, 1, 24 );
}
/***************************************************************************/
t_Win :: ~t_Win( void )
{ ; }
/***************************************************************************/
void t_Win :: set_pos( short _x1, short _y1, short _x2, short _y2 )
{
x1=_x1+1 ; y1=_y1+1 ; x2=_x2-1 ; y2=_y2-1 ;
size_x = x2-x1 ;
size_y = y2-y1 ;
}
/***************************************************************************/
void t_Win :: set_name( char *S )
{ strcpy(Name,S) ;
}
/***************************************************************************/
void t_Win :: paint( char S )
{ char c ;
if( S ) c=0x0f ;
else c=0x07 ;
s_rame2_F( y1-1, x1-1, y2+1, x2+1, c );
s_text_yxf( y1-1,x1+3 ,name_Color, Name );
}