Ignore:
Timestamp:
02/19/07 09:16:59 (17 years ago)
Author:
gumbau
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshViewUI.cpp

    r2103 r2127  
    653653                                                                                -> 
    654654                                                                                cb_menuRenderTextures_i(o,v); 
     655} 
     656 
     657//------------------------------------------------------------------------- 
     658//      Bounding Box callback 
     659//------------------------------------------------------------------------- 
     660inline void GeoMeshViewUI::cb_menuRenderBoundingBox_i(fltk::Item        *item, 
     661                                                                                                                                                                                                                        void    *v) 
     662{ 
     663        //      If the item is activated. 
     664        if (item->value()) 
     665        { 
     666                geoMeshView->activeBoundingBox(); 
     667        } 
     668        else 
     669        { 
     670                geoMeshView->deactiveBoundingBox(); 
     671        } 
     672 
     673        //      Repaint the main window. 
     674        mMainWindow->redraw(); 
     675} 
     676 
     677void GeoMeshViewUI::cb_menuRenderBoundingBox(fltk::Item* o, void* v) 
     678{ 
     679  ((GeoMeshViewUI*)     (o->parent()->parent()->parent()->user_data())) 
     680                                                                                -> 
     681                                                                                cb_menuRenderBoundingBox_i(o,v); 
     682} 
     683 
     684//------------------------------------------------------------------------- 
     685//      Axes callback 
     686//------------------------------------------------------------------------- 
     687inline void GeoMeshViewUI::cb_menuRenderAxes_i(fltk::Item       *item, 
     688                                                                                                                                                                                                                        void    *v) 
     689{ 
     690        //      If the item is activated. 
     691        if (item->value()) 
     692        { 
     693                geoMeshView->activeAxes(); 
     694        } 
     695        else 
     696        { 
     697                geoMeshView->deactiveAxes(); 
     698        } 
     699 
     700        //      Repaint the main window. 
     701        mMainWindow->redraw(); 
     702} 
     703 
     704void GeoMeshViewUI::cb_menuRenderAxes(fltk::Item* o, void* v) 
     705{ 
     706  ((GeoMeshViewUI*)     (o->parent()->parent()->parent()->user_data())) 
     707                                                                                -> 
     708                                                                                cb_menuRenderAxes_i(o,v); 
    655709} 
    656710 
     
    24682522        static  char                    title[256]; 
    24692523         
    2470         fcho    =       new fltk::FileChooser("", "*.{mesh,obj}", fltk::FileChooser::CREATE, "Open a mesh"); 
     2524        fcho    =       new fltk::FileChooser("", 
     2525                                                                                                                                "*.{mesh,obj}", 
     2526                                                                                                                                fltk::FileChooser::CREATE, 
     2527                                                                                                                                "Open a mesh"); 
    24712528 
    24722529        fcho->exec(); 
     
    25602617                } 
    25612618        } 
     2619 
    25622620        //      Free memory. 
    25632621        delete  fcho; 
     
    29933051 
    29943052                                { 
    2995                                         fltk::Item* o = menuRenderTextures = new fltk::Item("Texture mapping"); 
     3053                                        fltk::Item* o = new fltk::Item("Texture mapping"); 
    29963054                                        o->type(fltk::Item::RADIO); 
    29973055                                        o->set_value(); 
    29983056                                        o->callback((fltk::Callback*)cb_menuRenderTextures); 
     3057                                } 
     3058 
     3059                                new fltk::Divider(); 
     3060 
     3061                                { 
     3062                                        fltk::Item* o = new fltk::Item("Axis"); 
     3063                                        o->type(fltk::Item::RADIO); 
     3064                                        o->set_value(); 
     3065                                        o->callback((fltk::Callback*)cb_menuRenderAxes); 
     3066                                } 
     3067 
     3068                                { 
     3069                                        fltk::Item* o = new fltk::Item("Bounding Box"); 
     3070                                        o->type(fltk::Item::RADIO); 
     3071                                        o->set_value(); 
     3072                                        o->callback((fltk::Callback*)cb_menuRenderBoundingBox); 
    29993073                                } 
    30003074 
     
    31413215GeoMeshViewUI::~GeoMeshViewUI() 
    31423216{ 
    3143         delete  geoMeshLoader; 
     3217        //delete        geoMeshLoader; 
    31443218        mMainWindow->destroy(); 
    31453219} 
Note: See TracChangeset for help on using the changeset viewer.