EgtGeomKernel 1.5c9 :
- migliorata gestione colori standard - aggiunta gestione attributi Mark - aggiunta gestione degli oggetti selezionati - modifiche ad esecutore per selezionati e variabile $SEL.
This commit is contained in:
+100
@@ -391,6 +391,42 @@ GdbObj::RevertStatus( void)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbObj::IsOff( void) const
|
||||
{
|
||||
// se non ci sono attributi
|
||||
if ( m_pAttribs == nullptr)
|
||||
return false ;
|
||||
|
||||
// lo stato è definito
|
||||
return ( m_pAttribs->GetStatus() == GDB_ST_OFF) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbObj::IsOn( void) const
|
||||
{
|
||||
// se non ci sono attributi (On di default)
|
||||
if ( m_pAttribs == nullptr)
|
||||
return true ;
|
||||
|
||||
// lo stato è definito
|
||||
return ( m_pAttribs->GetStatus() == GDB_ST_ON) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbObj::IsSelected( void) const
|
||||
{
|
||||
// se non ci sono attributi
|
||||
if ( m_pAttribs == nullptr)
|
||||
return false ;
|
||||
|
||||
// lo stato è definito
|
||||
return ( m_pAttribs->GetStatus() == GDB_ST_SEL) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbObj::GetStatus( int& nStat) const
|
||||
@@ -437,6 +473,70 @@ GdbObj::GetCalcStatus( int& nStat, int nLev) const
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbObj::SetMark( void)
|
||||
{
|
||||
// verifico esistenza (con eventuale creazione) degli attributi
|
||||
if ( GetSafeAttribs() == nullptr)
|
||||
return false ;
|
||||
|
||||
// assegno la marcatura
|
||||
m_pAttribs->SetMark() ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbObj::ResetMark( void)
|
||||
{
|
||||
// se non ci sono attributi non fa alcunchè
|
||||
if ( m_pAttribs == nullptr)
|
||||
return true ;
|
||||
|
||||
// cancello la marcatura
|
||||
m_pAttribs->ResetMark() ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbObj::GetMark( int& nMark) const
|
||||
{
|
||||
// se non ci sono attributi
|
||||
if ( m_pAttribs == nullptr)
|
||||
return false ;
|
||||
|
||||
// la marcatura è definito
|
||||
nMark = m_pAttribs->GetMark() ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbObj::GetCalcMark( int& nMark) const
|
||||
{
|
||||
// recupero la marcatura dell'oggetto
|
||||
int nObjMark = GDB_MK_OFF ;
|
||||
if ( m_pAttribs != nullptr)
|
||||
nObjMark = m_pAttribs->GetMark() ;
|
||||
|
||||
// se la marcatura è ON, non ho bisogno di sapere altro
|
||||
if ( nObjMark == GDB_MK_ON) {
|
||||
nMark = GDB_MK_ON ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
// recupero la marcatura dell'eventuale padre
|
||||
int nParentMark = GDB_MK_OFF ;
|
||||
if ( GetParent() != nullptr)
|
||||
GetParent()->GetCalcMark( nParentMark) ;
|
||||
|
||||
// calcolo la marcatura
|
||||
nMark = ::CalcMark( nObjMark, nParentMark) ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbObj::SetMaterial( int nMat)
|
||||
|
||||
Reference in New Issue
Block a user