Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXEmbedderWindow.h

00001 /******************************************************************************** 00002 * * 00003 * W i n d o w H o s t i n g X E M B E D C l i e n t s * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 2004,2005 by Ivan Markov. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or * 00009 * modify it under the terms of the GNU Lesser General Public * 00010 * License as published by the Free Software Foundation; either * 00011 * version 2.1 of the License, or (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00016 * Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public * 00019 * License along with this library; if not, write to the Free Software * 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * 00021 ********************************************************************************* 00022 * $Id: FXEmbedderWindow.h,v 1.2 2005/01/31 01:22:58 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXEMBEDDERWINDOW_H 00025 #define FXEMBEDDERWINDOW_H 00026 00027 00028 #ifndef FXCOMPOSITE_H 00029 #include "FXComposite.h" 00030 #endif 00031 00032 namespace FX { 00033 00034 00035 class FXEmbedderWindow: public FXComposite { 00036 FXDECLARE(FXEmbedderWindow) 00037 friend class FXEmbedApp; 00038 protected: 00039 #ifdef WIN32 00040 FXID savedFocusWindow; 00041 #else 00042 FXID embeddedWindow; 00043 #endif 00044 protected: 00045 FXEmbedderWindow(){ } 00046 FXbool isForeignWindow(FXID window) const; 00047 FXID findEmbeddedWindow() const; 00048 virtual FXbool preprocessEvent(FXRawEvent&); 00049 #ifndef WIN32 00050 void registerEmbeddedWindow(FXID window); 00051 void unregisterEmbeddedWindow(); 00052 FXbool forwardEmbeddedWindowKeyEvent(); 00053 void sendEmbeddedWindowClientEvent(int time,int message,int detail,int data1,int data2); 00054 void updateEmbeddedWindowMap(); 00055 #endif 00056 private: 00057 FXEmbedderWindow(const FXEmbedderWindow&); 00058 FXEmbedderWindow& operator=(const FXEmbedderWindow&); 00059 public: 00060 long onConfigure(FXObject*,FXSelector,void*); 00061 long onKeyPress(FXObject*,FXSelector,void*); 00062 long onKeyRelease(FXObject*,FXSelector,void*); 00063 long onFocusIn(FXObject*,FXSelector,void*); 00064 long onFocusOut(FXObject*,FXSelector,void*); 00065 long onFocusNext(FXObject*,FXSelector,void*); 00066 long onFocusPrev(FXObject*,FXSelector,void*); 00067 public: 00068 00069 /// Constructor 00070 FXEmbedderWindow(FXComposite* p,FXObject* tgt=NULL,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0); 00071 00072 /// Create server-side resources 00073 virtual void create(); 00074 00075 /// Detach server-side resources 00076 virtual void detach(); 00077 00078 /// Destroy server-side resources 00079 virtual void destroy(); 00080 00081 /// Enable the window to receive mouse and keyboard events 00082 virtual void enable(); 00083 00084 /// Disable the window from receiving mouse and keyboard events 00085 virtual void disable(); 00086 00087 /// Return true if this window is a control capable of receiving the focus 00088 virtual FXbool canFocus() const; 00089 00090 void attachEmbeddedWindow(FXID window); 00091 void detachEmbeddedWindow(); 00092 00093 FXID getEmbeddedWindow() const; 00094 00095 void focusNext(); 00096 void focusPrev(); 00097 00098 /// Destructor 00099 virtual ~FXEmbedderWindow(); 00100 }; 00101 00102 } 00103 00104 #endif

Copyright © 1997-2005 Jeroen van der Zijp