home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / df3os2.zip / TOOLBAR.CPP < prev    next >
C/C++ Source or Header  |  1993-09-15  |  588b  |  23 lines

  1. // ------------ toolbar.cpp
  2.  
  3. #include "toolbar.h"
  4.  
  5. // ----- construct a Toolbar
  6. ToolBar::ToolBar(DFWindow *par) : DFWindow(par)
  7. {
  8.     windowtype = ToolbarWindow;
  9.     if (par != 0)    {
  10.         // --- put it into the application window
  11.         Move(par->ClientLeft(), par->ClientTop());
  12.         Size(par->ClientRight(), par->ClientTop()+2);
  13.         par->SetAttribute(TOOLBAR);
  14.     }
  15.     colors.fg = colors.bg = ToolBarBG;
  16. }
  17.  
  18. // ---- resize the menubar when the application window resizes
  19. void ToolBar::ParentSized(int xdif, int)
  20. {
  21.     Size(Right()+xdif, Bottom());
  22. }
  23.