- 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>
113 lines
4.8 KiB
C++
113 lines
4.8 KiB
C++
//----------------------------------------------------------------------------
|
|
// ObjectWindows - (C) Copyright 1991, 1993 by Borland International
|
|
//----------------------------------------------------------------------------
|
|
#if !defined(__APPWIN_H)
|
|
#define __APPWIN_H
|
|
|
|
#include <owl\menu.h>
|
|
#include <owl\floatfra.h>
|
|
#include <owl\opensave.h>
|
|
#include <owl\bitmapga.h>
|
|
#include "appbtnba.h"
|
|
#include "appmgr.h"
|
|
#include "appbtn.h"
|
|
|
|
#define NO_ENTRY '2' // does not exist in INI file.
|
|
#define INUSE '1' // in use by another instance of AppLauncher.
|
|
#define NOT_INUSE '0' // open, not used by any instance of AppLauncher.
|
|
#define NEntries 128 // maximum number of instances that can be running.
|
|
|
|
//
|
|
// Frame window of app. Contains the button bar and application manager.
|
|
//
|
|
class TAppWindow : public TFloatingFrame {
|
|
public:
|
|
static const int NumBufSize; // max size of number buffer.
|
|
|
|
TAppWindow(char* title, TWindow* client, string& startupPath);
|
|
~TAppWindow();
|
|
|
|
void SetupWindow();
|
|
void CleanupWindow();
|
|
|
|
protected:
|
|
LRESULT CmProperties(WPARAM wParam, LPARAM lParam);
|
|
LRESULT CmButtonPressed(WPARAM wParam, LPARAM lParam);
|
|
LRESULT CmButtonDrag(WPARAM wParam, LPARAM lParam);
|
|
void EvNCRButtonDown(UINT modKeys, TPoint& point);
|
|
void EvDropFiles(TDropInfo drop);
|
|
void EvEndSession(BOOL b);
|
|
|
|
void CmAddApp();
|
|
void CmRemoveApps();
|
|
void CmConfigOptions();
|
|
void CmReadConfig();
|
|
void CmHelp();
|
|
void CmDummy() {}
|
|
void CmPlaceHolder();
|
|
|
|
private:
|
|
unsigned CurINISecNum; // section of INI file in use.
|
|
int SaveOnExit; // save settings to INI file on exit?
|
|
int Orientation; // 0 = Vertical, 1 = Horizontal.
|
|
string& StartupPath; // dir. AppLauncher was started from.
|
|
unsigned MaxApps; // max. # of apps given screen res.
|
|
unsigned XExt; // vertical screen size.
|
|
unsigned YExt; // horizontal screen size.
|
|
TPopupMenu PopupMenu; // main menu.
|
|
TAppMgr AppMgr; // manages internal rep. of apps.
|
|
TAppButtonBar* AppButtons; // cache client object.
|
|
TBitmapGadget* AppRemoverGadget; // used when no apps.
|
|
int CleanedUp; // have we called shutdown routine?
|
|
int ConfirmOnRemove; // confirm on remove enabled?
|
|
char* InUseEntries; // INI sections in use.
|
|
int CM_REQUEST_ID;// request ids from other instances.
|
|
int CM_SENDING_ID;// send id to other instances.
|
|
int WaitingForMsg; // are we waiting for message?
|
|
TOpenSaveDialog::TData FileData; // save/restore info.
|
|
|
|
int DoAddApp(const string& path, int loc, const string& rec);
|
|
void RemoveApp(unsigned loc);
|
|
TGadget* CreateButton(string& path, int loc);
|
|
int RestoreFromINIFile(unsigned secNumber = UINT_MAX);
|
|
int RestoreXYLoc(const string& section);
|
|
int RestoreOrientation(const string& section);
|
|
int RestoreSaveOnExit(const string& section);
|
|
int RestoreConfirmOnRemove(const string& section);
|
|
int RestoreApps(const string& section);
|
|
int GetINIEntry(const string& entry, const string& section,
|
|
char* dest, unsigned destBufLen);
|
|
int SaveToINIFile(unsigned secNumber);
|
|
int SaveXYLoc(const string& section);
|
|
int SaveOrientation(const string& section);
|
|
int SaveSaveOnExit(const string& section);
|
|
int SaveConfirmOnRemove(const string& section);
|
|
int SaveApps(const string& section);
|
|
int WriteINIEntry(const string& section, const string& entryKey,
|
|
const string& entryValue);
|
|
void UpdateAppButtons();
|
|
void ReIdButtons();
|
|
void DisplayHelp();
|
|
int LocOfNearestButtonFromPoint(const TPoint& point);
|
|
void AppLauncherCleanup();
|
|
BOOL ConfirmRemove(const string& p);
|
|
void AnimateAppRemoverGadget();
|
|
|
|
// INI section management.
|
|
//
|
|
void InitEntries();
|
|
int SectionInUse(unsigned sec);
|
|
BOOL MarkInUse(unsigned sec, BOOL mark);
|
|
unsigned NextAvailableSection();
|
|
unsigned NextSection();
|
|
int INISectionExists(unsigned sec);
|
|
LRESULT CmRequestId(WPARAM wParam, LPARAM lParam);
|
|
LRESULT CmSendingId(WPARAM wParam, LPARAM lParam);
|
|
void FillEntries(int skipClear = 0);
|
|
void EvTimer(UINT);
|
|
|
|
DECLARE_RESPONSE_TABLE(TAppWindow);
|
|
};
|
|
|
|
#endif // __APPWIN_H
|