restored old tpanel.xpm

git-svn-id: trunk@8909 -
This commit is contained in:
mattias 2006-03-10 16:19:34 +00:00
parent 4d93dd90aa
commit 9272283138
17 changed files with 206 additions and 70 deletions

View File

@ -182,7 +182,7 @@ begin
LFMTree:=nil;
try
if CodeToolBoss.CheckLFM(PascalBuffer,LFMBuffer,LFMTree,
RootMustBeClassInIntf,ObjectsMustExists)
RootMustBeClassInIntf,ObjectsMustExists)
then begin
Result:=mrOk;
exit;

View File

@ -36,7 +36,8 @@ uses
Classes, SysUtils, LCLProc, Forms, Controls, Buttons, StdCtrls, Dialogs,
CodeToolManager, CodeAtom, CodeCache, CustomCodeTool, CodeTree,
PascalParserTool, FindDeclarationTool,
PropEdits, HelpIntf, HelpHTML, HelpFPDoc, MacroIntf, IDEWindowIntf, MsgIntf,
PropEdits, ObjectInspector, FormEditingIntf, ProjectIntf,
HelpIntf, HelpHTML, HelpFPDoc, MacroIntf, IDEWindowIntf, MsgIntf, LazIDEIntf,
LazarusIDEStrConsts, TransferMacros, DialogProcs, IDEOptionDefs,
EnvironmentOpts, AboutFrm, MsgView, Project, PackageDefs, MainBar,
OutputFilter, HelpOptions, MainIntf, LazConf, ExtCtrls, LResources,
@ -93,6 +94,7 @@ type
const CodePos: TPoint;
var ErrMsg: string): TShowHelpResult; override;
procedure ShowHelpForMessage(Line: integer); override;
procedure ShowHelpForObjectInspector(Sender: TObject); override;
public
property FCLHelpDB: THelpDatabase read FFCLHelpDB;
property FCLHelpDBPath: THelpBasePathObject read FFCLHelpDBPath;
@ -554,7 +556,7 @@ begin
ListOfPCodeXYPosition:=nil;
PascalHelpContextLists:=nil;
try
// get all possible declarations for this identifier
// get all possible declarations of this identifier
if CodeToolBoss.FindDeclarationAndOverload(CodeBuffer,CodePos.X,CodePos.Y,
ListOfPCodeXYPosition) then
begin
@ -616,6 +618,37 @@ begin
end;
end;
procedure THelpManager.ShowHelpForObjectInspector(Sender: TObject);
var
AnInspector: TObjectInspector;
Row: TOIPropertyGridRow;
LookupRoot: TPersistent;
AFile: TLazProjectFile;
begin
DebugLn('THelpManager.ShowHelpForObjectInspector ',dbgsName(Sender));
if Sender=nil then Sender:=ObjectInspector1;
if Sender is TObjectInspector then begin
AnInspector:=TObjectInspector(Sender);
Row:=AnInspector.GetActivePropertyRow;
if Row=nil then begin
// TODO: show help about object inspector
DebugLn('THelpManager.ShowHelpForObjectInspector TODO: show help about object inspector');
end else begin
// find unit of LookupRoot
if AnInspector.PropertyEditorHook=nil then exit;
LookupRoot:=AnInspector.PropertyEditorHook.LookupRoot;
if not (LookupRoot is TComponent) then exit;
AFile:=LazarusIDE.GetProjectFileWithRootComponent(TComponent(LookupRoot));
if AFile=nil then exit;
if Row.Editor=nil then exit;
if Row.Editor.GetPropInfo=nil then exit;
end;
end;
end;
initialization
{$i helpmanager.lrs}

View File

@ -2341,6 +2341,10 @@ begin
AddDefault(C,'Move component one forward' ,ecDesignerForwardOne);
AddDefault(C,'Move component one back' ,ecDesignerBackOne);
// object inspector - without menu items in the IDE bar (at least no direct)
C:=Categories[AddCategory('Object Inspector',lisKeyCatObjInspector,
IDECmdScopeObjctInspectorOnly)];
// custom keys (for experts, task groups, dynamic menu items, etc)
C:=Categories[AddCategory(KeyCategoryCustomName,lisKeyCatCustom,nil)];
end;

