Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

/home/jeroen/FOX/fox/fox-1.7.33/include/FXDockSite.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                         D o c k S i t e   W i d g e t                         *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2004,2012 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (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                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXDOCKSITE_H
00022 #define FXDOCKSITE_H
00023 
00024 #ifndef FXPACKER_H
00025 #include "FXPacker.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00031 class FXDockBar;
00032 
00034 enum {
00035   DOCKSITE_WRAP    = 0,           
00036   DOCKSITE_NO_WRAP = 0x00020000   
00037   };
00038 
00039 
00062 class FXAPI FXDockSite : public FXPacker {
00063   FXDECLARE(FXDockSite)
00064 protected:
00065 //  FXuchar      mode;            // Dragging mode
00066 protected:
00067 //  static const FXDefaultCursor cursorType[16];
00068 private:
00069   FXDockSite(const FXDockSite&);
00070   FXDockSite &operator=(const FXDockSite&);
00071 protected:
00072   FXDockSite(){}
00073   void moveVerBar(FXWindow*& begin,FXWindow*& end,FXWindow* bar,FXint barx,FXint bary,FXint barw,FXint barh,FXbool hop);
00074   void moveHorBar(FXWindow*& begin,FXWindow*& end,FXWindow* bar,FXint barx,FXint bary,FXint barw,FXint barh,FXbool hop);
00075   void galleyOfHorzBar(FXWindow *bar,FXWindow*& begin,FXWindow*& end) const;
00076   void galleyOfVertBar(FXWindow *bar,FXWindow*& begin,FXWindow*& end) const;
00077   FXint galleyWidth(FXWindow* begin,FXWindow*& end,FXint space,FXint& require,FXint& expand) const;
00078   FXint galleyHeight(FXWindow* begin,FXWindow*& end,FXint space,FXint& require,FXint& expand) const;
00079 protected:
00080   enum {
00081     DRAG_NONE        = 0,
00082     DRAG_TOP         = 1,
00083     DRAG_BOTTOM      = 2,
00084     DRAG_LEFT        = 4,
00085     DRAG_RIGHT       = 8,
00086     DRAG_TOPLEFT     = (DRAG_TOP|DRAG_LEFT),
00087     DRAG_TOPRIGHT    = (DRAG_TOP|DRAG_RIGHT),
00088     DRAG_BOTTOMLEFT  = (DRAG_BOTTOM|DRAG_LEFT),
00089     DRAG_BOTTOMRIGHT = (DRAG_BOTTOM|DRAG_RIGHT)
00090     };
00091 public:
00092 //  long onEnter(FXObject*,FXSelector,void*);
00093 //  long onLeave(FXObject*,FXSelector,void*);
00094 //  long onMotion(FXObject*,FXSelector,void*);
00095 //  long onLeftBtnPress(FXObject*,FXSelector,void*);
00096 //  long onLeftBtnRelease(FXObject*,FXSelector,void*);
00097 public:
00098 
00104   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);
00105 
00111   virtual FXint getDefaultWidth();
00112 
00118   virtual FXint getDefaultHeight();
00119 
00125   virtual FXint getWidthForHeight(FXint h);
00126 
00132   virtual FXint getHeightForWidth(FXint w);
00133 
00135   virtual void layout();
00136 
00138   virtual void resizeToolBar(FXDockBar* bar,FXint barx,FXint bary,FXint barw,FXint barh);
00139 
00145   virtual void moveToolBar(FXDockBar* bar,FXint barx,FXint bary);
00146 
00153   virtual void dockToolBar(FXDockBar* bar,FXWindow* other);
00154 
00161   virtual void dockToolBar(FXDockBar* bar,FXint barx,FXint bary);
00162 
00169   virtual void undockToolBar(FXDockBar* bar);
00170 
00172   void wrapGalleys(FXbool wrap);
00173 
00175   FXbool wrapGalleys() const;
00176   };
00177 
00178 }
00179 
00180 #endif

Copyright © 1997-2011 Jeroen van der Zijp