mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 17:11:40 -05:00
-ClipSelector action types distinguised
This commit is contained in:
parent
ee76b56c0b
commit
3313e54d96
2 changed files with 34 additions and 8 deletions
|
@ -73,13 +73,6 @@ class ClipSelector : public Fl_Button
|
||||||
|
|
||||||
highlight = false;
|
highlight = false;
|
||||||
mouseOver = false;
|
mouseOver = false;
|
||||||
|
|
||||||
clips[0].state = ClipState::CLIP_EMPTY;
|
|
||||||
clips[1].state = ClipState::CLIP_LOADED;
|
|
||||||
clips[2].state = ClipState::CLIP_QUEUED;
|
|
||||||
clips[3].state = ClipState::CLIP_PLAYING;
|
|
||||||
clips[4].state = ClipState::CLIP_RECORDING;
|
|
||||||
clips[5].state = ClipState::CLIP_STOPPING;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const int numClips = 10;
|
static const int numClips = 10;
|
||||||
|
@ -238,7 +231,40 @@ class ClipSelector : public Fl_Button
|
||||||
if (clipNum >= numClips)
|
if (clipNum >= numClips)
|
||||||
clipNum = numClips -1; // fix for clicking the lowest pixel
|
clipNum = numClips -1; // fix for clicking the lowest pixel
|
||||||
printf("clip number %i\n" , clipNum);
|
printf("clip number %i\n" , clipNum);
|
||||||
|
|
||||||
|
|
||||||
|
// handle right clicks: popup menu
|
||||||
|
if ( Fl::event_state(FL_BUTTON3) )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
switch( clips[clipNum].state )
|
||||||
|
{
|
||||||
|
case ClipState::CLIP_EMPTY:
|
||||||
|
clips[clipNum].state = ClipState::CLIP_RECORDING;
|
||||||
|
break;
|
||||||
|
case ClipState::CLIP_LOADED:
|
||||||
|
clips[clipNum].state = ClipState::CLIP_QUEUED;
|
||||||
|
break;
|
||||||
|
case ClipState::CLIP_QUEUED:
|
||||||
|
clips[clipNum].state = ClipState::CLIP_PLAYING;
|
||||||
|
break;
|
||||||
|
case ClipState::CLIP_PLAYING:
|
||||||
|
clips[clipNum].state = ClipState::CLIP_STOPPING;
|
||||||
|
break;
|
||||||
|
case ClipState::CLIP_RECORDING:
|
||||||
|
clips[clipNum].state = ClipState::CLIP_STOPPING;
|
||||||
|
break;
|
||||||
|
case ClipState::CLIP_STOPPING:
|
||||||
|
clips[clipNum].state = ClipState::CLIP_PLAYING;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printf("Avtk::ClipSelector, warning: unknown clip type\n");
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
redraw();
|
||||||
do_callback();
|
do_callback();
|
||||||
return 1;
|
return 1;
|
||||||
case FL_DRAG:
|
case FL_DRAG:
|
||||||
|
|
|
@ -69,7 +69,7 @@ class GTrack : public Fl_Group
|
||||||
button6(x + 5, y + 404 + 102, 100, 18,"Load"),
|
button6(x + 5, y + 404 + 102, 100, 18,"Load"),
|
||||||
*/
|
*/
|
||||||
|
|
||||||
volume(x+68, y +530, 36, 150, "Vol"),
|
volume(x+66, y +526, 36, 160, "Vol"),
|
||||||
|
|
||||||
dial1(x+25, y +452 + 102, 24, 24, "REV"),
|
dial1(x+25, y +452 + 102, 24, 24, "REV"),
|
||||||
dial2(x+25, y +452 + 152, 24, 24, "SC"),
|
dial2(x+25, y +452 + 152, 24, 24, "SC"),
|
||||||
|
|
Loading…
Add table
Reference in a new issue