- Main Page
- Classes
- Files
- Directories
- Related Pages

# progress.h

    00001 #ifndef KYRA_PROGRESSWIDGET_INCLUDED
    00002 #define KYRA_PROGRESSWIDGET_INCLUDED
    00003
    00004 #include "../gui/widget.h"
    00005
    00006
    00021 class KrProgress : public KrWidget
    00022 {
    00023 protected:
    00024
    00025         unsigned int m_maxValue;
    00026         unsigned int m_value;
    00027         KrBox* m_progress;
    00028         KrBox* m_border;
    00029         KrBoxResource *m_progressres;
    00030         KrBoxResource *m_borderres;
    00031
    00032         bool m_vertical;
    00033         int m_width, m_height;
    00034         KrRGBA m_FillCol;
    00035         KrRGBA m_ChangeCol;
    00036         KrRGBA m_BorderCol;
    00037         bool m_multicolor;
    00038
    00039         // Updates the size of the inner box
    00040         void Update();
    00041
    00042 public:
    00046         KrProgress::KrProgress (int width,
    00047                                                         int height,
    00048                                                         KrRGBA FillColor,
    00049                                                         KrRGBA ChangeColor,
    00050                                                         KrRGBA BorderColor,
    00051                                                         const KrScheme& scheme);
    00052
    00056         KrProgress::KrProgress (int width,
    00057                                                         int height,
    00058                                                         const KrScheme& scheme);
    00059
    00060         ~KrProgress ();
    00061
    00062         virtual const char* WidgetType() { return "Progress"; }
    00063
    00064         // Need to insert the progress box at the proper time
    00065         virtual void AddedtoTree();
    00066
    00068         void SetBarColors (KrRGBA FillColor, KrRGBA ChangeColor, KrRGBA BorderColor);
    00069
    00071         void SetMaxValue(int value);
    00072
    00074         void SetValue(int value);
    00075
    00077         unsigned int GetMaxValue() { return m_maxValue; }
    00078
    00080         unsigned int GetValue() { return m_value; }
    00081 };
    00082
    00083 #endif