home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
ool.zip
/
OOL
/
include
/
xuserbtn.h
< prev
next >
Wrap
Text File
|
1997-02-23
|
2KB
|
56 lines
#ifndef __OOL_XUSERBUTTON_H__
#define __OOL_XUSERBUTTON_H__
/*===========================================================================*/
/* OOL ------------------- the Open Object Library ------------- OS/2 Beta 1 */
/*===========================================================================*/
/* class: XUserButton */
/* derived from: XSettingButton */
/* last update: 12/96 */
/* programmed by: Stefan von Brauk (sbrauk@gwdg.de) */
/*===========================================================================*/
#include "xsetbtn.h"
#include "xtext.h"
#include "xgraphdv.h"
class XBitmap;
class XLine;
#define BU_TWOSTATE 0x8000
class _export_ XUserButton: public XSettingButton
{
friend XBitmap;
//for internal use only:
friend class userbtnhandler;
friend class userbtnmousehandler;
char isPressed;
XText * text;
XGraphicDevice * graph;
LONG style;
char buffer;
XLine * line1, *line2, *line3, *line4;
protected:
XBitmap * bmp[2];
void Draw( void );
void Setup( );
public:
XUserButton( const XWindow * w, const XRect * r, const LONG id = 0, const LONG style = WIN_VISIBLE, const char * text = NULL, const SHORT yOff = 0);
virtual ~XUserButton();
virtual void GetText( XString * buffer );
XBitmap * GetBitmapPointer( UCHAR index) { if(index == 0 || index == 1) return bmp[index]; else return NULL; }
XGraphicDevice * GetGraphPointer() { return graph; }
XText * GetTextPointer(void) { return text; }
virtual BOOL IsSelected( void ) const ;
void SetBitmap( const XBitmap *, const UCHAR index = 0);
virtual void Select( BOOL select = TRUE);
virtual void SetText( const char * text);
void SetTextStyle( const LONG t) { ;}
virtual void Toggle(void);
};
#endif