View File

@ -1557,6 +1557,7 @@ resourcestring
srkmCatEnvMenu = 'Environment menu commands';
srkmCarHelpMenu = 'Help menu commands';
lisKeyCatDesigner = 'Designer commands';
lisKeyCatObjInspector = 'Object Inspector commands';
lisKeyCatCustom = 'Custom commands';
// Languages

View File

@ -691,6 +691,12 @@ type
var ActiveSourceEditor: TSourceEditor; var ActiveUnitInfo: TUnitInfo); override;
procedure GetDesignerUnit(ADesigner: TDesigner;
var ActiveSourceEditor: TSourceEditor; var ActiveUnitInfo: TUnitInfo); override;
function GetDesignerWithProjectFile(AFile: TLazProjectFile;
LoadForm: boolean): TIDesigner; override;
function GetFormOfSource(AnUnitInfo: TUnitInfo;
LoadForm: boolean): TCustomForm;
function GetProjectFileWithRootComponent(AComponent: TComponent): TLazProjectFile; override;
function GetProjectFileWithDesigner(ADesigner: TIDesigner): TLazProjectFile; override;
procedure GetObjectInspectorUnit(
var ActiveSourceEditor: TSourceEditor; var ActiveUnitInfo: TUnitInfo); override;
procedure GetUnitWithForm(AForm: TCustomForm;
@ -733,8 +739,6 @@ type
var ActiveUnitInfo:TUnitInfo);
procedure DoSwitchToFormSrc(ADesigner: TDesigner;
var ActiveSourceEditor:TSourceEditor; var ActiveUnitInfo:TUnitInfo);
function GetFormOfSource(AnUnitInfo: TUnitInfo;
LoadForm: boolean): TCustomForm;
procedure UpdateCaption; override;
procedure HideIDE; override;
procedure HideUnmodifiedDesigners;
@ -1447,6 +1451,7 @@ begin
ObjectInspector1.OnAddToFavourites:=@OIOnAddToFavourites;
ObjectInspector1.OnRemoveFromFavourites:=@OIOnRemoveFromFavourites;
ObjectInspector1.BorderStyle:=bsSizeToolWin;
IDECmdScopeObjctInspectorOnly.AddWindowClass(TObjectInspector);
GlobalDesignHook:=TPropertyEditorHook.Create;
GlobalDesignHook.GetPrivateDirectory:=AppendPathDelim(GetPrimaryConfigPath);
@ -2324,7 +2329,9 @@ begin
ecContextHelp:
if Sender=MessagesView then
HelpBoss.ShowHelpForMessage(-1);
HelpBoss.ShowHelpForMessage(-1)
else if Sender is TObjectInspector then
HelpBoss.ShowHelpForObjectInspector(Sender);
ecSave:
if (Sender is TDesigner) then begin
@ -8248,6 +8255,18 @@ begin
end;
end;
function TMainIDE.GetDesignerWithProjectFile(AFile: TLazProjectFile;
LoadForm: boolean): TIDesigner;
var
AnUnitInfo: TUnitInfo;
AForm: TCustomForm;
begin
AnUnitInfo:=AFile as TUnitInfo;
AForm:=GetFormOfSource(AnUnitInfo,LoadForm);
if AForm<>nil then
Result:=AForm.Designer;
end;
procedure TMainIDE.GetObjectInspectorUnit(
var ActiveSourceEditor: TSourceEditor; var ActiveUnitInfo: TUnitInfo);
begin
@ -11957,6 +11976,36 @@ begin
Result:=FormEditor1.GetDesignerForm(AnUnitInfo.Component);
end;
function TMainIDE.GetProjectFileWithRootComponent(AComponent: TComponent
): TLazProjectFile;
var
AnUnitInfo: TUnitInfo;
begin
if AComponent=nil then exit(nil);
AnUnitInfo:=Project1.FirstUnitWithComponent;
while AnUnitInfo<>nil do begin
if AnUnitInfo.Component=AComponent then begin
Result:=AnUnitInfo;
exit;
end;
AnUnitInfo:=AnUnitInfo.NextUnitWithComponent;
end;
Result:=nil;
end;
function TMainIDE.GetProjectFileWithDesigner(ADesigner: TIDesigner
): TLazProjectFile;
var
TheDesigner: TDesigner;
AComponent: TComponent;
begin
TheDesigner:=ADesigner as TDesigner;
AComponent:=TheDesigner.LookupRoot;
if AComponent=nil then
RaiseException('TMainIDE.GetProjectFileWithDesigner Designer.LookupRoot=nil');
Result:=GetProjectFileWithRootComponent(AComponent);
end;
function TMainIDE.OnPropHookMethodExists(const AMethodName: ShortString;
TypeData: PTypeData;
var MethodIsCompatible,MethodIsPublished,IdentIsMethod: boolean): boolean;

