Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

ctrl_button.hpp

00001 /*****************************************************************************
00002  * ctrl_button.hpp
00003  *****************************************************************************
00004  * Copyright (C) 2003 the VideoLAN team
00005  * $Id: ctrl_button.hpp 12053 2005-08-06 23:38:31Z asmax $
00006  *
00007  * Authors: Cyril Deguet     <[email protected]>
00008  *          Olivier Teulière <[email protected]>
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef CTRL_BUTTON_HPP
00026 #define CTRL_BUTTON_HPP
00027 
00028 #include "ctrl_generic.hpp"
00029 #include "../utils/fsm.hpp"
00030 
00031 class GenericBitmap;
00032 class OSGraphics;
00033 class CmdGeneric;
00034 
00035 
00037 class CtrlButton: public CtrlGeneric
00038 {
00039     public:
00041         CtrlButton( intf_thread_t *pIntf, const GenericBitmap &rBmpUp,
00042                     const GenericBitmap &rBmpOver,
00043                     const GenericBitmap &rBmpDown,
00044                     CmdGeneric &rCommand, const UString &rTooltip,
00045                     const UString &rHelp, VarBool *pVisible );
00046 
00047         virtual ~CtrlButton();
00048 
00050         virtual void handleEvent( EvtGeneric &rEvent );
00051 
00053         virtual bool mouseOver( int x, int y ) const;
00054 
00056         virtual void draw( OSGraphics &rImage, int xDest, int yDest );
00057 
00059         virtual UString getTooltipText() const { return m_tooltip; }
00060 
00062         virtual string getType() const { return "button"; }
00063 
00064     private:
00066         FSM m_fsm;
00068         CmdGeneric &m_rCommand;
00070         const UString m_tooltip;
00072         OSGraphics *m_pImgUp, *m_pImgOver, *m_pImgDown;
00074         OSGraphics *m_pImg;
00075 
00077         DEFINE_CALLBACK( CtrlButton, UpOverDownOver )
00078         DEFINE_CALLBACK( CtrlButton, DownOverUpOver )
00079         DEFINE_CALLBACK( CtrlButton, DownOverDown )
00080         DEFINE_CALLBACK( CtrlButton, DownDownOver )
00081         DEFINE_CALLBACK( CtrlButton, UpOverUp )
00082         DEFINE_CALLBACK( CtrlButton, UpUpOver )
00083         DEFINE_CALLBACK( CtrlButton, DownUp )
00084         DEFINE_CALLBACK( CtrlButton, UpHidden )
00085         DEFINE_CALLBACK( CtrlButton, HiddenUp )
00086 };
00087 
00088 
00089 #endif

Generated on Tue Dec 20 10:14:41 2005 for vlc-0.8.4a by  doxygen 1.4.2