Browse Source

Removing code already excluded by MPEXCLUDE

Source commit: 0345d7df88750cd1c2d951d7743b725f66ae586c
Martin Prikryl 8 years ago
parent
commit
c2d98bde58

+ 0 - 10
source/packages/tb2k/TB2Consts.pas

@@ -14,16 +14,6 @@ resourcestring
   { TTBChevronItem }
   STBChevronItemMoreButtonsHint = 'More Buttons|';
 
-  {$IFNDEF MPEXCLUDE}
-  { TTBMRUListItem }
-  STBMRUListItemDefCaption = '(MRU List)';
-  {$ENDIF}
-
-  {$IFNDEF MPEXCLUDE}
-  { TTBMDIWindowItem }
-  STBMDIWindowItemDefCaption = '(Window List)';
-  {$ENDIF}
-
   { TTBDock exception messages }
   STBDockParentNotAllowed = 'A TTBDock control cannot be placed inside a tool window or another TTBDock';
   STBDockCannotChangePosition = 'Cannot change Position of a TTBDock if it already contains controls';

+ 2 - 331
source/packages/tb2k/TB2Dock.pas

@@ -49,9 +49,6 @@ type
   TTBDockableTo = set of TTBDockPosition;
 
   TTBCustomDockableWindow = class;
-  {$IFNDEF MPEXCLUDE}
-  TTBBasicBackground = class;
-  {$ENDIF}
 
   TTBInsertRemoveEvent = procedure(Sender: TObject; Inserting: Boolean;
     Bar: TTBCustomDockableWindow) of object;
@@ -64,9 +61,6 @@ type
     FPosition: TTBDockPosition;
     FAllowDrag: Boolean;
     FBoundLines: TTBDockBoundLines;
-    {$IFNDEF MPEXCLUDE}
-    FBackground: TTBBasicBackground;
-    {$ENDIF}
     FBkgOnToolbars: Boolean;
     FFixAlign: Boolean;
     FCommitNewPositions: Boolean;
@@ -82,10 +76,6 @@ type
     { Property access methods }
     //function GetVersion: TToolbar97Version;
     procedure SetAllowDrag(Value: Boolean);
-    {$IFNDEF MPEXCLUDE}
-    procedure SetBackground(Value: TTBBasicBackground);
-    procedure SetBackgroundOnToolbars(Value: Boolean);
-    {$ENDIF}
     procedure SetBoundLines(Value: TTBDockBoundLines);
     procedure SetFixAlign(Value: Boolean);
     procedure SetPosition(Value: TTBDockPosition);
@@ -95,9 +85,6 @@ type
     function GetToolbars(Index: Integer): TTBCustomDockableWindow;
 
     { Internal }
