CopperPrimitives.h

Go to the documentation of this file.
00001 #ifndef _COPPER_WINDOW_PRIMITIVES_H
00002 #define _COPPER_WINDOW_PRIMITIVES_H
00003 
00004 #include "CopperWindow.h"
00005 #include "MercurySprite.h"
00006 #include "MercuryText.h"
00007 
00009 class CopperWindowLoadable : public CopperWindow
00010 {
00011 public:
00012     virtual void Init( CopperWindow * pParent, const MString & sName );
00013     virtual bool IsFocusable() { return true; }
00014     CLASS_RTTI( CopperWindowLoadable, CopperWindow );
00015 };
00016 
00018 class CopperPicture : public CopperWindow
00019 {
00020 public:
00021     virtual void Init( CopperWindow * pParent, const MString & sName );
00022 
00023     virtual bool IsFocusable() { return false; }
00024     CLASS_RTTI( CopperPicture, CopperWindow );
00025 protected:
00026     MercurySprite   m_pImage;   
00027 };
00028 
00030 class CopperCaption : public CopperWindow
00031 {
00032 public:
00033     virtual void Init( CopperWindow * pParent, const MString & sName );
00034 
00035     virtual bool IsFocusable() { return false; }
00036     CLASS_RTTI( CopperCaption, CopperWindow );
00037 protected:
00038     MercuryText     m_pText;
00039 };
00040 
00042 class CopperButton : public CopperCaption
00043 {
00044 public:
00045     virtual void Init( CopperWindow * pParent, const MString & sName );
00046     virtual bool MouseEvent( const CopperMouseEvent & pMouseEvent );
00047 
00048     virtual bool IsFocusable() { return true; }
00049     CLASS_RTTI( CopperButton, CopperWindow );
00050 protected:
00051     void ToggleDownImage(bool isPressed);
00052     bool            m_bCurrentlyPressed;
00053 
00054     CSTMessagePair  m_pBrdReleaseInBox;
00055 
00056     MercurySprite   m_pBGDown;
00057     MercurySprite   m_pBGUp;
00058 };
00059 
00060 #endif
00061 
00062 /*
00063  * (c) 2006 Charles Lohr
00064  * All rights reserved.
00065  * 
00066  * Permission is hereby granted, free of charge, to any person obtaining a
00067  * copy of this software and associated documentation files (the
00068  * "Software"), to deal in the Software without restriction, including
00069  * without limitation the rights to use, copy, modify, merge, publish,
00070  * distribute, and/or sell copies of the Software, and to permit persons to
00071  * whom the Software is furnished to do so, provided that the above
00072  * copyright notice(s) and this permission notice appear in all copies of
00073  * the Software and that both the above copyright notice(s) and this
00074  * permission notice appear in supporting documentation.
00075  * 
00076  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00077  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00078  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
00079  * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
00080  * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
00081  * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
00082  * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
00083  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
00084  * PERFORMANCE OF THIS SOFTWARE.
00085  */
00086 

Hosted by SourceForge.net Logo