- 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>
169 lines
5.2 KiB
C++
169 lines
5.2 KiB
C++
//----------------------------------------------------------------------------
|
|
// ObjectWindows
|
|
// (C) Copyright 1992, 1994 by Borland International, All Rights Reserved
|
|
//
|
|
// Declaration of class TFrameWindow.
|
|
//----------------------------------------------------------------------------
|
|
#if !defined(OWL_FRAMEWIN_H)
|
|
#define OWL_FRAMEWIN_H
|
|
|
|
#if !defined(OWL_WINDOW_H)
|
|
# include <owl/window.h>
|
|
#endif
|
|
#if !defined(OWL_MENU_H)
|
|
# include <owl/menu.h>
|
|
#endif
|
|
|
|
// MDI window IDs
|
|
//
|
|
const int IDW_MDICLIENT = 32000; // ID of MDI client window
|
|
const int IDW_FIRSTMDICHILD = 32001; // child window IDs, 32 max to 32032
|
|
|
|
//
|
|
// class TMenuItemEnabler
|
|
// ----- ----------------
|
|
//
|
|
// command enabler for menu items
|
|
//
|
|
class _OWLCLASS TMenuItemEnabler : public TCommandEnabler {
|
|
public:
|
|
TMenuItemEnabler(HMENU hMenu, uint id, HWND hWndReceiver, int position)
|
|
: TCommandEnabler(id, hWndReceiver)
|
|
{
|
|
HMenu = hMenu;
|
|
Position = position;
|
|
if (::GetMenuItemID(HMenu, Position) == uint(-1))
|
|
Handled = NonSender;
|
|
}
|
|
|
|
// Override member functions of TCommandEnabler
|
|
//
|
|
void Enable(bool);
|
|
void SetText(const char far*);
|
|
void SetCheck(int);
|
|
|
|
// Menu specific menber functions
|
|
//
|
|
HMENU GetMenu() {return HMenu;}
|
|
int GetPosition() {return Position;}
|
|
|
|
protected:
|
|
HMENU HMenu;
|
|
int Position;
|
|
};
|
|
|
|
|
|
//
|
|
// class TFrameWindow
|
|
// ----- ------------
|
|
//
|
|
// adds the notion of a client window, keyboard navigation, and special
|
|
// processing for commands (see member function EvCommand)
|
|
//
|
|
class _OWLCLASS TFrameWindow : virtual public TWindow {
|
|
public:
|
|
bool KeyboardHandling;
|
|
|
|
TFrameWindow(TWindow* parent,
|
|
const char far* title = 0,
|
|
TWindow* clientWnd = 0,
|
|
bool shrinkToClient = false,
|
|
TModule* module = 0);
|
|
|
|
TFrameWindow(HWND hWnd, TModule* module = 0);
|
|
~TFrameWindow();
|
|
|
|
//
|
|
// Menubar manipulating functions
|
|
//
|
|
virtual bool AssignMenu(TResId menuResId);
|
|
virtual bool SetMenu(HMENU newMenu);
|
|
void SetMenuDescr(const TMenuDescr& menuDescr);
|
|
const TMenuDescr* GetMenuDescr() const {return MenuDescr;}
|
|
bool MergeMenu(const TMenuDescr& childMenuDescr);
|
|
bool RestoreMenu();
|
|
|
|
bool SetIcon(TModule* iconModule, TResId iconResId);
|
|
|
|
virtual TWindow* GetClientWindow();
|
|
virtual TWindow* SetClientWindow(TWindow* clientWnd);
|
|
void RemoveChild(TWindow* child);
|
|
virtual HWND GetCommandTarget();
|
|
|
|
//
|
|
// sets flag indicating that the receiver has requested "keyboard
|
|
// handling" (translation of keyboard input into control selections)
|
|
//
|
|
void EnableKBHandler() {KeyboardHandling = true;}
|
|
|
|
//
|
|
// override virtual functions defined by TWindow
|
|
//
|
|
bool PreProcessMsg(MSG& msg);
|
|
bool IdleAction(long idleCount);
|
|
bool HoldFocusHWnd(HWND hWndLose, HWND hWndGain);
|
|
bool SetDocTitle(const char far* docname, int index);
|
|
|
|
protected:
|
|
HWND HWndRestoreFocus;
|
|
TWindow* ClientWnd;
|
|
int DocTitleIndex;
|
|
TModule* MergeModule;
|
|
|
|
//
|
|
// Constructor & subsequent initializer for use with virtual derivations
|
|
// Immediate derivitives must call Init() before constructions are done.
|
|
//
|
|
TFrameWindow();
|
|
void Init(TWindow* clientWnd, bool shrinkToClient);
|
|
|
|
//
|
|
// extra processing for commands: starts with the focus window and gives
|
|
// it and its parent windows an opportunity to handle the command
|
|
//
|
|
LRESULT EvCommand(uint id, HWND hWndCtl, uint notifyCode);
|
|
void EvCommandEnable(TCommandEnabler& ce);
|
|
|
|
//
|
|
// message response functions
|
|
//
|
|
void EvInitMenuPopup(HMENU hPopupMenu,
|
|
uint index,
|
|
bool sysMenu);
|
|
void EvPaint();
|
|
bool EvEraseBkgnd(HDC);
|
|
HANDLE EvQueryDragIcon();
|
|
void EvSetFocus(HWND hWndLostFocus);
|
|
void EvSize(uint sizeType, TSize& size);
|
|
void EvParentNotify(uint event,
|
|
uint childHandleOrX,
|
|
uint childIDOrY);
|
|
void EvEnterIdle(uint source, HWND hWndDlg);
|
|
|
|
//
|
|
// override virtual function defined by TWindow
|
|
//
|
|
void SetupWindow();
|
|
|
|
private:
|
|
TMenuDescr* MenuDescr;
|
|
TModule* IconModule;
|
|
TResId IconResId;
|
|
TPoint MinimizedPos;
|
|
|
|
void Init(TWindow* clientWnd);
|
|
bool ResizeClientWindow(bool redraw = true);
|
|
TWindow* FirstChildWithTab();
|
|
|
|
//
|
|
// hidden to prevent accidental copying or assignment
|
|
//
|
|
TFrameWindow(const TFrameWindow&);
|
|
TFrameWindow& operator =(const TFrameWindow&);
|
|
|
|
DECLARE_RESPONSE_TABLE(TFrameWindow);
|
|
DECLARE_STREAMABLE(_OWLCLASS, TFrameWindow, 1);
|
|
};
|
|
|
|
#endif // OWL_FRAMEWIN_H
|