mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 12:12:47 +02:00
IDE: Add an option GUI for using CheckBox for Booleans in Object Inspector.
git-svn-id: trunk@46881 -
This commit is contained in:
parent
0be2affe39
commit
63400d9ec8
@ -435,7 +435,7 @@ begin
|
||||
end;
|
||||
except
|
||||
on E: Exception do begin
|
||||
DebugLn('ERROR: TOIOptions.Load: ',E.Message);
|
||||
DebugLn('ERROR: TCompPaletteOptions.Load: ',E.Message);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -478,7 +478,7 @@ begin
|
||||
end;
|
||||
except
|
||||
on E: Exception do begin
|
||||
DebugLn('ERROR: TOIOptions.Save: ',E.Message);
|
||||
DebugLn('ERROR: TCompPaletteOptions.Save: ',E.Message);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
@ -102,8 +102,9 @@ type
|
||||
FHighlightColor: TColor;
|
||||
FHighlightFontColor: TColor;
|
||||
|
||||
FShowHints: boolean;
|
||||
FShowHints: Boolean;
|
||||
FAutoShow: Boolean;
|
||||
FCheckboxForBoolean: Boolean;
|
||||
FBoldNonDefaultValues: Boolean;
|
||||
FDrawGridLines: Boolean;
|
||||
function FPropertyGridSplitterX(Page: TObjectInspectorPage): integer;
|
||||
@ -148,6 +149,7 @@ type
|
||||
property ShowHints: boolean read FShowHints
|
||||
write FShowHints;
|
||||
property AutoShow: boolean read FAutoShow write FAutoShow;
|
||||
property CheckboxForBoolean: boolean read FCheckboxForBoolean write FCheckboxForBoolean;
|
||||
property BoldNonDefaultValues: boolean read FBoldNonDefaultValues write FBoldNonDefaultValues;
|
||||
property DrawGridLines: boolean read FDrawGridLines write FDrawGridLines;
|
||||
property ShowGutter: boolean read FShowGutter write FShowGutter;
|
||||
@ -264,6 +266,7 @@ type
|
||||
FReadOnlyColor: TColor;
|
||||
FRowSpacing: integer;
|
||||
FShowGutter: Boolean;
|
||||
FCheckboxForBoolean: Boolean;
|
||||
FSubPropertiesColor: TColor;
|
||||
FChangeStep: integer;
|
||||
FCurrentButton: TControl; // nil or ValueButton
|
||||
@ -492,6 +495,8 @@ type
|
||||
property Selection: TPersistentSelectionList read FSelection
|
||||
write SetSelection;
|
||||
property ShowGutter: Boolean read FShowGutter write SetShowGutter default True;
|
||||
property CheckboxForBoolean: Boolean read FCheckboxForBoolean
|
||||
write FCheckboxForBoolean;
|
||||
property PreferredSplitterX: integer read FPreferredSplitterX
|
||||
write FPreferredSplitterX default 100;
|
||||
property SplitterX: integer read FSplitterX write SetSplitterX default 100;
|
||||
@ -643,7 +648,6 @@ type
|
||||
procedure DoUpdateRestricted;
|
||||
procedure DoViewRestricted;
|
||||
private
|
||||
FAutoShow: Boolean;
|
||||
FFavorites: TOIFavoriteProperties;
|
||||
FInfoBoxHeight: integer;
|
||||
FOnPropertyHint: TOIPropertyHint;
|
||||
@ -665,6 +669,8 @@ type
|
||||
FOnAddAvailablePersistent: TOnAddAvailablePersistent;
|
||||
FOnSelectPersistentsInOI: TNotifyEvent;
|
||||
FOnModified: TNotifyEvent;
|
||||
FAutoShow: Boolean;
|
||||
FCheckboxForBoolean: Boolean;
|
||||
FShowComponentTree: Boolean;
|
||||
FShowFavorites: Boolean;
|
||||
FShowInfoBox: Boolean;
|
||||
@ -715,6 +721,7 @@ type
|
||||
procedure SetAvailComboBoxText;
|
||||
procedure HookGetSelection(const ASelection: TPersistentSelectionList);
|
||||
procedure HookSetSelection(const ASelection: TPersistentSelectionList);
|
||||
procedure HookGetCheckboxForBoolean(var Value: Boolean);
|
||||
procedure DestroyNoteBook;
|
||||
procedure CreateNoteBook;
|
||||
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
||||
@ -741,7 +748,6 @@ type
|
||||
procedure ActivateGrid(Grid: TOICustomPropertyGrid);
|
||||
procedure FocusGrid(Grid: TOICustomPropertyGrid = nil);
|
||||
|
||||
property AutoShow: Boolean read FAutoShow write FAutoShow;
|
||||
property ComponentPanelHeight: integer read GetComponentPanelHeight
|
||||
write SetComponentPanelHeight;
|
||||
property DefaultItemHeight: integer read FDefaultItemHeight
|
||||
@ -769,19 +775,21 @@ type
|
||||
property OnRemoveFromFavorites: TNotifyEvent read FOnRemoveFromFavorites
|
||||
write FOnRemoveFromFavorites;
|
||||
property OnSelectionChange: TNotifyEvent read FOnSelectionChange write FOnSelectionChange;
|
||||
property OnSelectPersistentsInOI: TNotifyEvent
|
||||
read FOnSelectPersistentsInOI write FOnSelectPersistentsInOI;
|
||||
property OnShowOptions: TNotifyEvent read FOnShowOptions
|
||||
write SetOnShowOptions;
|
||||
property OnSelectPersistentsInOI: TNotifyEvent read FOnSelectPersistentsInOI
|
||||
write FOnSelectPersistentsInOI;
|
||||
property OnShowOptions: TNotifyEvent read FOnShowOptions write SetOnShowOptions;
|
||||
property OnUpdateRestricted: TNotifyEvent read FOnUpdateRestricted
|
||||
write FOnUpdateRestricted;
|
||||
property OnViewRestricted: TNotifyEvent read FOnViewRestricted write FOnViewRestricted;
|
||||
property OnNodeGetImageIndex : TOnOINodeGetImageEvent read FOnNodeGetImageIndex write FOnNodeGetImageIndex;
|
||||
property PropertyEditorHook: TPropertyEditorHook
|
||||
read FPropertyEditorHook write SetPropertyEditorHook;
|
||||
property OnNodeGetImageIndex : TOnOINodeGetImageEvent read FOnNodeGetImageIndex
|
||||
write FOnNodeGetImageIndex;
|
||||
property PropertyEditorHook: TPropertyEditorHook read FPropertyEditorHook
|
||||
write SetPropertyEditorHook;
|
||||
property RestrictedProps: TOIRestrictedProperties read FRestricted write SetRestricted;
|
||||
property Selection: TPersistentSelectionList
|
||||
read FSelection write SetSelection;
|
||||
property Selection: TPersistentSelectionList read FSelection write SetSelection;
|
||||
property AutoShow: Boolean read FAutoShow write FAutoShow;
|
||||
property CheckboxForBoolean: Boolean read FCheckboxForBoolean
|
||||
write FCheckboxForBoolean;
|
||||
property ShowComponentTree: Boolean read FShowComponentTree
|
||||
write SetShowComponentTree;
|
||||
property ShowFavorites: Boolean read FShowFavorites write SetShowFavorites;
|
||||
@ -1673,15 +1681,15 @@ begin
|
||||
//DebugLn(['TOICustomPropertyGrid.SetItemIndex FCurrentButton.BoundsRect=',dbgs(FCurrentButton.BoundsRect)]);
|
||||
end;
|
||||
NewValue:=NewRow.Editor.GetVisualValue;
|
||||
{$IFDEF UseOICheckBox}
|
||||
if (NewRow.Editor is TBoolPropertyEditor) then begin
|
||||
if (NewRow.Editor is TBoolPropertyEditor) and FCheckboxForBoolean then
|
||||
begin
|
||||
FCurrentEdit:=ValueCheckBox;
|
||||
ValueCheckBox.Enabled:=not NewRow.IsReadOnly;
|
||||
ValueCheckBox.Caption:=NewValue;
|
||||
ValueCheckBox.Checked:=(NewValue='True');
|
||||
end else
|
||||
{$ENDIF}
|
||||
if paValueList in EditorAttributes then begin
|
||||
end
|
||||
else if paValueList in EditorAttributes then
|
||||
begin
|
||||
FCurrentEdit:=ValueComboBox;
|
||||
if paCustomDrawn in EditorAttributes then
|
||||
ValueComboBox.Style:=csOwnerDrawVariable
|
||||
@ -1698,7 +1706,8 @@ begin
|
||||
Exclude(FStates,pgsGetComboItemsCalled);
|
||||
SetIdleEvent(true);
|
||||
ValueComboBox.Text:=NewValue;
|
||||
end else begin
|
||||
end
|
||||
else begin
|
||||
FCurrentEdit:=ValueEdit;
|
||||
ValueEdit.ReadOnly:=NewRow.IsReadOnly;
|
||||
ValueEdit.Enabled:=true;
|
||||
@ -1706,7 +1715,8 @@ begin
|
||||
ValueEdit.Text:=NewValue;
|
||||
end;
|
||||
AlignEditComponents;
|
||||
if FCurrentEdit<>nil then begin
|
||||
if FCurrentEdit<>nil then
|
||||
begin
|
||||
if FPropertyEditorHook<>nil then
|
||||
FCurrentEditorLookupRoot:=FPropertyEditorHook.LookupRoot;
|
||||
FCurrentEdit.Visible:=true;
|
||||
@ -3730,6 +3740,7 @@ begin
|
||||
|
||||
FShowHints:=ConfigStore.GetValue(Path+'ShowHints',FileVersion>=3);
|
||||
FAutoShow := ConfigStore.GetValue(Path+'AutoShow',True);
|
||||
FCheckboxForBoolean := ConfigStore.GetValue(Path+'CheckboxForBoolean',False);
|
||||
FBoldNonDefaultValues := ConfigStore.GetValue(Path+'BoldNonDefaultValues',True);
|
||||
FDrawGridLines := ConfigStore.GetValue(Path+'DrawGridLines',True);
|
||||
FShowGutter := ConfigStore.GetValue(Path+'ShowGutter',True);
|
||||
@ -3783,6 +3794,7 @@ begin
|
||||
|
||||
ConfigStore.SetDeleteValue(Path+'ShowHints',FShowHints, True);
|
||||
ConfigStore.SetDeleteValue(Path+'AutoShow',FAutoShow, True);
|
||||
ConfigStore.SetDeleteValue(Path+'CheckboxForBoolean',FCheckboxForBoolean, False);
|
||||
ConfigStore.SetDeleteValue(Path+'BoldNonDefaultValues',FBoldNonDefaultValues, True);
|
||||
ConfigStore.SetDeleteValue(Path+'DrawGridLines',FDrawGridLines, True);
|
||||
ConfigStore.SetDeleteValue(Path+'ShowGutter',FShowGutter, True);
|
||||
@ -3827,6 +3839,7 @@ begin
|
||||
|
||||
FShowHints := AnObjInspector.PropertyGrid.ShowHint;
|
||||
FAutoShow := AnObjInspector.AutoShow;
|
||||
FCheckboxForBoolean := AnObjInspector.CheckboxForBoolean;
|
||||
FBoldNonDefaultValues := fsBold in AnObjInspector.PropertyGrid.ValueFont.Style;
|
||||
FDrawGridLines := AnObjInspector.PropertyGrid.DrawHorzGridLines;
|
||||
FShowGutter := AnObjInspector.PropertyGrid.ShowGutter;
|
||||
@ -3855,11 +3868,12 @@ begin
|
||||
AssignTo(Grid);
|
||||
end;
|
||||
AnObjInspector.DefaultItemHeight := DefaultItemHeight;
|
||||
AnObjInspector.AutoShow := AutoShow;
|
||||
AnObjInspector.CheckboxForBoolean := FCheckboxForBoolean;
|
||||
AnObjInspector.ShowComponentTree := ShowComponentTree;
|
||||
AnObjInspector.ShowInfoBox := ShowInfoBox;
|
||||
AnObjInspector.ComponentPanelHeight := ComponentTreeHeight;
|
||||
AnObjInspector.InfoBoxHeight := InfoBoxHeight;
|
||||
AnObjInspector.AutoShow := AutoShow;
|
||||
AnObjInspector.ShowStatusBar := ShowStatusBar;
|
||||
end;
|
||||
|
||||
@ -3883,6 +3897,7 @@ begin
|
||||
AGrid.ShowHint := FShowHints;
|
||||
AGrid.DrawHorzGridLines := FDrawGridLines;
|
||||
AGrid.ShowGutter := FShowGutter;
|
||||
AGrid.CheckboxForBoolean := FCheckboxForBoolean;
|
||||
end;
|
||||
|
||||
|
||||
@ -4095,6 +4110,7 @@ begin
|
||||
FPropertyEditorHook.AddHandlerRefreshPropertyValues(
|
||||
@HookRefreshPropertyValues);
|
||||
FPropertyEditorHook.AddHandlerSetSelection(@HookSetSelection);
|
||||
FPropertyEditorHook.AddHandlerGetCheckboxForBoolean(@HookGetCheckboxForBoolean);
|
||||
Selection := nil;
|
||||
for Page:=Low(TObjectInspectorPage) to High(TObjectInspectorPage) do
|
||||
if GridControl[Page]<>nil then
|
||||
@ -4711,6 +4727,11 @@ begin
|
||||
Selection := ASelection;
|
||||
end;
|
||||
|
||||
procedure TObjectInspectorDlg.HookGetCheckboxForBoolean(var Value: Boolean);
|
||||
begin
|
||||
Value := fCheckboxForBoolean;
|
||||
end;
|
||||
|
||||
procedure TObjectInspectorDlg.SetShowComponentTree(const AValue: boolean);
|
||||
begin
|
||||
if FShowComponentTree = AValue then Exit;
|
||||
|
@ -451,10 +451,8 @@ type
|
||||
function OrdValueToVisualValue(OrdValue: longint): string; override;
|
||||
procedure GetValues(Proc: TGetStrProc); override;
|
||||
procedure SetValue(const NewValue: ansistring); override;
|
||||
{$IFDEF UseOICheckBox}
|
||||
procedure PropDrawValue(ACanvas: TCanvas; const ARect: TRect;
|
||||
AState: TPropEditDrawState); override;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{ TInt64PropertyEditor
|
||||
@ -1208,6 +1206,8 @@ type
|
||||
TPropHookModified = procedure(Sender: TObject) of object;
|
||||
TPropHookRevert = procedure(Instance:TPersistent; PropInfo:PPropInfo) of object;
|
||||
TPropHookRefreshPropertyValues = procedure of object;
|
||||
// other
|
||||
TPropHookGetCheckboxForBoolean = procedure(var Value: Boolean) of object;
|
||||
|
||||
TPropHookType = (
|
||||
// lookup root
|
||||
@ -1247,7 +1247,9 @@ type
|
||||
htRevert,
|
||||
htRefreshPropertyValues,
|
||||
// dependencies
|
||||
htAddDependency
|
||||
htAddDependency,
|
||||
// other
|
||||
htGetCheckboxForBoolean
|
||||
);
|
||||
|
||||
{ TPropertyEditorHook }
|
||||
@ -1322,8 +1324,9 @@ type
|
||||
procedure Revert(Instance: TPersistent; PropInfo: PPropInfo);
|
||||
procedure RefreshPropertyValues;
|
||||
// dependencies
|
||||
procedure AddDependency(const AClass: TClass;
|
||||
const AnUnitname: shortstring);
|
||||
procedure AddDependency(const AClass: TClass; const AnUnitname: shortstring);
|
||||
// other
|
||||
function GetCheckboxForBoolean: Boolean;
|
||||
public
|
||||
// Handlers
|
||||
procedure RemoveAllHandlersForObject(const HandlerObject: TObject);
|
||||
@ -1445,6 +1448,8 @@ type
|
||||
const OnAddDependency: TPropHookAddDependency);
|
||||
procedure RemoveHandlerAddDependency(
|
||||
const OnAddDependency: TPropHookAddDependency);
|
||||
procedure AddHandlerGetCheckboxForBoolean(
|
||||
const OnGetCheckboxForBoolean: TPropHookGetCheckboxForBoolean);
|
||||
end;
|
||||
|
||||
//==============================================================================
|
||||
@ -3242,7 +3247,6 @@ begin
|
||||
SetOrdValue(I);
|
||||
end;
|
||||
|
||||
{$IFDEF UseOICheckBox}
|
||||
procedure TBoolPropertyEditor.PropDrawValue(ACanvas: TCanvas; const ARect: TRect;
|
||||
AState: TPropEditDrawState);
|
||||
var
|
||||
@ -3251,24 +3255,26 @@ var
|
||||
Check: TThemedButton;
|
||||
Sz: TSize;
|
||||
begin
|
||||
// Draw the box using theme services.
|
||||
if GetOrdValue <> 0 then
|
||||
Check := tbCheckBoxCheckedNormal
|
||||
else
|
||||
Check := tbCheckBoxUncheckedNormal;
|
||||
Details := ThemeServices.GetElementDetails(Check);
|
||||
Sz := ThemeServices.GetDetailSize(Details);
|
||||
BRect := ARect;
|
||||
Inc(BRect.Top, 3);
|
||||
BRect.Right := BRect.Left + Sz.cx;
|
||||
BRect.Bottom := BRect.Top + Sz.cy;
|
||||
ThemeServices.DrawElement(ACanvas.Handle, Details, BRect, nil);
|
||||
// Write text after the image
|
||||
BRect := ARect;
|
||||
Inc(BRect.Left, Sz.cx+2);
|
||||
if FPropertyHook.GetCheckboxForBoolean then
|
||||
begin
|
||||
// Draw the box using theme services.
|
||||
if GetOrdValue <> 0 then
|
||||
Check := tbCheckBoxCheckedNormal
|
||||
else
|
||||
Check := tbCheckBoxUncheckedNormal;
|
||||
Details := ThemeServices.GetElementDetails(Check);
|
||||
Sz := ThemeServices.GetDetailSize(Details);
|
||||
Inc(BRect.Top, 3);
|
||||
BRect.Right := BRect.Left + Sz.cx;
|
||||
BRect.Bottom := BRect.Top + Sz.cy;
|
||||
ThemeServices.DrawElement(ACanvas.Handle, Details, BRect, nil);
|
||||
// Write text after the box
|
||||
BRect := ARect;
|
||||
Inc(BRect.Left, Sz.cx+2);
|
||||
end;
|
||||
inherited PropDrawValue(ACanvas, BRect, AState);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
{ TInt64PropertyEditor }
|
||||
|
||||
@ -5812,6 +5818,16 @@ begin
|
||||
TPropHookRefreshPropertyValues(FHandlers[htRefreshPropertyValues][i])();
|
||||
end;
|
||||
|
||||
function TPropertyEditorHook.GetCheckboxForBoolean: Boolean;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
Result:=False;
|
||||
i:=GetHandlerCount(htGetCheckboxForBoolean);
|
||||
if i > 0 then
|
||||
TPropHookGetCheckboxForBoolean(FHandlers[htGetCheckboxForBoolean][0])(Result);
|
||||
end;
|
||||
|
||||
procedure TPropertyEditorHook.RemoveAllHandlersForObject(const HandlerObject: TObject);
|
||||
var
|
||||
HookType: TPropHookType;
|
||||
@ -6097,8 +6113,7 @@ begin
|
||||
RemoveHandler(htSetSelectedPersistents,TMethod(OnSetSelection));
|
||||
end;
|
||||
|
||||
procedure TPropertyEditorHook.AddHandlerGetObject(
|
||||
const OnGetObject: TPropHookGetObject);
|
||||
procedure TPropertyEditorHook.AddHandlerGetObject(const OnGetObject: TPropHookGetObject);
|
||||
begin
|
||||
AddHandler(htGetObject,TMethod(OnGetObject));
|
||||
end;
|
||||
@ -6191,6 +6206,12 @@ begin
|
||||
RemoveHandler(htAddDependency,TMethod(OnAddDependency));
|
||||
end;
|
||||
|
||||
procedure TPropertyEditorHook.AddHandlerGetCheckboxForBoolean(
|
||||
const OnGetCheckboxForBoolean: TPropHookGetCheckboxForBoolean);
|
||||
begin
|
||||
AddHandler(htGetCheckboxForBoolean,TMethod(OnGetCheckboxForBoolean));
|
||||
end;
|
||||
|
||||
procedure TPropertyEditorHook.SetLookupRoot(APersistent: TPersistent);
|
||||
var
|
||||
i: Integer;
|
||||
|
@ -72,18 +72,18 @@ object OIOptionsFrame: TOIOptionsFrame
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 7
|
||||
Caption = 'OIOptionsGroupBox'
|
||||
ClientHeight = 102
|
||||
ClientWidth = 626
|
||||
TabOrder = 1
|
||||
object OIShowHintCheckBox: TCheckBox
|
||||
ClientHeight = 136
|
||||
ClientWidth = 630
|
||||
TabOrder = 3
|
||||
object OICheckboxForBooleanCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = OIOptsCenterLabel
|
||||
AnchorSideTop.Control = OIOptionsGroupBox
|
||||
Left = 313
|
||||
Height = 18
|
||||
Top = 6
|
||||
Width = 155
|
||||
Width = 225
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'OIShowHintCheckBox'
|
||||
Caption = 'OICheckboxForBooleanCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
@ -104,7 +104,7 @@ object OIOptionsFrame: TOIOptionsFrame
|
||||
end
|
||||
object OIBoldNonDefaultCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = OIOptsCenterLabel
|
||||
AnchorSideTop.Control = OIShowHintCheckBox
|
||||
AnchorSideTop.Control = OICheckboxForBooleanCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 313
|
||||
Height = 18
|
||||
@ -155,7 +155,6 @@ object OIOptionsFrame: TOIOptionsFrame
|
||||
Width = 187
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'OIShowStatusBarCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -201,6 +200,22 @@ object OIOptionsFrame: TOIOptionsFrame
|
||||
Width = 1
|
||||
ParentColor = False
|
||||
end
|
||||
object OIShowHintCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = OIOptionsGroupBox
|
||||
AnchorSideTop.Control = OIShowStatusBarCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 110
|
||||
Width = 155
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'OIShowHintCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 8
|
||||
end
|
||||
end
|
||||
object ObjectInspectorSpeedSettingsGroupBox: TGroupBox
|
||||
AnchorSideLeft.Control = ObjectInspectorColorsGroupBox
|
||||
@ -217,9 +232,9 @@ object OIOptionsFrame: TOIOptionsFrame
|
||||
BorderSpacing.Left = 7
|
||||
BorderSpacing.Bottom = 7
|
||||
Caption = 'ObjectInspectorSpeedSettingsGroupBox'
|
||||
ClientHeight = 151
|
||||
ClientWidth = 389
|
||||
TabOrder = 2
|
||||
ClientHeight = 145
|
||||
ClientWidth = 397
|
||||
TabOrder = 1
|
||||
object BtnUseDefaultLazarusSettings: TButton
|
||||
AnchorSideLeft.Control = ObjectInspectorSpeedSettingsGroupBox
|
||||
AnchorSideTop.Control = ObjectInspectorSpeedSettingsGroupBox
|
||||
@ -263,17 +278,17 @@ object OIOptionsFrame: TOIOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ObjectInspectorColorsGroupBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 237
|
||||
Height = 50
|
||||
Top = 180
|
||||
Width = 397
|
||||
Left = 233
|
||||
Height = 57
|
||||
Top = 171
|
||||
Width = 401
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 7
|
||||
Caption = 'OIMiscGroupBox'
|
||||
ClientHeight = 28
|
||||
ClientWidth = 389
|
||||
TabOrder = 3
|
||||
ClientHeight = 38
|
||||
ClientWidth = 397
|
||||
TabOrder = 2
|
||||
object OIDefaultItemHeightLabel: TLabel
|
||||
AnchorSideLeft.Control = OIMiscGroupBox
|
||||
AnchorSideTop.Control = OIDefaultItemHeightSpinEdit
|
||||
|
@ -51,6 +51,7 @@ type
|
||||
ooShowComponentTree,
|
||||
ooShowHints,
|
||||
ooAutoShow,
|
||||
ooCheckboxForBoolean,
|
||||
ooBoldNonDefault,
|
||||
ooDrawGridLines,
|
||||
ooShowGutter,
|
||||
@ -83,14 +84,14 @@ type
|
||||
OIDrawGridLinesCheckBox: TCheckBox;
|
||||
OIOptionsGroupBox: TGroupBox;
|
||||
OIShowComponentTreeCheckBox: TCheckBox;
|
||||
OIShowStatusBarCheckBox: TCheckBox;
|
||||
OIShowHintCheckBox: TCheckBox;
|
||||
OIShowStatusBarCheckBox: TCheckBox;
|
||||
OICheckboxForBooleanCheckBox: TCheckBox;
|
||||
OIShowInfoBoxCheckBox: TCheckBox;
|
||||
procedure BtnUseDefaultDelphiSettingsClick(Sender: TObject);
|
||||
procedure BtnUseDefaultLazarusSettingsClick(Sender: TObject);
|
||||
procedure ColorBoxChange(Sender: TObject);
|
||||
procedure ColorsListBoxGetColors(Sender: TCustomColorListBox;
|
||||
Items: TStrings);
|
||||
procedure ColorsListBoxGetColors(Sender: TCustomColorListBox; Items: TStrings);
|
||||
procedure ColorsListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||
private
|
||||
FLoaded: Boolean;
|
||||
@ -125,14 +126,15 @@ const
|
||||
{ ocReadOnly } DefReadOnlyColor
|
||||
);
|
||||
Options: (
|
||||
{ ooShowComponentTree } True,
|
||||
{ ooShowHints } False,
|
||||
{ ooAutoShow } True,
|
||||
{ ooBoldNonDefault } True,
|
||||
{ ooDrawGridLines } True,
|
||||
{ ooShowGutter } True,
|
||||
{ ooShowStatusBar } True,
|
||||
{ ooShowInfoBox } True
|
||||
{ ooShowComponentTree } True,
|
||||
{ ooShowHints } False,
|
||||
{ ooAutoShow } True,
|
||||
{ ooCheckboxForBoolean } False,
|
||||
{ ooBoldNonDefault } True,
|
||||
{ ooDrawGridLines } True,
|
||||
{ ooShowGutter } True,
|
||||
{ ooShowStatusBar } True,
|
||||
{ ooShowInfoBox } True
|
||||
);
|
||||
);
|
||||
|
||||
@ -152,14 +154,15 @@ const
|
||||
{ ocReadOnly } clGrayText
|
||||
);
|
||||
Options: (
|
||||
{ ooShowComponentTree } True,
|
||||
{ ooShowHints } False,
|
||||
{ ooAutoShow } True,
|
||||
{ ooBoldNonDefault } True,
|
||||
{ ooDrawGridLines } False,
|
||||
{ ooShowGutter } True,
|
||||
{ ooShowStatusBar } True,
|
||||
{ ooShowInfoBox } False
|
||||
{ ooShowComponentTree } True,
|
||||
{ ooShowHints } False,
|
||||
{ ooAutoShow } True,
|
||||
{ ooCheckboxForBoolean } False,
|
||||
{ ooBoldNonDefault } True,
|
||||
{ ooDrawGridLines } False,
|
||||
{ ooShowGutter } True,
|
||||
{ ooShowStatusBar } True,
|
||||
{ ooShowInfoBox } False
|
||||
);
|
||||
);
|
||||
|
||||
@ -171,9 +174,14 @@ begin
|
||||
OIMiscGroupBox.Caption := dlgOIMiscellaneous;
|
||||
OIOptionsGroupBox.Caption := dlgOIOptions;
|
||||
ObjectInspectorSpeedSettingsGroupBox.Caption := dlgOISpeedSettings;
|
||||
|
||||
BtnUseDefaultLazarusSettings.Caption := dlgOIUseDefaultLazarusSettings;
|
||||
BtnUseDefaultDelphiSettings.Caption := dlgOIUseDefaultDelphiSettings;
|
||||
OIDefaultItemHeightLabel.Caption := dlgOIItemHeight;
|
||||
OIDefaultItemHeightSpinEdit.Hint := dlgHeightOfOnePropertyInGrid;
|
||||
|
||||
OIAutoShowCheckBox.Caption := lisAutoShowObjectInspector;
|
||||
OIAutoShowCheckBox.Hint := lisObjectInspectorBecomesVisible;
|
||||
OIShowComponentTreeCheckBox.Caption := lisShowComponentTreeInObjectInspector;
|
||||
OIShowComponentTreeCheckBox.Hint := lisShowsAllControlsInTreeHierarchy;
|
||||
OIShowInfoBoxCheckBox.Caption := lisShowInfoBoxInObjectInspector;
|
||||
@ -183,17 +191,14 @@ begin
|
||||
OIShowHintCheckBox.Caption := lisShowHintsInObjectInspector;
|
||||
OIShowHintCheckBox.Hint := lisHintAtPropertysNameShowsDescription;
|
||||
|
||||
OIAutoShowCheckBox.Caption := lisAutoShowObjectInspector;
|
||||
OIAutoShowCheckBox.Hint := lisObjectInspectorBecomesVisible;
|
||||
OICheckboxForBooleanCheckBox.Caption := lisUseCheckBoxForBooleanValues;
|
||||
OICheckboxForBooleanCheckBox.Hint := lisDefaultIsComboboxWithTrueAndFalse;
|
||||
OIBoldNonDefaultCheckBox.Caption := lisBoldNonDefaultObjectInspector;
|
||||
OIBoldNonDefaultCheckBox.Hint := lisValuesThatAreChangedFromDefault;
|
||||
OIShowGutterCheckBox.Caption := lisShowGutterInObjectInspector;
|
||||
OIDrawGridLinesCheckBox.Caption := lisDrawGridLinesObjectInspector;
|
||||
OIDrawGridLinesCheckBox.Hint := lisHorizontalLinesBetweenProperties;
|
||||
|
||||
BtnUseDefaultLazarusSettings.Caption := dlgOIUseDefaultLazarusSettings;
|
||||
BtnUseDefaultDelphiSettings.Caption := dlgOIUseDefaultDelphiSettings;
|
||||
|
||||
FLoaded := False;
|
||||
end;
|
||||
|
||||
@ -228,6 +233,7 @@ begin
|
||||
OIShowComponentTreeCheckBox.Checked := ASettings.Options[ooShowComponentTree];
|
||||
OIShowHintCheckBox.Checked := ASettings.Options[ooShowHints];
|
||||
OIAutoShowCheckBox.Checked := ASettings.Options[ooAutoShow];
|
||||
OICheckboxForBooleanCheckBox.Checked := ASettings.Options[ooCheckboxForBoolean];
|
||||
OIBoldNonDefaultCheckBox.Checked := ASettings.Options[ooBoldNonDefault];
|
||||
OIDrawGridLinesCheckBox.Checked := ASettings.Options[ooDrawGridLines];
|
||||
OIShowGutterCheckBox.Checked := ASettings.Options[ooShowGutter];
|
||||
@ -287,6 +293,7 @@ begin
|
||||
ASettings.Options[ooShowComponentTree] := o.ShowComponentTree;
|
||||
ASettings.Options[ooShowHints] := o.ShowHints;
|
||||
ASettings.Options[ooAutoShow] := o.AutoShow;
|
||||
ASettings.Options[ooCheckboxForBoolean] := o.CheckboxForBoolean;
|
||||
ASettings.Options[ooBoldNonDefault] := o.BoldNonDefaultValues;
|
||||
ASettings.Options[ooDrawGridLines] := o.DrawGridLines;
|
||||
ASettings.Options[ooShowGutter] := o.ShowGutter;
|
||||
@ -317,6 +324,7 @@ begin
|
||||
o.ShowComponentTree := OIShowComponentTreeCheckBox.Checked;
|
||||
o.ShowHints := OIShowHintCheckBox.Checked;
|
||||
o.AutoShow := OIAutoShowCheckBox.Checked;
|
||||
o.CheckboxForBoolean := OICheckboxForBooleanCheckBox.Checked;
|
||||
o.BoldNonDefaultValues := OIBoldNonDefaultCheckBox.Checked;
|
||||
o.DrawGridLines := OIDrawGridLinesCheckBox.Checked;
|
||||
o.ShowGutter := OIShowGutterCheckBox.Checked;
|
||||
|
@ -1395,6 +1395,8 @@ resourcestring
|
||||
lisShowsAllControlsInTreeHierarchy = 'Shows all controls in tree hierarchy.';
|
||||
lisShowHintsInObjectInspector = 'Show hints';
|
||||
lisHintAtPropertysNameShowsDescription = 'A hint at property''s name shows its description.';
|
||||
lisUseCheckboxForBooleanValues = 'Use CheckBox for Boolean values';
|
||||
lisDefaultIsComboboxWithTrueAndFalse = 'The default is ComboBox with "True and "False" selections';
|
||||
lisAutoShowObjectInspector = 'Auto show';
|
||||
lisObjectInspectorBecomesVisible = 'Object Inspector becomes visible '
|
||||
+'when components are selected in designer.';
|
||||
|
Loading…
Reference in New Issue
Block a user