00001 00006 #ifndef _GBUTTON_H_ 00007 #define _GBUTTON_H_ 00008 00009 #ifdef MAC 00010 #define GBUTTON_MIN_X 28 00011 #else 00012 #define GBUTTON_MIN_X 16 00013 #endif 00014 00022 class LgiClass GButton : 00023 public GView, 00024 public ResObject 00025 { 00026 class GButtonPrivate *d; 00027 00028 public: 00030 GButton 00031 ( 00033 int id, 00035 int x, 00037 int y, 00039 int cx, 00041 int cy, 00043 const char *name 00044 ); 00045 ~GButton(); 00046 00047 const char *GetClass() { return "GButton"; } 00048 00050 bool Default(); 00052 void Default(bool b); 00054 int64 Value(); 00056 void Value(int64 i); 00057 00058 // Events 00059 int OnEvent(GMessage *Msg); 00060 void OnMouseClick(GMouse &m); 00061 void OnMouseEnter(GMouse &m); 00062 void OnMouseExit(GMouse &m); 00063 bool OnKey(GKey &k); 00064 void OnFocus(bool f); 00065 void OnPaint(GSurface *pDC); 00066 void OnAttach(); 00067 00068 // Impl 00069 char *Name() { return GView::Name(); } 00070 char16 *NameW() { return GView::NameW(); } 00071 bool Name(const char *n); 00072 bool NameW(const char16 *n); 00073 void SetFont(GFont *Fnt, bool OwnIt = false); 00074 }; 00075 00076 #endif