FXLinkLabel Class Reference

#include <FXLinkLabel.h>

Inheritance diagram for FXLinkLabel:

FXLabel

Detailed Description

A label which points to a link. This class behaves very much like the FXLabel class but it points to some link which is started when clicked.

Definition at line 20 of file FXLinkLabel.h.


Public Types

enum  { ID_FIRST = FXLabel::ID_LAST, ID_TIMER, ID_LAST }

Public Member Functions

 FXLinkLabel (FXComposite *p, const FXString &text, FXIcon *ic=0, FXuint opts=LABEL_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
 Constructor.
long onLeftBtnPress (FXObject *, FXSelector, void *)
long onTimer (FXObject *, FXSelector, void *)
virtual ~FXLinkLabel ()
 Destructor.

Protected Member Functions

 FXLinkLabel ()

Member Enumeration Documentation

anonymous enum

Enumerator:
ID_FIRST 
ID_TIMER 
ID_LAST 

Definition at line 33 of file FXLinkLabel.h.

00033          {
00034         ID_FIRST = FXLabel::ID_LAST,
00035         ID_TIMER,
00036 
00037         ID_LAST
00038     };


Constructor & Destructor Documentation

FXLinkLabel::FXLinkLabel (  )  [inline, protected]

Definition at line 24 of file FXLinkLabel.h.

00024 {}

FXLinkLabel::FXLinkLabel ( FXComposite *  p,
const FXString &  text,
FXIcon *  ic = 0,
FXuint  opts = LABEL_NORMAL,
FXint  x = 0,
FXint  y = 0,
FXint  w = 0,
FXint  h = 0,
FXint  pl = DEFAULT_PAD,
FXint  pr = DEFAULT_PAD,
FXint  pt = DEFAULT_PAD,
FXint  pb = DEFAULT_PAD 
)

Constructor.

FXLinkLabel::~FXLinkLabel (  )  [virtual]

Destructor.

Definition at line 72 of file FXLinkLabel.cpp.

References ID_TIMER.

00072                           {
00073     getApp()->removeTimeout(this,ID_TIMER);
00074 }


Member Function Documentation

long FXLinkLabel::onLeftBtnPress ( FXObject ,
FXSelector  ,
void *   
)

Definition at line 76 of file FXLinkLabel.cpp.

References fxexecute(), and ID_TIMER.

00076                                                            {
00077     FXString link = getTipText();
00078     if (link.length()) {
00079         getApp()->beginWaitCursor();
00080         if (fxexecute(link))
00081             getApp()->addTimeout(this,ID_TIMER,2000); // 2 seconds of way cursor
00082         else {
00083             getApp()->endWaitCursor();
00084             getApp()->beep();
00085         }
00086     }
00087     return 1;
00088 }

long FXLinkLabel::onTimer ( FXObject ,
FXSelector  ,
void *   
)

Definition at line 90 of file FXLinkLabel.cpp.

00090                                                     {
00091     getApp()->endWaitCursor();
00092     return 1;
00093 }


The documentation for this class was generated from the following files:

Generated on Wed May 5 00:06:41 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6