Update of /cvsroot/playerstage/code/gazebo/gui/fltk
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23327/gui/fltk
Modified Files:
Tag: ogre
GzWindow.cc GzWindow.h main.cc
Log Message:
Updates
Index: main.cc
===================================================================
RCS file: /cvsroot/playerstage/code/gazebo/gui/fltk/Attic/main.cc,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -d -r1.1.2.5 -r1.1.2.6
*** main.cc 7 Aug 2006 20:52:26 -0000 1.1.2.5
--- main.cc 10 Aug 2006 03:53:11 -0000 1.1.2.6
***************
*** 273,277 ****
}
! void idle_cp( void * )
{
double realTime, simTime, pauseTime, cpuTime, diffTime;
--- 273,277 ----
}
! void Update( void * )
{
double realTime, simTime, pauseTime, cpuTime, diffTime;
***************
*** 322,325 ****
--- 322,327 ----
window->draw();
+
+ Fl::repeat_timeout(0.01, Update);
}
***************
*** 347,351 ****
printf("Main Loop\n");
! Fl::add_idle( idle_cp);
return Fl::run();
}
--- 349,354 ----
printf("Main Loop\n");
! Fl::add_timeout(0.01,Update);
!
return Fl::run();
}
Index: GzWindow.h
===================================================================
RCS file: /cvsroot/playerstage/code/gazebo/gui/fltk/Attic/GzWindow.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** GzWindow.h 15 Mar 2006 22:45:34 -0000 1.1.2.2
--- GzWindow.h 10 Aug 2006 03:53:11 -0000 1.1.2.3
***************
*** 16,19 ****
--- 16,21 ----
#include <FL/Fl_Window.H>
+ #include "Vector.hh"
+
class GzWindow : public Fl_Window
{
***************
*** 26,29 ****
--- 28,36 ----
public: virtual void draw();
public: virtual void flush();
+ public: int handle(int event);
+
+ private: int HandlePush();
+ private: int HandleDrag();
+ private: int HandleKeyboard();
private: void OpenDisplay();
***************
*** 33,36 ****
--- 40,47 ----
private: Colormap colormap;
private: Display *display;
+
+ private: GzVector translateVec;
+ private: float translateScale;
+
};
Index: GzWindow.cc
===================================================================
RCS file: /cvsroot/playerstage/code/gazebo/gui/fltk/Attic/GzWindow.cc,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -d -r1.1.2.4 -r1.1.2.5
*** GzWindow.cc 7 Aug 2006 20:52:26 -0000 1.1.2.4
--- GzWindow.cc 10 Aug 2006 03:53:11 -0000 1.1.2.5
***************
*** 68,83 ****
void GzWindow::Init()
{
- printf("OpenDisplay\n");
this->OpenDisplay();
- printf("Adaptor Init\n");
world->ogreAdaptor->Init(this->display, this->visual, this->windowId,
this->w(), this->h());
-
- /*fl_open_display();
- Fl_Gl_Choice* glChoice = Fl_Gl_Choice::find( FL_DEPTH | FL_DOUBLE, NULL );
- Fl_X::make_xid( this, glChoice->vis, glChoice->colormap );
- world->ogreAdaptor->Init(fl_display, fl_visual, fl_xid(this), this->w(),
this->h());
- */
-
}
--- 68,74 ----
***************
*** 91,92 ****
--- 82,117 ----
this->draw();
}
+
+ int GzWindow::handle(int event)
+ {
+ switch (event)
+ {
+ case FL_PUSH:
+ return this->HandlePush();
+
+ case FL_DRAG:
+ return this->HandleDrag();
+
+ case FL_KEYBOARD:
+ return this->HandleKeyboard();
+
+ default:
+ return 1;
+ }
+ }
+
+ int GzWindow::HandlePush()
+ {
+ return 1;
+ }
+
+ int GzWindow::HandleDrag()
+ {
+ return 1;
+ }
+
+ int GzWindow::HandleKeyboard()
+ {
+ int key = Fl::event_key();
+ return 1;
+ }
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit