Semi-analytic galaxies-I. Synthesis of environmental and star-forming regulation mechanisms