00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __FLTKSUP_H__
00021 #define __FLTKSUP_H__
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026 #include <FL/Enumerations.H>
00027
00028
00029 #include "log.h"
00030 #include "gui.h"
00031
00032 #include <FL/Fl.H>
00033 #include <FL/gl.h>
00034 #include <FL/x.H>
00035 #include <FL/Fl_Window.H>
00036
00037 #include <fltk/Item.h>
00038 #include <fltk/Menu.h>
00039 #include <fltk/Window.h>
00040 #include <fltk/PopupMenu.h>
00041 #include <fltk/Widget.h>
00042 #include <fltk/gl.h>
00043 #include <fltk/visual.h>
00044 #include <fltk/GlWindow.h>
00045
00046 namespace gnash
00047 {
00048
00049 class FltkGui : public fltk::Window, public Gui
00050 {
00051 public:
00052 FltkGui(int x, int y, int width, int height, const char *label=0)
00053 : fltk::Window(width,height,label) {};
00054 virtual ~FltkGui();
00055 virtual bool init(int argc, char **argv[]);
00056 virtual bool init(int xid, int argc, char **argv[]);
00057 virtual bool createWindow(int width, int height);
00058 virtual bool createWindow(int xid, int width, int height);
00059
00060
00061 virtual bool poll();
00062 virtual bool run();
00063 virtual void resizeWindow();
00064 virtual bool createMenu();
00065 virtual bool setupEvents();
00066 virtual void startGL();
00067 virtual void endGL();
00068 virtual void drawTestGraphic();
00069
00070 virtual void create();
00071
00072 virtual void flush();
00073 virtual void destroy();
00074
00075
00076 void draw();
00077 int handle(int event);
00078 private:
00079 fltk::Window *_window;
00080 fltk::PopupMenu *_popup_menu;
00081 };
00082
00083
00084 }
00085
00086
00087 #endif