-    {$IFNDEF MPEXCLUDE}
-    procedure BackgroundChanged(Sender: TObject);
-    {$ENDIF}
     procedure ChangeDockList(const Insert: Boolean; const Bar: TTBCustomDockableWindow);
     procedure CommitPositions;
     procedure DrawNCArea(const DrawToDC: Boolean; const ADC: HDC;
@@ -110,9 +97,6 @@ type
     { Messages }
     procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR;
     procedure CMDialogKey(var Message: TCMDialogKey); message CM_DIALOGKEY;
-    {$IFNDEF MPEXCLUDE}
-    procedure CMSysColorChange(var Message: TMessage); message CM_SYSCOLORCHANGE;
-    {$ENDIF}
     procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND;
     procedure WMMove(var Message: TWMMove); message WM_MOVE;
     procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE;
@@ -128,9 +112,6 @@ type
     procedure AlignControls(AControl: TControl; var Rect: TRect); override;
     procedure ChangeWidthHeight(const NewWidth, NewHeight: Integer);
     procedure DrawBackground(DC: HDC; const DrawRect: TRect); virtual;
-    {$IFNDEF MPEXCLUDE}
-    function GetPalette: HPALETTE; override;
-    {$ENDIF}
     function HasVisibleToolbars: Boolean;
     procedure InvalidateBackgrounds;
     procedure Loaded; override;
@@ -161,10 +142,6 @@ type
     property Toolbars[Index: Integer]: TTBCustomDockableWindow read GetToolbars;
   published
     property AllowDrag: Boolean read FAllowDrag write SetAllowDrag default True;
-    {$IFNDEF MPEXCLUDE}
-    property Background: TTBBasicBackground read FBackground write SetBackground;
-    property BackgroundOnToolbars: Boolean read FBkgOnToolbars write SetBackgroundOnToolbars default True;
-    {$ENDIF}
     property BoundLines: TTBDockBoundLines read FBoundLines write SetBoundLines default [];
     property Color default clBtnFace;
     property FixAlign: Boolean read FFixAlign write SetFixAlign default False;
@@ -491,44 +468,6 @@ type
     property Width stored IsWidthAndHeightStored;
   end;
 
-  {$IFNDEF MPEXCLUDE}
-  TTBBasicBackground = class(TComponent)
-  protected
-    procedure Draw(DC: HDC; const DrawRect: TRect); virtual; abstract;
-    function GetPalette: HPALETTE; virtual; abstract;
-    procedure RegisterChanges(Proc: TNotifyEvent); virtual; abstract;
-    procedure SysColorChanged; virtual; abstract;
-    procedure UnregisterChanges(Proc: TNotifyEvent); virtual; abstract;
-    function UsingBackground: Boolean; virtual; abstract;
-  end;
-
-  TTBBackground = class(TTBBasicBackground)
-  private
-    FBitmap, FBitmapCache: TBitmap;
-    FBkColor: TColor;
-    FNotifyList: TList;
-    FTransparent: Boolean;
-    procedure BitmapChanged(Sender: TObject);
-    procedure SetBitmap(Value: TBitmap);
-    procedure SetBkColor(Value: TColor);
-    procedure SetTransparent(Value: Boolean);
-  protected
-    procedure Draw(DC: HDC; const DrawRect: TRect); override;
-    function GetPalette: HPALETTE; override;
-    procedure RegisterChanges(Proc: TNotifyEvent); override;
-    procedure SysColorChanged; override;
-    procedure UnregisterChanges(Proc: TNotifyEvent); override;
-    function UsingBackground: Boolean; override;
-  public
-    constructor Create(AOwner: TComponent); override;
-    destructor Destroy; override;
-  published
-    property Bitmap: TBitmap read FBitmap write SetBitmap;
-    property BkColor: TColor read FBkColor write SetBkColor default clBtnFace;
-    property Transparent: Boolean read FTransparent write SetTransparent default False;
-  end;
-  {$ENDIF}
-
 procedure TBRegLoadPositions(const OwnerComponent: TComponent;
   const RootKey: DWORD; const BaseRegistryKey: String);
 procedure TBRegSavePositions(const OwnerComponent: TComponent;
@@ -879,10 +818,6 @@ end;
 
 destructor TTBDock.Destroy;
 begin
-  {$IFNDEF MPEXCLUDE}
-  if Assigned(FBackground) then
-    FBackground.UnregisterChanges(BackgroundChanged);
-  {$ENDIF}
   inherited;
   DockVisibleList.Free;
   DockList.Free;
@@ -1678,28 +1613,13 @@ procedure TTBDock.Notification(AComponent: TComponent; Operation: TOperation);
 begin
   inherited;
   if Operation = opRemove then begin
-    {$IFNDEF MPEXCLUDE}
-    if AComponent = FBackground then
-      Background := nil
-    else {$ENDIF} if AComponent is TTBCustomDockableWindow then begin
+    if AComponent is TTBCustomDockableWindow then begin
       DockList.Remove(AComponent);
       DockVisibleList.Remove(AComponent);
     end;
   end;
 end;
 
-{$IFNDEF MPEXCLUDE}
-function TTBDock.GetPalette: HPALETTE;
-begin
-  if UsingBackground and Assigned(FBackground) then
-    { ^ by default UsingBackground returns False if FBackground isn't assigned,
-      but UsingBackground may be overridden and return True when it isn't }
-    Result := FBackground.GetPalette
-  else
-    Result := 0;
-end;
-{$ENDIF}
-
 procedure TTBDock.WMEraseBkgnd(var Message: TWMEraseBkgnd);
 var
   R, R2: TRect;
@@ -1862,15 +1782,6 @@ begin
   HandleWMPrintClient(Self, Message);
 end;
 
-{$IFNDEF MPEXCLUDE}
-procedure TTBDock.CMSysColorChange(var Message: TMessage);
-begin
-  inherited;
-  if Assigned(FBackground) then
-    FBackground.SysColorChanged;
-end;
-{$ENDIF}
-
 procedure TTBDock.RelayMsgToFloatingBars(var Message: TMessage);
 var
   I: Integer;
@@ -1924,18 +1835,12 @@ end;
 
 function TTBDock.UsingBackground: Boolean;
 begin
-  {$IFNDEF MPEXCLUDE}
-  Result := Assigned(FBackground) and FBackground.UsingBackground;
-  {$ELSE}
   Result := False;
-  {$ENDIF}
 end;
 
 procedure TTBDock.DrawBackground(DC: HDC; const DrawRect: TRect);
 begin
-  {$IFNDEF MPEXCLUDE}
-  FBackground.Draw(DC, DrawRect);
-  {$ENDIF}
+  { noop }
 end;
 
 procedure TTBDock.InvalidateBackgrounds;
@@ -1954,35 +1859,6 @@ begin
   end;
 end;
 
-{$IFNDEF MPEXCLUDE}
-procedure TTBDock.SetBackground(Value: TTBBasicBackground);
-begin
-  if FBackground <> Value then begin
-    if Assigned(FBackground) then
-      FBackground.UnregisterChanges(BackgroundChanged);
-    FBackground := Value;
-    if Assigned(Value) then begin
-      Value.FreeNotification(Self);
-      Value.RegisterChanges(BackgroundChanged);
-    end;
-    InvalidateBackgrounds;
-  end;
-end;
-
-procedure TTBDock.BackgroundChanged(Sender: TObject);
-begin
-  InvalidateBackgrounds;
-end;
-
-procedure TTBDock.SetBackgroundOnToolbars(Value: Boolean);
-begin
-  if FBkgOnToolbars <> Value then begin
-    FBkgOnToolbars := Value;
-    InvalidateBackgrounds;
-  end;
-end;
-{$ENDIF}
-
 procedure TTBDock.SetBoundLines(Value: TTBDockBoundLines);
 var
   X, Y: Integer;
@@ -5059,211 +4935,6 @@ begin
   end;
 end;
 
-(*function TTBCustomDockableWindow.GetVersion: TToolbar97Version;
-begin
-  Result := Toolbar97VersionPropText;
-end;
-
-procedure TTBCustomDockableWindow.SetVersion(const Value: TToolbar97Version);
-begin
-  { write method required for the property to show up in Object Inspector }
-end;*)
-
-
-{$IFNDEF MPEXCLUDE}
-
-{ TTBBackground }
-
-type
-  PNotifyEvent = ^TNotifyEvent;
-
-constructor TTBBackground.Create(AOwner: TComponent);
-begin
-  inherited;
-  FBkColor := clBtnFace;
-  FBitmap := TBitmap.Create;
-  FBitmap.OnChange := BitmapChanged;
-end;
-
-destructor TTBBackground.Destroy;
-var
-  I: Integer;
-begin
-  inherited;
-  FBitmapCache.Free;
-  FBitmap.Free;
-  if Assigned(FNotifyList) then begin
-    for I := FNotifyList.Count-1 downto 0 do
-      Dispose(PNotifyEvent(FNotifyList[I]));
-    FNotifyList.Free;
-  end;
-end;
-
-procedure TTBBackground.BitmapChanged(Sender: TObject);
-var
-  I: Integer;
-begin
-  { Erase the cache and notify }
-  FBitmapCache.Free;
-  FBitmapCache := nil;
-  if Assigned(FNotifyList) then
-    for I := 0 to FNotifyList.Count-1 do
-      PNotifyEvent(FNotifyList[I])^(Self);
-end;
-
-procedure TTBBackground.Draw(DC: HDC; const DrawRect: TRect);
-var
-  UseBmp: TBitmap;
-  R2: TRect;
-  SaveIndex: Integer;
-  DC2: HDC;
-  Brush: HBRUSH;
-  P: TPoint;
-begin
-  if FBitmapCache = nil then begin
-    FBitmapCache := TBitmap.Create;
-    FBitmapCache.Palette := CopyPalette(FBitmap.Palette);
-    FBitmapCache.Width := FBitmap.Width;
-    FBitmapCache.Height := FBitmap.Height;
-    if not FTransparent then begin
-      { Copy from a possible DIB to our DDB }
-      BitBlt(FBitmapCache.Canvas.Handle, 0, 0, FBitmapCache.Width,
-        FBitmapCache.Height, FBitmap.Canvas.Handle, 0, 0, SRCCOPY);
-    end
-    else begin
-      with FBitmapCache do begin
-        Canvas.Brush.Color := FBkColor;
-        R2 := Rect(0, 0, Width, Height);
-        Canvas.BrushCopy(R2, FBitmap, R2,
-          FBitmap.Canvas.Pixels[0, Height-1] or $02000000);
-      end;
-    end;
-    FBitmap.Dormant;
-  end;
-  UseBmp := FBitmapCache;
-
-  DC2 := 0;
-  SaveIndex := SaveDC(DC);
-  try
-    if UseBmp.Palette <> 0 then begin
-      SelectPalette(DC, UseBmp.Palette, True);
-      RealizePalette(DC);
-    end;
-    { Note: versions of Toolbar97 prior to 1.68 used 'UseBmp.Canvas.Handle'
-      instead of DC2 in the BitBlt call. This was changed because there
-      seems to be a bug in D2/BCB1's Graphics.pas: if you called
-      <dockname>.Background.LoadFromFile(<filename>) twice the background
-      would not be shown. }
-    if (UseBmp.Width = 8) and (UseBmp.Height = 8) then begin
-      { Use pattern brushes to draw 8x8 bitmaps.
-        Note: Win9x can't use bitmaps <8x8 in size for pattern brushes }
-      Brush := CreatePatternBrush(UseBmp.Handle);
-      GetWindowOrgEx(DC, P);
-      SetBrushOrgEx(DC, DrawRect.Left - P.X, DrawRect.Top - P.Y, nil);
-      FillRect(DC, DrawRect, Brush);
-      DeleteObject(Brush);
-    end
-    else begin
-      { BitBlt is faster than pattern brushes on large bitmaps }
-      DC2 := CreateCompatibleDC(DC);
-      SelectObject(DC2, UseBmp.Handle);
-      R2 := DrawRect;
-      while R2.Left < R2.Right do begin
-        while R2.Top < R2.Bottom do begin
-          BitBlt(DC, R2.Left, R2.Top, UseBmp.Width, UseBmp.Height,
-            DC2, 0, 0, SRCCOPY);
-          Inc(R2.Top, UseBmp.Height);
-        end;
-        R2.Top := DrawRect.Top;
-        Inc(R2.Left, UseBmp.Width);
-      end;
-    end;
-  finally
-    if DC2 <> 0 then
-      DeleteDC(DC2);
-    { Restore the palette and brush origin back }
-    RestoreDC(DC, SaveIndex);
-  end;
-end;
-
-function TTBBackground.GetPalette: HPALETTE;
-begin
-  Result := FBitmap.Palette;
-end;
-
-procedure TTBBackground.SysColorChanged;
-begin
-  if FTransparent and (FBkColor < 0) then
-    BitmapChanged(nil);
-end;
-
-function TTBBackground.UsingBackground: Boolean;
-begin
-  Result := (FBitmap.Width <> 0) and (FBitmap.Height <> 0);
-end;
-
-procedure TTBBackground.RegisterChanges(Proc: TNotifyEvent);
-var
-  I: Integer;
-  P: PNotifyEvent;
-begin
-  if FNotifyList = nil then
-    FNotifyList := TList.Create;
-  for I := 0 to FNotifyList.Count-1 do begin
-    P := FNotifyList[I];
-    if (TMethod(P^).Code = TMethod(Proc).Code) and
-       (TMethod(P^).Data = TMethod(Proc).Data) then
-      Exit;
-  end;
-  FNotifyList.Expand;
-  New(P);
-  P^ := Proc;
-  FNotifyList.Add(P);
-end;
-
-procedure TTBBackground.UnregisterChanges(Proc: TNotifyEvent);
-var
-  I: Integer;
-  P: PNotifyEvent;
-begin
-  if FNotifyList = nil then
-    Exit;
-  for I := 0 to FNotifyList.Count-1 do begin
-    P := FNotifyList[I];
-    if (TMethod(P^).Code = TMethod(Proc).Code) and
-       (TMethod(P^).Data = TMethod(Proc).Data) then begin
-      FNotifyList.Delete(I);
-      Dispose(P);
-      Break;
-    end;
-  end;
-end;
-
-procedure TTBBackground.SetBkColor(Value: TColor);
-begin
-  if FBkColor <> Value then begin
-    FBkColor := Value;
-    if FTransparent then
-      BitmapChanged(nil);
-  end;
-end;
-
-procedure TTBBackground.SetBitmap(Value: TBitmap);
-begin
-  FBitmap.Assign(Value);
-end;
-
-procedure TTBBackground.SetTransparent(Value: Boolean);
-begin
-  if FTransparent <> Value then begin
-    FTransparent := Value;
-    BitmapChanged(nil);
-  end;
-end;
-
-{$ENDIF}
-
-
 { Global procedures }
 
 procedure TBCustomLoadPositions(const OwnerComponent: TComponent;

+ 0 - 82
source/packages/tb2k/TB2ExtItems.pas

@@ -191,42 +191,6 @@ type
     property EditControl: TEdit read FEditControl;
   end;
 
-  {$IFNDEF MPEXCLUDE}
-  { TTBVisibilityToggleItem }
-
-  TTBVisibilityToggleItem = class(TTBCustomItem)
-  private
-    FControl: TControl;
-    procedure SetControl(Value: TControl);
-    procedure UpdateProps;
-  protected
-    procedure Notification(AComponent: TComponent; Operation: TOperation); override;
-  public
-    procedure Click; override;
-    procedure InitiateAction; override;
-  published
-    property Caption;
-    property Control: TControl read FControl write SetControl;
-    property DisplayMode;
-    property Enabled;
-    property HelpContext;
-    { MP }
-    property HelpKeyword;
-    property Hint;
-    property ImageIndex;
-    property Images;
-    property InheritOptions;
-    property MaskOptions;
-    property Options;
-    property ShortCut;
-    property Visible;
-
-    property OnClick;
-    property OnSelect;
-  end;
-  {$ENDIF}
-
-
 implementation
 
 uses
@@ -980,50 +944,4 @@ begin
   Result := True;
 end;
 
-
-{$IFNDEF MPEXCLUDE}
-
-{ TTBToolbarVisibilityItem }
-
-procedure TTBVisibilityToggleItem.Click;
-begin
-  if Assigned(FControl) then
-    FControl.Visible := not FControl.Visible;
-  inherited;
-end;
-
-procedure TTBVisibilityToggleItem.InitiateAction;
-begin
-  UpdateProps;
-end;
-
-procedure TTBVisibilityToggleItem.Notification(AComponent: TComponent;
-  Operation: TOperation);
-begin
-  inherited;
-  if (Operation = opRemove) and (AComponent = FControl) then
-    Control := nil;
-end;
-
-procedure TTBVisibilityToggleItem.SetControl(Value: TControl);
-begin
-  if FControl <> Value then begin
-    FControl := Value;
-    if Assigned(Value) then begin
-      Value.FreeNotification(Self);
-      if (Caption = '') and not(csLoading in ComponentState) then
-        Caption := TControlAccess(Value).Caption;
-    end;
-    UpdateProps;
-  end;
-end;
-
-procedure TTBVisibilityToggleItem.UpdateProps;
-begin
-  if (ComponentState * [csDesigning, csLoading, csDestroying] = []) then
-    Checked := Assigned(FControl) and FControl.Visible;
-end;
-
-{$ENDIF}
-
 end.

+ 5 - 13
source/packages/tb2k/TB2Reg.pas

@@ -33,7 +33,7 @@ interface
 uses
   Windows, SysUtils, Classes, Graphics, Controls, Dialogs, ActnList, ImgList,
   DesignIntf, DesignEditors, VCLEditors,
-  TB2Toolbar, {$IFNDEF MPEXCLUDE}TB2ToolWindow,{$ENDIF} TB2Dock, TB2Item, TB2ExtItems, {$IFNDEF MPEXCLUDE} TB2MRU, TB2MDI, {$ENDIF}
+  TB2Toolbar, TB2Dock, TB2Item, TB2ExtItems,
   TB2DsgnItemEditor;
 
 { TTBImageIndexPropertyEditor }
@@ -206,16 +206,13 @@ end;
 
 procedure Register;
 begin
-  RegisterComponents('Toolbar2000', [TTBDock, TTBToolbar, {$IFNDEF MPEXCLUDE}TTBToolWindow,{$ENDIF}
-    TTBPopupMenu, TTBImageList, TTBItemContainer{$IFNDEF MPEXCLUDE}, TTBBackground, TTBMRUList,
-    TTBMDIHandler{$ENDIF}]);
+  RegisterComponents('Toolbar2000', [TTBDock, TTBToolbar,
+    TTBPopupMenu, TTBImageList, TTBItemContainer]);
   RegisterActions('', [TTBEditAction], nil);
   RegisterNoIcon([TTBItem, TTBGroupItem, TTBSubmenuItem, TTBSeparatorItem,
-    TTBEditItem, {$IFNDEF MPEXCLUDE} TTBMRUListItem,{$ENDIF} TTBControlItem{$IFNDEF MPEXCLUDE}, TTBMDIWindowItem,
-    TTBVisibilityToggleItem{$ENDIF}]);
+    TTBEditItem, TTBControlItem]);
   RegisterClasses([TTBItem, TTBGroupItem, TTBSubmenuItem, TTBSeparatorItem,
-    TTBEditItem, {$IFNDEF MPEXCLUDE}TTBMRUListItem,{$ENDIF} TTBControlItem{$IFNDEF MPEXCLUDE}, TTBMDIWindowItem,
-    TTBVisibilityToggleItem{$ENDIF}]);
+    TTBEditItem, TTBControlItem]);
 
   RegisterComponentEditor(TTBCustomToolbar, TTBItemsEditor);
   RegisterComponentEditor(TTBItemContainer, TTBItemsEditor);
@@ -233,11 +230,6 @@ begin
   {$R TB2DsgnItemEditor.res}
   TBRegisterItemClass(TTBEditItem, 'New &Edit', HInstance);
   TBRegisterItemClass(TTBGroupItem, 'New &Group Item', HInstance);
-  {$IFNDEF MPEXCLUDE}
-  TBRegisterItemClass(TTBMRUListItem, 'New &MRU List Item', HInstance);
-  TBRegisterItemClass(TTBMDIWindowItem, 'New MDI &Windows List', HInstance);
-  TBRegisterItemClass(TTBVisibilityToggleItem, 'New &Visibility-Toggle Item', HInstance);
-  {$ENDIF}
 end;
 
 end.

+ 3 - 439
source/packages/tbx/TBX.pas

@@ -12,7 +12,7 @@ interface
 
 uses
   Windows, Messages, Classes, SysUtils, Controls, Graphics, ImgList, Forms,
-  TB2Item, TB2Dock, TB2Toolbar, {$IFNDEF MPEXCLUDE}TB2ToolWindow,{$ENDIF} TB2Anim, TBXUtils, TBXThemes, PasTools;
+  TB2Item, TB2Dock, TB2Toolbar, TB2Anim, TBXUtils, TBXThemes, PasTools;
 
 const
   TBXVersion = 2.1;
@@ -269,44 +269,6 @@ type
     function  IsToolbarStyle: Boolean; override;
   end;
 
-  {$IFNDEF MPEXCLUDE}
-  TTBXVisibilityToggleItem = class(TTBXCustomItem)
-  private
-    FControl: TControl;
-    procedure SetControl (Value: TControl);
-    procedure UpdateProps;
-  protected
-    procedure Notification (AComponent: TComponent; Operation: TOperation); override;
-  public
-    procedure Click; override;
-    procedure InitiateAction; override;
-  published
-    property Caption;
-    property Control: TControl read FControl write SetControl;
-    property DisplayMode;
-    property Enabled;
-    property FontSettings;
-    property HelpContext;
-    { MP }
-    property HelpKeyword;
-    property Hint;
-    property ImageIndex;
-    property Images;
-    property InheritOptions;
-    property Layout;
-    property MaskOptions;
-    property MinHeight;
-    property MinWidth;
-    property Options;
-    property ShortCut;
-    property Stretch;
-    property Visible;
-    property OnAdjustFont;
-    property OnClick;
-    property OnSelect;
-  end;
-  {$ENDIF}
-
   { TTBXPopupWindow }
 
   TTBXPopupWindow = class(TTBPopupWindow)
@@ -361,7 +323,6 @@ type
     procedure TBMGetEffectiveColor(var Message: TMessage); message TBM_GETEFFECTIVECOLOR;
     procedure TBMThemeChange(var Message: TMessage); message TBM_THEMECHANGE;
     procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND;
-    procedure WMSize(var Message: TWMSize); message WM_SIZE;
     procedure WMDpiChangedBeforeParent(var Message: TMessage); message WM_DPICHANGED_BEFOREPARENT;
     procedure WMDpiChangedAfterParent(var Message: TMessage); message WM_DPICHANGED_AFTERPARENT;
   protected
@@ -518,38 +479,6 @@ type
     property SnapDistance: Integer read FSnapDistance write FSnapDistance default 0;
   end;
 
-  {$IFNDEF MPEXCLUDE}
-  TTBXToolWindow = class(TTBToolWindow)
-  private
-    FEffectiveColor: TColor;
-    FSnapDistance: Integer;
-    procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED;
-    procedure CMControlChange(var Message: TCMControlChange); message CM_CONTROLCHANGE;
-    procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED;
-    procedure SetSnapDistance(Value: Integer);
-    procedure TBMGetEffectiveColor(var Message: TMessage); message TBM_GETEFFECTIVECOLOR;
-    procedure TBMGetViewType(var Message: TMessage); message TBM_GETVIEWTYPE;
-    procedure TBMThemeChange(var Message: TMessage); message TBM_THEMECHANGE;
-    procedure WMEraseBkgnd(var Message: TWmEraseBkgnd); message WM_ERASEBKGND;
-  protected
-    procedure DrawNCArea(const DrawToDC: Boolean; const ADC: HDC; const Clip: HRGN); override;
-    function  GetFloatingWindowParentClass: TTBFloatingWindowParentClass; override;
-    procedure GetToolbarInfo(out ToolbarInfo: TTBXToolbarInfo); virtual;
-    procedure SetParent(AParent: TWinControl); override;
-    procedure UpdateEffectiveColor;
-  public
-    constructor Create(AOwner: TComponent); override;
-    destructor Destroy; override;
-    function  GetFloatingBorderSize: TPoint; override;
-    procedure UpdateChildColors;
-    property EffectiveColor: TColor read FEffectiveColor;
-  published
-    property Color default clNone;
-    property DblClickUndock default False;
-    property SnapDistance: Integer read FSnapDistance write SetSnapDistance default 0;
-  end;
-  {$ENDIF}
-
   TTBXDock = class(TTBDock)
   private
     FMoving: Boolean;
@@ -636,9 +565,6 @@ type
   TTBFloatingWindowParentAccess = class(TTBFloatingWindowParent);
   TTBCustomDockableWindowAccess = class(TTBCustomDockableWindow);
   TTBXToolbarAccess = class(TTBXToolbar);
-  {$IFNDEF MPEXCLUDE}
-  TTBBackgroundAccess = class(TTBBackground);
-  {$ENDIF}
   TControlAccess = class(TControl);
   TTBXThemeAccess = class(TTBXTheme);
   TDockAccess = class(TTBDock);
@@ -2116,50 +2042,6 @@ end;
 
 //============================================================================//
 
-{$IFNDEF MPEXCLUDE}
-
-{ TTBXVisibilityToggleItem }
-
-procedure TTBXVisibilityToggleItem.Click;
-begin
-  if Assigned(FControl) then FControl.Visible := not FControl.Visible;
-  inherited;
-end;
-
-procedure TTBXVisibilityToggleItem.InitiateAction;
-begin
-  UpdateProps;
-end;
-
-procedure TTBXVisibilityToggleItem.Notification(AComponent: TComponent; Operation: TOperation);
-begin
-  inherited;
-  if (Operation = opRemove) and (AComponent = FControl) then Control := nil;
-end;
-
-procedure TTBXVisibilityToggleItem.SetControl(Value: TControl);
-begin
-  if FControl <> Value then
-  begin
-    FControl := Value;
-    if Assigned(Value) then
-    begin
-      Value.FreeNotification(Self);
-      if (Length(Caption) = 0) and not (csLoading in ComponentState) then
-        Caption := TControlAccess(Value).Caption;
-    end;
-    UpdateProps;
-  end;
-end;
-
-procedure TTBXVisibilityToggleItem.UpdateProps;
-begin
-  if (ComponentState * [csDesigning, csLoading, csDestroying] = []) then
-    Checked := Assigned(FControl) and FControl.Visible;
-end;
-
-{$ENDIF}
-
 //============================================================================//
 
 { TTBXPopupWindow }
@@ -2642,10 +2524,6 @@ begin
         R2 := CurrentDock.ClientRect;
         OffsetRect(R2, -Left, -Top);
         TDockAccess(CurrentDock).DrawBackground(DC, R2);
-        {$IFNDEF MPEXCLUDE}
-        if (Color = clNone) and CurrentDock.BackgroundOnToolbars then
-          ACanvas.Brush.Style := bsClear;
-        {$ENDIF}
       end
       else
       begin
@@ -2826,18 +2704,7 @@ begin
   Transparent := False;
   CR := ClientRect;
   if Color = clNone then
-    {$IFNDEF MPEXCLUDE}
-    if Docked and (TDockAccess(CurrentDock).UsingBackground) and CurrentDock.BackgroundOnToolbars
-      and not CurrentTheme.SolidToolbarClientArea then
-    begin
-      R := CurrentDock.ClientRect;
-      R.TopLeft := ScreenToClient(CurrentDock.ClientToScreen(R.TopLeft));
-      R.BottomRight := ScreenToClient(CurrentDock.ClientToScreen(R.BottomRight));
-      TDockAccess(CurrentDock).DrawBackground(Message.DC, R);
-      Message.Result := 1;
-      Transparent := True;
-    end
-    else {$ENDIF} if Embedded then
+    if Embedded then
     begin
       Transparent := True;
       DrawParentBackground(Self, Message.DC, CR);
@@ -2861,43 +2728,6 @@ begin
   end;
 end;
 
-procedure TTBXToolbar.WMSize(var Message: TWMSize);
-{$IFNDEF MPEXCLUDE}
-var
-  I: Integer;
-  V: TTBItemViewer;
-  R: TRect;
-{$ENDIF}
-begin
-  inherited;
-  {$IFNDEF MPEXCLUDE}
-  if Docked and TDockAccess(CurrentDock).UsingBackground and
-    TDockAccess(CurrentDock).BackgroundOnToolbars and
-    ((CurrentDock is TTBXDock) and not TTBXDock(CurrentDock).FResizing) then
-  begin
-    for I := 0 to View.ViewerCount - 1 do
-    begin
-      V := View.Viewers[I];
-      if V.Show and not IsRectEmpty(V.BoundsRect) and not (V.Item is TTBControlItem)
-      then View.Invalidate(V);
-    end;
-    Self.Update;
-    InvalidateRect(Handle, nil, True);
-    for I := 0 to View.ViewerCount - 1 do
-    begin
-      V := View.Viewers[I];
-      if V.Show and not IsRectEmpty(V.BoundsRect) and not (V.Item is TTBControlItem)
-      then
-      begin
-        R := V.BoundsRect;
-        ValidateRect(Handle, @R);
-      end;
-    end;
-  end;
-  {$ENDIF}
-end;
-
-
 //============================================================================//
 
 { TTBXChevronItem }
@@ -3240,265 +3070,6 @@ begin
 end;
 
 
-//============================================================================//
-
-{$IFNDEF MPEXCLUDE}
-
-{ TTBXToolWindow }
-
-procedure TTBXToolWindow.CMColorChanged(var Message: TMessage);
-begin
-  UpdateEffectiveColor;
-  if Docked and HandleAllocated then
-    RedrawWindow(Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE or
-      RDW_ERASE or RDW_UPDATENOW or RDW_ALLCHILDREN);
-  UpdateChildColors;
-  Invalidate;
-end;
-
-procedure TTBXToolWindow.CMControlChange(var Message: TCMControlChange);
-begin
-  inherited;
-  if Message.Inserting and (Color = clNone) then
-    Message.Control.Perform(CM_PARENTCOLORCHANGED, 1, EffectiveColor);
-end;
-
-procedure TTBXToolWindow.CMTextChanged(var Message: TMessage);
-begin
-  inherited;
-  if HandleAllocated then
-  begin
-    if Docked then RedrawWindow(Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE)
-    else RedrawWindow(TTBXFloatingWindowParent(Parent).Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE);
-  end;
-end;
-
-constructor TTBXToolWindow.Create(AOwner: TComponent);
-begin
-  inherited;
-  AddThemeNotification(Self);
-  DblClickUndock := False;
-  FEffectiveColor := Color;
-  Color := clNone;
-end;
-
-destructor TTBXToolWindow.Destroy;
-begin
-  RemoveThemeNotification(Self);
-  inherited;
-end;
-
-procedure TTBXToolWindow.DrawNCArea(const DrawToDC: Boolean;
-  const ADC: HDC; const Clip: HRGN);
-var
-  DC: HDC;
-  R, CR, R2: TRect;
-  ACanvas: TCanvas;
-  ToolbarInfo: TTBXToolbarInfo;
-  UsingBackground: Boolean;
-begin
-  if not Docked or not HandleAllocated then Exit;
-
-  if not DrawToDC then DC := GetWindowDC(Handle)
-  else DC := ADC;
-
-  UsingBackground := TDockAccess(CurrentDock).UsingBackground;
-
-  try
-    GetToolbarInfo(ToolbarInfo);
-    GetWindowRect(Handle, R);
-    OffsetRect(R, -R.Left, -R.Top);
-    if not DrawToDC then
-    begin
-      SelectNCUpdateRgn(Handle, DC, Clip);
-      CR := R;
-      with ToolbarInfo.BorderSize, CR do
-      begin
-        InflateRect(CR, -X, -Y);
-        if ToolbarInfo.IsVertical then Inc(Top, GetTBXDragHandleSize(ToolbarInfo))
-        else Inc(Left, GetTBXDragHandleSize(ToolbarInfo));
-        ExcludeClipRect(DC, Left, Top, Right, Bottom);
-      end;
-    end;
-    ACanvas := TCanvas.Create;
-    try
-      ACanvas.Handle := DC;
-      ACanvas.Brush.Color := EffectiveColor;
-      if CurrentTheme.SolidToolbarNCArea then
-      begin
-        ACanvas.Brush.Color := EffectiveColor;
-        ACanvas.Brush.Style := bsSolid;
-      end
-      else if UsingBackground then
-      begin
-        ACanvas.Brush.Color := EffectiveColor;
-        R2 := CurrentDock.ClientRect;
-        OffsetRect(R2, -Left, -Top);
-        TDockAccess(CurrentDock).DrawBackground(DC, R2);
-        {$IFNDEF MPEXCLUDE}
-        if (Color = clNone) and CurrentDock.BackgroundOnToolbars then
-          ACanvas.Brush.Style := bsClear;
-        {$ENDIF}
-      end
-      else
-      begin
-        ACanvas.Brush.Color := GetEffectiveColor(CurrentDock);
-        ACanvas.FillRect(R);
-        ACanvas.Brush.Color := EffectiveColor;
-        ACanvas.Brush.Style := bsSolid;
-      end;
-
-      CurrentTheme.PaintToolbarNCArea(GetMonitorFromControl(Self), ACanvas, R, ToolbarInfo);
-    finally
-      ACanvas.Handle := 0;
-      ACanvas.Free;
-    end;
-  finally
-    if not DrawToDC then ReleaseDC(Handle, DC);
-  end;
-end;
-
-function TTBXToolWindow.GetFloatingBorderSize: TPoint;
-begin
-  CurrentTheme.GetViewBorder(GetWinViewType(Self) or TVT_FLOATING, Result);
-end;
-
-function TTBXToolWindow.GetFloatingWindowParentClass: TTBFloatingWindowParentClass;
-begin
-  Result := TTBXFloatingWindowParent;
-end;
-
-procedure TTBXToolWindow.GetToolbarInfo(out ToolbarInfo: TTBXToolbarInfo);
-begin
-  FillChar(ToolbarInfo, SizeOf(ToolbarInfo), 0);
-  ToolbarInfo.WindowHandle := WindowHandle;
-  ToolbarInfo.ViewType := GetWinViewType(Self);
-  if CurrentDock <> nil then
-    ToolbarInfo.IsVertical := CurrentDock.Position in [dpLeft,dpRight];
-  ToolbarInfo.AllowDrag := CurrentDock.AllowDrag;
-  ToolbarInfo.DragHandleStyle := Ord(DragHandleStyle);
-  ToolbarInfo.ClientWidth := ClientWidth;
-  ToolbarInfo.ClientHeight := ClientHeight;
-  if ToolbarInfo.AllowDrag and CloseButtonWhenDocked then
-  begin
-    ToolbarInfo.CloseButtonState := CDBS_VISIBLE;
-    if CloseButtonDown then ToolbarInfo.CloseButtonState := ToolbarInfo.CloseButtonState or CDBS_PRESSED;
-    if CloseButtonHover then ToolbarInfo.CloseButtonState := ToolbarInfo.CloseButtonState or CDBS_HOT;
-  end;
-  ToolbarInfo.BorderStyle := BorderStyle;
-  ToolbarInfo.EffectiveColor := EffectiveColor;
-  CurrentTheme.GetViewBorder(ToolbarInfo.ViewType, ToolbarInfo.BorderSize);
-end;
-
-procedure TTBXToolWindow.SetParent(AParent: TWinControl);
-begin
-  inherited;
-  if AParent is TTBXFloatingWindowParent then
-    TTBXFloatingWindowParent(AParent).SnapDistance := SnapDistance;
-end;
-
-procedure TTBXToolWindow.SetSnapDistance(Value: Integer);
-begin
-  if Value < 0 then Value := 0;
-  FSnapDistance := Value;
-  if (Parent <> nil) and (Parent is TTBXFloatingWindowParent) then
-    TTBXFloatingWindowParent(Parent).SnapDistance := Value;
-end;
-
-procedure TTBXToolWindow.TBMGetEffectiveColor(var Message: TMessage);
-begin
-  Message.WParam := EffectiveColor;
-  Message.Result := 1;
-end;
-
-procedure TTBXToolWindow.TBMGetViewType(var Message: TMessage);
-begin
-  Message.Result := TVT_TOOLWINDOW;
-  if Floating then Message.Result := Message.Result or TVT_FLOATING;
-  if Resizable then Message.Result := Message.Result or TVT_RESIZABLE;
-end;
-
-procedure TTBXToolWindow.TBMThemeChange(var Message: TMessage);
-begin
-  case Message.WParam of
-    TSC_BEFOREVIEWCHANGE: BeginUpdate;
-    TSC_AFTERVIEWCHANGE:
-      begin
-        EndUpdate;
-        UpdateEffectiveColor;
-        if HandleAllocated and not (csDestroying in ComponentState) then
-          if Parent is TTBXFloatingWindowParent then
-            UpdateNCArea(TTBXFloatingWindowParent(Parent), GetWinViewType(Self))
-          else
-            UpdateNCArea(Self, GetWinViewType(Self));
-        UpdateChildColors;
-        Invalidate;
-      end;
-  end;
-end;
-
-procedure TTBXToolWindow.UpdateChildColors;
-var
-  M: TMessage;
-begin
-  M.Msg := CM_PARENTCOLORCHANGED;
-  M.WParam := 1;
-  M.LParam := EffectiveColor;
-  M.Result := 0;
-  Broadcast(M);
-end;
-
-procedure TTBXToolWindow.UpdateEffectiveColor;
-begin
-  if Color = clNone then FEffectiveColor := CurrentTheme.GetViewColor(GetWinViewType(Self))
-  else FEffectiveColor := Color;
-end;
-
-procedure TTBXToolWindow.WMEraseBkgnd(var Message: TWmEraseBkgnd);
-var
-  Canvas: TCanvas;
-  R, CR: TRect;
-  Transparent: Boolean;
-begin
-  Transparent := False;
-  CR := ClientRect;
-  {$IFNDEF MPEXCLUDE}
-  if Color = clNone then
-    if Docked and (TDockAccess(CurrentDock).UsingBackground) and CurrentDock.BackgroundOnToolbars
-      and not CurrentTheme.SolidToolbarClientArea then
-    begin
-      R := CurrentDock.ClientRect;
-      R.TopLeft := ScreenToClient(CurrentDock.ClientToScreen(R.TopLeft));
-      R.BottomRight := ScreenToClient(CurrentDock.ClientToScreen(R.BottomRight));
-      SaveDC(Message.DC);
-      with CR do IntersectClipRect(Message.DC, Left, Top, Right, Bottom);
-      TDockAccess(CurrentDock).DrawBackground(Message.DC, R);
-      RestoreDC(Message.DC, -1);
-      Message.Result := 1;
-      Transparent := True;
-    end;
-  {$ENDIF}
-
-  Canvas := TCanvas.Create;
-  Canvas.Handle := Message.DC;
-  try
-    if Docked then
-    begin
-      R := CurrentDock.ClientRect;
-      R.TopLeft := ScreenToClient(CurrentDock.ClientToScreen(R.TopLeft));
-      R.BottomRight := ScreenToClient(CurrentDock.ClientToScreen(R.BottomRight));
-    end
-    else R := Rect(0, 0, 0, 0);
-    CurrentTheme.PaintBackgnd(Canvas, R, CR, CR, EffectiveColor, Transparent, GetWinViewType(Self));
-    Message.Result := 1;
-  finally
-    Canvas.Handle := 0;
-    Canvas.Free;
-  end;
-end;
-
-{$ENDIF}
-
 //============================================================================//
 
 { Additional system colors }
@@ -3726,13 +3297,6 @@ begin
           end;
         end;
       end
-      {$IFNDEF MPEXCLUDE}
-      else if Toolbars[J] is TTBXToolWindow then with TTBXToolWindow(Toolbars[J]) do
-      begin
-        if HandleAllocated then
-          RedrawWindow(Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE or RDW_ERASE);
-      end;
-      {$ENDIF}
     end;
   end;
 end;
@@ -3768,7 +3332,7 @@ end;
 
 function TTBXDock.ThemedBackground: Boolean;
 begin
-  Result := {$IFNDEF MPEXCLUDE}(Background = nil) and{$ENDIF} (Color = clNone) and CurrentTheme.PaintDockBackground;
+  Result := (Color = clNone) and CurrentTheme.PaintDockBackground;
 end;
 
 function TTBXDock.UsingBackground: Boolean;

+ 2 - 816
source/packages/tbx/TBXExtItems.pas

@@ -13,7 +13,7 @@ interface
 
 uses
   Windows, Messages, Classes, SysUtils, Graphics, Controls, StdCtrls, ExtCtrls,
-  TBX, TBXThemes, TB2Item, TB2Toolbar, TB2ExtItems, TBXLists{$IFNDEF MPEXCLUDE}, TB2MRU{$ENDIF};
+  TBX, TBXThemes, TB2Item, TB2Toolbar, TB2ExtItems, TBXLists;
 
 const
   tcrNumericProperty = 3;
@@ -102,133 +102,6 @@ type
     function  IsToolbarStyle: Boolean; override;
   end;
 
-  {$IFNDEF MPEXCLUDE}
-  { TTBXSpinEditItem }
-  TTBXCustomSpinEditItem = class;
-
-  TSEValueType = (evtInteger, evtFloat, evtHex);
-  TDecimal = 0..10;
-  TSEChangeEvent = procedure(Sender: TTBXCustomSpinEditItem; const AValue: Extended) of object;
-  TSEConvertEvent = procedure(Sender: TTBXCustomSpinEditItem; const APrefix, APostfix: string; var AValue: Extended; var CanConvert: Boolean) of object;
-  TSEStepEvent = procedure(Sender: TTBXCustomSpinEditItem; Step: Integer; const OldValue: Extended; var NewValue: Extended) of object;
-  TSETextToValueEvent = procedure(Sender: TTBXCustomSpinEditItem; const AText: string; out AValue: Extended; var CanConvert: Boolean) of object;
-  TSEValueToTextEvent = procedure(Sender: TTBXCustomSpinEditItem; const AValue: Extended; var Text: string) of object;
-
-  TTBXCustomSpinEditItem = class(TTBXEditItem)
-  private
-    FDecimal: TDecimal;
-    FLastGoodValue: Extended;
-    FMaxValue: Extended;
-    FMinValue: Extended;
-    FIncrement: Extended;
-    FSpaceBeforePostfix: Boolean;
-    FSpaceAfterPrefix: Boolean;
-    FPostfix: string;
-    FPrefix: string;
-    FSnap: Boolean;
-    FValueType: TSEValueType;
-    FOnConvert: TSEConvertEvent;
-    FOnTextToValue: TSETextToValueEvent;
-    FOnValueChange: TSEChangeEvent;
-    FOnValueToText: TSEValueToTextEvent;
-    FOnStep: TSEStepEvent;
-    function  IsIncrementStored: Boolean;
-    function  IsMinValueStored: Boolean;
-    function  IsMaxValueStored: Boolean;
-    function  IsValueStored: Boolean;
-    function  GetValue: Extended;
-    procedure SetValue(NewValue: Extended);
-    procedure SetValueType(NewType: TSEValueType);
-    procedure SetDecimal(NewDecimal: TDecimal);
-    procedure SetIncrement(const NewIncrement: Extended);
-    procedure SetPostfix(const NewPostfix: string);
-    procedure SetPrefix(const NewPrefix: string);
-    procedure SetSpaceAfterPrefix(UseSpace: Boolean);
-    procedure SetSpaceBeforePostfix(UseSpace: Boolean);
-    function  ValidateUnits(const S: string): Boolean;
-    function  GetAsInteger: Integer;
-    procedure SetAsInteger(AValue: Integer);
-  protected
-    function  CheckValue(const V: Extended): Extended;
-    procedure ClickUp;
-    procedure ClickDown;
-    function  DoAcceptText(var NewText: string): Boolean; override;
-    function  DoConvert(const APrefix, APostfix: string; var AValue: Extended): Boolean; virtual;
-    procedure DoStep(Step: Integer; const OldValue: Extended; var NewValue: Extended); virtual;
-    procedure DoTextChanged(Reason: Integer); override;
-    function  DoTextToValue(const AText: string; out AValue: Extended): Boolean; virtual;
-    procedure DoValueChange(const V: Extended); virtual;
-    procedure DoValueToText(const NewValue: Extended; var NewText: string); virtual;
-    function  GetAsText(AValue: Extended): string;
-    function  GetItemViewerClass(AView: TTBView): TTBItemViewerClass; override;
-    function  ParseValue(const S: string; out V: Extended): Boolean;
-    procedure SetValueEx(NewValue: Extended; Reason: Integer);
-    property Alignment default taRightJustify;
-    property OnConvert: TSEConvertEvent read FOnConvert write FOnConvert;
-    property OnStep: TSEStepEvent read FOnStep write FOnStep;
-    property OnTextToValue: TSETextToValueEvent read FOnTextToValue write FOnTextToValue;
-    property OnValueChange: TSEChangeEvent read FOnValueChange write FOnValueChange;
-    property OnValueToText: TSEValueToTextEvent read FOnValueToText write FOnValueToText;
-  public
-    constructor Create(AOwner: TComponent); override;
-    property ValueType: TSEValueType read FValueType write SetValueType default evtInteger;
-    property AsInteger: Integer read GetAsInteger write SetAsInteger stored False;
-    property Decimal: TDecimal read FDecimal write SetDecimal default 2;
-    property Increment: Extended read FIncrement write SetIncrement stored IsIncrementStored;
-    property MaxValue: Extended read FMaxValue write FMaxValue stored IsMaxValueStored;
-    property MinValue: Extended read FMinValue write FMinValue stored IsMinValueStored;
-    property Postfix: string read FPostfix write SetPostfix;
-    property Prefix: string read FPrefix write SetPrefix;
-    property Snap: Boolean read FSnap write FSnap default True;
-    property SpaceAfterPrefix: Boolean read FSpaceAfterPrefix write SetSpaceAfterPrefix;
-    property SpaceBeforePostfix: Boolean read FSpaceBeforePostfix write SetSpaceBeforePostfix;
-    property Value: Extended read GetValue write SetValue stored IsValueStored;
-  published
-    property Text stored False;
-  end;
-
-  TTBXSpinEditItem = class(TTBXCustomSpinEditItem)
-  published
-    property ValueType;
-    property Alignment;
-    property Decimal;
-    property Increment;
-    property MaxValue;
-    property MinValue;
-    property Postfix;
-    property Prefix;
-    property Snap;
-    property SpaceAfterPrefix;
-    property SpaceBeforePostfix;
-    property Value;
-    property OnConvert;
-    property OnStep;
-    property OnTextToValue;
-    property OnValueChange;
-    property OnValueToText;
-  end;
-
-  TSEBtnState = (ebsNone, ebsUp, ebsDown);
-
-  TTBXSpinEditViewer = class(TTBXEditItemViewer)
-  private
-    FBtnState: TSEBtnState;
-    FBtnTimer: TTimer;
-    procedure TimerHandler(Sender: TObject);
-  protected
-    function  GetIndentAfter: Integer; override;
-    procedure GetEditInfo(out EditInfo: TTBXEditInfo; const ItemInfo: TTBXItemInfo); override;
-    function  HandleEditMessage(var Message: TMessage): Boolean; override;
-    procedure InvalidateButtons;
-    function  IsPtInButtonPart(X, Y: Integer): Boolean; override;
-    procedure LosingCapture; override;
-    procedure MouseDown(Shift: TShiftState; X, Y: Integer; var MouseDownOnMenu: Boolean); override;
-    procedure MouseUp(X, Y: Integer; MouseWasDownOnMenu: Boolean); override;
-  public
-    destructor Destroy; override;
-  end;
-  {$ENDIF}
-
   { TTBXCustomDropDownItem }
   { An extended edit item tb2k with a button. The dropdown list support is
     implemented in descendants, such as TTBXComboBoxItem }
@@ -459,36 +332,6 @@ type
     constructor Create(AView: TTBView; AItem: TTBCustomItem; AGroupLevel: Integer); override;
   end;
 
-  {$IFNDEF MPEXCLUDE}
-  { TTBXMRUList }
-
-  TTBXMRUList = class(TTBMRUList)
-  private
-    FKeyShift: Integer;
-    procedure SetKeyShift(Value: Integer);
-  protected
-    function GetFirstKey: Integer; override;
-    function GetItemClass: TTBCustomItemClass; override;
-    procedure SetItemCaptions; override;
-  published
-    property KeyShift: Integer read FKeyShift write SetKeyShift default 0;
-  end;
-
-  { TTBXMRUListItem }
-
-  TTBXMRUListItem = class(TTBXCustomItem)
-  private
-    FMRUList: TTBMRUList;
-    procedure SetMRUList(Value: TTBMRUList);
-  protected
-    procedure Notification(AComponent: TComponent; Operation: TOperation); override;
-  public
-    constructor Create(AOwner: TComponent); override;
-  published
-    property MRUList: TTBMRUList read FMRUList write SetMRUList;
-  end;
-  {$ENDIF}
-
 implementation
 
 uses TBXUtils, TB2Common, TB2Consts, TypInfo, Math, ImgList, {MP}Menus, Forms, PasTools;
@@ -501,9 +344,6 @@ const
 type
   TTBViewAccess = class(TTBView);
   TTBItemAccess = class(TTBCustomItem);
-  {$IFNDEF MPEXCLUDE}
-  TTBMRUListAccess = class(TTBMRUList);
-  {$ENDIF}
   TCustomEditAccess = class(TCustomEdit);
   TFontSettingsAccess = class(TFontSettings);
 
@@ -792,9 +632,7 @@ const
   ROLE_SYSTEM_COMBOBOX = $2E;
 begin
   Result := inherited GetAccRole;
-  {$IFNDEF MPEXCLUDE}
-  if Self is TTBXSpinEditViewer then Result := ROLE_SYSTEM_SPINBUTTON
-  else {$ENDIF} if Self is TTBXDropDownItemViewer then Result := ROLE_SYSTEM_COMBOBOX;
+  if Self is TTBXDropDownItemViewer then Result := ROLE_SYSTEM_COMBOBOX;
 end;
 
 procedure TTBXEditItemViewer.GetItemInfo(const Canvas: TCanvas; out ItemInfo: TTBXItemInfo; IsHoverItem, IsPushed, UseMenuColor: Boolean);
@@ -1916,656 +1754,4 @@ begin
   Wide := False;
 end;
 
-//============================================================================//
-
-{$IFNDEF MPEXCLUDE}
-
-{ TTBXMRUList }
-
-function TTBXMRUList.GetFirstKey:Integer;
-begin
-  Result := FKeyShift;
-end;
-
-function TTBXMRUList.GetItemClass: TTBCustomItemClass;
-begin
-  Result := TTBXCustomItem;
-end;
-
-procedure TTBXMRUList.SetItemCaptions;
-var
-  I: Integer;
-begin
-  inherited;
-  if Container is TTBXCustomItem then
-    for I := 0 to Items.Count - 1 do
-      TTBXCustomItem(Items[I]).FontSettings := TTBXCustomItem(Container).FontSettings;
-end;
-
-procedure TTBXMRUList.SetKeyShift(Value: Integer);
-begin
-  if Value < 0 then Value := 0;
-  FKeyShift := Value;
-  SetItemCaptions;
-end;
-
-
-//============================================================================//
-
-{ TTBXMRUListItem }
-
-constructor TTBXMRUListItem.Create(AOwner: TComponent);
-begin
-  inherited;
-  ItemStyle := ItemStyle + [tbisEmbeddedGroup];
-  Caption := STBMRUListItemDefCaption[1] + 'TBX ' +
-    Copy(STBMRUListItemDefCaption, 2, Length(STBMRUListItemDefCaption) - 1);
-end;
-
-procedure TTBXMRUListItem.Notification(AComponent: TComponent;
-  Operation: TOperation);
-begin
-  inherited;
-  if (AComponent = FMRUList) and (Operation = opRemove) then MRUList := nil;
-end;
-
-procedure TTBXMRUListItem.SetMRUList(Value: TTBMRUList);
-begin
-  if FMRUList <> Value then
-  begin
-    FMRUList := Value;
-    if Assigned(Value) then
-    begin
-      Value.FreeNotification(Self);
-      LinkSubitems := TTBMRUListAccess(Value).Container;
-    end
-    else LinkSubitems := nil;
-  end;
-end;
-
-{ TTBXCustomSpinEditItem }
-
-function TTBXCustomSpinEditItem.CheckValue(const V: Extended): Extended;
-begin
-  Result := V;
-  if FMaxValue <> FMinValue then
-  begin
-    if V < FMinValue then Result := FMinValue
-    else if V > FMaxValue then Result := FMaxValue;
-  end;
-end;
-
-procedure TTBXCustomSpinEditItem.ClickDown;
-var
-  OldValue, NewValue: Extended;
-begin
-  OldValue := GetValue;
-  if Snap then
-    NewValue := Ceil(OldValue / Increment - 1 - Increment * 0.0001) * Increment
-  else
-    NewValue := OldValue - FIncrement;
-  DoStep(-1, OldValue, NewValue);
-  SetValueEx(NewValue, tcrSpinButton);
-end;
-
-procedure TTBXCustomSpinEditItem.ClickUp;
-var
-  OldValue, NewValue: Extended;
-begin
-  OldValue := GetValue;
-  if Snap then
-    NewValue := Floor(OldValue / Increment + 1 + Increment * 0.0001) * Increment
-  else
-    NewValue := OldValue + FIncrement;
-  DoStep(+1, OldValue, NewValue);
-  SetValueEx(NewValue, tcrSpinButton);
-end;
-
-constructor TTBXCustomSpinEditItem.Create(AOwner: TComponent);
-begin
-  inherited;
-  FAlignment := taRightJustify;
-  FDecimal := 2;
-  FIncrement := 1;
-  FSnap := True;
-  Text := '0';
-end;
-
-function TTBXCustomSpinEditItem.DoAcceptText(var NewText: string): Boolean;
-var
-  V: Extended;
-begin
-  if ParseValue(NewText, V) then
-  begin
-    NewText := GetAsText(V);
-    Result := True;
-  end
-  else Result := False;
-end;
-
-function TTBXCustomSpinEditItem.DoConvert(const APrefix, APostfix: string; var AValue: Extended): Boolean;
-begin
-  Result := True;
-  if Assigned(FOnConvert) then FOnConvert(Self, APrefix, APostfix, AValue, Result);
-end;
-
-procedure TTBXCustomSpinEditItem.DoStep(Step: Integer; const OldValue: Extended; var NewValue: Extended);
-begin
-  if Assigned(FOnStep) then FOnStep(Self, Step, OldValue, NewValue);
-end;
-
-procedure TTBXCustomSpinEditItem.DoTextChanged(Reason: Integer);
-begin
-  if Reason = tcrEditControl then
-    SetValueEx(GetValue, tcrNumericProperty);
-end;
-
-function TTBXCustomSpinEditItem.DoTextToValue(const AText: string; out AValue: Extended): Boolean;
-begin
-  Result := False;
-  if Assigned(FOnTextToValue) then FOnTextToValue(Self, AText, AValue, Result);
-end;
-
-procedure TTBXCustomSpinEditItem.DoValueChange(const V: Extended);
-begin
-  if Assigned(FOnValueChange) then FOnValueChange(Self, V);
-end;
-
-procedure TTBXCustomSpinEditItem.DoValueToText(const NewValue: Extended; var NewText: string);
-begin
-  if Assigned(FOnValueToText) then FOnValueToText(Self, NewValue, NewText);
-end;
-
-function TTBXCustomSpinEditItem.GetAsInteger: Integer;
-begin
-  Result := Round(Value);
-end;
-
-function TTBXCustomSpinEditItem.GetAsText(AValue: Extended): string;
-begin
-  AValue := CheckValue(AValue);
-  if ValueType = evtFloat then Result := FloatToStrF(AValue, ffFixed, 15, FDecimal)
-  else if ValueType = evtHex then Result := IntToHex(Round(AValue), 1)
-  else Result := IntToStr(Round(AValue));
-
-  if Length(Prefix) > 0 then
-  begin
-    if SpaceAfterPrefix then Result := ' ' + Result;
-    Result := Prefix + Result;
-  end;
-  if Length(Postfix) > 0 then
-  begin
-    if SpaceBeforePostfix then Result := Result + ' ';
-    Result := Result + Postfix;
-  end;
-  DoValueToText(AValue, Result);
-end;
-
-function TTBXCustomSpinEditItem.GetItemViewerClass(AView: TTBView): TTBItemViewerClass;
-begin
-  if not (tboUseEditWhenVertical in EditOptions) and
-     (AView.Orientation = tbvoVertical) then
-    Result := TTBXItemViewer
-  else
-    Result := TTBXSpinEditViewer;
-end;
-
-function TTBXCustomSpinEditItem.GetValue: Extended;
-begin
-  if not ParseValue(Text, Result) then
-    Result := FLastGoodValue;
-end;
-
-function TTBXCustomSpinEditItem.IsIncrementStored: Boolean;
-begin
-  Result := FIncrement <> 1;
-end;
-
-function TTBXCustomSpinEditItem.IsMaxValueStored: Boolean;
-begin
-  Result := FMaxValue <> 0;
-end;
-
-function TTBXCustomSpinEditItem.IsMinValueStored: Boolean;
-begin
-  Result := FMinValue <> 0;
-end;
-
-function TTBXCustomSpinEditItem.IsValueStored: Boolean;
-begin
-  Result := GetValue <> 0;
-end;
-
-function TTBXCustomSpinEditItem.ParseValue(const S: string; out V: Extended): Boolean;
-const
-  CWhiteSpace = [' ', #9];
-  CDigits = ['0'..'9'];
-  CHexDigits = CDigits + ['A'..'F'];
-  CInvalidUnitChars = [#0..#31, ' ', '*', '+', ',', '-', '.', '/', '0'..'9', '^'];
-  CInvalidHexUnitChars = CInvalidUnitChars + ['A'..'F'];
-var
-  P: PChar;
-  Sign1: Integer;
-  Value1: Extended;
-  Value2: Extended;
-  Operator: Char;
-  PrefixString, PostfixString: string;
-
-  procedure SkipWhiteSpace;
-  begin
-    while P^ in CWhiteSpace do Inc(P);
-  end;
-
-  function GetInt: Integer;
-  begin
-    Result := 0;
-    while P^ in CDigits do
-    begin
-      Result := Result * 10 + (Integer(P^) - Integer('0'));
-      Inc(P);
-    end;
-  end;
-
-  function GetInt2: Extended;
-  begin
-    Result := 0;
-    while P^ in CDigits do
-    begin
-      Result := Result * 10 + (Integer(P^) - Integer('0'));
-      Inc(P);
-    end;
-  end;
-
-  function GetNumber(out PrefixString, PostfixString: string; out R: Extended): Boolean;
-  var
-    PStart: PChar;
-    Tmp: Integer;
-    ExponentSign, IR: Integer;
-    Count1, Count2: Integer;
-    E: Extended;
-  begin
-    R := 0;
-    Result := False;
-
-    { Read prefix }
-    PStart := P;
-    if ValueType <> evtHex then while not (P^ in CInvalidUnitChars) do Inc(P)
-    else while not (P^ in CInvalidHexUnitChars) do Inc(P);
-    SetString(PrefixString, PStart, P - PStart);
-    SkipWhiteSpace;
-
-    { Read value }
-    if ValueType in [evtFloat, evtInteger] then
-    begin
-      if (ValueType = evtInteger) and not (P^ in CDigits) then Exit;
-
-      { get the integer part }
-      PStart := P;
-      R := GetInt2;
-      Count1 := P - PStart;
-
-      if (ValueType = evtFloat) and (P^ = DecimalSeparator) then
-      begin
-        Inc(P);
-        PStart := P;
-        E := GetInt2;
-        R := R + E / IntPower(10, P - PStart);
-        Count2 := P - PStart;
-      end
-      else Count2 := 0;
-
-      if (Count1 = 0) and (Count2 = 0) then Exit; // '.' (or ',') is not a number
-
-      if (ValueType = evtFloat) and (P^ in ['e', 'E']) and (PChar(P + 1)^ in ['+', '-', '0'..'9']) then
-      begin
-        Inc(P);
-        ExponentSign := 1;
-        if P^ = '-' then
-        begin
-          ExponentSign := -1;
-          Inc(P);
-        end
-        else if P^ = '+' then Inc(P);
-        if not (P^ in CDigits) then Exit;
-        Tmp := GetInt;
-        if Tmp >= 5000 then Exit;
-        R := R * IntPower(10, Tmp * ExponentSign);
-      end;
-    end
-    else { evtHex }
-    begin
-      IR := 0;
-      if not (P^ in CHexDigits) then Exit;
-      while P^ in CHexDigits do
-      begin
-        IR := IR shl 4;
-        if P^ in CDigits then Inc(IR, Integer(P^) - Integer('0'))
-        else if P^ in ['a'..'f'] then Inc(IR, Integer(P^) - Integer('a') + 10)
-        else Inc(IR, Integer(P^) - Integer('A') + 10);
-        Inc(P);
-      end;
-      R := IR;
-    end;
-    SkipWhiteSpace;
-
-    { Read postfix }
-    PStart := P;
-    if ValueType <> evtHex then while not (P^ in CInvalidUnitChars) do Inc(P)
-    else while not (P^ in CInvalidHexUnitChars) do Inc(P);
-    SetString(PostfixString, PStart, P - PStart);
-    SkipWhiteSpace;
-
-    Result := True;
-  end;
-
-begin
-  V := 0;
-
-  { Try text-to-value conversion for predefined "constants" }
-  Result := DoTextToValue(S, V);
-  if Result then Exit;
-
-  { Parse the string for values and expressions }
-  if Length(S) = 0 then Exit;
-  P := PChar(S);
-  SkipWhiteSpace;
-
-  { Read the sign }
-  Sign1 := 1;
-  if P^ = '-' then
-  begin
-    Sign1 := -1;
-    Inc(P);
-    SkipWhiteSpace;
-  end
-  else if P^ = '+' then
-  begin
-    Inc(P);
-    SkipWhiteSpace;
-  end;
-
-  { Read value }
-  if not GetNumber(PrefixString, PostfixString, Value1) then Exit;
-  if not DoConvert(PrefixString, PostfixString, Value1) then Exit;
-  Value1 := Value1 * Sign1;
-  V := Value1;
-
-  { Read operator }
-  if P^ in ['*', '+', '-', '/'] then
-  begin
-    Operator := P^;
-    Inc(P);
-    SkipWhiteSpace;
-    if not GetNumber(PrefixString, PostfixString, Value2) then Exit;
-    if not DoConvert(PrefixString, PostfixString, Value2) then Exit;
-    case Operator of
-    '*': V := V * Value2;
-    '+': V := V + Value2;
-    '-': V := V - Value2;
-    '/': if Value2 <> 0 then V := V / Value2 else Exit;
-    end;
-  end;
-
-  if P^ = #0 then Result := True;
-end;
-
-procedure TTBXCustomSpinEditItem.SetAsInteger(AValue: Integer);
-begin
-  Value := AValue;
-end;
-
-procedure TTBXCustomSpinEditItem.SetDecimal(NewDecimal: TDecimal);
-begin
-  if NewDecimal <> FDecimal then
-  begin
-    FDecimal := NewDecimal;
-    SetValueEx(GetValue, tcrNumericProperty);
-  end;
-end;
-
-procedure TTBXCustomSpinEditItem.SetIncrement(const NewIncrement: Extended);
-begin
-  if NewIncrement <= 0 then
-    raise EPropertyError.Create('Increment should be a positive value');
-  FIncrement := NewIncrement;
-end;
-
-procedure TTBXCustomSpinEditItem.SetPostfix(const NewPostfix: string);
-begin
-  if not ValidateUnits(NewPostfix) then
-    raise EPropertyError.Create('Invalid postfix');
-  FPostfix := NewPostfix;
-  SetValueEx(GetValue, tcrNumericProperty);
-end;
-
-procedure TTBXCustomSpinEditItem.SetPrefix(const NewPrefix: string);
-begin
-  if not ValidateUnits(NewPrefix) then
-    raise EPropertyError.Create('Invalid prefix');
-  FPrefix := NewPrefix;
-  SetValueEx(GetValue, tcrNumericProperty);
-end;
-
-procedure TTBXCustomSpinEditItem.SetSpaceAfterPrefix(UseSpace: Boolean);
-begin
-  FSpaceAfterPrefix := UseSpace;
-  SetValueEx(GetValue, tcrNumericProperty);
-end;
-
-procedure TTBXCustomSpinEditItem.SetSpaceBeforePostfix(UseSpace: Boolean);
-begin
-  FSpaceBeforePostfix := UseSpace;
-  SetValueEx(GetValue, tcrNumericProperty);
-end;
-
-procedure TTBXCustomSpinEditItem.SetValue(NewValue: Extended);
-begin
-  SetTextEx(GetAsText(NewValue), tcrNumericProperty);
-  if FLastGoodValue <> NewValue then
-  begin
-    FLastGoodValue := NewValue;
-    DoValueChange(NewValue);
-  end;
-end;
-
-procedure TTBXCustomSpinEditItem.SetValueEx(NewValue: Extended; Reason: Integer);
-begin
-  SetTextEx(GetAsText(NewValue), Reason);
-  if FLastGoodValue <> NewValue then
-  begin
-    FLastGoodValue := NewValue;
-    DoValueChange(NewValue);
-  end;
-end;
-
-procedure TTBXCustomSpinEditItem.SetValueType(NewType: TSEValueType);
-var
-  V: Extended;
-begin
-  if NewType <> FValueType then
-  begin
-    V := GetValue;
-    FValueType := NewType;
-    SetValueEx(V, tcrNumericProperty);
-    if NewType in [evtInteger, evtHex] then FIncrement := Max(Round(FIncrement), 1);
-  end;
-end;
-
-function TTBXCustomSpinEditItem.ValidateUnits(const S: string): Boolean;
-const
-  InvalidChars = [#0..#31, ' ', '*', '+', ',', '-', '.', '/', '0'..'9', '^'];
-var
-  I: Integer;
-begin
-  Result := False;
-  if Length(S) > 0 then
-    for I := 1 to Length(S) do
-     if S[I] in InvalidChars then Exit;
-  Result := True;
-end;
-
-{ TTBXSpinEditViewer }
-
-destructor TTBXSpinEditViewer.Destroy;
-begin
-  FBtnTimer.Free;
-  inherited;
-end;
-
-procedure TTBXSpinEditViewer.GetEditInfo(out EditInfo: TTBXEditInfo; const ItemInfo: TTBXItemInfo);
-const
-  CDisabled: array [Boolean] of Integer = (EBSS_DISABLED, 0);
-  CHot: array [Boolean] of Integer = (0, EBSS_HOT);
-  CUpDnState: array [TSEBtnState] of Integer = (0, EBSS_UP, EBSS_DOWN);
-begin
-  inherited GetEditInfo(EditInfo, ItemInfo);
-  EditInfo.RightBtnInfo.ButtonType := EBT_SPIN;
-  EditInfo.RightBtnInfo.ButtonState := CDisabled[ItemInfo.Enabled] or
-    CHot[ItemInfo.HoverKind = hkMouseHover] or CUpDnState[FBtnState];
-end;
-
-function TTBXSpinEditViewer.GetIndentAfter: Integer;
-begin
-  if IsToolbarStyle then Result := CurrentTheme.GetIntegerMetrics(Self, TMI_EDIT_BTNWIDTH)  + 2
-  else Result := GetSystemMetricsForControl(View.FWindow, SM_CXMENUCHECK) + 2;
-end;
-
-function TTBXSpinEditViewer.HandleEditMessage(var Message: TMessage): Boolean;
-var
-  Item: TTBXCustomSpinEditItem;
-
-  function Val: Extended;
-  begin
-    if not Item.ParseValue(EditControl.Text, Result) then Result := Item.FLastGoodValue;
-  end;
-
-begin
-  Item := TTBXCustomSpinEditItem(Self.Item);
-  if Message.Msg = WM_CHAR then
-    case TWMChar(Message).CharCode of
-      VK_TAB:
-        begin
-          Item.Value := Val;
-          EditControl.Text := Item.Text;
-        end;
-      VK_RETURN:
-        begin
-          Item.Value := Val;
-          EditControl.Text := Item.Text;
-        end;
-      VK_ESCAPE:
-        begin
-//          Item.Value := Item.GetValue;
-        end;
-    end
-  else if Message.Msg = WM_KEYDOWN then
-    case TWMKeyDown(Message).CharCode of
-      VK_UP:
-        begin
-          Item.ClickUp;
-          EditControl.Text := Item.Text;
-          EditControl.SelectAll;
-          Result := True;
-          Exit;
-        end;
-      VK_DOWN:
-        begin
-          Item.ClickDown;
-          EditControl.Text := Item.Text;
-          EditControl.SelectAll;
-          Result := True;
-          Exit;
-        end;
-    end;
-
-  Result := inherited HandleEditMessage(Message);
-end;
-
-procedure TTBXSpinEditViewer.InvalidateButtons;
-var
-  R: TRect;
-begin
-  with TTBXSpinEditItem(Item) do
-    if Show and not IsRectEmpty(BoundsRect) then
-      begin
-        R := BoundsRect;
-        R.Left := R.Right - GetIndentAfter;
-        InvalidateRect(View.Window.Handle, @R, False);
-        Include(State, tbisInvalidated);
-      end;
-end;
-
-function TTBXSpinEditViewer.IsPtInButtonPart(X, Y: Integer): Boolean;
-begin
-  Result := X <= (BoundsRect.Right - BoundsRect.Left) - GetIndentAfter;
-end;
-
-procedure TTBXSpinEditViewer.LosingCapture;
-begin
-  FBtnTimer.Free;
-  FBtnTimer := nil;
-  inherited;
-end;
-
-procedure TTBXSpinEditViewer.MouseDown(Shift: TShiftState; X, Y: Integer; var MouseDownOnMenu: Boolean);
-begin
-  if not Item.Enabled then Exit;
-  FBtnState := ebsNone;
-  if X >= BoundsRect.Right - BoundsRect.Left - GetIndentAfter then
-  begin
-    if Y < (BoundsRect.Bottom - BoundsRect.Top) div 2 then
-    begin
-      FBtnState := ebsUp;
-      TTBXSpinEditItem(Item).ClickUp;
-    end
-    else
-    begin
-      FBtnState := ebsDown;
-      TTBXSpinEditItem(Item).ClickDown;
-    end;
-
-    if FBtnTimer = nil then
-    begin
-      FBtnTimer := TTimer.Create(nil);
-      FBtnTimer.OnTimer := TimerHandler;
-    end;
-    FBtnTimer.Interval := SE_FIRSTINTERVAL;
-    FBtnTimer.Enabled := True;
-  end;
-
-  if FBtnState <> ebsNone then
-  begin
-    InvalidateButtons;
-    inherited;
-    View.SetCapture;
-  end
-  else inherited;
-end;
-
-procedure TTBXSpinEditViewer.MouseUp(X, Y: Integer; MouseWasDownOnMenu: Boolean);
-begin
-  if FBtnState <> ebsNone then
-  begin
-    FBtnState := ebsNone;
-    FBtnTimer.Free;
-    FBtnTimer := nil;
-    InvalidateButtons;
-  end;
-  inherited;
-end;
-
-procedure TTBXSpinEditViewer.TimerHandler(Sender: TObject);
-begin
-  FBtnTimer.Interval := SE_INTERVAL;
-  if FBtnState = ebsUp then TTBXSpinEditItem(Item).ClickUp
-  else if FBtnState = ebsDown then TTBXSpinEditItem(Item).ClickDown
-  else
-  begin
-    FBtnTimer.Free;
-    FBtnTimer := nil;
-  end;
-end;
-
-{$ENDIF}
-
 end.

+ 0 - 81
source/packages/tbx/TBXLists.pas

@@ -227,24 +227,6 @@ type
 
   TTBXStringListClass = class of TTBXStringList;
 
-  {$IFNDEF MPEXCLUDE}
-
-  { TTBXUndoList }
-
-  TTBXUndoList = class(TTBXStringList)
-  protected
-    procedure DrawItem(ACanvas: TCanvas; AViewer: TTBXCustomListViewer; const ARect: TRect; AIndex, AHoverIndex: Integer); override;
-    function  GetItemViewerClass(AView: TTBView): TTBItemViewerClass; override;
-    procedure HandleHover(AIndex: Integer); override;
-  end;
-
-  TTBXUndoListViewer = class(TTBXCustomListViewer)
-  protected
-    procedure AdjustAutoScrollHover(var AIndex: Integer; Direction: Integer); override;
-    procedure HandleAutoScroll(var Direction, Interval: Integer); override;
-  end;
-  {$ENDIF}
-
 implementation
 
 uses Types, PasTools;
@@ -1379,67 +1361,4 @@ begin
   FStrings.Assign(Value);
 end;
 
-
-//----------------------------------------------------------------------------//
-
-{$IFNDEF MPEXCLUDE}
-
-{ TTBXUndoList }
-
-procedure TTBXUndoList.DrawItem(ACanvas: TCanvas; AViewer: TTBXCustomListViewer;
-  const ARect: TRect; AIndex, AHoverIndex: Integer);
-const
-  FillColors: array [Boolean] of TColor = (clWindow, clHighlight);
-  TextColors: array [Boolean] of TColor = (clWindowText, clHighlightText);
-var
-  S: string;
-  R: TRect;
-begin
-  ACanvas.Brush.Color := FillColors[AIndex <= AHoverIndex];
-  ACanvas.FillRect(ARect);
-  S := Strings[AIndex];
-  if Length(S) > 0 then
-  begin
-    R := ARect;
-    InflateRect(R, -4, 1);
-    ACanvas.Font.Color := TextColors[AIndex <= AHoverIndex];
-    ACanvas.Brush.Style := bsClear;
-    DrawText(ACanvas.Handle, PChar(S), Length(S), R, DT_SINGLELINE or DT_VCENTER);
-    ACanvas.Brush.Style := bsSolid;
-  end;
-end;
-
-function TTBXUndoList.GetItemViewerClass(AView: TTBView): TTBItemViewerClass;
-begin
-  Result := TTBXUndoListViewer;
-end;
-
-procedure TTBXUndoList.HandleHover(AIndex: Integer);
-begin
-  ItemIndex := AIndex;
-end;
-
-
-//----------------------------------------------------------------------------//
-
-{ TTBXUndoListViewer }
-
-procedure TTBXUndoListViewer.AdjustAutoScrollHover(var AIndex: Integer; Direction: Integer);
-begin
-  if Direction < 0 then AIndex := FOffset
-  else if Direction > 0 then AIndex := FOffset + FVisibleItems - 1;
-end;
-
-procedure TTBXUndoListViewer.HandleAutoScroll(var Direction, Interval: Integer);
-begin
-  inherited;
-  if Direction < 0 then HoverIndex := FOffset
-  else if Direction > 0 then HoverIndex := FOffset + FVisibleItems - 1
-  else Exit;
-  TTBXCustomList(Item).HandleHover(HoverIndex);
-  UpdateItems;
-end;
-
-{$ENDIF}
-
 end.

+ 0 - 1
source/packages/tbx/TBXOfficeXPTheme.pas

@@ -116,7 +116,6 @@ begin
     TMB_EDITMENUFULLSELECT:        Result := True;
     TMB_EDITHEIGHTEVEN:            Result := False;
     TMB_SOLIDTOOLBARNCAREA:        Result := False;
-    TMB_SOLIDTOOLBARCLIENTAREA:    Result := True;
   else
     Result := False;
   end;

+ 10 - 63
source/packages/tbx/TBXReg.pas

@@ -13,8 +13,8 @@ interface
 uses
   Windows, Classes, Controls, SysUtils, Graphics, ImgList, Dialogs,
   DesignIntf, DesignEditors, VCLEditors,
-  TB2Reg, TB2Toolbar, TB2Item, TBX, {$IFNDEF MPEXCLUDE}TBXMDI, TBXSwitcher,{$ENDIF} TB2DsgnItemEditor,
-  TBXExtItems, TBXLists, {$IFNDEF MPEXCLUDE}TBXDkPanels,{$ENDIF} TBXToolPals, TBXStatusBars;
+  TB2Reg, TB2Toolbar, TB2Item, TBX, TB2DsgnItemEditor,
+  TBXExtItems, TBXLists, TBXToolPals, TBXStatusBars;
 
 procedure Register;
 
@@ -29,11 +29,6 @@ type
     procedure Edit; override;
   end;
 
-  TTBXLinkImageIndexPropertyEditor = class(TTBImageIndexPropertyEditor)
-  public
-    function GetImageListAt(Index: Integer): TCustomImageList; override;
-  end;
-
   TTBXColorProperty = class(TColorProperty)
   public
     function GetValue: string; override;
@@ -63,12 +58,6 @@ implementation
 uses
   Forms, TBXThemes, TBXStrEdit, TBXUtils, TypInfo, TB2Version;
 
-{$IFNDEF MPEXCLUDE}
-type
-  TTBXLinkAccess = class(TTBXCustomLink);
-  TTBXButtonAccess = class(TTBXCustomButton);
-{$ENDIF}
-
 { TThemeProperty }
 
 function TThemeProperty.GetAttributes: TPropertyAttributes;
@@ -178,24 +167,6 @@ begin
   Result := inherited GetAttributes + [paDialog];
 end;
 
-{ TTBXLinkImageIndexPropertyEditor }
-
-function TTBXLinkImageIndexPropertyEditor.GetImageListAt(Index: Integer): TCustomImageList;
-{$IFNDEF MPEXCLUDE}
-var
-  C: TPersistent;
-{$ENDIF}
-begin
-  Result := nil;
-  {$IFNDEF MPEXCLUDE}
-  C := GetComponent(Index);
-  if C is TTBXCustomLink then
-    Result := TTBXLinkAccess(C).Images
-  else if C is TTBXCustomButton then
-    Result := TTBXButtonAccess(C).Images;
-  {$ENDIF}
-end;
-
 { TTBXColorProperty }
 
 function TTBXColorProperty.GetValue: string;
@@ -372,19 +343,17 @@ end;
 
 procedure Register;
 begin
-  RegisterComponents('Toolbar2000', [TTBXDock, {$IFNDEF MPEXCLUDE}TTBXMultiDock,{$ENDIF} TTBXToolbar,
-    {$IFNDEF MPEXCLUDE}TTBXToolWindow, TTBXDockablePanel,{$ENDIF} TTBXPopupMenu, {$IFNDEF MPEXCLUDE}TTBXSwitcher, TTBXMRUList,
-    TTBXMDIHandler, TTBXPageScroller,{$ENDIF} TTBXColorSet, {$IFNDEF MPEXCLUDE}TTBXAlignmentPanel,
-    TTBXLabel, TTBXLink, TTBXButton, TTBXCheckBox, TTBXRadioButton,{$ENDIF} TTBXStatusBar]);
+  RegisterComponents('Toolbar2000', [TTBXDock, TTBXToolbar,
+    TTBXPopupMenu, TTBXColorSet, TTBXStatusBar]);
   RegisterNoIcon([TTBXItem, TTBXSubMenuItem, TTBXSeparatorItem,
-    {$IFNDEF MPEXCLUDE}TTBXVisibilityToggleItem,{$ENDIF} TTBXLabelItem, {$IFNDEF MPEXCLUDE}TTBXMRUListItem,{$ENDIF} TTBXColorItem,
-    {$IFNDEF MPEXCLUDE}TTBXMDIWindowItem, TTBXEditItem, TTBXSpinEditItem,{$ENDIF} TTBXDropDownItem,
-    TTBXComboBoxItem, TTBXStringList{$IFNDEF MPEXCLUDE}, TTBXUndoList, TTBXToolPalette{$ENDIF}, TTBXColorPalette]);
+    TTBXLabelItem, TTBXColorItem,
+    TTBXDropDownItem,
+    TTBXComboBoxItem, TTBXStringList, TTBXColorPalette]);
 
   RegisterClasses([TTBXItem, TTBXSubMenuItem, TTBXSeparatorItem,
-    {$IFNDEF MPEXCLUDE}TTBXVisibilityToggleItem,{$ENDIF} TTBXLabelItem, {$IFNDEF MPEXCLUDE}TTBXMRUListItem,{$ENDIF} TTBXColorItem,
-    {$IFNDEF MPEXCLUDE}TTBXMDIWindowItem, TTBXEditItem, TTBXSpinEditItem,{$ENDIF} TTBXDropDownItem,
-    TTBXComboBoxItem, TTBXStringList{$IFNDEF MPEXCLUDE}, TTBXUndoList, TTBXToolPalette{$ENDIF}, TTBXColorPalette]);
+    TTBXLabelItem, TTBXColorItem,
+    TTBXDropDownItem,
+    TTBXComboBoxItem, TTBXStringList, TTBXColorPalette]);
 
 
   RegisterComponentEditor(TTBXToolbar, TTBXItemsEditor);
