Changeset 537 for trunk/thune/gl/gx.c

Show
Ignore:
Timestamp:
06/07/08 03:35:15 (6 months ago)
Author:
krobillard
Message:

Added show, hide, and gui_setMouseFocus().
Quit & halt propogate up nested ur_eval() calls.
Thune-gl RPM builds again.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/gl/gx.c

    r536 r537  
    721721 
    722722 
     723// (widget -- ) 
     724UR_CALL( uc_show ) 
     725{ 
     726    if( ur_is(tos, UT_WIDGET) ) 
     727    { 
     728        UCell* inv; 
     729        GWidgetId id = ur_int(tos); 
     730        GWidget* wp = gui_widgetPtr( &gxEnv.gui, id ); 
     731        if( wp ) 
     732        { 
     733            gui_show( &gxEnv.gui, wp, 1 ); 
     734 
     735            inv = UR_CALL_CELL; 
     736            if( inv && (ur_sel(inv) == UR_ATOM_FOCUS) ) 
     737            { 
     738                gui_setKeyFocus( &gxEnv.gui, id ); 
     739                gui_setMouseFocus( &gxEnv.gui, id ); 
     740            } 
     741        } 
     742    } 
     743    UR_S_DROP; 
     744} 
     745 
     746 
     747// (widget -- ) 
     748UR_CALL( uc_hide ) 
     749{ 
     750    if( ur_is(tos, UT_WIDGET) ) 
     751    { 
     752        GWidget* wp = gui_widgetPtr( &gxEnv.gui, ur_int(tos) ); 
     753        if( wp ) 
     754            gui_show( &gxEnv.gui, wp, 0 ); 
     755    } 
     756    UR_S_DROP; 
     757} 
     758 
     759 
    723760// (matrix vec3 -- ) 
    724761UR_CALL( uc_look_at ) 
     
    12931330    { uc_play,           "play" }, 
    12941331    { uc_stop,           "stop" }, 
     1332    { uc_show,           "show" }, 
     1333    { uc_hide,           "hide" }, 
    12951334    { uc_text_size,      "text-size" }, 
    12961335    { uc_display_events, "display.events" },