Flu_Separator.cpp 971 B

12345678910111213141516171819202122232425262728293031
  1. // $Id: Flu_Separator.cpp,v 1.2 2003/08/20 16:29:47 jbryan Exp $
  2. /***************************************************************
  3. * FLU - FLTK Utility Widgets
  4. * Copyright (C) 2002 Ohio Supercomputer Center, Ohio State University
  5. *
  6. * This file and its content is protected by a software license.
  7. * You should have received a copy of this license with this file.
  8. * If not, please contact the Ohio Supercomputer Center immediately:
  9. * Attn: Jason Bryan Re: FLU 1224 Kinnear Rd, Columbus, Ohio 43212
  10. *
  11. ***************************************************************/
  12. #include "FLU/Flu_Separator.H"
  13. Flu_Separator :: Flu_Separator( int X, int Y, int W, int H, const char *l )
  14. : Fl_Widget( X, Y, W, H, l )
  15. {
  16. type( HORIZONTAL );
  17. box( FL_EMBOSSED_BOX );
  18. }
  19. void Flu_Separator :: draw()
  20. {
  21. if( _type == HORIZONTAL )
  22. draw_box( box(), x()+3, y()+h()/2, w()-6, 2, color() );
  23. else
  24. draw_box( box(), x()+w()/2, y()+3, 2, h()-6, color() );
  25. }