@@ -394,13 +363,6 @@ begin
   RegisterPropertyEditor(TypeInfo(string), TTBXLabelItem, 'Caption', TCaptionProperty);
   RegisterPropertyEditor(TypeInfo(string), TTBToolbar, 'ChevronHint', TMLStringProperty);
   RegisterPropertyEditor(TypeInfo(string), TTBXToolbar, 'ChevronHint', TMLStringProperty);
-  {$IFNDEF MPEXCLUDE}
-  RegisterPropertyEditor(TypeInfo(string), TTBXSwitcher, 'Theme', TThemeProperty);
-  {$ENDIF}
-  {$IFNDEF MPEXCLUDE}
-  RegisterPropertyEditor(TypeInfo(TImageIndex), TTBXCustomLink, 'ImageIndex', TTBXLinkImageIndexPropertyEditor);
-  RegisterPropertyEditor(TypeInfo(TImageIndex), TTBXCustomButton, 'ImageIndex', TTBXLinkImageIndexPropertyEditor);
-  {$ENDIF}
   RegisterPropertyEditor(TypeInfo(TColor), TPersistent, '', TTBXColorProperty);
 
   RegisterComponentEditor(TTBXStatusBar, TTBXStatusBarEditor);
@@ -408,26 +370,11 @@ begin
   TBRegisterItemClass(TTBXItem, 'New &TBX Item', HInstance);
   TBRegisterItemClass(TTBXSubMenuItem, 'New TBX Submenu Item', HInstance);
   TBRegisterItemClass(TTBXSeparatorItem, 'New TBX Separator Item', HInstance);
