- 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>
228 lines
7.8 KiB
C++
228 lines
7.8 KiB
C++
//
|
|
//**************************************************************************
|
|
//
|
|
// BOlePart.h -- Declares the Bolero half of the site object. BOlePart
|
|
// looks to the user like a server object
|
|
//
|
|
// Copyright (c) 1993,94 by Borland International, Inc. All rights reserved
|
|
//
|
|
//**************************************************************************
|
|
|
|
#ifndef _BOLEPART_H
|
|
#define _BOLEPART_H 1
|
|
|
|
#include "BOleComp.h"
|
|
|
|
#if !defined(__SHELLAPI_H) && !defined(__WIN32__)
|
|
#include <shellapi.h>
|
|
#endif
|
|
|
|
extern "C"{
|
|
#include "ole2ui.h"
|
|
}
|
|
|
|
class _ICLASS BOleDocument;
|
|
|
|
class _ICLASS BOlePart : public BOleComponent, public IBPart2,
|
|
public IOleClientSite, public IAdviseSink,
|
|
public IOleInPlaceSite, public IBLinkInfo,
|
|
public IBLinkable, public IDropSource
|
|
{
|
|
protected:
|
|
|
|
IBSite * pSite;
|
|
IBContainer * pContainer;
|
|
IBLinkable * pILinkCont;
|
|
BOleDocument * pDoc;
|
|
IViewObject * pViewObject;
|
|
IEnumFORMATETC * pEnumFE;
|
|
IOleInPlaceObject * pInPlaceObject;
|
|
IEnumOLEVERB * pVerbEnumerator;
|
|
IOleLink * pLinkObject;
|
|
IStorage * pStgFromInit;
|
|
|
|
BOOL IsOpen : 1;
|
|
BOOL IsOpenInPlace : 1;
|
|
BOOL IsOpenInsideOut : 1;
|
|
BOOL HasMoniker : 1;
|
|
BOOL IsLink : 1;
|
|
BOOL MonikerAssigned : 1;
|
|
BOOL fLinkSrcAvail : 1;
|
|
|
|
LPOLESTR pShortName;
|
|
LPOLESTR pLongName;
|
|
LPOLESTR pAppName;
|
|
WORD verbIndex;
|
|
OLEVERB oleVerb;
|
|
DWORD dwDrawAspect, dwExtAspect;
|
|
HGLOBAL mfpIcon;
|
|
BOlePart * pNextPart, *pPrevPart;
|
|
LPOLESTR pszInstName;
|
|
BOleScaleFactor scaleSite;
|
|
SIZEL CachedExtent;
|
|
|
|
public:
|
|
|
|
IOleObject * pOleObject;
|
|
IDataObject * pDataObject;
|
|
LPUNKNOWN pDocument;
|
|
private:
|
|
void AddToList ();
|
|
void RemoveFromList ();
|
|
|
|
public:
|
|
BOlePart (BOleClassManager *pF, IBUnknownMain * pO, BOleDocument * pOD);
|
|
~BOlePart ();
|
|
|
|
virtual HRESULT _IFUNC GetParentIPS(LPOLEINPLACESITE *pIPSite);
|
|
virtual IMoniker * _IFUNC GetObjectMoniker (DWORD dwAssign);
|
|
virtual BOOL _IFUNC GetLinkAvailability() {return fLinkSrcAvail;}
|
|
virtual BOlePart * _IFUNC GetNextLink (BOOL);
|
|
virtual BOOL _IFUNC SourceGet(LPOLESTR FAR *,LPOLESTR FAR *,
|
|
LPOLESTR FAR *,DWORD FAR *);
|
|
virtual BOOL _IFUNC CacheIconicAspect (HGLOBAL);
|
|
virtual BOOL _IFUNC InitAdvises(LPOLEOBJECT, DWORD, LPOLESTR, LPOLESTR,
|
|
LPADVISESINK, BOOL);
|
|
HRESULT CreateFromBOleInitInfo(BOleInitInfo *pBI, BOOL &fShowAfterCreate);
|
|
void UpdateSiteScaleFactor();
|
|
void DeleteTypeNames();
|
|
|
|
virtual HRESULT _IFUNC CopyFromOriginal (LPFORMATETC, LPDATAOBJECT FAR*);
|
|
virtual HRESULT _IFUNC AddCachedData (IDataObject *pTarget);
|
|
virtual HRESULT _IFUNC AddLinkSourceData (IDataObject *pTarget);
|
|
virtual HRESULT _IFUNC AddSiteData (IDataObject *pTarget);
|
|
|
|
virtual HRESULT _IFUNC ConvertUI (PIBApplication, BOOL, BOleConvertInfo FAR*);
|
|
virtual HRESULT _IFUNC ConvertGuts (BOOL, BOleConvertInfo FAR*);
|
|
virtual HRESULT _IFUNC ConvertHelper (LPCLSID, LPOLESTR FAR *, WORD FAR*);
|
|
|
|
virtual BOOL _IFUNC IsInPlace () {return IsOpenInPlace;}
|
|
virtual void _IFUNC ResetObjectRects ();
|
|
virtual BOlePart* _IFUNC GetNextPart () {return pNextPart;}
|
|
|
|
HRESULT _IFUNC SwitchDisplayAspect(
|
|
LPOLEOBJECT lpOleObj,
|
|
LPDWORD lpdwCurAspect,
|
|
DWORD dwNewAspect,
|
|
HGLOBAL hMetaPict,
|
|
BOOL fDeleteOldAspect,
|
|
BOOL fSetupViewAdvise,
|
|
LPADVISESINK lpAdviseSink,
|
|
BOOL FAR* lpfMustUpdate,
|
|
BOOL fRunIfNecessary);
|
|
|
|
void _IFUNC HandleLinkError();
|
|
|
|
public:
|
|
|
|
// IPart methods
|
|
virtual HRESULT _IFUNC Init(PIBSite, BOleInitInfo FAR*);
|
|
virtual HRESULT _IFUNC Save (PIStorage, BOOL, BOOL);
|
|
|
|
// Information
|
|
virtual HRESULT _IFUNC CanOpenInPlace ();
|
|
virtual HRESULT _IFUNC GetPalette (LPLOGPALETTE FAR*);
|
|
virtual HRESULT _IFUNC SetHost (IBContainer FAR *pObjContainer);
|
|
virtual LPOLESTR _IFUNC GetName (BOlePartName);
|
|
|
|
// Server part state changes
|
|
virtual HRESULT _IFUNC Open (BOOL );
|
|
virtual HRESULT _IFUNC Show (BOOL );
|
|
virtual HRESULT _IFUNC Close ();
|
|
virtual HRESULT _IFUNC Activate (BOOL fActivate);
|
|
virtual HWND _IFUNC OpenInPlace (HWND);
|
|
|
|
// Part size and update methods
|
|
virtual HRESULT _IFUNC GetPartSize (LPSIZE);
|
|
virtual HRESULT _IFUNC SetPartSize (LPSIZE);
|
|
virtual HRESULT _IFUNC SetPartPos (LPRECT);
|
|
virtual HRESULT _IFUNC Draw (HDC, LPCRECTL lpExtent, LPCRECTL lpClip, BOleAspect, BOleDraw);
|
|
|
|
// Tool handling
|
|
virtual HRESULT _IFUNC InsertMenus (HMENU, BOleMenuWidths*);
|
|
virtual void _IFUNC FrameResized (const RECT *, BOOL);
|
|
virtual HRESULT _IFUNC ShowTools (BOOL);
|
|
|
|
virtual HRESULT _IFUNC EnumVerbs (BOleVerb*);
|
|
virtual HRESULT _IFUNC DragFeedback(POINT*,BOOL);
|
|
virtual HRESULT _IFUNC DoVerb (UINT);
|
|
|
|
//IBLinkInfo methods
|
|
virtual HRESULT _IFUNC SourceBreak();
|
|
virtual HRESULT _IFUNC SourceGet(LPOLESTR, UINT);
|
|
virtual HRESULT _IFUNC SourceSet(LPOLESTR);
|
|
virtual HRESULT _IFUNC SourceOpen();
|
|
virtual HRESULT _IFUNC UpdateGet(BOleLinkUpdate*);
|
|
virtual HRESULT _IFUNC UpdateSet(BOleLinkUpdate);
|
|
virtual HRESULT _IFUNC UpdateNow();
|
|
|
|
//Clipboard methods inherited from IBDataProvider
|
|
virtual UINT _IFUNC CountFormats ();
|
|
virtual HRESULT _IFUNC GetFormat (UINT, BOleFormat*);
|
|
virtual HANDLE _IFUNC GetFormatData (BOleFormat*);
|
|
virtual HRESULT _IFUNC SetFormatData(BOleFormat FAR* fmt, HANDLE data, BOOL release);
|
|
|
|
virtual HRESULT _IFUNC DoQueryInterface(REFIID iid, void FAR* FAR* pif);
|
|
|
|
// IUnknown Methods
|
|
//
|
|
DEFINE_IUNKNOWN(pObjOuter);
|
|
|
|
virtual HRESULT _IFUNC QueryInterfaceMain(REFIID iid, LPVOID FAR* pif);
|
|
|
|
protected:
|
|
// IOleClientSite Methods
|
|
//
|
|
HRESULT _IFUNC SaveObject();
|
|
HRESULT _IFUNC GetMoniker(DWORD dwAssign, DWORD dwWhichMoniker,
|
|
IMoniker* FAR* ppmk);
|
|
HRESULT _IFUNC GetContainer(IOleContainer* FAR* ppContainer);
|
|
HRESULT _IFUNC ShowObject();
|
|
HRESULT _IFUNC OnShowWindow(BOOL fShow);
|
|
HRESULT _IFUNC RequestNewObjectLayout();
|
|
|
|
// IAdviseSink Methods
|
|
//
|
|
void _IFUNC OnDataChange(FORMATETC FAR* pFormatetc,
|
|
STGMEDIUM FAR* pStgmed);
|
|
void _IFUNC OnViewChange(DWORD aspects, LONG lindex);
|
|
void _IFUNC OnRename(IMoniker* pmk);
|
|
void _IFUNC OnSave();
|
|
void _IFUNC OnClose();
|
|
|
|
// IOleWindow methods, base of IOleInPlaceUIWindow and IOleInPlaceSite
|
|
//
|
|
HRESULT _IFUNC GetWindow(HWND FAR* lphwnd);
|
|
HRESULT _IFUNC ContextSensitiveHelp(BOOL fEnterMode);
|
|
|
|
// IOleInPlaceSite methods
|
|
//
|
|
HRESULT _IFUNC CanInPlaceActivate();
|
|
HRESULT _IFUNC OnInPlaceActivate();
|
|
HRESULT _IFUNC OnUIActivate();
|
|
HRESULT _IFUNC GetWindowContext(IOleInPlaceFrame* FAR* lplpFrame,
|
|
IOleInPlaceUIWindow* FAR* lplpDoc,
|
|
LPRECT lprcPosRect,
|
|
LPRECT lprcClipRect,
|
|
LPOLEINPLACEFRAMEINFO lpFrameInfo);
|
|
HRESULT _IFUNC Scroll(SIZE scrollExtent);
|
|
HRESULT _IFUNC OnUIDeactivate(BOOL fUndoable);
|
|
HRESULT _IFUNC OnInPlaceDeactivate();
|
|
HRESULT _IFUNC DiscardUndoState();
|
|
HRESULT _IFUNC DeactivateAndUndo();
|
|
HRESULT _IFUNC OnPosRectChange(LPCRECT lprcPosRect);
|
|
|
|
// IBLinkable methods
|
|
//
|
|
virtual HRESULT _IFUNC GetMoniker(IMoniker FAR* FAR* ppMon);
|
|
virtual HRESULT _IFUNC OnRename(PIBLinkable pContainer, LPCOLESTR szName);
|
|
|
|
// IDropSource methods
|
|
//
|
|
HRESULT _IFUNC QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState);
|
|
HRESULT _IFUNC GiveFeedback(DWORD dwEffect);
|
|
};
|
|
|
|
#endif
|
|
|