mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 09:42:46 +02:00
lcl: rearrange some class fields as suggested by Luiz to reduce occupied memory
git-svn-id: trunk@15201 -
This commit is contained in:
parent
d0c1ddd0d2
commit
1843642237
@ -223,22 +223,22 @@ type
|
||||
|
||||
TCustomSpeedButton = class(TGraphicControl)
|
||||
private
|
||||
FAllowAllUp: Boolean;
|
||||
FDown: Boolean;
|
||||
FDownLoaded : Boolean;// value of Down set during loading
|
||||
FDragging: Boolean;
|
||||
FFlat: Boolean;
|
||||
FGlyph: TButtonGlyph;
|
||||
FGroupIndex: Integer;
|
||||
FLastDrawDetails: TThemedElementDetails;
|
||||
FLayout: TButtonLayout;
|
||||
FMargin: integer;
|
||||
FMouseInControl: Boolean;
|
||||
FSpacing: integer;
|
||||
FShortcut: TShortCut;
|
||||
FShowAccelChar: boolean;
|
||||
FShowCaption: boolean;
|
||||
FSpacing: integer;
|
||||
FTransparent: Boolean;
|
||||
FAllowAllUp: Boolean;
|
||||
FDown: Boolean;
|
||||
FDownLoaded : Boolean;// value of Down set during loading
|
||||
FDragging: Boolean;
|
||||
FFlat: Boolean;
|
||||
FMouseInControl: Boolean;
|
||||
function GetGlyph: TBitmap;
|
||||
procedure SetShowCaption(const AValue: boolean);
|
||||
procedure UpdateExclusive;
|
||||
|
@ -774,9 +774,7 @@ type
|
||||
FAnchors: TAnchors;
|
||||
FAnchorSides: array[TAnchorKind] of TAnchorSide;
|
||||
fAnchoredControls: TFPList; // list of TControl anchored to this control
|
||||
FAutoSizing: Boolean;
|
||||
FAutoSizingLockCount: Integer;
|
||||
FAutoSize: Boolean;
|
||||
FBaseBounds: TRect;
|
||||
FBaseBoundsLock: integer;
|
||||
FBaseParentClientSize: TPoint;
|
||||
@ -789,12 +787,10 @@ type
|
||||
FControlFlags: TControlFlags;
|
||||
FControlHandlers: array[TControlHandlerType] of TMethodList;
|
||||
FControlStyle: TControlStyle;
|
||||
FCtl3D: Boolean;
|
||||
FDockOrientation: TDockOrientation;
|
||||
FDragCursor: TCursor;
|
||||
FDragKind: TDragKind;
|
||||
FDragMode: TDragMode;
|
||||
FEnabled: Boolean;
|
||||
FFloatingDockSiteClass: TWinControlClass;
|
||||
FFont: TFont;
|
||||
FHeight: Integer;
|
||||
@ -803,7 +799,6 @@ type
|
||||
FHelpType: THelpType;
|
||||
FHint: TTranslateString;
|
||||
FHostDockSite: TWinControl;
|
||||
FIsControl: Boolean;
|
||||
fLastAlignedBounds: TRect;
|
||||
fLastAlignedBoundsTried: integer;
|
||||
FLastChangebounds: TRect;
|
||||
@ -816,7 +811,6 @@ type
|
||||
FLeft: Integer;
|
||||
FLoadedClientSize: TPoint;
|
||||
FLRDockWidth: Integer;
|
||||
FMouseEntered: boolean;
|
||||
FOnChangeBounds: TNotifyEvent;
|
||||
FOnClick: TNotifyEvent;
|
||||
FOnConstrainedResize: TConstrainedResizeEvent;
|
||||
@ -839,9 +833,6 @@ type
|
||||
FOnStartDrag: TStartDragEvent;
|
||||
FOnTripleClick: TNotifyEvent;
|
||||
FParent: TWinControl;
|
||||
FParentColor: Boolean;
|
||||
FParentFont: Boolean;
|
||||
FParentShowHint: Boolean;
|
||||
FPopupMenu: TPopupMenu;
|
||||
FPreferredMinWidth: integer;// without theme space
|
||||
FPreferredMinHeight: integer;// without theme space
|
||||
@ -849,15 +840,25 @@ type
|
||||
FPreferredHeight: integer;// with theme space
|
||||
FReadBounds: TRect;
|
||||
FSessionProperties: string;
|
||||
FShowHint: Boolean;
|
||||
FSizeLock: integer;
|
||||
FTBDockHeight: Integer;
|
||||
FTop: Integer;
|
||||
FUndockHeight: Integer;
|
||||
FUndockWidth: Integer;
|
||||
FVisible: Boolean;
|
||||
FWidth: Integer;
|
||||
FWindowProc: TWndMethod;
|
||||
//boolean fields
|
||||
FIsControl: Boolean;
|
||||
FCtl3D: Boolean;
|
||||
FShowHint: Boolean;
|
||||
FParentColor: Boolean;
|
||||
FParentFont: Boolean;
|
||||
FParentShowHint: Boolean;
|
||||
FAutoSize: Boolean;
|
||||
FAutoSizing: Boolean;
|
||||
FEnabled: Boolean;
|
||||
FMouseEntered: boolean;
|
||||
FVisible: Boolean;
|
||||
function CaptureMouseButtonsIsStored: boolean;
|
||||
procedure DoActionChange(Sender: TObject);
|
||||
function GetAnchorSide(Kind: TAnchorKind): TAnchorSide;
|
||||
@ -1487,7 +1488,6 @@ type
|
||||
|
||||
TWinControl = class(TControl)
|
||||
private
|
||||
FAlignLevel: Word;
|
||||
FBorderWidth: TBorderWidth;
|
||||
FBoundsLockCount: integer;
|
||||
FBoundsRealized: TRect;
|
||||
@ -1500,11 +1500,9 @@ type
|
||||
FWinControls: TFPList; // the child controls (only TWinControl, no TControl)
|
||||
FDefWndProc: Pointer;
|
||||
FDockClients: TFPList;
|
||||
FDoubleBuffered: Boolean;
|
||||
FClientWidth: Integer;
|
||||
FClientHeight: Integer;
|
||||
FDockManager: TDockManager;
|
||||
FDockSite: Boolean;
|
||||
FOnDockDrop: TDockDropEvent;
|
||||
FOnDockOver: TDockOverEvent;
|
||||
FOnGetSiteInfo: TGetSiteInfoEvent;
|
||||
@ -1519,13 +1517,16 @@ type
|
||||
FOnUnDock: TUnDockEvent;
|
||||
FOnUTF8KeyPress: TUTF8KeyPressEvent;
|
||||
FParentWindow: hwnd;
|
||||
FParentCtl3D: Boolean;
|
||||
FRealizeBoundsLockCount: integer;
|
||||
FHandle: Hwnd;
|
||||
FShowing: Boolean;
|
||||
FTabOrder: integer;
|
||||
FTabStop: Boolean;
|
||||
FTabList: TFPList;
|
||||
FAlignLevel: Word;
|
||||
FTabStop: Boolean;
|
||||
FShowing: Boolean;
|
||||
FParentCtl3D: Boolean;
|
||||
FDoubleBuffered: Boolean;
|
||||
FDockSite: Boolean;
|
||||
FUseDockManager: Boolean;
|
||||
procedure AlignControl(AControl: TControl);
|
||||
function GetBrush: TBrush;
|
||||
|
16
lcl/menus.pp
16
lcl/menus.pp
@ -99,14 +99,9 @@ type
|
||||
TMenuItem = class(TLCLComponent)
|
||||
private
|
||||
FActionLink: TMenuActionLink;
|
||||
FAutoCheck: boolean;
|
||||
FCaption: string;
|
||||
FChecked: Boolean;
|
||||
FCommand: integer;
|
||||
FDefault: Boolean;
|
||||
FEnabled: Boolean;
|
||||
FBitmap: TBitmap;
|
||||
FGroupIndex: Byte;
|
||||
FHandle: HMenu;
|
||||
FHelpContext: THelpContext;
|
||||
FHint: String;
|
||||
@ -117,16 +112,21 @@ type
|
||||
FOnChange: TMenuChangeEvent;
|
||||
FOnClick: TNotifyEvent;
|
||||
FParent: TMenuItem;
|
||||
FMenuItemHandlers: array[TMenuItemHandlerType] of TMethodList;
|
||||
FSubMenuImages: TCustomImageList;
|
||||
FShortCut: TShortCut;
|
||||
FGroupIndex: Byte;
|
||||
FRadioItem: Boolean;
|
||||
FRightJustify: boolean;
|
||||
FShortCut: TShortCut;
|
||||
FShowAlwaysCheckable: boolean;
|
||||
FSubMenuImages: TCustomImageList;
|
||||
FVisible: Boolean;
|
||||
// True => Bitmap property indicates assigned Bitmap.
|
||||
// False => Bitmap property is not assigned but can represent imagelist bitmap
|
||||
FBitmapIsValid: Boolean;
|
||||
FMenuItemHandlers: array[TMenuItemHandlerType] of TMethodList;
|
||||
FAutoCheck: Boolean;
|
||||
FChecked: Boolean;
|
||||
FDefault: Boolean;
|
||||
FEnabled: Boolean;
|
||||
function GetBitmap: TBitmap;
|
||||
function GetCount: Integer;
|
||||
function GetItem(Index: Integer): TMenuItem;
|
||||
|
@ -970,8 +970,8 @@ type
|
||||
|
||||
TButtonControl = class(TWinControl)
|
||||
private
|
||||
FClicksDisabled: Boolean;
|
||||
FOnChange: TNotifyEvent;
|
||||
FClicksDisabled: Boolean;
|
||||
FUseOnChange: boolean;
|
||||
function IsCheckedStored: boolean;
|
||||
function UseOnChangeIsStored: boolean;
|
||||
@ -1009,11 +1009,11 @@ type
|
||||
|
||||
TCustomButton = class(TButtonControl)
|
||||
private
|
||||
FModalResult: TModalResult;
|
||||
FShortCut: TShortcut;
|
||||
FCancel: Boolean;
|
||||
FDefault: Boolean;
|
||||
FActive: boolean;
|
||||
FModalResult: TModalResult;
|
||||
FShortCut: TShortcut;
|
||||
procedure SetCancel(NewCancel: boolean);
|
||||
procedure SetDefault(Value: Boolean);
|
||||
procedure SetModalResult(const AValue: TModalResult);
|
||||
@ -1545,3 +1545,4 @@ end.
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user