-  {$IFNDEF MPEXCLUDE}
-  TBRegisterItemClass(TTBXVisibilityToggleItem, 'New TBX Visibility Toggle Item', HInstance);
-  {$ENDIF}
   TBRegisterItemClass(TTBXLabelItem, 'New TBX Label Item', HInstance);
-  {$IFNDEF MPEXCLUDE}
-  TBRegisterItemClass(TTBXMRUListItem, 'New TBX MRU List Item', HInstance);
-  {$ENDIF}
   TBRegisterItemClass(TTBXColorItem, 'New TBX Color Item', HInstance);
-  {$IFNDEF MPEXCLUDE}
-  TBRegisterItemClass(TTBXMDIWindowItem, 'New TBX MDI Window Item', HInstance);
-  TBRegisterItemClass(TTBXEditItem, 'New TBX Edit Item', HInstance);
-  TBRegisterItemClass(TTBXSpinEditItem, 'New TBX Spin Edit Item', HInstance);
-  {$ENDIF}
   TBRegisterItemClass(TTBXDropDownItem, 'New TBX Drop Down Item', HInstance);
   TBRegisterItemClass(TTBXComboBoxItem, 'New TBX Combo Box Item', HInstance);
   TBRegisterItemClass(TTBXStringList, 'New TBX String List', HInstance);
