home *** CD-ROM | disk | FTP | other *** search
- /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % Copyright (C) 1994, by WATCOM International Inc. All rights %
- % reserved. No part of this software may be reproduced or %
- % used in any form or by any means - graphic, electronic or %
- % mechanical, including photocopying, recording, taping or %
- % information storage and retrieval systems - except with the %
- % written permission of WATCOM International Inc. %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- */
-
- #ifndef _WSTATUS_HPP_INCLUDED
- #define _WSTATUS_HPP_INCLUDED
-
- #ifndef _WNO_PRAGMA_PUSH
- #pragma pack(push,8);
- #pragma enum int;
- #endif
-
- #ifndef _WSTRING_HPP_INCLUDED
- # include "wstring.hpp"
- #endif
- #ifndef _WCONTROL_HPP_INCLUDED
- # include "wcontrol.hpp"
- #endif
- #ifndef _WFORM_HPP_INCLUDED
- # include "wform.hpp"
- #endif
- #ifndef _WARRAY_HPP_INCLUDED
- # include "warray.hpp"
- #endif
-
- class WFont;
-
- #define WStatusDefault ((WStyle)0x50000103L) // WS_VISIBLE|WS_CHILD|CCS_BOTTOM
- #define WStatusSizeGrip ((WStyle)0x00000100L) // SBARS_SIZEGRIP
-
- enum WStatusBarItemType {
- WSBITNormal=0x0000,
- WSBITNoBorders=0x0100,
- WSBITPopOut=0x0200
- };
-
- typedef WArray< WLong > WLongArray;
-
- class WCMCLASS WStatusBar : public WControl {
- WDeclareSubclass( WStatusBar, WControl );
-
- public:
-
- /*******************************************************************
- * Constructors and Destructors
- *******************************************************************/
-
- WStatusBar();
-
- ~WStatusBar();
-
- /*******************************************************************
- * Properties
- *******************************************************************/
-
- // ItemEdges
- //
- // The number of items. The positions parameter is an array
- // that holds the right edges of each part. Setting an edge
- // to -1 means stretch to the end.
-
- WLongArray GetItemEdges();
- WBool SetItemEdges( const WLongArray & positions );
-
- // SimpleMode
- //
- // In "simple mode", the status bar displays only one line
- // of text. The text is maintained independently of the text
- // in any panes.
-
- WBool GetSimpleMode() const;
- WBool SetSimpleMode( WBool on );
-
- // Height
- //
- //
- WBool SetMinimumHeight( WULong height );
-
-
- /*******************************************************************
- * Methods
- *******************************************************************/
-
- /*******************************************************************
- * Item Properties
- *******************************************************************/
-
- // Length
-
- WULong GetLength( WULong itemNumber ) const;
-
- // Rectangle
-
- WRect GetRectangle( WULong itemNumber ) const;
-
- // Text
- //
- // Get/set the text for an item.
-
- #define WSTATUSBAR_SIMPLE_ITEM 255
-
- WString GetText( WULong itemNumber ) const;
- WBool SetText( WULong itemNumber, const WString & str,
- WStatusBarItemType type=WSBITNormal );
-
- // Type
-
- WStatusBarItemType GetType( WULong itemNumber ) const;
-
- /*******************************************************************
- * Overriddes
- *******************************************************************/
-
- virtual WRect GetRectangle( WBool absolute = FALSE ) const;
-
- virtual WBool SetText( const WString & text );
-
- virtual WString GetText() const;
-
- virtual const WChar * InitializeClass();
-
- virtual WStyle GetDefaultStyle() const;
-
- virtual WStyle GetDefaultExtendedStyle() const;
-
- virtual WBool CloneWindow( WStyle newStyle, WStyle newExStyle,
- void * data=NULL );
-
- virtual WRect CalculateSize( const WRect &, WBool );
-
- /*******************************************************************
- * Data members
- *******************************************************************/
-
- private:
-
- WBool _simpleMode;
- };
-
- #ifndef _WNO_PRAGMA_PUSH
- #pragma enum pop;
- #pragma pack(pop);
- #endif
-
- #endif // _WSTATUS_HPP_INCLUDED
-