mrg_ui/src/mtktextbuffer.cxx
//============================================================================
// Return the character offset of the beginning of this region.  This is
// easy if tracking has not been enabled on the region.
//
Return the character offset of the beginning of this region.  This is
easy if tracking has not been enabled on the region.
Return the character offset of the beginning of this region . This is easy if tracking has not been enabled on the region .
int Region::GetOffset()
{
	if(marker == NULL){
		return offset;
	} else {
		textBuffer *tbuf = marker->owner;
		Tcl_Interp *itrp = tbuf->framework.interp;
		int index;
		int start = offset;
		if (tbuf->framework.Tcl("indexToOffset %s %s.first",
				   tbuf->tk_name.str(), marker->tag_name)
			== TCL_OK
		    && Tcl_GetInt(itrp, itrp->result, &index) == TCL_OK) {
		    start = index;
		}
		return start;
	}
}
int Region :: GetOffset ( ) { if ( marker == NULL ) { return offset ; } else { textBuffer * tbuf = marker -> owner ; Tcl_Interp * itrp = tbuf -> framework . interp ; int index ; int start = offset ; if ( tbuf -> framework . Tcl ( " " , tbuf -> tk_name . str ( ) , marker -> tag_name ) == TCL_OK && Tcl_GetInt ( itrp , itrp -> result , & index ) == TCL_OK ) { start = index ; } return start ; } }
Return the character offset of the beginning of this region.
Return the character offset of the beginning of this region .