-  {$IFNDEF MPEXCLUDE}
-  TBRegisterItemClass(TTBXUndoList, 'New TBX Undo List', HInstance);
-  TBRegisterItemClass(TTBXToolPalette, 'New TBX Tool Palette', HInstance);
-  {$ENDIF}
   TBRegisterItemClass(TTBXColorPalette, 'New TBX Color Palette', HInstance);
 
 end;

+ 0 - 4
source/packages/tbx/TBXThemes.pas

@@ -45,9 +45,6 @@ const
   TMB_EDITHEIGHTEVEN         = 4; // forces the height of the edit item to be even number (otherwise it will be odd)
   TMB_PAINTDOCKBACKGROUND    = 5; // docks are painted by the theme instead of having a uniform color
   TMB_SOLIDTOOLBARNCAREA     = 6; // no transparency in NC area of toolbars
-  TMB_SOLIDTOOLBARCLIENTAREA = 7; // no transparency in client area of toolbars
-
-  TMB_SOLIDTOOLBARS          = TMB_SOLIDTOOLBARNCAREA; // for compatibility only
 
 { Margins Metric IDs}
 const
@@ -328,7 +325,6 @@ type
     property EditHeightEven: Boolean index TMB_EDITHEIGHTEVEN read GetBooleanMetrics;
     property PaintDockBackground: Boolean index TMB_PAINTDOCKBACKGROUND read GetBooleanMetrics;
     property SolidToolbarNCArea: Boolean index TMB_SOLIDTOOLBARNCAREA read GetBooleanMetrics;