View File

@ -577,7 +577,7 @@ type
function ProjectUnitWithShortFilename(const ShortFilename: string): TUnitInfo;
function ProjectUnitWithUnitname(const AnUnitName: string): TUnitInfo;
function UnitWithEditorIndex(Index:integer): TUnitInfo;
Function UnitWithComponent(AComponent: TComponent): TUnitInfo;
function UnitWithComponent(AComponent: TComponent): TUnitInfo;
function UnitInfoWithFilename(const AFilename: string): TUnitInfo;
function UnitInfoWithFilename(const AFilename: string;
SearchFlags: TProjectFileSearchFlags): TUnitInfo;

View File

@ -50,7 +50,7 @@ uses
SynEditTypes, SynEdit, SynRegExpr, SynEditHighlighter, SynEditAutoComplete,
SynEditKeyCmds, SynCompletion,
// IDE interface
HelpIntf, SrcEditorIntf, MenuIntf, LazIDEIntf, IDEWindowIntf,
ProjectIntf, HelpIntf, SrcEditorIntf, MenuIntf, LazIDEIntf, IDEWindowIntf,
// IDE units
LazarusIDEStrConsts, LazConf, IDECommands, EditorOptions, KeyMapping, Project,
WordCompletion, FindReplaceDialog, FindInFilesDlg, IDEProcs, IDEOptionDefs,
@ -307,6 +307,10 @@ type
function GetLines: TStrings; override;
procedure SetLines(const AValue: TStrings); override;
// context
function GetProjectFile: TLazProjectFile; override;
function GetDesigner(LoadForm: boolean): TIDesigner; override;
// notebook
procedure Activate;
function PageIndex: integer;
@ -2399,6 +2403,22 @@ begin
FEditor.Lines:=AValue;
end;
function TSourceEditor.GetProjectFile: TLazProjectFile;
begin
Result:=Project1.UnitWithEditorIndex(PageIndex);
end;
function TSourceEditor.GetDesigner(LoadForm: boolean): TIDesigner;
var
AProjectFile: TLazProjectFile;
begin
AProjectFile:=GetProjectFile;
if AProjectFile<>nil then
Result:=LazarusIDE.GetDesignerWithProjectFile(AProjectFile,LoadForm)
else
Result:=nil;
end;
function TSourceEditor.GetCursorScreenXY: TPoint;
begin
Result:=FEditor.CaretXY;

View File

