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

CATSwitchMulti.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------
00002 /// \file CATSwitchMulti.h
00003 /// \brief On/Off switch 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-24 06:27:32 -0600 (Thu, 24 Jan 2008) $
00011 // $Revision:   $
00012 // $NoKeywords: $
00013 //
00014 //
00015 //---------------------------------------------------------------------------
00016 #ifndef _GGSwitchMulti_H_
00017 #define _GGSwitchMulti_H_
00018 
00019 #include "CATControl.h"
00020 
00021 class CATSwitchMulti;
00022 
00023 /// \class CATSwitchMulti
00024 /// \brief On/Off switch for GUI
00025 /// \ingroup CATGUI
00026 class CATSwitchMulti : public CATControl
00027 {
00028 public:
00029     /// CATSwitchMulti constructor (inherited from CATControl->CATXMLObject)
00030     /// \param element - Type name ("Switch")
00031     /// \param attribs - attribute information for the window
00032     /// \param parent - parent XML object (should be a "Window" element)
00033     /// \param rootDir - root directory of skin for bin/png loads
00034     CATSwitchMulti(   const CATString&             element, 
00035         const CATString&             rootDir);
00036 
00037     virtual ~CATSwitchMulti();          
00038 
00039     virtual void OnMouseClick();
00040 
00041     /// Draw() draws the control into the parent's image
00042     /// \param image - parent image to draw into   
00043     /// \param dirtyRect - portion of control (in window coordinates)
00044     ///        that requires redrawing.
00045     virtual void Draw(CATImage* image, const CATRect& dirtyRect);
00046 
00047     /// ParseAttributes() parses the known attributes for an object.
00048     virtual CATResult ParseAttributes();
00049 
00050     /// Load() loads the skin in
00051     virtual        CATResult Load(   CATPROGRESSCB              progressCB   = 0,
00052         void*                       progressParam= 0,
00053         CATFloat32                      progMin      = 0.0f,
00054         CATFloat32                      progMax      = 1.0f);   
00055 
00056     virtual  CATString GetHint() const;
00057 
00058 #ifdef _WIN32
00059     virtual CATUInt32     GetAccessRole() {return CAT_ROLE_SYSTEM_PUSHBUTTON;}
00060 #endif //_WIN32
00061 
00062 protected:
00063     bool                    fAutoIncrement;
00064     CATUInt32               fNumImages;      
00065 
00066     std::vector<CATImage*>  fImageList;
00067     std::vector<CATImage*>  fImageDisabledList;
00068     std::vector<CATImage*>  fImagePressedList;
00069     std::vector<CATImage*>  fImageFocusList;
00070     std::vector<CATImage*>  fImageActiveList;
00071     CATStack<CATImage*> fMasterSet;
00072 };
00073 
00074 #endif // _GGSwitchMulti_H_
00075 
00076 

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