mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 19:59:14 +02:00
Object Inspector: Adjust access visibility of controls which are created at run-time. RTTI is not needed.
git-svn-id: trunk@54342 -
This commit is contained in:
parent
62155bcd28
commit
eec043d29e
@ -8,11 +8,11 @@ object ObjectInspectorDlg: TObjectInspectorDlg
|
|||||||
ClientHeight = 669
|
ClientHeight = 669
|
||||||
ClientWidth = 300
|
ClientWidth = 300
|
||||||
KeyPreview = True
|
KeyPreview = True
|
||||||
LCLVersion = '1.5'
|
LCLVersion = '1.7'
|
||||||
object StatusBar: TStatusBar
|
object StatusBar: TStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 23
|
Height = 19
|
||||||
Top = 646
|
Top = 650
|
||||||
Width = 300
|
Width = 300
|
||||||
Panels = <
|
Panels = <
|
||||||
item
|
item
|
||||||
@ -24,11 +24,11 @@ object ObjectInspectorDlg: TObjectInspectorDlg
|
|||||||
end
|
end
|
||||||
object AvailPersistentComboBox: TComboBox
|
object AvailPersistentComboBox: TComboBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 23
|
Height = 28
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 300
|
Width = 300
|
||||||
Align = alTop
|
Align = alTop
|
||||||
ItemHeight = 15
|
ItemHeight = 14
|
||||||
OnCloseUp = AvailComboBoxCloseUp
|
OnCloseUp = AvailComboBoxCloseUp
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -36,23 +36,22 @@ object ObjectInspectorDlg: TObjectInspectorDlg
|
|||||||
object ComponentPanel: TPanel
|
object ComponentPanel: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 184
|
Height = 184
|
||||||
Top = 23
|
Top = 28
|
||||||
Width = 406
|
Width = 300
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 184
|
ClientHeight = 184
|
||||||
ClientWidth = 406
|
ClientWidth = 300
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object CompFilterEdit: TTreeFilterEdit
|
object CompFilterEdit: TTreeFilterEdit
|
||||||
AnchorSideLeft.Control = FilterLabel
|
AnchorSideLeft.Control = CompFilterLabel
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = FilterLabel
|
AnchorSideTop.Control = CompFilterLabel
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 92
|
Left = 84
|
||||||
Height = 28
|
Height = 28
|
||||||
Top = 3
|
Top = 0
|
||||||
Width = 311
|
Width = 213
|
||||||
UseFormActivate = True
|
|
||||||
ButtonWidth = 23
|
ButtonWidth = 23
|
||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
@ -60,11 +59,11 @@ object ObjectInspectorDlg: TObjectInspectorDlg
|
|||||||
MaxLength = 0
|
MaxLength = 0
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object FilterLabel: TLabel
|
object CompFilterLabel: TLabel
|
||||||
Left = 3
|
Left = 3
|
||||||
Height = 15
|
Height = 14
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 69
|
Width = 76
|
||||||
Caption = 'Co&mponents'
|
Caption = 'Co&mponents'
|
||||||
FocusControl = CompFilterEdit
|
FocusControl = CompFilterEdit
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
|
@ -257,7 +257,7 @@ type
|
|||||||
oiqeShowValue
|
oiqeShowValue
|
||||||
);
|
);
|
||||||
|
|
||||||
TOIPropertyHint = function(Sender: TObject; PointedRow: TOIPropertyGridRow;
|
TOIPropertyHintEvent = function(Sender: TObject; PointedRow: TOIPropertyGridRow;
|
||||||
out AHint: string): boolean of object;
|
out AHint: string): boolean of object;
|
||||||
|
|
||||||
TOIEditorFilterEvent = procedure(Sender: TObject; aEditor: TPropertyEditor;
|
TOIEditorFilterEvent = procedure(Sender: TObject; aEditor: TPropertyEditor;
|
||||||
@ -273,7 +273,7 @@ type
|
|||||||
FLayout: TOILayout;
|
FLayout: TOILayout;
|
||||||
FOnEditorFilter: TOIEditorFilterEvent;
|
FOnEditorFilter: TOIEditorFilterEvent;
|
||||||
FOnOIKeyDown: TKeyEvent;
|
FOnOIKeyDown: TKeyEvent;
|
||||||
FOnPropertyHint: TOIPropertyHint;
|
FOnPropertyHint: TOIPropertyHintEvent;
|
||||||
FOnSelectionChange: TNotifyEvent;
|
FOnSelectionChange: TNotifyEvent;
|
||||||
FReferencesColor: TColor;
|
FReferencesColor: TColor;
|
||||||
FReadOnlyColor: TColor;
|
FReadOnlyColor: TColor;
|
||||||
@ -516,7 +516,7 @@ type
|
|||||||
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
||||||
property OnOIKeyDown: TKeyEvent read FOnOIKeyDown write FOnOIKeyDown;
|
property OnOIKeyDown: TKeyEvent read FOnOIKeyDown write FOnOIKeyDown;
|
||||||
property OnSelectionChange: TNotifyEvent read FOnSelectionChange write FOnSelectionChange;
|
property OnSelectionChange: TNotifyEvent read FOnSelectionChange write FOnSelectionChange;
|
||||||
property OnPropertyHint: TOIPropertyHint read FOnPropertyHint write FOnPropertyHint;
|
property OnPropertyHint: TOIPropertyHintEvent read FOnPropertyHint write FOnPropertyHint;
|
||||||
property PropertyEditorHook: TPropertyEditorHook read FPropertyEditorHook
|
property PropertyEditorHook: TPropertyEditorHook read FPropertyEditorHook
|
||||||
write SetPropertyEditorHook;
|
write SetPropertyEditorHook;
|
||||||
property RowCount: integer read GetRowCount;
|
property RowCount: integer read GetRowCount;
|
||||||
@ -596,10 +596,11 @@ type
|
|||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
TOnAddAvailablePersistent = procedure(APersistent: TPersistent;
|
TAddAvailablePersistentEvent = procedure(APersistent: TPersistent;
|
||||||
var Allowed: boolean) of object;
|
var Allowed: boolean) of object;
|
||||||
//copy of TGetPersistentImageIndexEvent
|
//copy of TGetPersistentImageIndexEvent
|
||||||
TOnOINodeGetImageEvent = procedure(APersistent: TPersistent; var AImageIndex: integer) of object;
|
TOnOINodeGetImageEvent = procedure(APersistent: TPersistent;
|
||||||
|
var AImageIndex: integer) of object;
|
||||||
|
|
||||||
TOIFlag = (
|
TOIFlag = (
|
||||||
oifRebuildPropListsNeeded
|
oifRebuildPropListsNeeded
|
||||||
@ -609,14 +610,30 @@ type
|
|||||||
{ TObjectInspectorDlg }
|
{ TObjectInspectorDlg }
|
||||||
|
|
||||||
TObjectInspectorDlg = class(TForm)
|
TObjectInspectorDlg = class(TForm)
|
||||||
PropertyPanel: TPanel;
|
MainPopupMenu: TPopupMenu;
|
||||||
FilterLabel1: TLabel;
|
AvailPersistentComboBox: TComboBox;
|
||||||
PropFilterEdit: TListFilterEdit;
|
|
||||||
ComponentPanel: TPanel;
|
ComponentPanel: TPanel;
|
||||||
FilterLabel: TLabel;
|
CompFilterLabel: TLabel;
|
||||||
CompFilterEdit: TTreeFilterEdit;
|
CompFilterEdit: TTreeFilterEdit;
|
||||||
ComponentTree: TComponentTreeView;
|
StatusBar: TStatusBar;
|
||||||
// Menu items are created in constructor at run-time, not design time
|
procedure MainPopupMenuClose(Sender: TObject);
|
||||||
|
procedure OnMainPopupMenuPopup(Sender: TObject);
|
||||||
|
procedure AvailComboBoxCloseUp(Sender: TObject);
|
||||||
|
private
|
||||||
|
// These are created at run-time, no need for default published section.
|
||||||
|
PropertyPanel: TPanel;
|
||||||
|
PropFilterLabel: TLabel;
|
||||||
|
PropFilterEdit: TListFilterEdit;
|
||||||
|
RestrictedPanel: TPanel;
|
||||||
|
RestrictedInnerPanel: TPanel;
|
||||||
|
WidgetSetsRestrictedLabel: TLabel;
|
||||||
|
WidgetSetsRestrictedBox: TPaintBox;
|
||||||
|
ComponentRestrictedLabel: TLabel;
|
||||||
|
ComponentRestrictedBox: TPaintBox;
|
||||||
|
NoteBook: TPageControl;
|
||||||
|
Splitter1: TSplitter;
|
||||||
|
Splitter2: TSplitter;
|
||||||
|
// MenuItems
|
||||||
AddToFavoritesPopupMenuItem: TMenuItem;
|
AddToFavoritesPopupMenuItem: TMenuItem;
|
||||||
ViewRestrictedPropertiesPopupMenuItem: TMenuItem;
|
ViewRestrictedPropertiesPopupMenuItem: TMenuItem;
|
||||||
CopyPopupmenuItem: TMenuItem;
|
CopyPopupmenuItem: TMenuItem;
|
||||||
@ -636,32 +653,59 @@ type
|
|||||||
ShowStatusBarPopupMenuItem: TMenuItem;
|
ShowStatusBarPopupMenuItem: TMenuItem;
|
||||||
ShowOptionsPopupMenuItem: TMenuItem;
|
ShowOptionsPopupMenuItem: TMenuItem;
|
||||||
UndoPropertyPopupMenuItem: TMenuItem;
|
UndoPropertyPopupMenuItem: TMenuItem;
|
||||||
AvailPersistentComboBox: TComboBox;
|
// Variables
|
||||||
InfoPanel: TPanel;
|
FAutoShow: Boolean;
|
||||||
EventGrid: TOICustomPropertyGrid;
|
FCheckboxForBoolean: Boolean;
|
||||||
FavoriteGrid: TOICustomPropertyGrid;
|
FComponentEditor: TBaseComponentEditor;
|
||||||
RestrictedGrid: TOICustomPropertyGrid;
|
FDefaultItemHeight: integer;
|
||||||
RestrictedPanel: TPanel;
|
FEnableHookGetSelection: boolean;
|
||||||
RestrictedInnerPanel: TPanel;
|
FFavorites: TOIFavoriteProperties;
|
||||||
WidgetSetsRestrictedLabel: TLabel;
|
FFilter: TTypeKinds;
|
||||||
WidgetSetsRestrictedBox: TPaintBox;
|
FFlags: TOIFlags;
|
||||||
ComponentRestrictedLabel: TLabel;
|
FInfoBoxHeight: integer;
|
||||||
ComponentRestrictedBox: TPaintBox;
|
FLastActiveRowName: String;
|
||||||
MainPopupMenu: TPopupMenu;
|
FPropertyEditorHook: TPropertyEditorHook;
|
||||||
NoteBook: TPageControl;
|
FRefreshingSelectionCount: integer;
|
||||||
PropertyGrid: TOICustomPropertyGrid;
|
FRestricted: TOIRestrictedProperties;
|
||||||
Splitter1: TSplitter;
|
FSelection: TPersistentSelectionList;
|
||||||
Splitter2: TSplitter;
|
FSettingSelectionCount: integer;
|
||||||
StatusBar: TStatusBar;
|
FShowComponentTree: Boolean;
|
||||||
procedure AvailComboBoxCloseUp(Sender: TObject);
|
FShowFavorites: Boolean;
|
||||||
|
FShowInfoBox: Boolean;
|
||||||
|
FShowRestricted: Boolean;
|
||||||
|
FShowStatusBar: Boolean;
|
||||||
|
FStateOfHintsOnMainPopupMenu: Boolean;
|
||||||
|
FUpdateLock: integer;
|
||||||
|
FUpdatingAvailComboBox: Boolean;
|
||||||
|
// Events
|
||||||
|
FOnAddAvailablePersistent: TAddAvailablePersistentEvent;
|
||||||
|
FOnAddToFavorites: TNotifyEvent;
|
||||||
|
FOnAutoShow: TNotifyEvent;
|
||||||
|
FOnFindDeclarationOfProperty: TNotifyEvent;
|
||||||
|
FOnModified: TNotifyEvent;
|
||||||
|
FOnNodeGetImageIndex: TOnOINodeGetImageEvent;
|
||||||
|
FOnOIKeyDown: TKeyEvent;
|
||||||
|
FOnPropertyHint: TOIPropertyHintEvent;
|
||||||
|
FOnRemainingKeyDown: TKeyEvent;
|
||||||
|
FOnRemainingKeyUp: TKeyEvent;
|
||||||
|
FOnRemoveFromFavorites: TNotifyEvent;
|
||||||
|
FOnSelectionChange: TNotifyEvent;
|
||||||
|
FOnSelectPersistentsInOI: TNotifyEvent;
|
||||||
|
FOnShowOptions: TNotifyEvent;
|
||||||
|
FOnUpdateRestricted: TNotifyEvent;
|
||||||
|
FOnViewRestricted: TNotifyEvent;
|
||||||
|
// These event handlers are assigned at run-time, no need for default published section.
|
||||||
procedure ComponentTreeDblClick(Sender: TObject);
|
procedure ComponentTreeDblClick(Sender: TObject);
|
||||||
procedure ComponentTreeGetNodeImageIndex(APersistent: TPersistent; var AIndex: integer);
|
procedure ComponentTreeGetNodeImageIndex(APersistent: TPersistent; var AIndex: integer);
|
||||||
procedure ComponentTreeKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure ComponentTreeKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
procedure ComponentTreeSelectionChanged(Sender: TObject);
|
procedure ComponentTreeSelectionChanged(Sender: TObject);
|
||||||
procedure MainPopupMenuClose(Sender: TObject);
|
|
||||||
procedure OnGridKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure OnGridKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
procedure OnGridKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure OnGridKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
procedure OnGridDblClick(Sender: TObject);
|
procedure OnGridDblClick(Sender: TObject);
|
||||||
|
procedure OnGridModified(Sender: TObject);
|
||||||
|
procedure OnGridSelectionChange(Sender: TObject);
|
||||||
|
function OnGridPropertyHint(Sender: TObject; PointedRow: TOIPropertyGridRow;
|
||||||
|
out AHint: string): boolean;
|
||||||
procedure OnPropEditPopupClick(Sender: TObject);
|
procedure OnPropEditPopupClick(Sender: TObject);
|
||||||
procedure OnAddToFavoritesPopupmenuItemClick(Sender: TObject);
|
procedure OnAddToFavoritesPopupmenuItemClick(Sender: TObject);
|
||||||
procedure OnRemoveFromFavoritesPopupmenuItemClick(Sender: TObject);
|
procedure OnRemoveFromFavoritesPopupmenuItemClick(Sender: TObject);
|
||||||
@ -678,66 +722,31 @@ type
|
|||||||
procedure OnShowInfoBoxPopupMenuItemClick(Sender: TObject);
|
procedure OnShowInfoBoxPopupMenuItemClick(Sender: TObject);
|
||||||
procedure OnShowStatusBarPopupMenuItemClick(Sender: TObject);
|
procedure OnShowStatusBarPopupMenuItemClick(Sender: TObject);
|
||||||
procedure OnShowOptionsPopupMenuItemClick(Sender: TObject);
|
procedure OnShowOptionsPopupMenuItemClick(Sender: TObject);
|
||||||
procedure OnMainPopupMenuPopup(Sender: TObject);
|
|
||||||
procedure RestrictedPageShow(Sender: TObject);
|
procedure RestrictedPageShow(Sender: TObject);
|
||||||
procedure WidgetSetRestrictedPaint(Sender: TObject);
|
procedure WidgetSetRestrictedPaint(Sender: TObject);
|
||||||
procedure ComponentRestrictedPaint(Sender: TObject);
|
procedure ComponentRestrictedPaint(Sender: TObject);
|
||||||
procedure DoUpdateRestricted;
|
|
||||||
procedure DoViewRestricted;
|
|
||||||
procedure PropFilterEditAfterFilter(Sender: TObject);
|
procedure PropFilterEditAfterFilter(Sender: TObject);
|
||||||
procedure PropFilterEditResize(Sender: TObject);
|
procedure PropFilterEditResize(Sender: TObject);
|
||||||
procedure NoteBookPageChange(Sender: TObject);
|
procedure NoteBookPageChange(Sender: TObject);
|
||||||
private
|
|
||||||
FAutoShow: Boolean;
|
|
||||||
FCheckboxForBoolean: Boolean;
|
|
||||||
FComponentEditor: TBaseComponentEditor;
|
|
||||||
FDefaultItemHeight: integer;
|
|
||||||
FEnableHookGetSelection: boolean;
|
|
||||||
FFavorites: TOIFavoriteProperties;
|
|
||||||
FFilter: TTypeKinds;
|
|
||||||
FFlags: TOIFlags;
|
|
||||||
FInfoBoxHeight: integer;
|
|
||||||
FLastActiveRowName: String;
|
|
||||||
FOnAddAvailablePersistent: TOnAddAvailablePersistent;
|
|
||||||
FOnAddToFavorites: TNotifyEvent;
|
|
||||||
FOnAutoShow: TNotifyEvent;
|
|
||||||
FOnFindDeclarationOfProperty: TNotifyEvent;
|
|
||||||
FOnModified: TNotifyEvent;
|
|
||||||
FOnNodeGetImageIndex: TOnOINodeGetImageEvent;
|
|
||||||
FOnOIKeyDown: TKeyEvent;
|
|
||||||
FOnPropertyHint: TOIPropertyHint;
|
|
||||||
FOnRemainingKeyDown: TKeyEvent;
|
|
||||||
FOnRemainingKeyUp: TKeyEvent;
|
|
||||||
FOnRemoveFromFavorites: TNotifyEvent;
|
|
||||||
FOnSelectionChange: TNotifyEvent;
|
|
||||||
FOnSelectPersistentsInOI: TNotifyEvent;
|
|
||||||
FOnShowOptions: TNotifyEvent;
|
|
||||||
FOnUpdateRestricted: TNotifyEvent;
|
|
||||||
FOnViewRestricted: TNotifyEvent;
|
|
||||||
FPropertyEditorHook: TPropertyEditorHook;
|
|
||||||
FRefreshingSelectionCount: integer;
|
|
||||||
FRestricted: TOIRestrictedProperties;
|
|
||||||
FSelection: TPersistentSelectionList;
|
|
||||||
FSettingSelectionCount: integer;
|
|
||||||
FShowComponentTree: Boolean;
|
|
||||||
FShowFavorites: Boolean;
|
|
||||||
FShowInfoBox: Boolean;
|
|
||||||
FShowRestricted: Boolean;
|
|
||||||
FShowStatusBar: Boolean;
|
|
||||||
FStateOfHintsOnMainPopupMenu: Boolean;
|
|
||||||
FUpdateLock: integer;
|
|
||||||
FUpdatingAvailComboBox: Boolean;
|
|
||||||
function GetComponentPanelHeight: integer;
|
|
||||||
function GetGridControl(Page: TObjectInspectorPage): TOICustomPropertyGrid;
|
|
||||||
function GetInfoBoxHeight: integer;
|
|
||||||
function GetParentCandidates: TFPList;
|
|
||||||
procedure CreateBottomSplitter;
|
|
||||||
procedure CreateTopSplitter;
|
|
||||||
procedure DefSelectionVisibleInDesigner;
|
|
||||||
procedure DoChangeParentItemClick(Sender: TObject);
|
procedure DoChangeParentItemClick(Sender: TObject);
|
||||||
procedure DoCollectionAddItem(Sender: TObject);
|
procedure DoCollectionAddItem(Sender: TObject);
|
||||||
procedure DoComponentEditorVerbMenuItemClick(Sender: TObject);
|
procedure DoComponentEditorVerbMenuItemClick(Sender: TObject);
|
||||||
procedure DoZOrderItemClick(Sender: TObject);
|
procedure DoZOrderItemClick(Sender: TObject);
|
||||||
|
procedure TopSplitterMoved(Sender: TObject);
|
||||||
|
|
||||||
|
procedure DoModified(Sender: TObject);
|
||||||
|
// Methods
|
||||||
|
procedure DoUpdateRestricted;
|
||||||
|
procedure DoViewRestricted;
|
||||||
|
function GetComponentPanelHeight: integer;
|
||||||
|
function GetGridControl(Page: TObjectInspectorPage): TOICustomPropertyGrid;
|
||||||
|
function GetInfoBoxHeight: integer;
|
||||||
|
function GetParentCandidates: TFPList;
|
||||||
|
function GetSelectedPersistent: TPersistent;
|
||||||
|
function GetComponentEditorForSelection: TBaseComponentEditor;
|
||||||
|
procedure CreateBottomSplitter;
|
||||||
|
procedure CreateTopSplitter;
|
||||||
|
procedure DefSelectionVisibleInDesigner;
|
||||||
procedure RestrictedPaint(
|
procedure RestrictedPaint(
|
||||||
ABox: TPaintBox; const ARestrictions: TWidgetSetRestrictionsArray);
|
ABox: TPaintBox; const ARestrictions: TWidgetSetRestrictionsArray);
|
||||||
procedure SetComponentEditor(const AValue: TBaseComponentEditor);
|
procedure SetComponentEditor(const AValue: TBaseComponentEditor);
|
||||||
@ -757,29 +766,29 @@ type
|
|||||||
procedure SetShowRestricted(const AValue: Boolean);
|
procedure SetShowRestricted(const AValue: Boolean);
|
||||||
procedure SetShowStatusBar(const AValue: Boolean);
|
procedure SetShowStatusBar(const AValue: Boolean);
|
||||||
procedure ShowNextPage(Delta: integer);
|
procedure ShowNextPage(Delta: integer);
|
||||||
procedure TopSplitterMoved(Sender: TObject);
|
|
||||||
protected
|
|
||||||
function PersistentToString(APersistent: TPersistent): string;
|
function PersistentToString(APersistent: TPersistent): string;
|
||||||
procedure AddPersistentToList(APersistent: TPersistent; List: TStrings);
|
procedure AddPersistentToList(APersistent: TPersistent; List: TStrings);
|
||||||
procedure HookLookupRootChange;
|
procedure HookLookupRootChange;
|
||||||
procedure OnGridModified(Sender: TObject);
|
|
||||||
procedure OnGridSelectionChange(Sender: TObject);
|
|
||||||
function OnGridPropertyHint(Sender: TObject; PointedRow: TOIPropertyGridRow;
|
|
||||||
out AHint: string): boolean;
|
|
||||||
procedure FillPersistentComboBox;
|
procedure FillPersistentComboBox;
|
||||||
procedure SetAvailComboBoxText;
|
procedure SetAvailComboBoxText;
|
||||||
procedure HookGetSelection(const ASelection: TPersistentSelectionList);
|
procedure HookGetSelection(const ASelection: TPersistentSelectionList);
|
||||||
procedure HookSetSelection(const ASelection: TPersistentSelectionList);
|
procedure HookSetSelection(const ASelection: TPersistentSelectionList);
|
||||||
procedure DestroyNoteBook;
|
procedure DestroyNoteBook;
|
||||||
procedure CreateNoteBook;
|
procedure CreateNoteBook;
|
||||||
|
protected
|
||||||
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
|
||||||
procedure KeyUp(var Key: Word; Shift: TShiftState); override;
|
procedure KeyUp(var Key: Word; Shift: TShiftState); override;
|
||||||
procedure Resize; override;
|
procedure Resize; override;
|
||||||
procedure DoModified(Sender: TObject);
|
|
||||||
function GetSelectedPersistent: TPersistent;
|
|
||||||
function GetComponentEditorForSelection: TBaseComponentEditor;
|
|
||||||
property ComponentEditor: TBaseComponentEditor read FComponentEditor write SetComponentEditor;
|
|
||||||
public
|
public
|
||||||
|
// These are created at run-time, no need for default published section.
|
||||||
|
ComponentTree: TComponentTreeView;
|
||||||
|
InfoPanel: TPanel;
|
||||||
|
EventGrid: TOICustomPropertyGrid;
|
||||||
|
FavoriteGrid: TOICustomPropertyGrid;
|
||||||
|
RestrictedGrid: TOICustomPropertyGrid;
|
||||||
|
PropertyGrid: TOICustomPropertyGrid;
|
||||||
|
//
|
||||||
constructor Create(AnOwner: TComponent); override;
|
constructor Create(AnOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure RefreshSelection;
|
procedure RefreshSelection;
|
||||||
@ -799,6 +808,7 @@ type
|
|||||||
procedure ActivateGrid(Grid: TOICustomPropertyGrid);
|
procedure ActivateGrid(Grid: TOICustomPropertyGrid);
|
||||||
procedure FocusGrid(Grid: TOICustomPropertyGrid = nil);
|
procedure FocusGrid(Grid: TOICustomPropertyGrid = nil);
|
||||||
public
|
public
|
||||||
|
property ComponentEditor: TBaseComponentEditor read FComponentEditor write SetComponentEditor;
|
||||||
property ComponentPanelHeight: integer read GetComponentPanelHeight
|
property ComponentPanelHeight: integer read GetComponentPanelHeight
|
||||||
write SetComponentPanelHeight;
|
write SetComponentPanelHeight;
|
||||||
property DefaultItemHeight: integer read FDefaultItemHeight
|
property DefaultItemHeight: integer read FDefaultItemHeight
|
||||||
@ -810,7 +820,19 @@ type
|
|||||||
property GridControl[Page: TObjectInspectorPage]: TOICustomPropertyGrid
|
property GridControl[Page: TObjectInspectorPage]: TOICustomPropertyGrid
|
||||||
read GetGridControl;
|
read GetGridControl;
|
||||||
property InfoBoxHeight: integer read GetInfoBoxHeight write SetInfoBoxHeight;
|
property InfoBoxHeight: integer read GetInfoBoxHeight write SetInfoBoxHeight;
|
||||||
property OnAddAvailPersistent: TOnAddAvailablePersistent
|
property PropertyEditorHook: TPropertyEditorHook read FPropertyEditorHook
|
||||||
|
write SetPropertyEditorHook;
|
||||||
|
property RestrictedProps: TOIRestrictedProperties read FRestricted write SetRestricted;
|
||||||
|
property Selection: TPersistentSelectionList read FSelection write SetSelection;
|
||||||
|
property AutoShow: Boolean read FAutoShow write FAutoShow;
|
||||||
|
property ShowComponentTree: Boolean read FShowComponentTree write SetShowComponentTree;
|
||||||
|
property ShowFavorites: Boolean read FShowFavorites write SetShowFavorites;
|
||||||
|
property ShowInfoBox: Boolean read FShowInfoBox write SetShowInfoBox;
|
||||||
|
property ShowRestricted: Boolean read FShowRestricted write SetShowRestricted;
|
||||||
|
property ShowStatusBar: Boolean read FShowStatusBar write SetShowStatusBar;
|
||||||
|
property LastActiveRowName: string read FLastActiveRowName;
|
||||||
|
// Events
|
||||||
|
property OnAddAvailPersistent: TAddAvailablePersistentEvent
|
||||||
read FOnAddAvailablePersistent write FOnAddAvailablePersistent;
|
read FOnAddAvailablePersistent write FOnAddAvailablePersistent;
|
||||||
property OnAddToFavorites: TNotifyEvent read FOnAddToFavorites write FOnAddToFavorites;
|
property OnAddToFavorites: TNotifyEvent read FOnAddToFavorites write FOnAddToFavorites;
|
||||||
property OnAutoShow: TNotifyEvent read FOnAutoShow write FOnAutoShow;
|
property OnAutoShow: TNotifyEvent read FOnAutoShow write FOnAutoShow;
|
||||||
@ -818,7 +840,7 @@ type
|
|||||||
write FOnFindDeclarationOfProperty;
|
write FOnFindDeclarationOfProperty;
|
||||||
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
||||||
property OnOIKeyDown: TKeyEvent read FOnOIKeyDown write FOnOIKeyDown;
|
property OnOIKeyDown: TKeyEvent read FOnOIKeyDown write FOnOIKeyDown;
|
||||||
property OnPropertyHint: TOIPropertyHint read FOnPropertyHint write FOnPropertyHint;
|
property OnPropertyHint: TOIPropertyHintEvent read FOnPropertyHint write FOnPropertyHint;
|
||||||
property OnRemainingKeyDown: TKeyEvent read FOnRemainingKeyDown
|
property OnRemainingKeyDown: TKeyEvent read FOnRemainingKeyDown
|
||||||
write FOnRemainingKeyDown;
|
write FOnRemainingKeyDown;
|
||||||
property OnRemainingKeyUp: TKeyEvent read FOnRemainingKeyUp
|
property OnRemainingKeyUp: TKeyEvent read FOnRemainingKeyUp
|
||||||
@ -834,17 +856,6 @@ type
|
|||||||
property OnViewRestricted: TNotifyEvent read FOnViewRestricted write FOnViewRestricted;
|
property OnViewRestricted: TNotifyEvent read FOnViewRestricted write FOnViewRestricted;
|
||||||
property OnNodeGetImageIndex : TOnOINodeGetImageEvent read FOnNodeGetImageIndex
|
property OnNodeGetImageIndex : TOnOINodeGetImageEvent read FOnNodeGetImageIndex
|
||||||
write 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 AutoShow: Boolean read FAutoShow write FAutoShow;
|
|
||||||
property ShowComponentTree: Boolean read FShowComponentTree write SetShowComponentTree;
|
|
||||||
property ShowFavorites: Boolean read FShowFavorites write SetShowFavorites;
|
|
||||||
property ShowInfoBox: Boolean read FShowInfoBox write SetShowInfoBox;
|
|
||||||
property ShowRestricted: Boolean read FShowRestricted write SetShowRestricted;
|
|
||||||
property ShowStatusBar: Boolean read FShowStatusBar write SetShowStatusBar;
|
|
||||||
property LastActiveRowName: string read FLastActiveRowName;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -4191,7 +4202,7 @@ begin
|
|||||||
FFilter := DefaultOITypeKinds;
|
FFilter := DefaultOITypeKinds;
|
||||||
|
|
||||||
Caption := oisObjectInspector;
|
Caption := oisObjectInspector;
|
||||||
FilterLabel.Caption := oisBtnComponents;
|
CompFilterLabel.Caption := oisBtnComponents;
|
||||||
MainPopupMenu.Images := IDEImages.Images_16;
|
MainPopupMenu.Images := IDEImages.Images_16;
|
||||||
|
|
||||||
AddPopupMenuItem(AddToFavoritesPopupMenuItem,nil,'AddToFavoritePopupMenuItem',
|
AddPopupMenuItem(AddToFavoritesPopupMenuItem,nil,'AddToFavoritePopupMenuItem',
|
||||||
@ -4334,9 +4345,9 @@ begin
|
|||||||
Visible := True;
|
Visible := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FilterLabel1 := TLabel.Create(self);
|
PropFilterLabel := TLabel.Create(self);
|
||||||
PropFilterEdit:= TListFilterEdit.Create(self);
|
PropFilterEdit:= TListFilterEdit.Create(self);
|
||||||
with FilterLabel1 do
|
with PropFilterLabel do
|
||||||
begin
|
begin
|
||||||
Parent := PropertyPanel;
|
Parent := PropertyPanel;
|
||||||
Left := ScaleCoord96(5);
|
Left := ScaleCoord96(5);
|
||||||
@ -4349,9 +4360,9 @@ begin
|
|||||||
with PropFilterEdit do
|
with PropFilterEdit do
|
||||||
begin
|
begin
|
||||||
Parent := PropertyPanel;
|
Parent := PropertyPanel;
|
||||||
AnchorSideLeft.Control := FilterLabel1;
|
AnchorSideLeft.Control := PropFilterLabel;
|
||||||
AnchorSideLeft.Side := asrBottom;
|
AnchorSideLeft.Side := asrBottom;
|
||||||
AnchorSideTop.Control := FilterLabel1;
|
AnchorSideTop.Control := PropFilterLabel;
|
||||||
AnchorSideTop.Side := asrCenter;
|
AnchorSideTop.Side := asrCenter;
|
||||||
Left := ScaleCoord96(61);
|
Left := ScaleCoord96(61);
|
||||||
Top := ScaleCoord96(3);
|
Top := ScaleCoord96(3);
|
||||||
@ -4373,7 +4384,7 @@ destructor TObjectInspectorDlg.Destroy;
|
|||||||
begin
|
begin
|
||||||
FreeAndNil(FSelection);
|
FreeAndNil(FSelection);
|
||||||
FreeAndNil(FComponentEditor);
|
FreeAndNil(FComponentEditor);
|
||||||
FreeAndNil(FilterLabel1);
|
FreeAndNil(PropFilterLabel);
|
||||||
FreeAndNil(PropFilterEdit);
|
FreeAndNil(PropFilterEdit);
|
||||||
FreeAndNil(PropertyPanel);
|
FreeAndNil(PropertyPanel);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
|
Loading…
Reference in New Issue
Block a user