FXDockSite.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                         D o c k S i t e   W i d g e t                         *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2004,2006 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (at your option) any later version.            *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************
00022 * $Id: FXDockSite.h,v 1.30 2006/01/22 17:58:01 fox Exp $                        *
00023 ********************************************************************************/
00024 #ifndef FXDOCKSITE_H
00025 #define FXDOCKSITE_H
00026 
00027 #ifndef FXPACKER_H
00028 #include "FXPacker.h"
00029 #endif
00030 
00031 namespace FX {
00032 
00033 
00034 class FXDockBar;
00035 
00037 enum {
00038   DOCKSITE_WRAP    = 0,           
00039   DOCKSITE_NO_WRAP = 0x00020000   
00040   };
00041 
00042 
00065 class FXAPI FXDockSite : public FXPacker {
00066   FXDECLARE(FXDockSite)
00067 protected:
00068   FXDockSite(){}
00069 private:
00070   FXDockSite(const FXDockSite&);
00071   FXDockSite &operator=(const FXDockSite&);
00072 protected:
00073   void moveVerBar(FXWindow* bar,FXWindow *begin,FXWindow* end,FXint bx,FXint by);
00074   void moveHorBar(FXWindow* bar,FXWindow *begin,FXWindow* end,FXint bx,FXint by);
00075   FXint galleyWidth(FXWindow *begin,FXWindow*& end,FXint space,FXint& require,FXint& expand) const;
00076   FXint galleyHeight(FXWindow *begin,FXWindow*& end,FXint space,FXint& require,FXint& expand) const;
00077 public:
00078 
00084   FXDockSite(FXComposite *p,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=0,FXint pr=0,FXint pt=0,FXint pb=0,FXint hs=0,FXint vs=0);
00085 
00091   virtual FXint getDefaultWidth();
00092 
00098   virtual FXint getDefaultHeight();
00099 
00105   virtual FXint getWidthForHeight(FXint h);
00106 
00112   virtual FXint getHeightForWidth(FXint w);
00113 
00115   virtual void layout();
00116 
00122   virtual void moveToolBar(FXDockBar* bar,FXint barx,FXint bary);
00123 
00130   virtual void dockToolBar(FXDockBar* bar,FXWindow* before);
00131 
00138   virtual void dockToolBar(FXDockBar* bar,FXint barx,FXint bary);
00139 
00146   virtual void undockToolBar(FXDockBar* bar);
00147 
00149   void wrapGalleys(FXbool wrap);
00150 
00152   FXbool wrapGalleys() const;
00153   };
00154 
00155 }
00156 
00157 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:20 2009 for TnFOX by doxygen v1.4.7