home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 19.ddi / OWLINC.PAK / MESSAGEB.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  1.9 KB  |  68 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1992, 1993 by Borland International
  3. //   include\owl\messageb.h
  4. //   Class TMessageBar.
  5. //----------------------------------------------------------------------------
  6. #if !defined(__OWL_MESSAGEB_H)
  7. #define __OWL_MESSAGEB_H
  8.  
  9. #if !defined(__OWL_GADGETWI_H)
  10.   #include "owl\gadgetwi.h"
  11. #endif
  12.  
  13. const int IDW_STATUSBAR = 32000;
  14.  
  15. //
  16. //  class TMessageBar
  17. //  ----- -----------
  18. //
  19. //  implements a message bar with one text gadget as wide as the window and no
  20. //  border. positions itself at the bottom of the window and uses the default
  21. //  decoration bar font
  22. //
  23. //  the message bar optionally draws a highlight line at the top
  24. //
  25. class _OWLCLASS TMessageBar : public TGadgetWindow {
  26.   public:
  27.     TMessageBar(TWindow*   parent = 0,
  28.                 TFont*     font = new TGadgetWindowFont,
  29.                 TModule*   module = 0);
  30.    ~TMessageBar();
  31.  
  32.     //
  33.     // set the text for the text message gadget (the first gadget)
  34.     //
  35.     void    SetText(const char* text);
  36.  
  37.     //
  38.     // set (or clear if 0) menu/command item hint text displayed in/on bar
  39.     //
  40.     virtual void    SetHintText(const char* text);
  41.  
  42.   protected:
  43.     BOOL   HighlightLine;  // does this bar have a upper highlight line?
  44.     char*  HintText;       // current command hint being displayed, if any
  45.  
  46.     //
  47.     // compensate for highlight line
  48.     //
  49.     void   GetInnerRect(TRect& rect);
  50.     void   GetDesiredSize(TSize& rect);
  51.  
  52.     //
  53.     // draw highlight line, then HintText if any, or gadgets
  54.     //
  55.     void  PaintGadgets(TDC& dc, BOOL erase, TRect& rect);
  56.  
  57.   private:
  58.     //
  59.     // hidden to prevent accidental copying or assignment
  60.     //
  61.     TMessageBar(const TMessageBar&);
  62.     TMessageBar& operator =(const TMessageBar&);
  63.  
  64.   DECLARE_CASTABLE;
  65. };
  66.  
  67. #endif  // __OWL_MESSAGEB_H
  68.