00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __NEOWTKEDITBOX_H
00028 #define __NEOWTKEDITBOX_H
00029
00030
00031 #include "base.h"
00032 #include "borderarea.h"
00033
00034 #ifdef HAVE_NEOCHUNKIO
00035 # include <neochunkio/complex.h>
00036 # include "chunktype.h"
00037 #endif
00038
00039
00046 namespace NeoWTK
00047 {
00048
00049
00050
00051 class TextArea;
00052
00053
00054
00055 class EditBoxChunk;
00056
00057
00063 class NEOWTK_API EditBox : public BorderArea
00064 {
00065 #ifdef HAVE_NEOCHUNKIO
00066 friend class EditBoxChunk;
00067 #endif
00068
00069 protected:
00070
00072 TextArea *m_pkTextArea;
00073
00075 Object *m_pkCursor;
00076
00078 bool m_bInputFocus;
00079
00081 float m_fCursorBlinkTime;
00082
00083
00084 public:
00085
00091 EditBox( Object *pkParent, EditBox *pkObject = 0, bool bCreateAreas = true );
00092
00095 virtual ~EditBox();
00096
00103 virtual bool Render( NeoEngine::Frustum *pkFrustum = 0, bool bForce = false );
00104
00109 virtual void Update( float fDeltaTime );
00110
00116 virtual unsigned int ProcessMsg( Msg *pkMsg );
00117
00124 virtual Object *Duplicate( Object *pkParent = 0, Object *pkObject = 0 );
00125 };
00126
00127
00128 #ifdef HAVE_NEOCHUNKIO
00129
00130
00136 class NEOWTK_API EditBoxChunk : public BorderAreaChunk
00137 {
00138 public:
00139
00146 EditBoxChunk( unsigned short usType, const NeoEngine::HashString &rstrType, const NeoEngine::HashString &rstrID = "" ) : BorderAreaChunk( usType, rstrType, rstrID ) {}
00147
00151 virtual ~EditBoxChunk() {}
00152
00159 virtual int ParseData( unsigned int uiFlags, NeoEngine::FileManager *pkFileManager );
00160
00168 static NeoChunkIO::Chunk *Allocator( unsigned short usType, const NeoEngine::HashString &rstrType, const NeoEngine::HashString &rstrID ) { return new EditBoxChunk( usType, rstrType, rstrID ); }
00169 };
00170
00171
00172 #endif
00175 };
00178 #endif