00001 /********************************************************************** 00002 00003 Copyright (c) 2005, TomTom B.V. 00004 00005 All rights reserved 00006 00007 00008 ***********************************************************************/ 00009 00010 00011 #ifndef __CUIINPUT_H__ 00012 #define __CUIINPUT_H__ 00013 00014 #include "MUIWidget.h" 00015 #include "CUIScreen.h" 00016 00021 class CUIInput: public MUIWidget 00022 { 00023 public: 00032 CUIInput( const CUIRect& aRectangle, 00033 const char* aText, 00034 const char* aCaption, 00035 unsigned int aMaxLen = CUIScreen::KMaxEditLen, 00036 CUIScreen::EEditOptions aOptions = CUIScreen::KDefaultOptions ); 00037 virtual ~CUIInput(); 00038 00039 virtual void Draw(); 00040 virtual bool HandlePenEvent( MInputReader::TTouchEventData& aData ); 00041 virtual bool HandleKeyEvent( MInputReader::TKeyEventData& aData ); 00042 00043 private: 00044 CUIInput(); 00045 CUIInput( const CUIInput& ); 00046 CUIInput& operator=( const CUIInput& ); 00047 00048 private: 00049 char* m_pCaption; 00050 00051 void StartKeyboardInput(); 00052 00053 public: 00056 enum EInputOption 00057 { 00058 KTransparentDraw = 0x01, 00059 KClipTitle = 0x02, 00060 KShowClipping = 0x04, 00063 KDefaultOptions = KClipTitle | KShowClipping 00064 }; 00065 typedef int EInputOptions; 00067 unsigned int iMaxLen; 00068 CUIScreen::EEditOptions iEditOptions; 00069 EInputOptions iOptions; 00070 }; 00071 00072 #endif // __CUIINPUT_H__ 00073