return -1;
}
- class TEnableGridEvent: public SALOME_Event
- {
- public:
- typedef void (Plot2d_ViewFrame::* TFun)(bool, const int, bool, const int, bool);
- TEnableGridEvent (Plot2d_ViewFrame* theView, TFun theFun,
- CORBA::Boolean theMajor, CORBA::Long theNumMajor,
- CORBA::Boolean theMinor, CORBA::Long theNumMinor):
- myView(theView), myFun(theFun),
- myMajor(theMajor), myNumMajor(theNumMajor),
- myMinor(theMinor), myNumMinor(theNumMinor)
- {}
-
- virtual void Execute()
- {
- (myView->*myFun)(myMajor,myNumMajor,myMinor,myNumMinor,true);
- }
- protected:
- Plot2d_ViewFrame* myView;
- TFun myFun;
- CORBA::Boolean myMajor, myMinor;
- CORBA::Long myNumMajor, myNumMinor;
- };
-
void XYPlot_i::EnableXGrid (CORBA::Boolean theMajor, CORBA::Long theNumMajor,
CORBA::Boolean theMinor, CORBA::Long theNumMinor)
{
- if (GetViewWindow())
- myView->setXGrid(theMajor,theNumMajor,theMinor,theNumMinor);
+ class TEvent: public SALOME_Event
+ {
+ public:
+ TEvent (Plot2d_ViewFrame* theView,
+ CORBA::Boolean theMajor,
+ CORBA::Long theNumMajor,
+ CORBA::Boolean theMinor,
+ CORBA::Long theNumMinor):
+ myView(theView),
+ myMajor(theMajor),
+ myNumMajor(theNumMajor),
+ myMinor(theMinor),
+ myNumMinor(theNumMinor)
+ {}
+
+ virtual void Execute()
+ {
+ myView->setXGrid( myMajor, myNumMajor, myMinor, myNumMinor );
+ }
+ protected:
+ Plot2d_ViewFrame* myView;
+ CORBA::Boolean myMajor, myMinor;
+ CORBA::Long myNumMajor, myNumMinor;
+ };
+
+ if ( GetViewWindow() )
+ ProcessVoidEvent( new TEvent( myView, theMajor, theNumMajor, theMinor, theNumMinor ) );
}
- void XYPlot_i::EnableYGrid(CORBA::Boolean theMajor, CORBA::Long theNumMajor,
- CORBA::Boolean theMinor, CORBA::Long theNumMinor)
+ void XYPlot_i::EnableYGrid(CORBA::Boolean theMajor,
+ CORBA::Long theNumMajor,
+ CORBA::Boolean theMinor,
+ CORBA::Long theNumMinor)
{
- this->EnableYGrid(theMajor,theNumMajor,theMinor,theNumMinor,
- false,0,false,0);
+ this->EnableYGrid( theMajor, theNumMajor, theMinor, theNumMinor, false, 0, false, 0 );
}
- void XYPlot_i::EnableYGrid(CORBA::Boolean theMajor, CORBA::Long theNumMajor,
- CORBA::Boolean theMinor, CORBA::Long theNumMinor,
- CORBA::Boolean the2Major, CORBA::Long the2NumMajor,
- CORBA::Boolean the2Minor, CORBA::Long the2NumMinor)
+ void XYPlot_i::EnableYGrid(CORBA::Boolean theMajor,
+ CORBA::Long theNumMajor,
+ CORBA::Boolean theMinor,
+ CORBA::Long theNumMinor,
+ CORBA::Boolean the2Major,
+ CORBA::Long the2NumMajor,
+ CORBA::Boolean the2Minor,
+ CORBA::Long the2NumMinor)
{
+ class TEvent: public SALOME_Event
+ {
+ public:
+ TEvent (Plot2d_ViewFrame* theView,
+ CORBA::Boolean theMajor,
+ CORBA::Long theNumMajor,
+ CORBA::Boolean theMinor,
+ CORBA::Long theNumMinor,
+ CORBA::Boolean the2Major,
+ CORBA::Long the2NumMajor,
+ CORBA::Boolean the2Minor,
+ CORBA::Long the2NumMinor):
+ myView(theView),
+ myMajor(theMajor),
+ myNumMajor(theNumMajor),
+ myMinor(theMinor),
+ myNumMinor(theNumMinor),
+ my2Major(the2Major),
+ my2NumMajor(the2NumMajor),
+ my2Minor(the2Minor),
+ my2NumMinor(the2NumMinor)
+ {}
+
+ virtual void Execute()
+ {
+ myView->setYGrid( myMajor, myNumMajor, myMinor, myNumMinor,
+ my2Major, my2NumMajor, my2Minor, my2NumMinor);
+ }
+ protected:
+ Plot2d_ViewFrame* myView;
+ CORBA::Boolean myMajor, myMinor, my2Major, my2Minor;
+ CORBA::Long myNumMajor, myNumMinor, my2NumMajor, my2NumMinor;
+ };
+
if (GetViewWindow())
- myView->setYGrid(theMajor,theNumMajor,theMinor,theNumMinor,
- the2Major,the2NumMajor,the2Minor,the2NumMinor);
+ ProcessVoidEvent( new TEvent( myView, theMajor, theNumMajor, theMinor, theNumMinor,
+ the2Major, the2NumMajor, the2Minor, the2NumMinor ) );
}
class TSetScaleModeEvent: public SALOME_Event