fltksup.h

Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
00003 // 
00004 // This program is free software; you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation; either version 2 of the License, or
00007 // (at your option) any later version.
00008 // 
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 // You should have received a copy of the GNU General Public License
00014 // along with this program; if not, write to the Free Software
00015 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
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 //    virtual bool checkEvents(movie_interface *movie);
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 //    Fl_X::create(fltk::fl_window*, XVisualInfo*, Colormap, int background=-1);
00072     virtual void flush();
00073     virtual void destroy();
00074 //    virtual::Window::~Window();
00075     
00076     void draw();
00077     int handle(int event);
00078  private:
00079     fltk::Window *_window;
00080     fltk::PopupMenu  *_popup_menu;
00081 };
00082  
00083 // end of namespace gnash 
00084 }
00085 
00086 // end of __FLTKSUP_H__
00087 #endif

Generated on Thu Nov 23 22:31:31 2006 for Gnash by  doxygen 1.4.6