home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool.zip / OOL / include / xtoolbar.h < prev    next >
C/C++ Source or Header  |  1997-03-07  |  2KB  |  70 lines

  1. #ifndef __OOL_XTOOLBAR_H__
  2. #define __OOL_XTOOLBAR_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------- OS/2 Beta 1 */
  6. /*===========================================================================*/
  7. /*                              class: XToolBar                              */
  8. /*                       derived from: XFrameControl                         */
  9. /*                        last update: 11/96                                 */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13. #include "xfrmcnt.h"
  14.  
  15. #define TB_RIPABLE 16
  16.  
  17. class XFrameWindow;
  18. class XColor;
  19. class XGraphicDevice;
  20. class XLine;
  21. class XControlEvent;
  22.  
  23. typedef struct clientWin
  24. {
  25.    LONG xOffset, yOffset;
  26.    BOOL group;
  27.    XWindow * clientWin;
  28. } ___clientWin___;
  29.  
  30. class XSize;
  31. class ToolBarHandler;
  32.  
  33. class _export_ XToolBar: public XFrameControl
  34. {
  35.       friend class XFrame;
  36.       friend class ToolBarParent;
  37.       friend class ToolBarHandler;
  38.    private:
  39.       clientWin ** clientArray;
  40.       USHORT clients;
  41.       USHORT borderSize;
  42.       XFrameWindow * frame, * cutWindow;
  43.       SHORT spacing;
  44.       ToolBarHandler * hdl;
  45.       XGraphicDevice * graph;
  46.       XLine * line1, *line2, *line3, *line4;
  47.         BOOL border;
  48.    protected:
  49.       virtual void Attach( void );
  50.       virtual void Cut( void );
  51.    public:
  52.       XToolBar( const XFrameWindow *, const ULONG style = TB_TOP, const ULONG id=0, const USHORT ySize = 20, const USHORT groupSpacing = 15);
  53.       virtual ~XToolBar();
  54.       void AddWindow( const XWindow * clientWindow, const BOOL newGroup = FALSE, const BOOL adjustSize = FALSE, const XWindow * insertBehind = NULL, const LONG x_offset = 0, LONG y_Offset = 0);
  55.       BOOL DoCommand( LONG);
  56.       void DoControl( XControlEvent*);
  57.       void DoSize( XSize* );
  58.       void Draw(void);
  59.       void GetBackgroundColor( XColor * rgb);
  60.       XFrameWindow * GetCutWindow() const { return cutWindow; }
  61.       BOOL RemoveWindow( const XWindow *, const BOOL redraw = FALSE);
  62.       void ReSize( void );
  63.       void SetBackgroundColor( const XColor * col);
  64.       void SetBorderSize( const USHORT siz);
  65.       BOOL SetHeight( const USHORT cy);
  66.       void Show( const BOOL show = TRUE);
  67. };
  68.  
  69. #endif
  70.