- 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>
115 lines
3.3 KiB
C++
115 lines
3.3 KiB
C++
//----------------------------------------------------------------------------
|
|
// ObjectWindows
|
|
// (C) Copyright 1991, 1994 by Borland International, All Rights Reserved
|
|
//
|
|
// Defines class TScrollBar. This defines the basic
|
|
// behavior of all scrollbar controls.
|
|
//----------------------------------------------------------------------------
|
|
#if !defined(OWL_SCROLLBAR_H)
|
|
#define OWL_SCROLLBAR_H
|
|
|
|
#if !defined(OWL_CONTROL_H)
|
|
# include <owl/control.h>
|
|
#endif
|
|
|
|
//
|
|
// class TScrollBar
|
|
// ----- ----------
|
|
//
|
|
class _OWLCLASS TScrollBar : public TControl {
|
|
public:
|
|
TScrollBar(TWindow* parent,
|
|
int id,
|
|
int x, int y, int w, int h,
|
|
bool isHScrollBar,
|
|
TModule* module = 0);
|
|
|
|
TScrollBar(TWindow* parent, int resourceId, TModule* module = 0);
|
|
|
|
//
|
|
// Virtual functions to interface to scrollbars & derived
|
|
//
|
|
virtual void GetRange(int& min, int& max) const
|
|
{::GetScrollRange(HWindow, SB_CTL, &min, &max);}
|
|
virtual int GetPosition() const {return ::GetScrollPos(HWindow, SB_CTL);}
|
|
virtual void SetRange(int min, int max)
|
|
{::SetScrollRange(HWindow, SB_CTL, min, max, false);}
|
|
virtual void SetPosition(int thumbPos);
|
|
virtual int DeltaPos(int delta);
|
|
|
|
//
|
|
// Override TWindow virtual member functions
|
|
//
|
|
uint Transfer(void* buffer, TTransferDirection direction);
|
|
|
|
//
|
|
// called by EvHScroll and EvVScroll response table handlers
|
|
//
|
|
// these routines all end up calling SetPosition()
|
|
//
|
|
virtual void SBLineUp();
|
|
virtual void SBLineDown();
|
|
virtual void SBPageUp();
|
|
virtual void SBPageDown();
|
|
virtual void SBThumbPosition(int thumbPos);
|
|
virtual void SBThumbTrack(int thumbPos);
|
|
virtual void SBTop();
|
|
virtual void SBBottom();
|
|
virtual void SBEndScroll();
|
|
|
|
//
|
|
// response table handlers that call above virtual functions in
|
|
// response to messages sent by to us by TWindow::DispatchScroll()
|
|
//
|
|
void EvHScroll(uint scrollCode, uint thumbPos, HWND hWndCtl);
|
|
void EvVScroll(uint scrollCode, uint thumbPos, HWND hWndCtl);
|
|
|
|
public:
|
|
int LineMagnitude;
|
|
int PageMagnitude;
|
|
|
|
protected:
|
|
//
|
|
// Override TWindow virtual member functions
|
|
//
|
|
char far* GetClassName();
|
|
void SetupWindow();
|
|
|
|
private:
|
|
//
|
|
// hidden to prevent accidental copying or assignment
|
|
//
|
|
TScrollBar(const TScrollBar&);
|
|
TScrollBar& operator=(const TScrollBar&);
|
|
|
|
DECLARE_RESPONSE_TABLE(TScrollBar);
|
|
DECLARE_STREAMABLE(_OWLCLASS, TScrollBar, 1);
|
|
};
|
|
|
|
//
|
|
// scroll bar notification macros. methods are: void method()
|
|
//
|
|
// EV_SB_LINEDOWN(id, method)
|
|
// EV_SB_LINEUP(id, method)
|
|
// EV_SB_PAGEDOWN(id, method)
|
|
// EV_SB_PAGEUP(id, method)
|
|
// EV_SB_TOP(id, method)
|
|
// EV_SB_BOTTOM(id, method)
|
|
// EV_SB_THUMBPOSITION(id, method)
|
|
// EV_SB_ENDSCROLL(id, method)
|
|
// EV_SB_BEGINTRACK(id, method)
|
|
|
|
//
|
|
// struct TScrollBarData
|
|
// ------ --------------
|
|
//
|
|
// TScrollBar transfer structure
|
|
//
|
|
struct TScrollBarData {
|
|
int LowValue;
|
|
int HighValue;
|
|
int Position;
|
|
};
|
|
|
|
#endif // OWL_SCROLLBAR_H
|