@ -22,7 +22,7 @@ unit FormEditingIntf;
interface
uses
Classes, SysUtils, TypInfo, Forms, Controls, ComponentEditors;
Classes, SysUtils, TypInfo, Forms, Controls, ProjectIntf, ComponentEditors;
const
ComponentPaletteBtnWidth = 25;
@ -35,32 +35,32 @@ type
protected
FComponent : TComponent;
public
Function GetComponentType : ShortString; virtual; abstract;
Function GetComponentHandle : LongInt; virtual; abstract;
Function GetParent : TIComponentInterface; virtual; abstract;
Function IsTControl : Boolean; virtual; abstract;
Function GetPropCount : Integer; virtual; abstract;
Function GetPropType(Index : Integer) : TTypeKind; virtual; abstract;
// Function GetPropType(Index : Integer) : TPropertyType; virtual; abstract;
Function GetPropName(Index : Integer) : Shortstring; virtual; abstract;
Function GetPropTypeByName(Name : ShortString) : TTypeKind; virtual; abstract;
// Function GetPropTypebyName(Name : ShortString) : TPropertyType; virtual; abstract;
Function GetPropTypeName(Index : Integer) : ShortString; virtual; abstract;
function GetComponentType : ShortString; virtual; abstract;
function GetComponentHandle : LongInt; virtual; abstract;
function GetParent : TIComponentInterface; virtual; abstract;
function IsTControl : Boolean; virtual; abstract;
function GetPropCount : Integer; virtual; abstract;
function GetPropType(Index : Integer) : TTypeKind; virtual; abstract;
// function GetPropType(Index : Integer) : TPropertyType; virtual; abstract;
function GetPropName(Index : Integer) : Shortstring; virtual; abstract;
function GetPropTypeByName(Name : ShortString) : TTypeKind; virtual; abstract;
// function GetPropTypebyName(Name : ShortString) : TPropertyType; virtual; abstract;
function GetPropTypeName(Index : Integer) : ShortString; virtual; abstract;
Function GetPropValue(Index : Integer; var Value) : Boolean; virtual; abstract;
Function GetPropValuebyName(Name: Shortstring; var Value) : Boolean; virtual; abstract;
Function SetProp(Index : Integer; const Value) : Boolean; virtual; abstract;
Function SetPropbyName(Name : Shortstring; const Value) : Boolean; virtual; abstract;
function GetPropValue(Index : Integer; var Value) : Boolean; virtual; abstract;
function GetPropValuebyName(Name: Shortstring; var Value) : Boolean; virtual; abstract;
function SetProp(Index : Integer; const Value) : Boolean; virtual; abstract;
function SetPropbyName(Name : Shortstring; const Value) : Boolean; virtual; abstract;
Function GetControlCount: Integer; virtual; abstract;
Function GetControl(Index : Integer): TIComponentInterface; virtual; abstract;
function GetControlCount: Integer; virtual; abstract;
function GetControl(Index : Integer): TIComponentInterface; virtual; abstract;
Function GetComponentCount: Integer; virtual; abstract;
Function GetComponent(Index : Integer): TIComponentInterface; virtual; abstract;
function GetComponentCount: Integer; virtual; abstract;
function GetComponent(Index : Integer): TIComponentInterface; virtual; abstract;
Function Select: Boolean; virtual; abstract;
Function Focus: Boolean; virtual; abstract;
Function Delete: Boolean; virtual; abstract;
function Select: Boolean; virtual; abstract;
function Focus: Boolean; virtual; abstract;
function Delete: Boolean; virtual; abstract;
property Component: TComponent read FComponent;
end;
@ -70,16 +70,16 @@ type
TIFormInterface = class
public
Function Filename : AnsiString; virtual; abstract;
Function FormModified : Boolean; virtual; abstract;
Function MarkModified : Boolean; virtual; abstract;
Function GetFormComponent : TIComponentInterface; virtual; abstract;
Function FindComponent : TIComponentInterface; virtual; abstract;
Function GetComponentfromHandle(ComponentHandle:Pointer): TIComponentInterface; virtual; abstract;
function Filename : AnsiString; virtual; abstract;
function FormModified : Boolean; virtual; abstract;
function MarkModified : Boolean; virtual; abstract;
function GetFormComponent : TIComponentInterface; virtual; abstract;
function FindComponent : TIComponentInterface; virtual; abstract;
function GetComponentfromHandle(ComponentHandle:Pointer): TIComponentInterface; virtual; abstract;
Function GetSelCount: Integer; virtual; abstract;
Function GetSelComponent(Index : Integer): TIComponentInterface; virtual; abstract;
Function CreateComponent(CI : TIComponentInterface; TypeClass : TComponentClass;
function GetSelCount: Integer; virtual; abstract;
function GetSelComponent(Index : Integer): TIComponentInterface; virtual; abstract;
function CreateComponent(CI : TIComponentInterface; TypeClass : TComponentClass;
X,Y,W,H : Integer): TIComponentInterface; virtual; abstract;
end;
@ -91,23 +91,23 @@ type
function GetDesigner(Index: integer): TIDesigner; virtual; abstract;
public
// components
Function FindComponentByName(const Name: ShortString
function FindComponentByName(const Name: ShortString
): TIComponentInterface; virtual; abstract;
Function FindComponent(AComponent: TComponent): TIComponentInterface; virtual; abstract;
function FindComponent(AComponent: TComponent): TIComponentInterface; virtual; abstract;
Function GetDefaultComponentParent(TypeClass: TComponentClass
function GetDefaultComponentParent(TypeClass: TComponentClass
): TIComponentInterface; virtual; abstract;
Function GetDefaultComponentPosition(TypeClass: TComponentClass;
function GetDefaultComponentPosition(TypeClass: TComponentClass;
ParentCI: TIComponentInterface;
var X,Y: integer): boolean; virtual; abstract;
Function CreateComponent(ParentCI: TIComponentInterface;
function CreateComponent(ParentCI: TIComponentInterface;
TypeClass: TComponentClass;
X,Y,W,H: Integer): TIComponentInterface; virtual; abstract;
Function CreateComponentFromStream(BinStream: TStream;
function CreateComponentFromStream(BinStream: TStream;
AncestorType: TComponentClass;
const NewUnitName: ShortString;
Interactive: boolean): TIComponentInterface; virtual; abstract;
Function CreateChildComponentFromStream(BinStream: TStream;
function CreateChildComponentFromStream(BinStream: TStream;
ComponentClass: TComponentClass;
Root: TComponent;
ParentControl: TWinControl

View File

@ -687,6 +687,7 @@ type
const CodePos: TPoint;
var ErrMsg: string): TShowHelpResult; virtual; abstract;
procedure ShowHelpForMessage(Line: integer); virtual; abstract;
procedure ShowHelpForObjectInspector(Sender: TObject); virtual; abstract;
end;

View File

@ -470,6 +470,7 @@ var
IDECmdScopeSrcEdit: TIDECommandScope;
IDECmdScopeSrcEditOnly: TIDECommandScope;
IDECmdScopeDesignerOnly: TIDECommandScope;
IDECmdScopeObjctInspectorOnly: TIDECommandScope;
// register a new IDE command category (i.e. set of commands)
function RegisterIDECommandCategory(Parent: TIDECommandCategory;
@ -550,6 +551,7 @@ begin
IDECmdScopeSrcEdit:=RegisterIDECommandScope('SourceEditor');
IDECmdScopeSrcEditOnly:=RegisterIDECommandScope('SourceEditorOnly');
IDECmdScopeDesignerOnly:=RegisterIDECommandScope('DesignerOnly');
IDECmdScopeObjctInspectorOnly:=RegisterIDECommandScope('ObjectInspectorOnly');
end;
function CompareIDEShortCuts(Data1, Data2: Pointer): integer;

View File

@ -164,6 +164,11 @@ type
FocusEditor: boolean): boolean; virtual; abstract;
procedure DoJumpToNextError(DirectionDown: boolean); virtual; abstract;
procedure DoShowMessagesView; virtual; abstract;
function GetDesignerWithProjectFile(AFile: TLazProjectFile;
LoadForm: boolean): TIDesigner; virtual; abstract;
function GetProjectFileWithRootComponent(AComponent: TComponent): TLazProjectFile; virtual; abstract;
function GetProjectFileWithDesigner(ADesigner: TIDesigner): TLazProjectFile; virtual; abstract;
public
property ActiveProject: TLazProject read GetActiveProject;
end;

View File

@ -263,6 +263,7 @@ type
FBackgroundColor: TColor;
FColumn: TOICustomPropertyGridColumn;
FLayout: TOILayout;
FOnOIKeyDown: TKeyEvent;
FReferencesColor: TColor;
FRowSpacing: integer;
FSubPropertiesColor: TColor;
@ -433,6 +434,7 @@ type
property Layout: TOILayout read FLayout write FLayout default oilHorizontal;
property NameFont: TFont read FNameFont write FNameFont;
property OnModified: TNotifyEvent read FOnModified write FOnModified;
property OnOIKeyDown: TKeyEvent read FOnOIKeyDown write FOnOIKeyDown;
property PrefferedSplitterX: integer read FPreferredSplitterX
write FPreferredSplitterX default 100;
property PropertyEditorHook: TPropertyEditorHook read FPropertyEditorHook
@ -546,7 +548,8 @@ type
procedure AvailComboBoxCloseUp(Sender: TObject);
procedure ComponentTreeSelectionChanged(Sender: TObject);
procedure ObjectInspectorResize(Sender: TObject);
procedure OnGriddKeyUp(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 OnSetDefaultPopupmenuItemClick(Sender: TObject);
procedure OnAddToFavoritesPopupmenuItemClick(Sender: TObject);
procedure OnRemoveFromFavoritesPopupmenuItemClick(Sender: TObject);
@ -562,6 +565,7 @@ type
private
FFavourites: TOIFavouriteProperties;
FOnAddToFavourites: TNotifyEvent;
FOnOIKeyDown: TKeyEvent;
FOnRemainingKeyUp: TKeyEvent;
FOnRemoveFromFavourites: TNotifyEvent;
FSelection: TPersistentSelectionList;
@ -646,6 +650,7 @@ type
write FOnAddToFavourites;
property OnRemoveFromFavourites: TNotifyEvent read FOnRemoveFromFavourites
write FOnRemoveFromFavourites;
property OnOIKeyDown: TKeyEvent read FOnOIKeyDown write FOnOIKeyDown;
end;
const
@ -1723,8 +1728,8 @@ begin
inherited KeyDown(Key, Shift);
end;
procedure TOICustomPropertyGrid.HandleStandardKeys(var Key: Word; Shift: TShiftState
);
procedure TOICustomPropertyGrid.HandleStandardKeys(var Key: Word;
Shift: TShiftState);
var
Handled: Boolean;
begin
@ -1759,7 +1764,9 @@ begin
SetRowValue;
else
Handled:=false;
if Assigned(OnOIKeyDown) then
OnOIKeyDown(Self,Key,Shift);
Handled:=Key=VK_UNKNOWN;
end;
if Handled then Key:=VK_UNKNOWN;
end;
@ -3366,7 +3373,13 @@ begin
ComponentTree.Height:=ClientHeight div 4;
end;
procedure TObjectInspector.OnGriddKeyUp(Sender: TObject; var Key: Word;
procedure TObjectInspector.OnGridKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Assigned(OnOIKeyDown) then OnOIKeyDown(Self,Key,Shift);
end;
procedure TObjectInspector.OnGridKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Assigned(OnRemainingKeyUp) then OnRemainingKeyUp(Self,Key,Shift);
@ -3594,7 +3607,8 @@ begin
Align:=alClient;
PopupMenu:=MainPopupMenu;
OnModified:=@OnGridModified;
OnKeyUp:=@OnGriddKeyUp;
OnOIKeyDown:=@OnGridKeyDown;
OnKeyUp:=@OnGridKeyUp;
end;
// event grid
@ -3607,7 +3621,8 @@ begin
Align:=alClient;
PopupMenu:=MainPopupMenu;
OnModified:=@OnGridModified;
OnKeyUp:=@OnGriddKeyUp;
OnOIKeyDown:=@OnGridKeyDown;
OnKeyUp:=@OnGridKeyUp;
end;
CreateFavouritePage;
@ -3639,7 +3654,7 @@ begin
Align:=alClient;
PopupMenu:=MainPopupMenu;
OnModified:=@OnGridModified;
OnKeyUp:=@OnGriddKeyUp;
OnKeyUp:=@OnGridKeyUp;
end;
FavouriteGrid.Favourites:=FFavourites;
end;

View File

@ -20,7 +20,7 @@ unit SrcEditorIntf;
interface
uses
Classes, SysUtils, LCLProc, Forms, Controls;
Classes, SysUtils, LCLProc, Forms, Controls, ProjectIntf;
type
TSrcEditSearchOption = (sesoMatchCase, sesoWholeWord, sesoBackwards,
@ -94,6 +94,10 @@ type
// search and replace
function SearchReplace(const ASearch, AReplace: string;
SearchOptions: TSrcEditSearchOptions): integer; virtual; abstract;
// context
function GetProjectFile: TLazProjectFile; virtual; abstract;
function GetDesigner(LoadForm: boolean): TIDesigner; virtual; abstract;
public
property BlockBegin: TPoint read GetBlockBegin write SetBlockBegin;
property BlockEnd: TPoint read GetBlockEnd write SetBlockEnd;

View File

@ -1,7 +1,7 @@
/* XPM */
static char * tpanel_xpm[] = {
"20 21 4 1",
" c None",
" c None",
". c #808080",
"+ c #FFFFFF",
"@ c #C0C0C0",
@ -25,5 +25,4 @@ static char * tpanel_xpm[] = {
".+@@@@@@@@@@@@@@@@.+",
".@.................+",
" +++++++++++++++++++",
" "};
" . "};

View File

@ -2467,16 +2467,16 @@ LazarusResources.Add('tpairsplitter','XPM',[
+'....@@@@@......"};'#10
]);
LazarusResources.Add('tpanel','XPM',[
'/* XPM */'#10'static char * tpanel_xpm[] = {'#10'"20 21 4 1",'#10'"'#9'c Non'
+'e",'#10'".'#9'c #808080",'#10'"+'#9'c #FFFFFF",'#10'"@'#9'c #C0C0C0",'#10'"'
+'................... ",'#10'".+++++++++++++++++@+",'#10'".+@@@@@@@@@@@@@@@@.'
'/* XPM */'#10'static char * tpanel_xpm[] = {'#10'"20 21 4 1",'#10'" '#9'c No'
+'ne",'#10'".'#9'c #808080",'#10'"+'#9'c #FFFFFF",'#10'"@'#9'c #C0C0C0",'#10
+'"................... ",'#10'".+++++++++++++++++@+",'#10'".+@@@@@@@@@@@@@@@@'
+'.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@'
+'@@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'"'
+'.+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.'
+'+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@'
+'@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".'
+'+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+'
+'",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@@'
+'@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".+'
+'@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".@.................+"'
+','#10'" +++++++++++++++++++",'#10'"'#9#9' "};'#10#10
+'+@@@@@@@@@@@@@@@@.+",'#10'".+@@@@@@@@@@@@@@@@.+",'#10'".@.................+'
+'",'#10'" +++++++++++++++++++",'#10'" . "};'#10
]);
LazarusResources.Add('tpicture','XPM',[
'/* XPM */'#10'static char *graphic[] = {'#10'"23 23 61 1",'#10'". c None",'

View File

@ -266,7 +266,7 @@ type
TKeyEvent = procedure(Sender: TObject; var Key: Word; Shift:TShiftState) of Object;
TKeyEvent = procedure(Sender: TObject; var Key: Word; Shift: TShiftState) of Object;
TKeyPressEvent = procedure(Sender: TObject; var Key: char) of Object;
TUTF8KeyPressEvent = procedure(Sender: TObject; var UTF8Key: TUTF8Char) of Object;

View File

@ -2170,8 +2170,11 @@ var
inc(ReadPos);
end;
CurEntry:=PXPMPixelToColorEntry(
FPixelToColorTree.FindData(IntArray,FCharsPerPixel));
CurColor:=CurEntry^.Color;
FPixelToColorTree.FindData(IntArray,FCharsPerPixel));
if CurEntry<>nil then
CurColor:=CurEntry^.Color
else
RaiseXPMReadError('invalid color',ReadPos-FCharsPerPixel);
{if CurEntry2<>CurEntry then begin
DebugLn('x=',x,' y=',y,' Pixel=',Entry^.Pixel,
' RefPixel=',CurEntry^.Pixel,