-    property SolidToolbarClientArea: Boolean index TMB_SOLIDTOOLBARCLIENTAREA read GetBooleanMetrics;
 
     property Name: string read FName;
     property Tag: Integer read FTag write FTag;

+ 1 - 1
source/tb2k.cbproj

@@ -40,7 +40,7 @@
 		<DCC_EXPLICIT_STRING_CAST_LOSS>true</DCC_EXPLICIT_STRING_CAST_LOSS>
 		<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Vcl;$(DCC_Namespace)</DCC_Namespace>
 		<DCC_UnitSearchPath>packages\my;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
-		<Defines>MPEXCLUDE;$(Define);$(Defines)</Defines>
+		<Defines>$(Define);$(Defines)</Defines>
 		<FinalOutputDir>$(INTERM_PATH)\$(Platform)\$(Config)</FinalOutputDir>
 		<ILINK_Description>Toolbar2000 Components (Jordan Russell)</ILINK_Description>
 		<ILINK_GenerateImportLibrary>true</ILINK_GenerateImportLibrary>

+ 0 - 1
source/tbxp.cbproj

@@ -40,7 +40,6 @@
 		<DCC_EXPLICIT_STRING_CAST_LOSS>true</DCC_EXPLICIT_STRING_CAST_LOSS>
 		<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Vcl;$(DCC_Namespace)</DCC_Namespace>
 		<DCC_UnitSearchPath>packages\tbx;packages\tb2k;packages\my;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
-		<Defines>MPEXCLUDE;$(Defines)</Defines>
 		<FinalOutputDir>$(INTERM_PATH)\$(Platform)\$(Config)</FinalOutputDir>
 		<ILINK_Description>Toolbar2000 -- TBX Extensions (Alex Denisov)</ILINK_Description>
 		<ILINK_GenerateImportLibrary>true</ILINK_GenerateImportLibrary>