Beispiel #1
0
void gSampleChannel::refresh() {

	if (ch->status == STATUS_OFF) {
		sampleButton->bgColor0 = COLOR_BG_0;
		sampleButton->bdColor  = COLOR_BD_0;
		sampleButton->txtColor = COLOR_TEXT_0;
	}
	else
	if (ch->status == STATUS_PLAY) {
		sampleButton->bgColor0 = COLOR_BG_2;
		sampleButton->bdColor  = COLOR_BD_1;
		sampleButton->txtColor = COLOR_TEXT_1;
	}
	else
	if (ch->status & (STATUS_WAIT | STATUS_ENDING))
		__gu_blinkChannel(this);    /// move to gChannel::blink

	if (ch->recStatus & (REC_WAITING | REC_ENDING))
		__gu_blinkChannel(this);    /// move to gChannel::blink

	if (ch->wave != NULL) {

		if (G_Mixer.chanInput == ch)
			sampleButton->bgColor0 = COLOR_BG_3;

		if (recorder::active) {
			if (recorder::canRec(ch)) {
				sampleButton->bgColor0 = COLOR_BG_4;
				sampleButton->txtColor = COLOR_TEXT_0;
			}
		}
		status->redraw();
	}
	sampleButton->redraw();
}
Beispiel #2
0
void __gu_refreshColumn(Fl_Group *col) {

	for (int i=0; i<col->children(); i++) {

		gChannel *gch = (gChannel *) col->child(i);

		if (gch->ch->status == STATUS_OFF) {
			gch->sampleButton->bgColor0 = COLOR_BG_0;
			gch->sampleButton->bdColor  = COLOR_BD_0;
			gch->sampleButton->txtColor = COLOR_TEXT_0;
		}
		else
		if (gch->ch->status == STATUS_PLAY) {
			gch->sampleButton->bgColor0 = COLOR_BG_2;
			gch->sampleButton->bdColor  = COLOR_BD_1;
			gch->sampleButton->txtColor = COLOR_TEXT_1;
		}
		else
		if (gch->ch->status & (STATUS_WAIT | STATUS_ENDING))
			__gu_blinkChannel(gch);

		if (gch->ch->recStatus & (REC_WAITING | REC_ENDING))
			__gu_blinkChannel(gch);

		/* SAMPLE_CHANNEL only */

		if (gch->ch->type == CHANNEL_SAMPLE && gch->ch->wave != NULL) {

			if (G_Mixer.chanInput == gch->ch)
				gch->sampleButton->bgColor0 = COLOR_BG_3;

			if (recorder::active)
				if (recorder::canRec(gch->ch)) {
					gch->sampleButton->bgColor0 = COLOR_BG_4;
					gch->sampleButton->txtColor = COLOR_TEXT_0;
				}

			gch->status->redraw();
		}

		gch->sampleButton->redraw();
	}
}
Beispiel #3
0
void gMidiChannel::refresh() {

	if (ch->status == STATUS_OFF) {
		sampleButton->bgColor0 = COLOR_BG_0;
		sampleButton->bdColor  = COLOR_BD_0;
		sampleButton->txtColor = COLOR_TEXT_0;
	}
	else
	if (ch->status == STATUS_PLAY) {
		sampleButton->bgColor0 = COLOR_BG_2;
		sampleButton->bdColor  = COLOR_BD_1;
		sampleButton->txtColor = COLOR_TEXT_1;
	}
	else
	if (ch->status & (STATUS_WAIT | STATUS_ENDING))
		__gu_blinkChannel(this);    /// TODO - move to gChannel::blink

	if (ch->recStatus & (REC_WAITING | REC_ENDING))
		__gu_blinkChannel(this);    /// TODO - move to gChannel::blink

	sampleButton->redraw();
}