Google
Web alhem.net
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

gui::HotButton Class Reference

#include <HotButton.h>

Inheritance diagram for gui::HotButton:

Inheritance graph
[legend]
Collaboration diagram for gui::HotButton:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 HotButton (Surface *, coord_t x, coord_t y, buttonstyle_t, SurfaceHelper *=NULL)
 ~HotButton ()
void OnMouseIn ()
void OnMouseOut ()
void OnClick (coord_t, coord_t)
void OnTimer (long)

Constructor & Destructor Documentation

gui::HotButton::HotButton Surface ,
coord_t  x,
coord_t  y,
buttonstyle_t  ,
SurfaceHelper = NULL
 

Definition at line 59 of file HotButton.cpp.

References gui::buttonstyle_t, and gui::coord_t.

00060 :Button(s,x,y,style,sh) 00061 { 00062 SetClickable(true); 00063 }

gui::HotButton::~HotButton  ) 
 

Definition at line 66 of file HotButton.cpp.

00067 { 00068 }


Member Function Documentation

void gui::HotButton::OnClick coord_t  ,
coord_t 
[virtual]
 

Reimplemented from gui::Surface.

Definition at line 111 of file HotButton.cpp.

References gui::Surface::OnButton().

00112 { 00113 // printf("HotButton::OnClick()\n"); 00114 OnButton(); 00115 SetTimer(250); 00116 }

void gui::HotButton::OnMouseIn  )  [virtual]
 

Reimplemented from gui::Surface.

Definition at line 71 of file HotButton.cpp.

References gui::Surface::DrawTemporaryScreen(), gui::Surface::GetParent(), gui::Surface::InvalidateEv(), gui::Surface::IsClickable(), and gui::Surface::UseTemporaryScreen().

00072 { 00073 Surface *pclParent = GetParent(); 00074 if (IsClickable()) 00075 { 00076 SetInverted(true); 00077 while (pclParent) 00078 { 00079 if (pclParent -> UseTemporaryScreen()) 00080 { 00081 pclParent -> DrawTemporaryScreen(); 00082 break; 00083 } 00084 pclParent = pclParent -> GetParent(); 00085 } 00086 InvalidateEv(); 00087 } 00088 }

void gui::HotButton::OnMouseOut  )  [virtual]
 

Reimplemented from gui::Surface.

Definition at line 91 of file HotButton.cpp.

References gui::Surface::DrawTemporaryScreen(), gui::Surface::GetParent(), gui::Surface::InvalidateEv(), gui::Surface::IsClickable(), and gui::Surface::UseTemporaryScreen().

00092 { 00093 Surface *pclParent = GetParent(); 00094 if (IsClickable()) 00095 { 00096 SetInverted(false); 00097 while (pclParent) 00098 { 00099 if (pclParent -> UseTemporaryScreen()) 00100 { 00101 pclParent -> DrawTemporaryScreen(); 00102 break; 00103 } 00104 pclParent = pclParent -> GetParent(); 00105 } 00106 InvalidateEv(); 00107 } 00108 }

void gui::HotButton::OnTimer long   )  [virtual]
 

Reimplemented from gui::Surface.

Definition at line 119 of file HotButton.cpp.

References gui::Surface::IsInverted(), and gui::Surface::OnButton().

00120 { 00121 //printf("HotButton::OnTimer()\n"); 00122 if (IsInverted()) 00123 { 00124 OnButton(); 00125 SetTimer(90); 00126 } 00127 }


The documentation for this class was generated from the following files:
Generated for My SDL C++ Gui by doxygen 1.3.6

www.TV-friendship.com
The matchmaking service with an all new twist.

Quantum 'Teleportation'
Some thoughts
Page, code, and content Copyright (C) 2004 by Anders Hedström