Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
00001 /******************************************************************************** 00002 * * 00003 * C o m p o s e - C o n t e x t * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 2005,2006 by Jeroen van der Zijp. 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: FXComposeContext.h,v 1.8 2006/01/22 17:57:59 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXCOMPOSECONTEXT_H 00025 #define FXCOMPOSECONTEXT_H 00026 00027 #ifndef FXID_H 00028 #include "FXId.h" 00029 #endif 00030 00031 namespace FX { 00032 00033 00034 class FXApp; 00035 class FXWindow; 00036 00037 00038 /** 00039 * Compose Context manages the state of an input method 00040 * if input method support is enabled. 00041 */ 00042 class FXAPI FXComposeContext : public FXId { 00043 FXDECLARE(FXComposeContext) 00044 protected: 00045 FXWindow *window; // Window we belong to 00046 FXSelector message; // Message to send it 00047 private: 00048 #ifndef WIN32 00049 static int editStartCallback(void*,FXComposeContext*,void*); 00050 static void editDoneCallback(void*,FXComposeContext*,void*); 00051 static void editDrawCallback(void*,FXComposeContext*,void*); 00052 static void editCaretCallback(void*,FXComposeContext*,void*); 00053 static void statusStartCallback(void*,FXComposeContext*,void*); 00054 static void statusDoneCallback(void*,FXComposeContext*,void*); 00055 static void statusDrawCallback(void*,FXComposeContext*,void*); 00056 #endif 00057 protected: 00058 FXComposeContext(); 00059 private: 00060 FXComposeContext(const FXComposeContext&); 00061 FXComposeContext &operator=(const FXComposeContext&); 00062 public: 00063 00064 /// Construct compose context for given window 00065 FXComposeContext(FXApp* a,FXWindow* win=NULL,FXSelector sel=0); 00066 00067 /// Create resource 00068 virtual void create(); 00069 00070 /// Destroy resource 00071 virtual void destroy(); 00072 00073 /// Focus in 00074 void focusIn(); 00075 00076 /// Focus out 00077 void focusOut(); 00078 00079 /// Set the spot 00080 void setSpot(FXint x,FXint y); 00081 00082 /// Set the area 00083 void setArea(FXint x,FXint y,FXint w,FXint h); 00084 00085 /// Translate key event 00086 FXString translateEvent(FXRawEvent& event); 00087 00088 /// Destructor 00089 virtual ~FXComposeContext(); 00090 }; 00091 00092 } 00093 00094 #endif
Copyright © 1997-2005 Jeroen van der Zijp |