- BORLAND/: Borland C++ 4.52 (chosen over 4.5 by byte-match: CODE/RP/CW32.LIB
is identical to 4.52's install lib). BCC32/TLINK32/TLIB/MAKE run natively on
Win11; CODE/BT/OPT.MAK is the shipped BTL4OPT.EXE's exact flag recipe
(extender = Borland PowerPack DPMI32, not Phar Lap TNT).
- restoration/source410/: the literal 1995-form reconstruction of the missing
BT game source (never mixed into CODE/). Round 1-3 state:
* 6 of 10 surviving original TUs COMPILE CLEAN under the period toolchain
(BTMSSN, BTCNSL, BTSCNRL, BTTEAM, BTL4MODE, BTL4ARND) - first builds
since 1996.
* BT_L4/BTL4APP.CPP pilot reconstruction: 12/12 functions, Fail() lands on
its binary-recorded line 400 exactly.
* BT/BTCNSL.HPP: console wire IDs recovered from the binary's ctors
(Killed=9, Damaged=10, ScoreUpdate=13, DeathWithoutHonor=15 [T1];
TeamScore=12 flagged [T4]).
* MUNGA/: 8 engine-header backfills back-dated from the BT412 WinTesla tree
(VDATA numbering decomp-verified; AUDREND's OpenAL-era virtual removed -
the period compiler is the drift detector).
* Tooling: backdate.py (WinTesla->1995 header transform), compile410.sh
(per-TU verification sweep under authentic OPT.MAK flags).
* README: corrected roadmap - MECH.HPP is the capstone grown with the mech
TU reconstructions; BTREG.CPP green = the header-family milestone.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
184 lines
5.5 KiB
C++
184 lines
5.5 KiB
C++
//
|
|
//**************************************************************************
|
|
//
|
|
// BOleDoc.h -- Declares the document-level helper object for containers
|
|
//
|
|
// Copyright (c) 1993,94 by Borland International, Inc. All rights reserved
|
|
//
|
|
//**************************************************************************
|
|
|
|
#ifndef _BOLEDOC_H
|
|
#define _BOLEDOC_H 1
|
|
|
|
#include "BOleComp.h"
|
|
#include "BOlePart.h"
|
|
|
|
class _ICLASS BOleService;
|
|
|
|
|
|
class _ICLASS BOleDocument : public BOleComponent, public IBDocument,
|
|
public IDropTarget, public IOleUILinkContainer, public IOleInPlaceFrame,
|
|
public IBOverrideBrowseLinks
|
|
{
|
|
public:
|
|
static CLIPFORMAT oleEmbdObjClipFmt;
|
|
static CLIPFORMAT oleEmbSrcClipFmt;
|
|
static CLIPFORMAT oleLinkSrcClipFmt;
|
|
|
|
static CLIPFORMAT oleLinkClipFmt;
|
|
static CLIPFORMAT oleNativeClipFmt;
|
|
static CLIPFORMAT oleOwnerLinkClipFmt;
|
|
static CLIPFORMAT oleObjectDescFmt;
|
|
static CLIPFORMAT oleLinkSrcDescFmt;
|
|
|
|
static UINT dragScrollInset;
|
|
static UINT dragScrollDelay;
|
|
static UINT dragScrollInterval;
|
|
|
|
protected:
|
|
|
|
friend BOlePart;
|
|
friend BOleService;
|
|
|
|
IBContainer * pContainer;
|
|
IBApplication * pApplication;
|
|
BOleService * pService;
|
|
|
|
IOleInPlaceActiveObject
|
|
* pActivePart; // For keeping object's active state in sync with window's
|
|
|
|
BOlePart * pFirstPart; // For enumerating objects
|
|
|
|
// For drawing XOR'ed outline rect during drag/drop
|
|
//
|
|
RECT dndObjPos;
|
|
SIZE dndSize;
|
|
POINT dndLastPos;
|
|
BOOL dndInfoAvailable;
|
|
POINT dndOffset;
|
|
PIBDropDest pDropDest;
|
|
BOOL fDrawn;
|
|
|
|
BOOL dndLastFeedbackFailed; // so we know what to do when mouse doesn't move
|
|
|
|
// For scrolling during drag/drop
|
|
//
|
|
RECT rcScrollTop, rcScrollLeft, rcScrollRight, rcScrollBottom;
|
|
DWORD scrollEnterTime;
|
|
DWORD scrollLastTime;
|
|
BOOL fScrollDelay;
|
|
|
|
// For format negotiation during drag/drop
|
|
//
|
|
OLEUIPASTEENTRY *dndFormatList;
|
|
UINT dndFormatCount;
|
|
UINT dndFormat;
|
|
BOOL fCantLink;
|
|
|
|
// For registering drag/drop
|
|
BOOL fRegistered;
|
|
|
|
// To prevent BrowseLinks from being re-entrant
|
|
BOOL fInBrowseLinks;
|
|
|
|
// Private implementation functions
|
|
//
|
|
short _IFUNC ValidateDrag(DWORD keyState, POINTL *where, DWORD *effect, IDataObject *dataObj = NULL);
|
|
BOleScroll _IFUNC DragScrollReqd (POINTL *where);
|
|
void _IFUNC CacheDragRects (LPRECT);
|
|
void _IFUNC CalculateDndObjPos ();
|
|
|
|
public:
|
|
BOleDocument (BOleClassManager *, IBUnknownMain *, BOleService *);
|
|
~BOleDocument ();
|
|
|
|
IBContainer *GetContainer () { return pContainer; }
|
|
|
|
BOlePart *GetFirstPart () { return pFirstPart; }
|
|
void SetFirstPart (BOlePart*pPart) { pFirstPart = pPart; }
|
|
void OnRemovePart (BOlePart *pPart);
|
|
BOOL _IFUNC EnableBrowseLinks();
|
|
|
|
HRESULT OnModalDialog (BOOL);
|
|
HRESULT TranslateAccel (LPMSG);
|
|
|
|
// IDocument functions
|
|
//
|
|
virtual HRESULT _IFUNC Init(PIBContainer);
|
|
virtual void _IFUNC OnResize ();
|
|
virtual void _IFUNC OnActivate (BOOL fActivate);
|
|
virtual void _IFUNC OnClose ();
|
|
virtual HRESULT _IFUNC OnSetFocus(BOOL);
|
|
virtual HRESULT _IFUNC EnumLinks (PIBLinkInfo FAR*);
|
|
virtual HRESULT _IFUNC BrowseLinks ();
|
|
virtual HRESULT _IFUNC UpdateLinks ();
|
|
|
|
public:
|
|
|
|
// IUnknown Methods
|
|
// delegate aggregator's IUnknownMain
|
|
DEFINE_IUNKNOWN(pObjOuter)
|
|
|
|
// IUnknownMain methods
|
|
//
|
|
virtual HRESULT _IFUNC QueryInterfaceMain(REFIID iid, LPVOID FAR* pif);
|
|
|
|
private:
|
|
|
|
// IOleWindow methods, base of IOleInPlaceUIWindow and IOleInPlaceSite
|
|
//
|
|
HRESULT _IFUNC GetWindow(HWND FAR* lphwnd);
|
|
HRESULT _IFUNC ContextSensitiveHelp(BOOL fEnterMode);
|
|
|
|
// IOleInPlaceUIWindow methods
|
|
//
|
|
HRESULT _IFUNC GetBorder(LPRECT lprectBorder);
|
|
HRESULT _IFUNC RequestBorderSpace(LPCRECT lprectWidths);
|
|
HRESULT _IFUNC SetBorderSpace(LPCBORDERWIDTHS lpborderwidths);
|
|
HRESULT _IFUNC SetActiveObject(IOleInPlaceActiveObject* lpActiveObject,
|
|
LPCOLESTR lpszObjName);
|
|
|
|
// IDropTarget functions
|
|
//
|
|
HRESULT _IFUNC DragEnter(IDataObject *dataObj, DWORD keyState, POINTL where, LPDWORD effect);
|
|
HRESULT _IFUNC DragOver(DWORD keyState, POINTL where, LPDWORD effect);
|
|
HRESULT _IFUNC DragLeave();
|
|
HRESULT _IFUNC Drop(IDataObject *dataObj, DWORD keyState, POINTL where, LPDWORD effect);
|
|
|
|
// IOleUILinkContainer functions
|
|
//
|
|
DWORD _IFUNC GetNextLink (DWORD dwLink);
|
|
HRESULT _IFUNC SetLinkUpdateOptions (DWORD dwLink, DWORD dwUpdateOpt);
|
|
HRESULT _IFUNC GetLinkUpdateOptions (DWORD dwLink, DWORD FAR* lpdwUpdateOpt);
|
|
HRESULT _IFUNC SetLinkSource(
|
|
DWORD dwLink,
|
|
LPOLESTR lpszDisplayName,
|
|
ULONG lenFileName,
|
|
ULONG FAR* pchEaten,
|
|
BOOL fValidateSource);
|
|
HRESULT _IFUNC GetLinkSource(
|
|
DWORD dwLink,
|
|
LPOLESTR FAR* lplpszDisplayName,
|
|
ULONG FAR* lplenFileName,
|
|
LPOLESTR FAR* lplpszFullLinkType,
|
|
LPOLESTR FAR* lplpszShortLinkType,
|
|
BOOL FAR* lpfSourceAvailable,
|
|
BOOL FAR* lpfIsSelected);
|
|
HRESULT _IFUNC OpenLinkSource (DWORD dwLink);
|
|
HRESULT _IFUNC UpdateLink(DWORD dwLink, BOOL fErrorMessage,BOOL fErrorAction);
|
|
HRESULT _IFUNC CancelLink (DWORD dwLink);
|
|
|
|
// IOleInPlaceFrame methods
|
|
//
|
|
HRESULT _IFUNC InsertMenus(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidts);
|
|
HRESULT _IFUNC SetMenu(HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject);
|
|
HRESULT _IFUNC RemoveMenus(HMENU hmenuShared);
|
|
HRESULT _IFUNC SetStatusText(LPCOLESTR lpszStatusText);
|
|
HRESULT _IFUNC EnableModeless(BOOL fEnable);
|
|
HRESULT _IFUNC TranslateAccelerator(LPMSG lpmsg, WORD wID);
|
|
};
|
|
|
|
#endif _BOLEDOC_H
|
|
|
|
|