10#if !defined(OWL_DOCKING_H)
14#if defined(BI_HAS_PRAGMA_ONCE)
192 bool shrinkToClient =
true,
194 bool popupPalette =
true,
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
TCursor, derived from TGdiBase, represents the GDI cursor object class.
TDecoratedFrame automatically positions its client window (you must supply a client window) so that i...
DECLARE_RESPONSE_TABLE(TDockableControlBar)
TDockableControlBar(TWindow *parent=0, TTileDirection direction=Horizontal, TFont *font=0, TModule *module=0)
Constructs a dockable control bar.
void EvOwlWindowDocked(uint pos, const TDockingSlip &slip)
void Layout(TAbsLocation, TSize *=nullptr) override
Causes this dockable to lay itself out vertically, horizontally, or rectangularly.
virtual TTileDirection GetDirectionForLocation(TAbsLocation loc)
Returns the layout direction to use when placed in a slip This can be overridden to provide different...
auto GetWindow() -> TWindow *override
Returns the TWindow part of this dockable object.
void EvOwlWindowDocked(uint pos, const TDockingSlip &slip)
Inserts/deletes FlatBar Grip.
void EvLButtonDown(uint modKeys, const TPoint &point)
Forwards event to slip to allow movement of gadget within the slip.
auto ShouldBeginDrag(TPoint &) -> bool override
Returns true if the mouse click point is in a spot that should move this dockable around.
virtual TGadget * GetGripGadget()
void GetRect(TRect &) override
Gets this dockable's screen rectangle.
auto ComputeSize(TAbsLocation, TSize *) -> TSize override
Finds out how big this dockable would be in a given location, and with a given optional size hint.
void LayoutSession() override
If the gadget window changes size when laying out a dockable gadget window, this function tells the d...
DECLARE_RESPONSE_TABLE(TDockableGadgetWindow)
auto GetHarbor() -> THarbor *override
Returns the harbor containing the dockable object.
TDockableGadgetWindow(TWindow *parent=0, TTileDirection direction=Horizontal, TFont *font=0, TModule *module=0)
This constructor creates a dockable gadget window and sets the appropriate styles for the window.
bool EvSetCursor(HWND hWndCursor, uint codeHitTest, TMsgId mouseMsg)
TDockable is an abstract base class for fixed or floating docking windows that want to be dockable in...
virtual TWindow * GetWindow()=0
Gets dockable's window and hides it, in case we have to toss it around a bit.
virtual TSize ComputeSize(TAbsLocation loc, TSize *dim)=0
Returns the rectangle of the dockable window in the given location.
virtual void GetRect(TRect &rect)=0
Return the rectangle of the dockable window in the given location.
virtual void Layout(TAbsLocation loc, TSize *dim=0)=0
Changes the window to be equal to the size returned from ComputeNNNNN.
virtual bool ShouldBeginDrag(TPoint &pt)=0
This is overriden for any window that wants to be docked.
virtual THarbor * GetHarbor()=0
Returns the harbor containing the dockable object.
TDockingSlip is an abstract base class for windows which accepts and holds dockable windows.
virtual void DockableMove(TDockable &dockable, const TPoint *topLeft=0, TRelPosition position=rpNone, TDockable *relDockable=0)=0
void SetHarbor(THarbor *harbor)
Set the back pointer to the harbor.
THarbor * GetHarbor() const
Retrieve the associated harbor.
virtual TAbsLocation GetLocation() const =0
virtual void DockableRemoved(const TRect &orgRect)=0
virtual void DockableInsert(TDockable &dockable, const TPoint *topLeft=0, TRelPosition position=rpNone, TDockable *relDockable=0)=0
Inserts the dockable into the slip, based on arguments given.
TEdgeSlip is the class of windows used by THarbor as the actual docking slips along the decorated fra...
TWindow * MoveDraggedWindow(TWindow *draggedWindow)
All terminology in this function is referenced to the following two windows Drag and LeftEdge.
void DockableInsert(TDockable &dockable, const TPoint *topLeft, TRelPosition position, TDockable *relDockable) override
This function overrides TDockingSlip::DockableInsert to insert a new dockable object into this TEdgeS...
void EvParentNotify(const TParentNotify &)
Makes sure that the slip size is updated when a child changes size.
uint EvNCCalcSize(bool calcValidRects, NCCALCSIZE_PARAMS &calcSize)
Returns the size of the client area, leaving room for the etched separators.
TEdgeSlip(TDecoratedFrame &parent, TAbsLocation location, TModule *module=0)
Constructs an edge slip, and sets the approriate styles for the window.
void EvLButtonDown(uint modKeys, const TPoint &point)
Forwards the left button down message to the dockable object.
bool EvWindowPosChanging(WINDOWPOS &windowPos)
When the slip shrinks, this function adjusts dockables where needed.
void DockableRemoved(const TRect &orgRect) override
Overriden TDockingSlip virtual.
void SetupWindow() override
Ensures that all decorations in the docking window are abutted against each other (both horizontally ...
void CompressGridLines()
Compresses or expands dockables perpendicular to the grid line.
void DockableMove(TDockable &dockable, const TPoint *topLeft, TRelPosition position, TDockable *relDockable) override
Overriden TDockingSlip virtual.
auto EvCommand(uint id, THandle hWndCtl, uint notifyCode) -> TResult override
Forward command messages to the parent.
int GridSize(int baseCoord)
Returns the perpendicular size of the grid line with the given base coordinates.
void EvLButtonDblClk(uint modKeys, const TPoint &point)
Handles WM_LBUTONDBLCLICK to tell the frame to edit a toolbar.
void EvCommandEnable(TCommandEnabler &commandEnabler) override
Changes the reciever to be the framewindow, not the docking window.
void CompressParallel(int width)
Compresses empty space along grid line if any dockables hang out past the end.
auto GetLocation() const -> TAbsLocation override
Retrieves the location of the slip.
void EvNCPaint(HRGN)
Erases the background and draws in etched 'borders' within the client area.
TSize ComputeDockingArea()
Computes the docking area size based on the dockables inside (total height if top/bottom docking area...
void MoveAllOthers(TWindow *draggedWindow, TWindow *movedWindow)
Builds a list (sorted by left coordinate) of windows on the same horizontal (top/bottom docking) or v...
void ReLayout(bool forcedLayout)
Called by Harbor when creating this docking window on a drop.
bool EvEraseBkgnd(HDC)
Erases the background and draws in etched 'borders' within the client area.
TFloatingFrame(TWindow *parent, LPCTSTR title=0, TWindow *clientWnd=0, bool shrinkToClient=false, int captionHeight=DefaultCaptionHeight, bool popupPalette=false, TModule *module=0)
Constructs a TFloatingFrame object attached to the specified parent window.
TFloatingSlip is a floating frame which can hold a dockable window.
bool EvWindowPosChanging(WINDOWPOS &windowPos)
Handles WM_WINDOWPOSCHANGING to make sure that the frame is properly constrained by the dimensions of...
auto ComputeSize(TAbsLocation, TSize *) -> TSize override
Forward the first four TDockable virtuals to the client dockable.
void EvSettingChange(uint, LPCTSTR)
Event handler for the .INI file changed message.
DECLARE_RESPONSE_TABLE(TFloatingSlip)
void EvNCLButtonDown(uint hitTest, const TPoint &point)
Handles lbutton down bubbled up from the client to begin a dockable drag operation.
auto GetHarbor() -> THarbor *override
Returns the associated harbor.
auto ShouldBeginDrag(TPoint &) -> bool override
A given mouse down should never begin a drag for this dockable.
void DockableInsert(TDockable &, const TPoint *topLeft, TRelPosition, TDockable *relDockable) override
Overriden TDockingSlip virtual.
void EvWindowPosChanged(const WINDOWPOS &windowPos)
Handles WM_WINDOWPOSCHANGED to make sure that the dockable client gets a chance to do final layout.
void GetRect(TRect &) override
Gets this dockable's screen rect.
void EvGetMinMaxInfo(MINMAXINFO &info)
void Layout(TAbsLocation, TSize *=nullptr) override
Forwards the layout message over to the dockable object.
TFloatingSlip(TWindow *parent, int x, int y, TWindow *clientWnd=0, bool shrinkToClient=true, int captionHeight=DefaultCaptionHeight, bool popupPalette=true, TModule *module=0)
Constructs a floating slip and sets the appropriate style for the window.
void DockableMove(TDockable &, const TPoint *topLeft, TRelPosition, TDockable *relDockable) override
Overriden TDockingSlip virtual.
void EvClose()
When closing the floating slip, removes any dockable first so that it is not destroyed.
bool EvSizing(uint side, TRect &rect)
Handles the Windows 4.0 message for the best resize user feedback.
void DockableRemoved(const TRect &) override
Overriden TDockingSlip virtual.
void EvLButtonDown(uint hitTest, const TPoint &point)
Handles lbutton down bubbled up from the client to begin a dockable drag operation.
auto GetWindow() -> TWindow *override
Returns the TWindow part of this dockable object.
auto GetLocation() const -> TAbsLocation override
Returns the location of the object.
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
TGadgetWindow(TWindow *parent=nullptr, TTileDirection direction=Horizontal, TFont *font=nullptr, TModule *module=nullptr)
Creates a TGadgetWindow interface object with the default tile direction and font and passes module w...
TTileDirection
Enumeration describing how gadgets should be laid out within the gadget window.
@ Horizontal
Arrange gadgets in a row.
THarbor is the object that holds all the docking slips.
void Remove(TDockable &dockable)
Remove a dockable from the harbor.
TRelPosition GetSlipPosition(TAbsLocation location)
Returns the default docking relative position for a given slip location.
void EvLButtonDblClk(uint modKeys, const TPoint &point)
Handles the left button double click and forwards the message to the dockable window.
THarbor(TDecoratedFrame &df)
Creates the harbor. The harbor is where the slips can go dock.
TDockingSlip * Insert(TDockable &dockable, TAbsLocation location, const TPoint *where=0, TRelPosition position=rpNone, TDockable *relativeTo=0)
Dockable window insertion.
TSize DragNSize
Size of dockable when a natural shape.
TDecoratedFrame & DecFrame
DECLARE_RESPONSE_TABLE(THarbor)
void Move(TDockable &dockable, TAbsLocation location, const TPoint *where=0, TRelPosition position=rpNone, TDockable *relativeTo=0)
Move a dockable from one slip to another, programatically.
void EvLButtonUp(uint modKeys, const TPoint &point)
Handles mouse up to drop a dockable window being dragged.
TSize DragVSize
Size of dockable when vertical.
void EvMouseMove(uint modKeys, const TPoint &point)
Handles MouseMove to perform dockable dragging if a drag is in progress.
TSize DragHSize
Size of dockable when horizontal.
virtual TEdgeSlip * ConstructEdgeSlip(TDecoratedFrame &df, TAbsLocation location)
Creates an edge slip at a location.
virtual TFloatingSlip * ConstructFloatingSlip(TDecoratedFrame &df, int x, int y, TWindow *dockableWindow)
Constructs a floating slip with a particular window at a location.
TDockingSlip * DragNotificatee
Slip notified on drag operations.
void SetEdgeSlip(TAbsLocation location, TEdgeSlip *slip)
Sets a new edge slip for a given location.
TAbsLocation DragOrgSlipLoc
Original slip location on mouseDown.
bool DockDraggingBegin(TDockable &dockable, const TPoint &pt, TAbsLocation location, TDockingSlip *dockingNotify=0)
Called by docking slips.
TEdgeSlip * GetEdgeSlip(TAbsLocation location)
Returns the slip at the location.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TPoint is a support class, derived from tagPOINT.
TRect is a mathematical class derived from tagRect.
The tagSIZE struct is defined as.
Derived from TDC, TWindowDC is a device context (DC) class that provides access to the entire area ow...
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
TWindow(TWindow *parent, LPCTSTR title=nullptr, TModule *module=nullptr)
Adds this to the child list of parent if nonzero, and calls EnableAutoCreate so that this will be cre...
HWND THandle
TWindow encapsulates an HWND.
Definition of class TControlBar.
Definition of class TDecoratedFrame, a TFrameWindow that can manage decorations around the client win...
Definition of class TFloatingFrame.
Definition of TGadgetList, TGadgetWindow & TGadgetWindowFont A list holding gadgets,...
TRelPosition
General use 2-D rectangular relative position enum.
@ rpNone
No location specified.
@ rpAbove
Refers to top edge of frame.
@ rpBelow
Refers to bottom edge of frame.
@ rpRightOf
Refers to left edge of frame.
@ rpLeftOf
Refers to right edge of frame.
@ XCoord
Left & right edge have X coords parallel vertically.
@ YCoord
Grid type corresponds with Location:
TAbsLocation
General use absolute 2-D rectangular location enum.
Object Windows Library (OWLNext Core).
UINT TMsgId
Message ID type.
TDispatch< WM_PARENTNOTIFY >::TArgs TParentNotify
Alias for convenience.
LRESULT TResult
Result type.