TAPs 0.7.7.3
TAPsOpenGLCtrlButton.cpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsOpenGLCtrlButton.cpp
00003 
00004 Button Control via OpenGL
00005 
00006 SUKITTI PUNAK   (05/02/2007)
00007 UPDATE          (05/02/2007)
00008 ******************************************************************************/
00009 #include "TAPsOpenGLCtrlButton.hpp"
00010 // Using Inclusion Model (i.e. definitions are included in declarations)
00011 //                       (this name.cpp is included in name.hpp)
00012 // Each friend is defined directly inside its declaration.
00013 
00014 BEGIN_NAMESPACE_TAPs__OpenGL
00015 //=============================================================================
00016 // Constructor(s) and Destructor
00017 //-----------------------------------------------------------------------------
00018 OpenGLCtrlButton::OpenGLCtrlButton ()
00019     : OpenGLCtrl()
00020 {
00021     Default();
00022 }
00023 //-----------------------------------------------------------------------------
00024 OpenGLCtrlButton::~OpenGLCtrlButton ()
00025 {}
00026 //-----------------------------------------------------------------------------
00027 //=============================================================================
00028 
00029 //=============================================================================
00030 // Get/Set Function(s)
00031 //-----------------------------------------------------------------------------
00032 void OpenGLCtrlButton::Default ()
00033 {
00034     SetSize( 50, 20 );
00035     SetText( "Push" );
00036     m_BorderSize = 4;
00037     //
00038     m_ForegroundColor[0] = 1.0;
00039     m_ForegroundColor[1] = 1.0;
00040     m_ForegroundColor[2] = 1.0;
00041     m_ForegroundColor[3] = 0.90;
00042     //
00043     m_BackgroundColor[0] = 0.25;
00044     m_BackgroundColor[1] = 0.25;
00045     m_BackgroundColor[2] = 0.25;
00046     m_BackgroundColor[3] = 0.90;
00047 }
00048 //-----------------------------------------------------------------------------
00049 //=============================================================================
00050 
00051 //=============================================================================
00052 // Draw Function(s)
00053 //-----------------------------------------------------------------------------
00054 void OpenGLCtrlButton::Draw ()
00055 {
00056     DrawBackgroundAndBorder();
00057     DrawText();
00058 }
00059 //-----------------------------------------------------------------------------
00060 //=============================================================================
00061 
00062 //=============================================================================
00063 END_NAMESPACE_TAPs__OpenGL
00064 //-----------------------------------------------------------------------------
00065 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00066 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines