123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- //===========================================================================//
- // Copyright (C) Microsoft Corporation. All rights reserved. //
- //===========================================================================//
- #ifndef ASCROLL_H
- #define ASCROLL_H
- #include "aSystem.h"
- #include "aButton.h"
- class mcScrollButton : public aAnimButton
- {
- public:
- virtual void render();
- unsigned long lightEdge;
- unsigned long darkEdge;
- unsigned long regularColor;
- };
- class aScrollBar : public aObject
- {
- public:
- aScrollBar();
- virtual long init(long xPos, long yPos, long w, long h);
- virtual void destroy();
- virtual void update();
- virtual void render();
- virtual int handleMessage( unsigned long message, unsigned long fromWho );
- void SetScrollMax(float newMax);
- void SetScrollPos(float newPos);
- float GetScrollMax(void){return scrollMax;};
- float GetScrollPos(void){return scrollPos;};
- long SetSrollInc( long newInc ){ scrollInc = newInc; } // amount you move for one arrow click
- long SetScrollPage(long newInc){ pageInc = newInc;} // amount you move if you click on the bar itself
- void ScrollUp(void);
- void ScrollPageUp(void);
- void ScrollDown(void);
- void ScrollPageDown(void);
- void SetScroll( long newScrollPos );
- void Enable( bool enable );
- protected:
- float scrollMax;
- float scrollPos;
- aAnimButton topButton;
- aAnimButton bottomButton;
- mcScrollButton scrollTab;
- long lastY;
- long scrollInc;
- long pageInc;
- unsigned long color;
- void ResizeAreas(void);
- };
- class mcScrollBar : public aScrollBar
- {
- public:
- long init ( long xPos, long yPos, long w, long h );
- virtual void resize(long w, long h);
- void setOrange();
- void setGreen();
- private:
- aAnimation orangeInfo[4];
- aAnimation greenInfo[4];
-
- };
- #endif
|