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
00028 #ifndef _FalMultiLineEditbox_h_
00029 #define _FalMultiLineEditbox_h_
00030
00031 #include "FalModule.h"
00032 #include "../../elements/CEGUIMultiLineEditbox.h"
00033 #include "FalMultiLineEditboxProperties.h"
00034
00035 #if defined(_MSC_VER)
00036 # pragma warning(push)
00037 # pragma warning(disable : 4251)
00038 #endif
00039
00040
00041 namespace CEGUI
00042 {
00074 class FALAGARDBASE_API FalagardMultiLineEditbox : public MultiLineEditboxWindowRenderer
00075 {
00076 public:
00077 static const utf8 TypeName[];
00078
00079 static const String UnselectedTextColourPropertyName;
00081 static const String SelectedTextColourPropertyName;
00083 static const String ActiveSelectionColourPropertyName;
00085 static const String InactiveSelectionColourPropertyName;
00087 static const float DefaultCaretBlinkTimeout;
00088
00093 FalagardMultiLineEditbox(const String& type);
00094
00095
00096 Rect getTextRenderArea(void) const;
00097 void render();
00098 void update(float elapsed);
00099
00101 bool isCaretBlinkEnabled() const;
00103 float getCaretBlinkTimeout() const;
00105 void setCaretBlinkEnabled(bool enable);
00107 void setCaretBlinkTimeout(float seconds);
00108
00109 protected:
00120 void cacheEditboxBaseImagery();
00121
00129 void cacheCaratImagery(const Rect& textArea);
00130
00135 void cacheTextLines(const Rect& dest_area);
00136
00145 colour getUnselectedTextColour() const;
00146
00155 colour getActiveSelectionColour() const;
00156
00165 colour getInactiveSelectionColour() const;
00166
00175 colour getSelectedTextColour() const;
00176
00186 colour getOptionalPropertyColour(const String& propertyName) const;
00187
00188
00189 static FalagardMultiLineEditboxProperties::BlinkCaret d_blinkCaretProperty;
00190 static FalagardMultiLineEditboxProperties::BlinkCaretTimeout d_blinkCaretTimeoutProperty;
00191
00193 bool d_blinkCaret;
00195 float d_caretBlinkTimeout;
00197 float d_caretBlinkElapsed;
00199 bool d_showCaret;
00200 };
00201
00202 }
00203
00204
00205 #if defined(_MSC_VER)
00206 # pragma warning(pop)
00207 #endif
00208
00209 #endif // end of guard _FalMultiLineEditbox_h_