Revision: 6734
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6734&view=rev
Author:   jeremy_asher
Date:     2008-07-02 11:39:16 -0700 (Wed, 02 Jul 2008)

Log Message:
-----------
Selected model visualization filter

Modified Paths:
--------------
    code/stage/trunk/libstage/canvas.cc
    code/stage/trunk/libstage/options_dlg.cc
    code/stage/trunk/libstage/options_dlg.hh
    code/stage/trunk/libstage/stage.hh
    code/stage/trunk/libstage/worldgui.cc

Modified: code/stage/trunk/libstage/canvas.cc
===================================================================
--- code/stage/trunk/libstage/canvas.cc 2008-07-02 17:57:24 UTC (rev 6733)
+++ code/stage/trunk/libstage/canvas.cc 2008-07-02 18:39:16 UTC (rev 6734)
@@ -48,7 +48,8 @@
   showTrailArrows( "Trails/Rising Arrows", "show_trailarrows", "#a", false ),
   showTrailRise( "Trails/Rising blocks", "show_trailrise", "#r", false ),
   showTrails( "Trails/Fast", "show_trailfast", "t", false ),
-  showTree( "Debug/Tree", "show_tree", "#T", false )
+  showTree( "Debug/Tree", "show_tree", "#T", false ),
+  visualizeAll( "Visualize All", "vis_all", "", true )
 {
   end();
 
@@ -537,9 +538,15 @@
     DrawBlocks();
   
   // draw the model-specific visualizations
-  if( showData ) 
-    for( GList* it=world->StgWorld::children; it; it=it->next ) 
-      ((StgModel*)it->data)->DataVisualizeTree();  
+       if( showData ) {
+               GList* it;
+               if ( visualizeAll )
+                       it = world->StgWorld::children;
+               else
+                       it = selected_models;
+               for( ; it; it=it->next ) 
+                       ((StgModel*)it->data)->DataVisualizeTree();
+       }
   
   if( showGrid ) 
     for( GList* it=world->StgWorld::children; it; it=it->next )
@@ -685,6 +692,7 @@
 void StgCanvas::CreateMenuItems( Fl_Menu_Bar* menu, std::string path )
 {
   showData.CreateMenuItem( menu, path );
+//  visualizeAll.CreateMenuItem( menu, path );
   showBlocks.CreateMenuItem( menu, path );
   showFlags.CreateMenuItem( menu, path );
   showClock.CreateMenuItem( menu, path );

Modified: code/stage/trunk/libstage/options_dlg.cc
===================================================================
--- code/stage/trunk/libstage/options_dlg.cc    2008-07-02 17:57:24 UTC (rev 
6733)
+++ code/stage/trunk/libstage/options_dlg.cc    2008-07-02 18:39:16 UTC (rev 
6734)
@@ -4,7 +4,7 @@
 namespace Stg {
   
   OptionsDlg::OptionsDlg( int x, int y, int w, int h ) :
-        Fl_Window( x,y, w,h, "Options" ),
+        Fl_Window( x,y, w,h, "Filter" ),
         changedItem( NULL ),
         showAll( NULL ),
         status( NO_EVENT ),
@@ -12,7 +12,6 @@
   {
         showAllCheck = new Fl_Check_Button( 0,0, w,boxH );
         showAllCheck->callback( checkChanged, this );
-        showAllCheck->deactivate();
         
         scroll = new Fl_Scroll( 0,boxH+vm, w,h-boxH-btnH-3*vm );
         scroll->type( Fl_Scroll::VERTICAL );

Modified: code/stage/trunk/libstage/options_dlg.hh
===================================================================
--- code/stage/trunk/libstage/options_dlg.hh    2008-07-02 17:57:24 UTC (rev 
6733)
+++ code/stage/trunk/libstage/options_dlg.hh    2008-07-02 18:39:16 UTC (rev 
6734)
@@ -48,7 +48,7 @@
                void hide() { Fl_Window::hide(); }
                
                void setOptions( const std::vector<Option*>& opts );
-         void setOptions( const std::set<Option*, Option::optComp>& opts );
+               void setOptions( const std::set<Option*, Option::optComp>& opts 
);
                void clearOptions() { options.clear(); }
                void showAllOpt( Option* opt );
                const event_t event() const { return status; }

Modified: code/stage/trunk/libstage/stage.hh
===================================================================
--- code/stage/trunk/libstage/stage.hh  2008-07-02 17:57:24 UTC (rev 6733)
+++ code/stage/trunk/libstage/stage.hh  2008-07-02 18:39:16 UTC (rev 6734)
@@ -1948,7 +1948,8 @@
     showTrailArrows, 
     showTrailRise, 
     showTrails, 
-    showTree;
+    showTree,
+       visualizeAll;
   
 public:
 
@@ -2013,8 +2014,6 @@
   stg_usec_t real_time_of_last_update;
   stg_usec_t interval_real;   ///< real-time interval between updates - set 
this to zero for 'as fast as possible
        
-  Option ShowAll;
-
 public:
   static const stg_msec_t DEFAULT_INTERVAL_REAL = 100; ///< real time between 
updates
 

Modified: code/stage/trunk/libstage/worldgui.cc
===================================================================
--- code/stage/trunk/libstage/worldgui.cc       2008-07-02 17:57:24 UTC (rev 
6733)
+++ code/stage/trunk/libstage/worldgui.cc       2008-07-02 18:39:16 UTC (rev 
6734)
@@ -115,8 +115,7 @@
 #endif
 
 StgWorldGui::StgWorldGui(int W,int H,const char* L) : 
-  Fl_Window(W,H,L),
-  ShowAll( "Visualize all models", "show_vis", "", true )
+  Fl_Window(W,H,L)
 {
   //size_range( 100,100 ); // set minimum window size
   oDlg = NULL;
@@ -421,8 +420,8 @@
     int y = worldGui->y();
     OptionsDlg* oDlg = new OptionsDlg( x,y, 180,250 );
     oDlg->callback( optionsDlgCb, worldGui );
-    oDlg->showAllOpt( &worldGui->ShowAll );
     oDlg->setOptions( worldGui->drawOptions );
+    oDlg->showAllOpt( &worldGui->canvas->visualizeAll );
     oDlg->show();
 
     worldGui->oDlg = oDlg;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to