- 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>
210 lines
7.4 KiB
C++
210 lines
7.4 KiB
C++
//----------------------------------------------------------------------------
|
|
// ObjectWindows
|
|
// (C) Copyright 1994 by Borland International, All Rights Reserved
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
#if !defined(OWL_OLEWINDO_H)
|
|
#define OWL_OLEWINDO_H
|
|
|
|
#if !defined(OWL_WINDOW_H)
|
|
# include <owl/window.h>
|
|
#endif
|
|
#if !defined(OWL_OCFEVENT_H)
|
|
# include <owl/ocfevent.h>
|
|
#endif
|
|
#if !defined(OCF_OCREMVIE_H)
|
|
# include <ocf/ocremvie.h>
|
|
#endif
|
|
#if !defined(OCF_OCPART_H)
|
|
# include <ocf/ocpart.h>
|
|
#endif
|
|
#if !defined(OWL_UIHANDLE_H)
|
|
# include <owl/uihandle.h>
|
|
#endif
|
|
#if !defined(OCF_OCLINK_H)
|
|
# include <ocf/oclink.h>
|
|
#endif
|
|
|
|
//
|
|
// class TOleWindow
|
|
// ----- ----------
|
|
//
|
|
// The generic ole 2 window. Use as a client of a frame window.
|
|
//
|
|
class _USERCLASS TOleWindow : public TWindow {
|
|
public:
|
|
TOleWindow(TWindow* parent = 0, TModule* module = 0);
|
|
~TOleWindow();
|
|
|
|
// Accessors
|
|
//
|
|
TOcDocument* GetOcDoc() {return OcDoc;}
|
|
TOcView* GetOcView() {return OcView;}
|
|
TOcRemView* GetOcRemView() {return TYPESAFE_DOWNCAST(OcView, TOcRemView);}
|
|
TOcApp* GetOcApp() {return OcApp;}
|
|
bool HasActivePart();
|
|
bool SelectEmbedded() {return DragPart != 0;}
|
|
|
|
bool IsOpenEditing() const;
|
|
bool IsRemote() const {return Remote;}
|
|
|
|
virtual bool OleShutDown();
|
|
virtual void SetupDC(TDC& dc, bool scale = true);
|
|
virtual TOcView* CreateOcView(TRegLink* link, bool isRemote, IUnknown* outer);
|
|
|
|
protected:
|
|
// Overridables
|
|
//
|
|
virtual void GetInsertPosition(TRect& rect);
|
|
virtual void InvalidatePart(TOcInvalidate invalid); // server only
|
|
virtual bool Deactivate();
|
|
virtual bool Select(uint modKeys, TPoint& point);
|
|
virtual bool PaintSelection(TDC& dc, bool erase, TRect& rect,
|
|
void* userData = 0){return false;}
|
|
virtual bool PaintParts(TDC& dc, bool erase, TRect& rect, bool metafile);
|
|
virtual bool PaintLink(TDC& dc, bool erase, TRect& rect,
|
|
TString& moniker) {return false;}
|
|
virtual void GetLogPerUnit(TSize& logPerUnit);
|
|
virtual void SetScale(uint16 percent);
|
|
virtual void SetSelection(TOcPart* part);
|
|
virtual bool ShowCursor(HWND wnd, uint hitTest, uint mouseMsg);
|
|
|
|
protected:
|
|
void SetupWindow();
|
|
void CleanupWindow();
|
|
bool IdleAction(long idleCount);
|
|
|
|
LRESULT EvCommand(uint id, HWND hWndCtl, uint notifyCode);
|
|
void EvCommandEnable(TCommandEnabler& commandEnabler);
|
|
bool CanClose();
|
|
bool InClient(TDC& dc, TPoint& point);
|
|
|
|
void EvPaint();
|
|
void EvSize(uint sizeType, TSize& size);
|
|
void EvMDIActivate(HWND hWndActivated, HWND hWndDeactivated);
|
|
uint EvMouseActivate(HWND topParent, uint hitCode, uint msg);
|
|
void EvSetFocus(HWND hWndLostFocus);
|
|
|
|
virtual bool EvOcViewPartInvalid(TOcPartChangeInfo& changeInfo);
|
|
|
|
void CeFileClose(TCommandEnabler& ce);
|
|
|
|
void CmEditDelete();
|
|
void CmEditCut();
|
|
void CmEditCopy();
|
|
void CmEditPaste();
|
|
void CmEditPasteSpecial();
|
|
void CmEditPasteLink();
|
|
void CmEditLinks();
|
|
void CmEditConvert();
|
|
void CmEditInsertObject();
|
|
void CmEditShowObjects();
|
|
|
|
void CeEditDelete(TCommandEnabler& ce);
|
|
void CeEditCut(TCommandEnabler& ce);
|
|
void CeEditCopy(TCommandEnabler& ce);
|
|
void CeEditPaste(TCommandEnabler& ce);
|
|
void CeEditPasteSpecial(TCommandEnabler& ce);
|
|
void CeEditPasteLink(TCommandEnabler& ce);
|
|
void CeEditLinks(TCommandEnabler& ce);
|
|
void CeEditObject(TCommandEnabler& ce);
|
|
void CeEditConvert(TCommandEnabler& ce);
|
|
void CeEditVerbs(TCommandEnabler& ce);
|
|
void CeEditInsertObject(TCommandEnabler& ce);
|
|
void CeEditShowObjects(TCommandEnabler& ce);
|
|
|
|
void EvMouseMove(uint modKeys, TPoint& point);
|
|
void EvRButtonDown(uint modKeys, TPoint& point);
|
|
void EvLButtonUp(uint modKeys, TPoint& point);
|
|
void EvLButtonDown(uint modKeys, TPoint& point);
|
|
void EvLButtonDblClk(uint modKeys, TPoint& point);
|
|
bool EvSetCursor(HWND hWndCursor, uint hitTest, uint mouseMsg);
|
|
void EvDropFiles(TDropInfo dropInfo);
|
|
void EvHScroll(uint scrollCode, uint thumbPos, HWND hWndCtl);
|
|
void EvVScroll(uint scrollCode, uint thumbPos, HWND hWndCtl);
|
|
void EvMenuSelect(uint menuItemId, uint flags, HMENU hMenu);
|
|
|
|
LRESULT EvOcEvent(WPARAM wParam, LPARAM lParam);
|
|
// uint32 EvOcViewDiscardUndo(void far* undo);
|
|
|
|
// Container specific messages
|
|
//
|
|
const char far* EvOcViewTitle();
|
|
void EvOcViewSetTitle(const char far* title);
|
|
|
|
bool EvOcViewBorderSpaceReq(TRect far* rect);
|
|
bool EvOcViewBorderSpaceSet(TRect far* rect);
|
|
bool EvOcViewDrop(TOcDragDrop far& ddInfo);
|
|
bool EvOcViewDrag(TOcDragDrop far& ddInfo);
|
|
bool EvOcViewScroll(TOcScrollDir scrollDir);
|
|
bool EvOcViewGetScale(TOcScaleFactor& scaleFactor);
|
|
bool EvOcViewGetSiteRect(TRect far* rect);
|
|
bool EvOcViewSetSiteRect(TRect far* rect);
|
|
bool EvOcViewPartActivate(TOcPart& ocPart);
|
|
bool EvOcViewPasteObject(TOcInitInfo& init);
|
|
|
|
// Server specific messages
|
|
//
|
|
bool EvOcPartInvalid(TOcPart far& /*part*/) {return false;}
|
|
bool EvOcViewSavePart(TOcSaveLoad far& ocSave);
|
|
bool EvOcViewLoadPart(TOcSaveLoad far& ocLoad);
|
|
bool EvOcViewPaint(TOcViewPaint far& vp);
|
|
bool EvOcViewInsMenus(TOcMenuDescr far& sharedMenu);
|
|
bool EvOcViewShowTools(TOcToolBarInfo far& tbi);
|
|
bool EvOcViewGetPalette(LOGPALETTE far* far* palette);
|
|
bool EvOcViewClipData(TOcFormatData far& format);
|
|
bool EvOcViewSetData(TOcFormatData far& format);
|
|
bool EvOcViewClose();
|
|
bool EvOcViewPartSize(TOcPartSize far& size);
|
|
bool EvOcViewOpenDoc(const char far* path);
|
|
bool EvOcViewAttachWindow(bool attach);
|
|
bool EvOcViewSetScale(TOcScaleFactor& scaleFactor);
|
|
bool EvOcViewGetItemName(TOcItemName& item);
|
|
bool EvOcViewSetLink(TOcLinkView& view);
|
|
bool EvOcViewBreakLink(TOcLinkView& view);
|
|
bool EvOcViewDoVerb(uint verb);
|
|
|
|
TPopupMenu* CreateVerbPopup(const TOcVerb& ocVerb);
|
|
void EvDoVerb(uint whichVerb);
|
|
void Init();
|
|
|
|
protected:
|
|
TOcPart* DragPart;
|
|
TUIHandle::TWhere DragHit;
|
|
TDC* DragDC;
|
|
TPoint DragPt;
|
|
TRect DragRect;
|
|
TPoint DragStart;
|
|
TOcScaleFactor Scale; // current scaling factor
|
|
TRect Pos; // current position
|
|
|
|
TOcDocument* OcDoc; // associated OCF document partner
|
|
TOcView* OcView; // associated OCF view partner
|
|
TOcApp* OcApp; // associated OCF app partner
|
|
string ContainerName; // Name for this container
|
|
|
|
bool Remote; // Using a remote OC view?
|
|
bool ShowObjects; // Show embedded part frames?
|
|
|
|
int MinWidth; // minimum width of part
|
|
int MinHeight; // minimum height of part
|
|
|
|
DECLARE_RESPONSE_TABLE(TOleWindow);
|
|
};
|
|
|
|
|
|
//
|
|
// class TOleClientDC
|
|
// ----- ------------
|
|
//
|
|
// The TOleClientDC is a client dc with window origin, ext, and viewport
|
|
// origin, ext set up to reflect the current scrolling and scaling information.
|
|
//
|
|
class TOleClientDC : public TClientDC {
|
|
public:
|
|
TOleClientDC(TOleWindow& win, bool scale = true);
|
|
};
|
|
|
|
|
|
#endif
|