Main Page   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

/cygdrive/d/Eigene Dateien/!DProcs/code_gen/src/QScreen.h

Go to the documentation of this file.
00001 // Class QScreen 
00002 // Filename QScreen.h 
00003 // FaPra 2003-2004, A5, Alexander Kramer
00004 
00005 #ifndef QScreen_h 
00006 #define QScreen_h 
00007 
00008 #include "QWidget.h"
00009 
00010 //! Pre-declaration of QScreen
00011 class QScreen;
00012 
00013 
00014 
00015 #include "QEvent.h"
00016 
00017 //! Screen which manages the windows
00018 class QScreen : public QWidget
00019 {
00020 protected:
00021 //! Widget List which will be removed before next event processing
00022 list<QWidget*> WidgetsToRemove;
00023 
00024 //! current focused widget
00025 QWidget* ScreenFocusedWidget;
00026 
00027 //! last event which was sent to windows or widgets
00028 QEvent* LastEvent;
00029 
00030 public:
00031 //! draws itself with OpenGL. Here is the OpenGL drawing code
00032 virtual void draw( QEvent*  e );
00033 
00034 //! layout the children widgets. This method is called every time the size is changed. Have to be overwritten for respond on size changes
00035 virtual void layout();
00036 
00037 //! have to return true if widget should be dragged with mouse. This method is overwritten in sub classes. If returns true, widget will be dragged
00038 virtual bool canDrag( QEvent*  e );
00039 
00040 //! processing mouse/keyboard events which are in widgets region. Mouse coordinates are relative to Owner
00041 virtual bool processEvent( QEvent*  e );
00042 
00043 //! processing mouse events which are in Owner widget region. Mouse coordinates are relative to Owner
00044 virtual bool processMouseOwner( QEvent*  e );
00045 
00046 //! called if a child is added/removed
00047 virtual void childrenChanged();
00048 
00049 //! defines whether control can have keyboard focus. Should return true if Widget wants to get keyboard focus
00050 virtual bool canFocus( QEvent*  e );
00051 
00052 //! initialization code
00053 virtual void Init();
00054 
00055 //! clean up code
00056 virtual void CleanUp();
00057 
00058 //! overwritten method which adds the widget to the list for freeing
00059 virtual void freeWidget( QWidget*  widget );
00060 
00061 //! removes a widget from the children
00062 virtual void remove( QWidget*  widget );
00063 
00064 //! sends current event
00065  void sendEvent();
00066 
00067 //! post request for redisplay
00068 virtual void redraw();
00069 
00070 //! method for handling glut resize function
00071 virtual void glutResize( int  width , int  height );
00072 
00073 //! method for handling glut keyboard down function
00074 virtual void glutKeyboard( unsigned  char  key , int  x , int  y );
00075 
00076 //! method for handling glut keyboard up function 
00077 virtual void glutKeyboardUp( unsigned  char  key , int  x , int  y );
00078 
00079 //! method for handling glut special key functions
00080 virtual void glutSpecialFunc( int  key , int  x , int  y );
00081 
00082 //! method for handling glut mouse motion function
00083 virtual void glutMotion( int  x , int  y );
00084 
00085 //! method for handling glut mouse button function
00086 virtual void glutMouse( int  button , int  state , int  x , int  y );
00087 
00088 //! method for handling glut display function
00089 virtual void glutDisplay();
00090 
00091 //! called if Sender wants to announce new focused control
00092 virtual void requestFocus( QWidget*  Sender , QWidget*  FocusedWidget );
00093 
00094 //! getter method for ScreenFocusedWidget
00095 virtual QWidget* getScreenFocusedWidget();
00096 
00097 //! setter method for ScreenFocusedWidget
00098 virtual void setScreenFocusedWidget( QWidget*  newValue );
00099 
00100 //! getter method for LastEvent
00101  QEvent* getLastEvent();
00102 
00103 //! prints itself to the cout
00104  void print();
00105 
00106 //! Constructor
00107   QScreen( QWidget*  aOwner );
00108 
00109 //! Destructor
00110 virtual  ~QScreen();
00111 
00112 
00113 };
00114 #endif
00115 

Generated on Thu Mar 18 18:33:48 2004 for miniQT by doxygen1.2.18