Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

singlecontainer.h

00001 /*
00002   libwftk - Worldforge Toolkit - a widget library
00003   Copyright (C) 2003 Ron Steinke <rsteinke@w-link.net>
00004 
00005   This library is free software; you can redistribute it and/or
00006   modify it under the terms of the GNU Lesser General Public
00007   License as published by the Free Software Foundation; either
00008   version 2.1 of the License, or (at your option) any later version.
00009   
00010   This library is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013   Lesser General Public License for more details.
00014   
00015   You should have received a copy of the GNU Lesser General Public
00016   License along with this library; if not, write to the
00017   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018   Boston, MA  02111-1307, SA.
00019 */
00020 
00021 #ifndef _SINGLE_CONTAINER_H
00022 #define _SINGLE_CONTAINER_H
00023 
00024 #include <wftk/widget.h>
00025 
00026 namespace wftk {
00027 
00029 class SingleContainer : public Widget
00030 {
00031  public:
00033   SingleContainer(unsigned top_pad, unsigned bottom_pad,
00034     unsigned left_pad, unsigned right_pad);
00035 
00037   void pack(ScreenArea* child);
00039   void clear();
00040 
00042   void setPadding(unsigned top_pad, unsigned bottom_pad,
00043     unsigned left_pad, unsigned right_pad);
00044 
00046   ScreenArea* child() const {return child_;}
00047 
00049   unsigned topPad() const {return top_pad_;}
00051   unsigned bottomPad() const {return bottom_pad_;}
00053   unsigned leftPad() const {return left_pad_;}
00055   unsigned rightPad() const {return right_pad_;}
00056 
00057  protected:
00059   virtual void setPackingInfo();
00061   virtual void handleResize(Uint16 w, Uint16 h);
00062  private:
00063   unsigned top_pad_, bottom_pad_, left_pad_, right_pad_;
00064   ScreenArea* child_;
00065 };
00066 
00067 } // namespace wftk
00068 
00069 #endif // _SINGLE_CONTAINER_H

Generated Fri Mar 5 08:11:00 2004.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.