00001 #ifndef _SCROLLDECORATOR_H_INCLUDED_ 00002 #define _SCROLLDECORATOR_H_INCLUDED_ 00003 00004 #include <iostream> 00005 00006 class ScrollDecorator : public Decorator { 00007 public: 00008 static const int INITIAL_SCROLL_POSITION = 0; 00009 00010 ScrollDecorator( VisualComponent* pvc, int position_ ) 00011 : 00012 Decorator( pvc ), m_scrollPosition( position_ ) 00013 { 00014 } 00015 00016 virtual void Draw() 00017 { 00018 Decorator::Draw(); 00019 DrawScroll( m_scrollPosition ); 00020 } 00021 00022 private: 00023 void DrawScroll( int position_ ) 00024 { 00025 std::cout << " scroll-position:" << position_; 00026 } 00027 00028 private: 00029 int m_scrollPosition; 00030 }; 00031 00032 #endif //_SCROLLDECORATOR_H_INCLUDED_