00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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
00066 protected:
00067
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
00093
00094
00095
00096
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