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

FXDockSite.h
1 /********************************************************************************
2 * *
3 * D o c k S i t e W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2004,2022 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXDOCKSITE_H
22 #define FXDOCKSITE_H
23 
24 #ifndef FXPACKER_H
25 #include "FXPacker.h"
26 #endif
27 
28 namespace FX {
29 
30 
31 class FXDockBar;
32 
34 enum {
35  DOCKSITE_WRAP = 0,
36  DOCKSITE_NO_WRAP = 0x00020000
37  };
38 
39 
62 class FXAPI FXDockSite : public FXPacker {
63  FXDECLARE(FXDockSite)
64 protected:
65 // FXuchar mode; // Dragging mode
66 protected:
67 // static const FXDefaultCursor cursorType[16];
68 private:
69  FXDockSite(const FXDockSite&);
70  FXDockSite &operator=(const FXDockSite&);
71 protected:
72  FXDockSite(){}
73  void moveVerBar(FXWindow*& begin,FXWindow*& end,FXWindow* bar,FXint barx,FXint bary,FXint barw,FXint barh,FXbool hop);
74  void moveHorBar(FXWindow*& begin,FXWindow*& end,FXWindow* bar,FXint barx,FXint bary,FXint barw,FXint barh,FXbool hop);
75  void galleyOfHorzBar(FXWindow *bar,FXWindow*& begin,FXWindow*& end) const;
76  void galleyOfVertBar(FXWindow *bar,FXWindow*& begin,FXWindow*& end) const;
77  FXint galleyWidth(FXWindow* begin,FXWindow*& end,FXint space,FXint& require,FXint& expand) const;
78  FXint galleyHeight(FXWindow* begin,FXWindow*& end,FXint space,FXint& require,FXint& expand) const;
79 protected:
80  enum {
81  DRAG_NONE = 0,
82  DRAG_TOP = 1,
83  DRAG_BOTTOM = 2,
84  DRAG_LEFT = 4,
85  DRAG_RIGHT = 8,
86  DRAG_TOPLEFT = (DRAG_TOP|DRAG_LEFT),
87  DRAG_TOPRIGHT = (DRAG_TOP|DRAG_RIGHT),
88  DRAG_BOTTOMLEFT = (DRAG_BOTTOM|DRAG_LEFT),
89  DRAG_BOTTOMRIGHT = (DRAG_BOTTOM|DRAG_RIGHT)
90  };
91 public:
92 // long onEnter(FXObject*,FXSelector,void*);
93 // long onLeave(FXObject*,FXSelector,void*);
94 // long onMotion(FXObject*,FXSelector,void*);
95 // long onLeftBtnPress(FXObject*,FXSelector,void*);
96 // long onLeftBtnRelease(FXObject*,FXSelector,void*);
97 public:
98 
104  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);
105 
111  virtual FXint getDefaultWidth();
112 
118  virtual FXint getDefaultHeight();
119 
125  virtual FXint getWidthForHeight(FXint h);
126 
132  virtual FXint getHeightForWidth(FXint w);
133 
135  virtual void layout();
136 
138  virtual void resizeToolBar(FXDockBar* bar,FXint barx,FXint bary,FXint barw,FXint barh);
139 
145  virtual void moveToolBar(FXDockBar* bar,FXint barx,FXint bary);
146 
153  virtual void dockToolBar(FXDockBar* bar,FXWindow* other);
154 
161  virtual void dockToolBar(FXDockBar* bar,FXint barx,FXint bary);
162 
169  virtual void undockToolBar(FXDockBar* bar);
170 
172  void wrapGalleys(FXbool wrap);
173 
175  FXbool wrapGalleys() const;
176  };
177 
178 }
179 
180 #endif
Window is the base class for all widgets in FOX.
Definition: FXWindow.h:130
Base composite.
Definition: FXComposite.h:32
The dock site widget is a widget where dock bars can be docked.
Definition: FXDockSite.h:62
Definition: FX4Splitter.h:28
Packer is a layout manager which automatically places child windows inside its area against the left...
Definition: FXPacker.h:48
A dock bar widget can be docked inside a dock site widget, or floated around freely.
Definition: FXDockBar.h:42

Copyright © 1997-2022 Jeroen van der Zijp