use member function

This commit is contained in:
dickelbeck 2007-09-09 02:27:56 +00:00
parent 2601099e96
commit db9372c76a
1 changed files with 12 additions and 4 deletions

View File

@ -369,7 +369,7 @@ int MODULE::WriteDescr( FILE* File )
/* Generation des coord et caracteristiques */ /* Generation des coord et caracteristiques */
memset( StringStat, 0, sizeof(StringStat) ); memset( StringStat, 0, sizeof(StringStat) );
if( m_ModuleStatus & MODULE_is_LOCKED ) if( IsLocked() )
StringStat[0] = 'F'; StringStat[0] = 'F';
else else
StringStat[0] = '~'; StringStat[0] = '~';
@ -670,7 +670,7 @@ int MODULE::ReadDescr( FILE* File, int* LineNum )
m_ModuleStatus = 0; m_ModuleStatus = 0;
if( BufCar1[0] == 'F' ) if( BufCar1[0] == 'F' )
m_ModuleStatus |= MODULE_is_LOCKED; SetLocked(true);
if( BufCar1[1] == 'P' ) if( BufCar1[1] == 'P' )
m_ModuleStatus |= MODULE_is_PLACED; m_ModuleStatus |= MODULE_is_PLACED;
break; break;
@ -1128,7 +1128,7 @@ void MODULE::Display_Infos( WinEDA_DrawFrame* frame )
pos += 4; pos += 4;
msg = wxT( ".." ); msg = wxT( ".." );
if( m_ModuleStatus & MODULE_is_LOCKED ) if( IsLocked() )
msg[0] = 'F'; msg[0] = 'F';
if( m_ModuleStatus & MODULE_is_PLACED ) if( m_ModuleStatus & MODULE_is_PLACED )
msg[1] = 'P'; msg[1] = 'P';
@ -1169,6 +1169,14 @@ bool MODULE::HitTest( const wxPoint& refPos )
/* la souris est-elle dans ce rectangle : */ /* la souris est-elle dans ce rectangle : */
if( m_BoundaryBox.Inside( spot_cX, spot_cY ) ) if( m_BoundaryBox.Inside( spot_cX, spot_cY ) )
return true; return true;
// The GENERAL_COLLECTOR needs these two tests in order to find a MODULE
// when the user clicks on its text. Keep these 2, needed in OnRightClick().
if( m_Reference->HitTest( refPos ) )
return true;
if( m_Value->HitTest( refPos ) )
return true;
return false; return false;
} }
@ -1256,7 +1264,7 @@ void MODULE::Show( int nestLevel, std::ostream& os )
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
" ref=\"" << m_Reference->m_Text.mb_str() << '"' << " ref=\"" << m_Reference->m_Text.mb_str() << '"' <<
" value=\"" << m_Value->m_Text.mb_str() << '"' << " value=\"" << m_Value->m_Text.mb_str() << '"' <<
" layer=\"" << ReturnPcbLayerName(m_Layer,true,false).mb_str() << '"' << " layer=\"" << ReturnPcbLayerName(m_Layer,true).mb_str() << '"' <<
">\n"; ">\n";
NestedSpace( nestLevel+1, os ) << NestedSpace( nestLevel+1, os ) <<