home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************
- *
- * WLabel -- Wrapper for the Windows 95 Static Label control.
- *
- * Events:
- *
- * DataAvailable --
- *
- * DataClose --
- *
- * DataOpen --
- *
- * DataRequest --
- *
- *************************************************************************/
-
- #ifndef _WLABEL_HPP_INCLUDED
- #define _WLABEL_HPP_INCLUDED
-
- #ifndef _WNO_PRAGMA_PUSH
- #pragma pack(push,8);
- #pragma enum int;
- #endif
-
- #ifndef _WSTATIC_HPP_INCLUDED
- # include "wstatic.hpp"
- #endif
- #ifndef _WDATATRG_HPP_INCLUDED
- # include "wdatatrg.hpp"
- #endif
-
- class WDataSource;
-
- //
- // Label styles
- //
-
- #define WLSDefault ((WStyle)0x5000010CL) // WS_VISIBLE|SS_LEFTNOWORDWRAP|WS_CHILD|SS_NOTIFY
-
- class WCMCLASS WLabel : public WStatic {
- WDeclareSubclass( WLabel, WStatic );
-
- public:
-
- /**********************************************************
- * Constructors and Destructors
- *********************************************************/
-
- WLabel();
-
- ~WLabel();
-
- /**********************************************************
- * Properties
- *********************************************************/
-
- // AutoSize
-
- virtual WBool SetAutoSize( WBool on );
- virtual WBool GetAutoSize() const;
-
- // DataColumns
-
- WString GetDataColumns() const;
- WBool SetDataColumns( const WString & cols );
-
- // DataSource
-
- WDataSource *GetDataSource() const;
- WBool SetDataSource( WDataSource *source );
-
- /**********************************************************
- * Methods
- *********************************************************/
-
- // AutoSize
-
- virtual WBool AutoSize();
-
- /**********************************************************
- * Overrides
- *********************************************************/
-
- virtual WBool Move( const WRect & rectangle, WBool update=TRUE );
- virtual WBool Move( const WRect & rectangle, WDeferMoveHandle & dwp );
- virtual WBool Move( const WPoint & point, WBool update=TRUE );
- virtual WBool Move( const WPoint & point, WDeferMoveHandle & dwp );
-
- virtual WBool SetFont( const WFont & font, WBool preserveSize=TRUE );
-
- virtual WBool SetText( const WString & text );
-
- virtual WStyle GetDefaultStyle() const;
-
- WBool DataOpenHandler( WLabel *, WDataOpenEventData *ev );
- WBool DataCloseHandler( WLabel *, WDataCloseEventData *ev );
- WBool DataAvailableHandler( WLabel *, WDataAvailableEventData *ev );
- WBool DataRequestHandler( WLabel *, WDataRequestEventData *ev );
-
- protected:
-
- WBool AllocDTCell();
-
- /**********************************************************
- * Data members
- *********************************************************/
-
- private:
-
- WBool _autoSize;
- WDataTargetCell *_dataTarget;
- };
-
- #ifndef _WNO_PRAGMA_PUSH
- #pragma enum pop;
- #pragma pack(pop);
- #endif
-
- #endif // _WLABEL_HPP_INCLUDED
-