CStepLabel.hpp

Go to the documentation of this file.
00001 #ifndef __CStepLabel__
00002 #define __CStepLabel__
00003 
00004 #include "CTextLabel.hpp"
00005 #include <Collections/CollectionTypedef.h>
00006 #include "../Listeners/IActionListener.hpp"
00007 
00008 //  ===========================================================================
00009 
00010 using Exponent::GUI::Controls::CTextLabel;
00011 using Exponent::GUI::Listeners::IActionListener;
00012 using Exponent::Collections::TStringCountedPointerArray;
00013 
00014 //  ===========================================================================
00015 
00016 namespace Exponent
00017 {
00018     namespace GUI
00019     {
00020         namespace Controls
00021         {
00039             class CStepLabel : public CTextLabel, public IActionListener
00040             {
00042                 EXPONENT_CLASS_DECLARATION;
00045 //  ===========================================================================
00046 
00047             public:
00048 
00049 //  ===========================================================================
00050 
00055                 enum EStepLabelButtons
00056                 {
00057                     e_stepIncrementButton = 0,      
00058                     e_stepDecrementButton,          
00059                 };
00060 
00061 //  ===========================================================================
00062 
00063                 
00071                 CStepLabel(IControlRoot *root, const long uniqueId, const CRect &area, IActionListener *listener = NULL);
00072 
00076                 virtual ~CStepLabel();
00077 
00078 //  ===========================================================================
00079 
00084                 void addString(const CString &string);
00085 
00090                 const TStringCountedPointerArray *getStringArray() const { return m_stringArray; }
00091 
00096                 TStringCountedPointerArray *getMutableStringArray() const { return m_stringArray; }
00097 
00101                 void wrapStringsAtEdges(const bool wrap) { m_wrapStrings = wrap; }
00102 
00103 //  ===========================================================================
00104 
00108                 void nextString();
00109 
00113                 void previousString();
00114 
00119                 void setStep(const long step);
00120 
00121 //  ===========================================================================
00122                 
00129                 virtual void handleActionEvent(const CActionEvent &event);
00130 
00131 //  ===========================================================================
00132 
00133             protected:
00134 
00135 //  ===========================================================================
00136 
00137                 TStringCountedPointerArray *m_stringArray;      
00138                 bool m_wrapStrings;                             
00139                 long m_currentStringIndex;                      
00141             };
00142         }
00143     }
00144 }
00145 #endif  // End of CStepLabel.hpp

Infinity API - CStepLabel.hpp Source File generated on 7 Mar 2007