Beispiel #1
0
static void scrolllist_draw_select(t_scrolllist* x, t_glist* glist)
{
  t_canvas *canvas=glist_getcanvas(glist);
 
    // post( "scrolllist : select" );
    if(x->x_selected)
    {
        /* sets the item in blue */
        SYS_VGUI3(".x%x.c itemconfigure %xTEXTLIST -outline #0000FF\n", canvas, x);
    }
    else
    {
        SYS_VGUI3(".x%x.c itemconfigure %xTEXTLIST -outline #000000\n", canvas, x);
    }
}       
Beispiel #2
0
static void scratcher_draw_delete(t_scratcher *x, t_glist *glist)
{
    t_int ci;
    t_canvas *canvas=glist_getcanvas(glist);

    if ( glist_isvisible( glist ) )
    {
        SYS_VGUI3( ".x%lx.c delete %xSCRATCHER\n", canvas, x );
        SYS_VGUI3( ".x%lx.c delete %xFSCRATCHER\n", canvas, x );
        SYS_VGUI3( ".x%lx.c delete %xSPEEDBAR\n", canvas, x );
        for ( ci=0; ci<SCRATCHER_NB_GROOVES; ci ++)
        {
            SYS_VGUI4( ".x%lx.c delete %xGROOVE%d\n", canvas, x, ci );
        }
    }
}
Beispiel #3
0
static void exciter_draw_select(t_exciter* x,t_glist* glist)
{
    t_canvas *canvas=glist_getcanvas(glist);

    if(x->x_selected)
    {
        /* sets the main item in blue */
        SYS_VGUI3(".x%lx.c itemconfigure %xLINE -outline #0000FF\n", canvas, x);

    }
    else
    {
        /* sets the main item in black */
        SYS_VGUI3(".x%lx.c itemconfigure %xLINE -outline #000000\n", canvas, x);
    }
}
Beispiel #4
0
static void scrolllist_draw_erase(t_scrolllist* x, t_glist* glist)
{
 t_canvas *canvas=glist_getcanvas(glist);
 t_int i;
 
    SYS_VGUI3(".x%x.c delete %xTEXTLIST\n", canvas, x);
    for ( i=x->x_firstseen; i<=x->x_lastseen; i++ )
    {
        SYS_VGUI4(".x%x.c delete %xITEM%d\n", canvas, x, i); 
    }
} 
Beispiel #5
0
/* toggle speed line */
static void scratcher_showspeed(t_scratcher *x, t_floatarg fshowspeed )
{
    t_canvas *canvas=glist_getcanvas(x->x_glist);

    if (fshowspeed == 0)
    {
        x->x_showspeed = 0;
        SYS_VGUI3( ".x%lx.c delete %xSPEEDBAR\n", canvas, x );
    }
    else
    {
        x->x_showspeed = 1;
        SYS_VGUI3( ".x%lx.c delete %xSPEEDBAR\n", canvas, x );
        SYS_VGUI7( ".x%lx.c create line %d %d %d %d -fill #FF0000 -tags %xSPEEDBAR -width 3\n",
                   canvas, text_xpix(&x->x_obj, x->x_glist)+x->x_width/2,
                   text_ypix(&x->x_obj, x->x_glist)+x->x_height/2,
                   text_xpix(&x->x_obj, x->x_glist)+x->x_width/2 + (int)(x->x_width/2*cos( x->x_readspeed - 1. )),
                   text_ypix(&x->x_obj, x->x_glist)+x->x_height/2 - (int)(x->x_width/2*sin( x->x_readspeed - 1. )),
                   x );
    }
}
Beispiel #6
0
static void exciter_draw_erase(t_exciter* x,t_glist* glist)
{
    t_canvas *canvas=glist_getcanvas(glist);
    int i, ei, gi;

    SYS_VGUI3(".x%lx.c delete %xLINE\n", canvas, x );
    SYS_VGUI3(".x%lx.c delete %xLOWERCAPTION\n", canvas, x );
    SYS_VGUI3(".x%lx.c delete %xHIGHERCAPTION\n", canvas, x );
    SYS_VGUI3(".x%lx.c delete %xIN\n", canvas, x );
    for ( ei=0; ei<x->x_nbevents; ei++ )
    {
        for ( gi=0; gi<(x->x_width/EXCITER_PIXEL_GRAIN); gi++ )
        {
            if( *(x->x_sbangs+ei*(x->x_width/EXCITER_PIXEL_GRAIN)+gi) != 0 )
            {
                exciter_delete_gem( x, glist, gi, ei );
            }
        }
        SYS_VGUI4(".x%lx.c delete %xOUT%d\n", canvas, x, ei );
    }
}
Beispiel #7
0
/* stop playing   */
static void scratcher_stop(t_scratcher *x)
{
    t_canvas *canvas=glist_getcanvas(x->x_glist);

    x->x_play=0;
    // reset read position
    x->x_readpos=0;
    x->x_readspeed=0.;
    if ( x->x_showspeed )
    {
        SYS_VGUI3( ".x%lx.c delete %xSPEEDBAR\n", canvas, x );
        SYS_VGUI7( ".x%lx.c create line %d %d %d %d -fill #FF0000 -tags %xSPEEDBAR -width 3\n",
                   canvas, text_xpix(&x->x_obj, x->x_glist)+x->x_width/2,
                   text_ypix(&x->x_obj, x->x_glist)+x->x_height/2,
                   text_xpix(&x->x_obj, x->x_glist)+x->x_width/2 + (int)(x->x_width/2*cos( x->x_readspeed - 1. )),
                   text_ypix(&x->x_obj, x->x_glist)+x->x_height/2 - (int)(x->x_width/2*sin( x->x_readspeed - 1. )),
                   x );
    }
}