Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATGUI/CATProgress.h Source File

CATProgress.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------
00002 /// \file CATProgress.h
00003 /// \brief Progress bar for GUI
00004 /// \ingroup CATGUI
00005 ///
00006 /// Copyright (c) 2003-2008 by Michael Ellison.
00007 /// See COPYING.txt for the \ref gaslicense License (MIT License).
00008 ///
00009 // $Author: mikeellison $
00010 // $Date: 2008-01-30 06:11:10 -0600 (Wed, 30 Jan 2008) $
00011 // $Revision:   $
00012 // $NoKeywords: $
00013 //
00014 //
00015 //---------------------------------------------------------------------------
00016 #ifndef _GGProgress_H_
00017 #define _GGProgress_H_
00018 
00019 #include "CATControl.h"
00020 
00021 class CATProgress;
00022 
00023 enum CATPROGRESSSTYLE
00024 {
00025     CATPROGRESS_VERTICAL,
00026     CATPROGRESS_HORIZONTAL
00027 };
00028 
00029 /// \class CATProgress CATProgress.h
00030 /// \brief Progress bar for GUI
00031 /// \ingroup CATGUI
00032 class CATProgress : public CATControl
00033 {
00034 public:
00035     // CATProgress constructor (inherited from CATControl->CATXMLObject)
00036     // \param element - Type name ("Progress")
00037     // \param attribs - attribute information for the window
00038     // \param parent - parent XML object (should be a "Window" element)
00039     // \param rootDir - root directory of skin for bin/png loads
00040     CATProgress( const CATString&             element, 
00041         const CATString&             rootDir);
00042 
00043     virtual ~CATProgress();          
00044 
00045     /// IsFocusable() returns true if the control can receive
00046     /// focus, and false otherwise.
00047     virtual bool         IsFocusable() const;
00048 
00049     /// Load() loads the skin in
00050     virtual        CATResult Load(CATPROGRESSCB             progressCB   = 0,
00051         void*                           progressParam= 0,
00052         CATFloat32                      progMin      = 0.0f,
00053         CATFloat32                      progMax      = 1.0f);   
00054 
00055     /// Draw() draws the control into the parent's image
00056     /// \param image - parent's image to draw into
00057     /// \param dirtyRect - portion of control (in window coordinates)
00058     ///        that requires redrawing.
00059     virtual void Draw(CATImage* image, const CATRect& dirtyRect);
00060 
00061     /// ParseAttributes() parses the known attributes for an object.
00062     virtual CATResult ParseAttributes();
00063 
00064     /// SetImages() sets the images and resets the control
00065     virtual void SetImages( CATImage* imageOn, CATImage* imageOff, CATImage* imageDisabled);
00066 
00067 #ifdef _WIN32
00068     virtual CATUInt32     GetAccessRole() {return CAT_ROLE_SYSTEM_PROGRESSBAR;}
00069 #endif //_WIN32
00070 
00071 protected:
00072     CATImage*          fImageOn;
00073     CATPROGRESSSTYLE   fProgressStyle;
00074 };
00075 
00076 #endif // _GGProgress_H_
00077 
00078 

Generated on Mon Feb 11 04:09:55 2008 for Game Accessibility Suite by doxygen 1.5.4