src/tool-humsheet.cpp
void Tool_humsheet::printColSpan(HTp token) {
	if (!token->getOwner()->hasSpines()) {
		m_free_text << " colspan=\"" << m_max_field << "\"";
		return;
	}
	int track = token->getTrack() - 1;
	int scount = m_max_subtrack.at(track);
	int subtrack = token->getSubtrack();
	if (subtrack > 1) {
		subtrack--;
	}
	HTp nexttok = token->getNextFieldToken();
	int ntrack = -1;
	if (nexttok) {
		ntrack = nexttok->getTrack() - 1;
	}
	if ((ntrack < 0) || (ntrack != track)) {
		// at the end of a primary spine, so do a colspan with the remaining subtracks
		if (subtrack < scount-1) {
			int colspan = scount - subtrack;
			m_free_text << " colspan=\"" << colspan << "\"";
		}
	} else {
		// do nothing
	}
}
//////////////////////////////
//
// Tool_humsheet::printColspan -- print any necessary colspan values for
//    token (to align by primary spines)
//
:printColspan -- print any necessary colspan values for
token (to align by primary spines)
: printColspan -- print any necessary colspan values for token ( to align by primary spines )
void Tool_humsheet::printColSpan(HTp token) {
	if (!token->getOwner()->hasSpines()) {
		m_free_text << " colspan=\"" << m_max_field << "\"";
		return;
	}
	int track = token->getTrack() - 1;
	int scount = m_max_subtrack.at(track);
	int subtrack = token->getSubtrack();
	if (subtrack > 1) {
		subtrack--;
	}
	HTp nexttok = token->getNextFieldToken();
	int ntrack = -1;
	if (nexttok) {
		ntrack = nexttok->getTrack() - 1;
	}
	if ((ntrack < 0) || (ntrack != track)) {
		if (subtrack < scount-1) {
			int colspan = scount - subtrack;
			m_free_text << " colspan=\"" << colspan << "\"";
		}
	} else {
	}
}
void Tool_humsheet :: printColSpan ( HTp token ) { if ( ! token -> getOwner ( ) -> hasSpines ( ) ) { m_free_text << " \" " << m_max_field << " \" " ; return ; } int track = token -> getTrack ( ) - 1 ; int scount = m_max_subtrack . at ( track ) ; int subtrack = token -> getSubtrack ( ) ; if ( subtrack > 1 ) { subtrack -- ; } HTp nexttok = token -> getNextFieldToken ( ) ; int ntrack = -1 ; if ( nexttok ) { ntrack = nexttok -> getTrack ( ) - 1 ; } if ( ( ntrack < 0 ) || ( ntrack != track ) ) { if ( subtrack < scount - 1 ) { int colspan = scount - subtrack ; m_free_text << " \" " << colspan << " \" " ; } } else { } }
Tool_humsheet::printColspan -- print any necessary colspan values for
token (to align by primary spines)
Tool_humsheet :: printColspan -- print any necessary colspan values for token ( to align by primary spines )
// at the end of a primary spine, so do a colspan with the remaining subtracks // do nothing