mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-05 01:38:37 +02:00
IDE+IDEIntf+LCL: moved LCLPlatformDirNames to LCL interfacebase
git-svn-id: trunk@14469 -
This commit is contained in:
parent
a2be38a14b
commit
3b5e8c18da
@ -35,7 +35,7 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, AVL_Tree,
|
Classes, SysUtils, AVL_Tree,
|
||||||
// LCL
|
// LCL
|
||||||
LCLProc, Dialogs, FileUtil, Forms, Controls,
|
InterfaceBase, LCLProc, Dialogs, FileUtil, Forms, Controls,
|
||||||
// codetools
|
// codetools
|
||||||
BasicCodeTools, CodeToolManager, DefineTemplates,
|
BasicCodeTools, CodeToolManager, DefineTemplates,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
|
@ -52,16 +52,6 @@ type
|
|||||||
TLCLPlatforms = set of TLCLPlatform;
|
TLCLPlatforms = set of TLCLPlatform;
|
||||||
|
|
||||||
const
|
const
|
||||||
LCLPlatformDirNames: array[TLCLPlatform] of string = (
|
|
||||||
'gtk',
|
|
||||||
'gtk2',
|
|
||||||
'win32',
|
|
||||||
'wince',
|
|
||||||
'carbon',
|
|
||||||
'qt',
|
|
||||||
'fpgui',
|
|
||||||
'nogui'
|
|
||||||
);
|
|
||||||
LCLPlatformDisplayNames: array[TLCLPlatform] of string = (
|
LCLPlatformDisplayNames: array[TLCLPlatform] of string = (
|
||||||
'gtk',
|
'gtk',
|
||||||
'gtk 2 (beta)',
|
'gtk 2 (beta)',
|
||||||
|
@ -94,7 +94,8 @@ begin
|
|||||||
Down := True;
|
Down := True;
|
||||||
AllowAllUp := True;
|
AllowAllUp := True;
|
||||||
|
|
||||||
IDEImages.Images_16.GetBitmap(IDEImages.LoadImage(16, WidgetSetImageNames[P]), Glyph);
|
IDEImages.Images_16.GetBitmap(
|
||||||
|
IDEImages.LoadImage(16, 'issue_'+LCLPlatformDirNames[P]), Glyph);
|
||||||
ShowHint := True;
|
ShowHint := True;
|
||||||
Hint := LCLPlatformDisplayNames[P];
|
Hint := LCLPlatformDisplayNames[P];
|
||||||
OnClick := @NameFilterEditChange;
|
OnClick := @NameFilterEditChange;
|
||||||
@ -236,7 +237,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
ID := PtrInt(Issues.Objects[I]);
|
ID := PtrInt(Issues.Objects[I]);
|
||||||
|
|
||||||
ImageIndex := IDEImages.LoadImage(16, WidgetSetImageNames[FIssueList[ID].WidgetSet]);
|
ImageIndex := IDEImages.LoadImage(16,
|
||||||
|
'issue_'+LCLPlatformDirNames[FIssueList[ID].WidgetSet]);
|
||||||
StateIndex := ImageIndex;
|
StateIndex := ImageIndex;
|
||||||
SelectedIndex := ImageIndex;
|
SelectedIndex := ImageIndex;
|
||||||
|
|
||||||
|
@ -37,7 +37,8 @@ interface
|
|||||||
uses
|
uses
|
||||||
InterfaceBase, Forms, SysUtils, Buttons, Types, Classes, Graphics, GraphType,
|
InterfaceBase, Forms, SysUtils, Buttons, Types, Classes, Graphics, GraphType,
|
||||||
StdCtrls, LCLType, LCLIntf, LCLProc, Controls, ComCtrls, ExtCtrls, TypInfo,
|
StdCtrls, LCLType, LCLIntf, LCLProc, Controls, ComCtrls, ExtCtrls, TypInfo,
|
||||||
LMessages, LResources, LazConfigStorage, Menus, Dialogs, ObjInspStrConsts,
|
LMessages, LResources, LazConfigStorage, Menus, Dialogs,
|
||||||
|
ObjInspStrConsts,
|
||||||
PropEdits, GraphPropEdits, ListViewPropEdit, ImageListEditor,
|
PropEdits, GraphPropEdits, ListViewPropEdit, ImageListEditor,
|
||||||
ComponentTreeView, ComponentEditors, IDEImagesIntf;
|
ComponentTreeView, ComponentEditors, IDEImagesIntf;
|
||||||
|
|
||||||
@ -567,9 +568,9 @@ type
|
|||||||
DeletePopupmenuItem: TMenuItem;
|
DeletePopupmenuItem: TMenuItem;
|
||||||
EventGrid: TOICustomPropertyGrid;
|
EventGrid: TOICustomPropertyGrid;
|
||||||
FavouriteGrid: TOICustomPropertyGrid;
|
FavouriteGrid: TOICustomPropertyGrid;
|
||||||
IssuesGrid: TOICustomPropertyGrid;
|
RestrictedGrid: TOICustomPropertyGrid;
|
||||||
IssuesPanel: TPanel;
|
RestrictedPanel: TPanel;
|
||||||
IssuesInnerPanel: TPanel;
|
RestrictedInnerPanel: TPanel;
|
||||||
WidgetSetsIssuesLabel: TLabel;
|
WidgetSetsIssuesLabel: TLabel;
|
||||||
WidgetSetsIssuesBox: TPaintBox;
|
WidgetSetsIssuesBox: TPaintBox;
|
||||||
ComponentIssuesLabel: TLabel;
|
ComponentIssuesLabel: TLabel;
|
||||||
@ -608,7 +609,7 @@ type
|
|||||||
procedure OnShowOptionsPopupMenuItemClick(Sender: TObject);
|
procedure OnShowOptionsPopupMenuItemClick(Sender: TObject);
|
||||||
procedure OnShowComponentTreePopupMenuItemClick(Sender: TObject);
|
procedure OnShowComponentTreePopupMenuItemClick(Sender: TObject);
|
||||||
procedure OnMainPopupMenuPopup(Sender: TObject);
|
procedure OnMainPopupMenuPopup(Sender: TObject);
|
||||||
procedure IssuePageShow(Sender: TObject);
|
procedure RestrictedPageShow(Sender: TObject);
|
||||||
procedure WidgetSetIssuesPaint(Sender: TObject);
|
procedure WidgetSetIssuesPaint(Sender: TObject);
|
||||||
procedure ComponentIssuesPaint(Sender: TObject);
|
procedure ComponentIssuesPaint(Sender: TObject);
|
||||||
procedure DoUpdateIssues;
|
procedure DoUpdateIssues;
|
||||||
@ -722,36 +723,22 @@ const
|
|||||||
'PropertyPage',
|
'PropertyPage',
|
||||||
'EventPage',
|
'EventPage',
|
||||||
'FavouritePage',
|
'FavouritePage',
|
||||||
'IssuesPage'
|
'RestrictedPage'
|
||||||
);
|
);
|
||||||
DefaultOIGridNames: array[TObjectInspectorPage] of shortstring = (
|
DefaultOIGridNames: array[TObjectInspectorPage] of shortstring = (
|
||||||
'PropertyGrid',
|
'PropertyGrid',
|
||||||
'EventGrid',
|
'EventGrid',
|
||||||
'FavouriteGrid',
|
'FavouriteGrid',
|
||||||
'IssuesGrid'
|
'RestrictedGrid'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
function CompareOIFavouriteProperties(Data1, Data2: Pointer): integer;
|
function CompareOIFavouriteProperties(Data1, Data2: Pointer): integer;
|
||||||
|
|
||||||
|
|
||||||
const
|
|
||||||
WidgetSetImageNames: array [TLCLPlatform] of shortstring = (
|
|
||||||
'issue_gtk',
|
|
||||||
'issue_gtk2',
|
|
||||||
'issue_win32',
|
|
||||||
'issue_wince',
|
|
||||||
'issue_carbon',
|
|
||||||
'issue_qt',
|
|
||||||
'issue_fpgui',
|
|
||||||
'issue_nogui'
|
|
||||||
);
|
|
||||||
|
|
||||||
//******************************************************************************
|
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
const
|
const
|
||||||
ScrollBarWidth=0;
|
ScrollBarWidth=0;
|
||||||
|
|
||||||
@ -2262,7 +2249,8 @@ begin
|
|||||||
if Platform in CurRow.FWidgetSets then
|
if Platform in CurRow.FWidgetSets then
|
||||||
begin
|
begin
|
||||||
Dec(X, IDEImages.Images_16.Width);
|
Dec(X, IDEImages.Images_16.Width);
|
||||||
IDEImages.Images_16.Draw(Canvas, X, Y, IDEImages.LoadImage(16, WidgetSetImageNames[Platform]));
|
IDEImages.Images_16.Draw(Canvas, X, Y,
|
||||||
|
IDEImages.LoadImage(16, 'issue_'+LCLPlatformDirNames[Platform]));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Font:=OldFont;
|
Font:=OldFont;
|
||||||
@ -3355,7 +3343,7 @@ begin
|
|||||||
if FIssues = AValue then exit;
|
if FIssues = AValue then exit;
|
||||||
//DebugLn('TObjectInspectorDlg.SetIssues Count: ', DbgS(AValue.Count));
|
//DebugLn('TObjectInspectorDlg.SetIssues Count: ', DbgS(AValue.Count));
|
||||||
FIssues := AValue;
|
FIssues := AValue;
|
||||||
IssuesGrid.Favourites := FIssues;
|
RestrictedGrid.Favourites := FIssues;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TObjectInspectorDlg.SetOnShowOptions(const AValue: TNotifyEvent);
|
procedure TObjectInspectorDlg.SetOnShowOptions(const AValue: TNotifyEvent);
|
||||||
@ -3460,7 +3448,7 @@ begin
|
|||||||
0: Result:=PropertyGrid;
|
0: Result:=PropertyGrid;
|
||||||
1: Result:=EventGrid;
|
1: Result:=EventGrid;
|
||||||
2: Result:=FavouriteGrid;
|
2: Result:=FavouriteGrid;
|
||||||
3: Result:=IssuesGrid;
|
3: Result:=RestrictedGrid;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3800,9 +3788,9 @@ begin
|
|||||||
NoteBook.Page[3].TabVisible := AValue;
|
NoteBook.Page[3].TabVisible := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TObjectInspectorDlg.IssuePageShow(Sender: TObject);
|
procedure TObjectInspectorDlg.RestrictedPageShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
//DebugLn('IssuePageShow');
|
//DebugLn('RestrictedPageShow');
|
||||||
DoUpdateIssues;
|
DoUpdateIssues;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3824,7 +3812,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
None := False;
|
None := False;
|
||||||
IDEImages.Images_16.Draw(WidgetSetsIssuesBox.Canvas, X, Y,
|
IDEImages.Images_16.Draw(WidgetSetsIssuesBox.Canvas, X, Y,
|
||||||
IDEImages.LoadImage(16, WidgetSetImageNames[Platform]));
|
IDEImages.LoadImage(16, 'issue_'+LCLPlatformDirNames[Platform]));
|
||||||
Inc(X, 16);
|
Inc(X, 16);
|
||||||
|
|
||||||
S := WidgetSetsIssuesBox.Canvas.TextExtent(IntToStr(Issues.WidgetSetRestrictions[Platform]));
|
S := WidgetSetsIssuesBox.Canvas.TextExtent(IntToStr(Issues.WidgetSetRestrictions[Platform]));
|
||||||
@ -3876,7 +3864,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
None := False;
|
None := False;
|
||||||
IDEImages.Images_16.Draw(WidgetSetsIssuesBox.Canvas, X, Y,
|
IDEImages.Images_16.Draw(WidgetSetsIssuesBox.Canvas, X, Y,
|
||||||
IDEImages.LoadImage(16, WidgetSetImageNames[Platform]));
|
IDEImages.LoadImage(16, 'issue_'+LCLPlatformDirNames[Platform]));
|
||||||
Inc(X, 16);
|
Inc(X, 16);
|
||||||
|
|
||||||
S := ComponentIssuesBox.Canvas.TextExtent(IntToStr(WidgetSetRestrictions[Platform]));
|
S := ComponentIssuesBox.Canvas.TextExtent(IntToStr(WidgetSetRestrictions[Platform]));
|
||||||
@ -3913,7 +3901,7 @@ begin
|
|||||||
FreeAndNil(PropertyGrid);
|
FreeAndNil(PropertyGrid);
|
||||||
FreeAndNil(EventGrid);
|
FreeAndNil(EventGrid);
|
||||||
FreeAndNil(FavouriteGrid);
|
FreeAndNil(FavouriteGrid);
|
||||||
FreeAndNil(IssuesGrid);
|
FreeAndNil(RestrictedGrid);
|
||||||
FreeAndNil(NoteBook);
|
FreeAndNil(NoteBook);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3940,10 +3928,10 @@ begin
|
|||||||
Page[2].Name:=DefaultOIPageNames[oipgpFavourite];
|
Page[2].Name:=DefaultOIPageNames[oipgpFavourite];
|
||||||
Page[2].TabVisible := ShowFavorites;
|
Page[2].TabVisible := ShowFavorites;
|
||||||
|
|
||||||
Pages.Add(oisIssues);
|
Pages.Add(oisRestricted);
|
||||||
Page[3].Name:=DefaultOIPageNames[oipgpRestricted];
|
Page[3].Name:=DefaultOIPageNames[oipgpRestricted];
|
||||||
Page[3].TabVisible := ShowIssues;
|
Page[3].TabVisible := ShowIssues;
|
||||||
Page[3].OnShow := @IssuePageShow;
|
Page[3].OnShow := @RestrictedPageShow;
|
||||||
|
|
||||||
PageIndex:=0;
|
PageIndex:=0;
|
||||||
PopupMenu:=MainPopupMenu;
|
PopupMenu:=MainPopupMenu;
|
||||||
@ -4006,12 +3994,12 @@ begin
|
|||||||
FavouriteGrid.Favourites:=FFavourites;
|
FavouriteGrid.Favourites:=FFavourites;
|
||||||
|
|
||||||
// issues grid
|
// issues grid
|
||||||
IssuesGrid:=TOICustomPropertyGrid.CreateWithParams(Self,PropertyEditorHook,
|
RestrictedGrid:=TOICustomPropertyGrid.CreateWithParams(Self,PropertyEditorHook,
|
||||||
[tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod
|
[tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat, tkSet, tkMethod
|
||||||
, tkSString, tkLString, tkAString, tkWString, tkVariant
|
, tkSString, tkLString, tkAString, tkWString, tkVariant
|
||||||
{, tkArray, tkRecord, tkInterface}, tkClass, tkObject, tkWChar, tkBool
|
{, tkArray, tkRecord, tkInterface}, tkClass, tkObject, tkWChar, tkBool
|
||||||
, tkInt64, tkQWord],FDefaultItemHeight);
|
, tkInt64, tkQWord],FDefaultItemHeight);
|
||||||
with IssuesGrid do begin
|
with RestrictedGrid do begin
|
||||||
Name:=DefaultOIGridNames[oipgpRestricted];
|
Name:=DefaultOIGridNames[oipgpRestricted];
|
||||||
Selection:=Self.FSelection;
|
Selection:=Self.FSelection;
|
||||||
Align:=alClient;
|
Align:=alClient;
|
||||||
@ -4024,30 +4012,30 @@ begin
|
|||||||
Parent:=NoteBook.Page[3];
|
Parent:=NoteBook.Page[3];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
IssuesPanel := TPanel.Create(Self);
|
RestrictedPanel := TPanel.Create(Self);
|
||||||
with IssuesPanel do
|
with RestrictedPanel do
|
||||||
begin
|
begin
|
||||||
Align := alTop;
|
Align := alTop;
|
||||||
BevelOuter := bvNone;
|
BevelOuter := bvNone;
|
||||||
Parent := NoteBook.Page[3];
|
Parent := NoteBook.Page[3];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
IssuesInnerPanel := TPanel.Create(Self);
|
RestrictedInnerPanel := TPanel.Create(Self);
|
||||||
with IssuesInnerPanel do
|
with RestrictedInnerPanel do
|
||||||
begin
|
begin
|
||||||
BevelOuter := bvNone;
|
BevelOuter := bvNone;
|
||||||
BorderSpacing.Around := 6;
|
BorderSpacing.Around := 6;
|
||||||
Parent := IssuesPanel;
|
Parent := RestrictedPanel;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
WidgetSetsIssuesLabel := TLabel.Create(Self);
|
WidgetSetsIssuesLabel := TLabel.Create(Self);
|
||||||
with WidgetSetsIssuesLabel do
|
with WidgetSetsIssuesLabel do
|
||||||
begin
|
begin
|
||||||
Caption := oisWidgetSetIssues;
|
Caption := oisWidgetSetRestrictions;
|
||||||
Top := 1;
|
Top := 1;
|
||||||
Align := alTop;
|
Align := alTop;
|
||||||
AutoSize := True;
|
AutoSize := True;
|
||||||
Parent := IssuesInnerPanel;
|
Parent := RestrictedInnerPanel;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
WidgetSetsIssuesBox := TPaintBox.Create(Self);
|
WidgetSetsIssuesBox := TPaintBox.Create(Self);
|
||||||
@ -4057,17 +4045,17 @@ begin
|
|||||||
Align := alTop;
|
Align := alTop;
|
||||||
Height := 24;
|
Height := 24;
|
||||||
OnPaint := @WidgetSetIssuesPaint;
|
OnPaint := @WidgetSetIssuesPaint;
|
||||||
Parent := IssuesInnerPanel;
|
Parent := RestrictedInnerPanel;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ComponentIssuesLabel := TLabel.Create(Self);
|
ComponentIssuesLabel := TLabel.Create(Self);
|
||||||
with ComponentIssuesLabel do
|
with ComponentIssuesLabel do
|
||||||
begin
|
begin
|
||||||
Caption := oisComponentIssues;
|
Caption := oisComponentRestrictions;
|
||||||
Top := 3;
|
Top := 3;
|
||||||
Align := alTop;
|
Align := alTop;
|
||||||
AutoSize := True;
|
AutoSize := True;
|
||||||
Parent := IssuesInnerPanel;
|
Parent := RestrictedInnerPanel;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ComponentIssuesBox := TPaintBox.Create(Self);
|
ComponentIssuesBox := TPaintBox.Create(Self);
|
||||||
@ -4077,11 +4065,11 @@ begin
|
|||||||
Align := alTop;
|
Align := alTop;
|
||||||
Height := 24;
|
Height := 24;
|
||||||
OnPaint := @ComponentIssuesPaint;
|
OnPaint := @ComponentIssuesPaint;
|
||||||
Parent := IssuesInnerPanel;
|
Parent := RestrictedInnerPanel;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
IssuesInnerPanel.AutoSize := True;
|
RestrictedInnerPanel.AutoSize := True;
|
||||||
IssuesPanel.AutoSize := True;
|
RestrictedPanel.AutoSize := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TObjectInspectorDlg.KeyDown(var Key: Word; Shift: TShiftState);
|
procedure TObjectInspectorDlg.KeyDown(var Key: Word; Shift: TShiftState);
|
||||||
@ -4188,7 +4176,7 @@ begin
|
|||||||
case Page of
|
case Page of
|
||||||
oipgpFavourite: Result:=FavouriteGrid;
|
oipgpFavourite: Result:=FavouriteGrid;
|
||||||
oipgpEvents: Result:=EventGrid;
|
oipgpEvents: Result:=EventGrid;
|
||||||
oipgpRestricted: Result:=IssuesGrid;
|
oipgpRestricted: Result:=RestrictedGrid;
|
||||||
else Result:=PropertyGrid;
|
else Result:=PropertyGrid;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -44,10 +44,10 @@ resourcestring
|
|||||||
oisProperties='Properties';
|
oisProperties='Properties';
|
||||||
oisEvents='Events';
|
oisEvents='Events';
|
||||||
oisFavorites = 'Favorites';
|
oisFavorites = 'Favorites';
|
||||||
oisIssues = 'Issues';
|
oisRestricted = 'Restricted';
|
||||||
|
|
||||||
oisWidgetSetIssues = 'General Widget Set issues: ';
|
oisWidgetSetRestrictions = 'General widget set restrictions: ';
|
||||||
oisComponentIssues = 'Component issues: ';
|
oisComponentRestrictions = 'Component restrictions: ';
|
||||||
|
|
||||||
|
|
||||||
//Object Inspector Popup Menu
|
//Object Inspector Popup Menu
|
||||||
|
@ -112,6 +112,18 @@ type
|
|||||||
end;
|
end;
|
||||||
TWidgetSetClass = class of TWidgetSet;
|
TWidgetSetClass = class of TWidgetSet;
|
||||||
|
|
||||||
|
const
|
||||||
|
LCLPlatformDirNames: array[TLCLPlatform] of string = (
|
||||||
|
'gtk',
|
||||||
|
'gtk2',
|
||||||
|
'win32',
|
||||||
|
'wince',
|
||||||
|
'carbon',
|
||||||
|
'qt',
|
||||||
|
'fpgui',
|
||||||
|
'nogui'
|
||||||
|
);
|
||||||
|
|
||||||
type
|
type
|
||||||
EInterfaceException = class(Exception);
|
EInterfaceException = class(Exception);
|
||||||
EInterfaceError = class(EInterfaceException);
|
EInterfaceError = class(EInterfaceException);
|
||||||
|
Loading…
Reference in New Issue
Block a user