Crazy Eddies GUI System: FalMultiLineEditbox.h Source File

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

FalMultiLineEditbox.h

    00001 /***********************************************************************
    00002     filename:   FalMultiLineEditbox.h
    00003     created:    Thu Jul 7 2005
    00004     author:     Paul D Turner <paul@cegui.org.uk>
    00005 *************************************************************************/
    00006 /***************************************************************************
    00007  *   Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
    00008  *
    00009  *   Permission is hereby granted, free of charge, to any person obtaining
    00010  *   a copy of this software and associated documentation files (the
    00011  *   "Software"), to deal in the Software without restriction, including
    00012  *   without limitation the rights to use, copy, modify, merge, publish,
    00013  *   distribute, sublicense, and/or sell copies of the Software, and to
    00014  *   permit persons to whom the Software is furnished to do so, subject to
    00015  *   the following conditions:
    00016  *
    00017  *   The above copyright notice and this permission notice shall be
    00018  *   included in all copies or substantial portions of the Software.
    00019  *
    00020  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    00021  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    00022  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    00023  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
    00024  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
    00025  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    00026  *   OTHER DEALINGS IN THE SOFTWARE.
    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 // Start of CEGUI namespace section
    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     // overridden from base classes.
    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     // properties
    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 } // End of  CEGUI namespace section
    00203
    00204
    00205 #if defined(_MSC_VER)
    00206 #       pragma warning(pop)
    00207 #endif
    00208
    00209 #endif  // end of guard _FalMultiLineEditbox_h_