MG: fixed speedbuttons numglyphs>1 and started IDE debugging

git-svn-id: trunk@358 -
This commit is contained in:
lazarus 2001-10-18 13:01:33 +00:00
parent 3bda8aaab6
commit 5710c6c271
23 changed files with 813 additions and 894 deletions

View File

@ -21,7 +21,7 @@
}
unit DBGBreakpoint;
{$mode objfpc}
{$mode objfpc}{$H+}
interface
@ -69,7 +69,8 @@ type
protected
public
property Enabled: Boolean read FEnabled write SetEnabled;
property Items[const AnIndex: Integer]: TDBGBreakPoint read GetItem write SetItem; default;
property Items[const AnIndex: Integer]: TDBGBreakPoint
read GetItem write SetItem; default;
property Name: String read FName write SetName;
end;
@ -79,7 +80,8 @@ type
procedure SetItem(const AnIndex: Integer; const Value: TDBGBreakPointGroup);
protected
public
property Items[const AnIndex: Integer]: TDBGBreakPointGroup read GetItem write SetItem; default;
property Items[const AnIndex: Integer]: TDBGBreakPointGroup
read GetItem write SetItem; default;
end;
@ -132,6 +134,7 @@ end;
function TDBGBreakPointGroup.GetItem(const AnIndex: Integer): TDBGBreakPoint;
begin
Result:=nil;
end;
procedure TDBGBreakPointGroup.SetEnabled(const AValue: Boolean);
@ -139,7 +142,8 @@ begin
FEnabled := AValue;
end;
procedure TDBGBreakPointGroup.SetItem(const AnIndex: Integer; const AValue: TDBGBreakPoint);
procedure TDBGBreakPointGroup.SetItem(const AnIndex: Integer;
const AValue: TDBGBreakPoint);
begin
end;
@ -150,17 +154,23 @@ end;
{ TDBGBreakPointGroups }
function TDBGBreakPointGroups.GetItem(const AnIndex: Integer): TDBGBreakPointGroup;
function TDBGBreakPointGroups.GetItem(
const AnIndex: Integer): TDBGBreakPointGroup;
begin
Result:=nil;
end;
procedure TDBGBreakPointGroups.SetItem(const AnIndex: Integer; const Value: TDBGBreakPointGroup);
procedure TDBGBreakPointGroups.SetItem(const AnIndex: Integer;
const Value: TDBGBreakPointGroup);
begin
end;
end.
{ =============================================================================
$Log$
Revision 1.3 2001/10/18 13:01:31 lazarus
MG: fixed speedbuttons numglyphs>1 and started IDE debugging
Revision 1.2 2001/02/25 16:44:57 lazarus
MWE:
+ Added header and footer

View File

@ -21,7 +21,7 @@
}
unit DBGWatch;
{$mode objfpc}
{$mode objfpc}{$H+}
interface
@ -49,7 +49,8 @@ type
procedure SetItem(const AnIndex: Integer; const Value: TDBGWatch);
protected
public
property Items[const AnIndex: Integer]: TDBGWatch read GetItem write SetItem; default;
property Items[const AnIndex: Integer]: TDBGWatch
read GetItem write SetItem; default;
end;
implementation
@ -70,6 +71,7 @@ end;
function TDBGWatches.GetItem(const AnIndex: Integer): TDBGWatch;
begin
Result:=nil
end;
procedure TDBGWatches.SetItem(const AnIndex: Integer; const Value: TDBGWatch);
@ -79,6 +81,9 @@ end;
end.
{ =============================================================================
$Log$
Revision 1.3 2001/10/18 13:01:31 lazarus
MG: fixed speedbuttons numglyphs>1 and started IDE debugging
Revision 1.2 2001/02/25 16:44:57 lazarus
MWE:
+ Added header and footer

View File

@ -22,7 +22,7 @@
}
unit Debugger;
{$mode objfpc}
{$mode objfpc}{$H+}
interface
@ -30,10 +30,12 @@ uses
Classes, DBGWatch, DBGBreakpoint;
type
TDBGCommandFlags = set of (dcfRun, dcfPause, dcfStop, dcfStepOver, dcfStepInto, dcfRunTo, dcfJumpto, dcfBreak);
TDBGCommandFlags = set of (dcfRun, dcfPause, dcfStop, dcfStepOver, dcfStepInto,
dcfRunTo, dcfJumpto, dcfBreak);
TDBGState = (dsStop, dsPause, dsRun, dsError);
TDBGCurrentLineEvent = procedure(Sender: TObject; const ASource: String; const ALine: Integer) of object;
TDBGCurrentLineEvent = procedure(Sender: TObject; const AFilename: String;
const ALine: Integer) of object;
TDebugger = class
private
@ -54,8 +56,8 @@ type
procedure Stop; virtual; // quit debugging
procedure StepOver; virtual;
procedure StepInto; virtual;
procedure RunTo(const ASource: String; const ALine: Integer); virtual; // Executes til a certain point
procedure JumpTo(const ASource: String; const ALine: Integer); virtual; // No execute, only set exec point
procedure RunTo(const AFilename: String; const ALine: Integer); virtual; // Executes til a certain point
procedure JumpTo(const AFilename: String; const ALine: Integer); virtual; // No execute, only set exec point
property BreakPointGroups: TDBGBreakPointGroups read FBreakPointGroups; // list of all breakpoints
property FileName: String read FFileName write SetFileName; // The name of the exe to be debugged
property Flags: TDBGCommandFlags read GetFlags; // All available commands of the debugger
@ -77,17 +79,19 @@ end;
function TDebugger.GetDBGState: TDBGState;
begin
Result:=dsStop;
end;
function TDebugger.GetFlags: TDBGCommandFlags;
begin
Result:=[dcfStop];
end;
procedure TDebugger.Init;
begin
end;
procedure TDebugger.JumpTo(const ASource: String; const ALine: Integer);
procedure TDebugger.JumpTo(const AFilename: String; const ALine: Integer);
begin
end;
@ -99,7 +103,7 @@ procedure TDebugger.Run;
begin
end;
procedure TDebugger.RunTo(const ASource: String; const ALine: Integer);
procedure TDebugger.RunTo(const AFilename: String; const ALine: Integer);
begin
end;
@ -122,6 +126,9 @@ end;
end.
{ =============================================================================
$Log$
Revision 1.2 2001/10/18 13:01:31 lazarus
MG: fixed speedbuttons numglyphs>1 and started IDE debugging
Revision 1.1 2001/02/28 22:09:15 lazarus
MWE:
* Renamed DBGDebugger to Debugger

View File

@ -38,6 +38,15 @@ type
MaxCounter: integer; // for bakCounter
SubDirectory: string;
end;
TDebuggerType = (dtNone, dtGnuDebugger);
const
DebuggerName : array[TDebuggerType] of string = (
'(None)','GNU debugger (gdb)'
);
type
{ class for storing environment options }
TEnvironmentOptions = class
@ -70,10 +79,12 @@ type
// object inspector
FObjectInspectorOptions: TOIOptions;
// compiler + lazarus files
// compiler + debugger + lazarus files
FLazarusDirectory: string;
FCompilerFilename: string;
FFPCSourceDirectory: string;
FDebuggerFilename: string;
FDebuggerType: TDebuggerType;
FTestBuildDirectory: string;
// recent files and directories
@ -142,6 +153,10 @@ type
read FCompilerFilename write FCompilerFilename;
property FPCSourceDirectory: string
read FFPCSourceDirectory write FFPCSourceDirectory;
property DebuggerFilename: string
read FDebuggerFilename write FDebuggerFilename;
property DebuggerType: TDebuggerType
read FDebuggerType write FDebuggerType;
property TestBuildDirectory: string
read FTestBuildDirectory write FTestBuildDirectory;
@ -254,6 +269,9 @@ type
CompilerPathComboBox: TComboBox;
FPCSourceDirLabel: TLabel;
FPCSourceDirComboBox: TComboBox;
DebuggerPathLabel: TLabel;
DebuggerPathComboBox: TComboBox;
DebuggerTypeComboBox: TComboBox;
TestBuildDirLabel: TLabel;
TestBuildDirComboBox: TComboBox;
@ -282,9 +300,18 @@ type
var
EnvironmentOptions: TEnvironmentOptions;
function DebuggerNameToType(const s: string): TDebuggerType;
implementation
function DebuggerNameToType(const s: string): TDebuggerType;
begin
for Result:=Low(TDebuggerType) to High(TDebuggerType) do
if UpperCase(DebuggerName[Result])=uppercase(s) then exit;
Result:=dtNone;
end;
{ TEnvironmentOptions }
@ -329,6 +356,8 @@ begin
FLazarusDirectory:=ExtractFilePath(ParamStr(0));
FCompilerFilename:='';
FFPCSourceDirectory:='';
FDebuggerFilename:='';
FDebuggerType:=dtNone;
FTestBuildDirectory:={$ifdef win32}'c:/temp'{$else}'/tmp'{$endif};
// recent files and directories
@ -426,6 +455,17 @@ var XMLConfig: TXMLConfig;
if s<>'' then List.Add(s);
end;
end;
procedure LoadDebuggerType(var ADebuggerType: TDebuggerType; Path: string);
var i:integer;
begin
i:=XMLConfig.GetValue(Path+'DebuggerType/Value',5);
case i of
1:ADebuggerType:=dtGnuDebugger;
else
ADebuggerType:=dtNone;
end;
end;
begin
try
@ -487,6 +527,9 @@ begin
'EnvironmentOptions/CompilerFilename/Value',FCompilerFilename);
FFPCSourceDirectory:=XMLConfig.GetValue(
'EnvironmentOptions/FPCSourceDirectory/Value',FFPCSourceDirectory);
FDebuggerFilename:=XMLConfig.GetValue(
'EnvironmentOptions/DebuggerFilename/Value',FDebuggerFilename);
LoadDebuggerType(FDebuggerType,'EnvironmentOptions/');
FTestBuildDirectory:=XMLConfig.GetValue(
'EnvironmentOptions/TestBuildDirectory/Value',FTestBuildDirectory);
@ -556,6 +599,17 @@ var XMLConfig: TXMLConfig;
for i:=0 to List.Count-1 do
XMLConfig.SetValue(Path+'Item'+IntToStr(i+1)+'/Value',List[i]);
end;
procedure SaveDebuggerType(ADebuggerType: TDebuggerType; Path:string);
var i:integer;
begin
case ADebuggerType of
dtNone: i:=0;
dtGnuDebugger: i:=1;
end;
XMLConfig.SetValue(Path+'DebuggerType/Value',i);
end;
begin
try
@ -610,6 +664,9 @@ begin
'EnvironmentOptions/CompilerFilename/Value',FCompilerFilename);
XMLConfig.SetValue(
'EnvironmentOptions/FPCSourceDirectory/Value',FFPCSourceDirectory);
XMLConfig.SetValue(
'EnvironmentOptions/DebuggerFilename/Value',FDebuggerFilename);
SaveDebuggerType(DebuggerType,'EnvironmentOptions/');
XMLConfig.SetValue(
'EnvironmentOptions/TestBuildDirectory/Value',FTestBuildDirectory);
@ -677,7 +734,7 @@ constructor TEnvironmentOptionsDialog.Create(AOwner:TComponent);
begin
inherited Create(AOwner);
if LazarusResources.Find(ClassName)=nil then begin
SetBounds((Screen.Width-480) div 2,(Screen.Height-400) div 2, 485, 405);
SetBounds((Screen.Width-480) div 2,(Screen.Height-430) div 2, 485, 435);
Caption:='Environment Options';
NoteBook:=TNoteBook.Create(Self);
@ -1329,6 +1386,7 @@ end;
procedure TEnvironmentOptionsDialog.SetupFilesPage;
var MaxX:integer;
ADebuggerType: TDebuggerType;
begin
MaxX:=ClientWidth-5;
@ -1496,12 +1554,59 @@ begin
Show;
end;
DebuggerPathLabel:=TLabel.Create(Self);
with DebuggerPathLabel do begin
Name:='DebuggerPathLabel';
Parent:=NoteBook.Page[1];
Left:=LazarusDirLabel.Left;
Top:=FPCSourceDirComboBox.Top+FPCSourceDirComboBox.Height;
Width:=FPCSourceDirLabel.Width;
Height:=25;
Caption:='Debugger type and path';
Show;
end;
DebuggerTypeComboBox:=TComboBox.Create(Self);
with DebuggerTypeComboBox do begin
Name:='DebuggerTypeComboBox';
Parent:=NoteBook.Page[1];
Left:=FPCSourceDirLabel.Left;
Top:=DebuggerPathLabel.Top+DebuggerPathLabel.Height+2;
Width:=LazarusDirLabel.Width div 2;
Height:=25;
with Items do begin
BeginUpdate;
for ADebuggerType:=Low(TDebuggerType) to High(TDebuggerType) do
Add(DebuggerName[ADebuggerType]);
EndUpdate;
end;
Show;
end;
DebuggerPathComboBox:=TComboBox.Create(Self);
with DebuggerPathComboBox do begin
Name:='DebuggerPathComboBox';
Parent:=NoteBook.Page[1];
Left:=DebuggerTypeComboBox.Left+DebuggerTypeComboBox.Width+10;
Top:=DebuggerTypeComboBox.Top;
Width:=LazarusDirLabel.Width-DebuggerTypeComboBox.Width-10;
Height:=25;
with Items do begin
BeginUpdate;
Add(DebuggerName[dtNone]);
Add('/opt/fpc/gdb');
EndUpdate;
end;
Show;
end;
TestBuildDirLabel:=TLabel.Create(Self);
with TestBuildDirLabel do begin
Name:='TestBuildDirLabel';
Parent:=NoteBook.Page[1];
Left:=LazarusDirLabel.Left;
Top:=FPCSourceDirComboBox.Top+FPCSourceDirComboBox.Height;
Top:=DebuggerTypeComboBox.Top+DebuggerTypeComboBox.Height;
Width:=LazarusDirLabel.Width;
Height:=23;
Caption:='Directory for building test projects';
@ -1650,6 +1755,8 @@ begin
SetComboBoxText(LazarusDirComboBox,LazarusDirectory);
SetComboBoxText(CompilerPathComboBox,CompilerFilename);
SetComboBoxText(FPCSourceDirComboBox,FPCSourceDirectory);
SetComboBoxText(DebuggerPathComboBox,DebuggerFilename);
SetComboBoxText(DebuggerTypeComboBox,DebuggerName[DebuggerType]);
SetComboBoxText(TestBuildDirComboBox,TestBuildDirectory);
// recent files and directories
@ -1731,6 +1838,8 @@ begin
LazarusDirectory:=LazarusDirComboBox.Text;
CompilerFilename:=CompilerPathComboBox.Text;
FPCSourceDirectory:=FPCSourceDirComboBox.Text;
DebuggerFilename:=DebuggerPathComboBox.Text;
DebuggerType:=DebuggerNameToType(DebuggerTypeComboBox.Text);
TestBuildDirectory:=TestBuildDirComboBox.Text;
// recent files and directories

View File

@ -46,6 +46,9 @@ const
ecClose = ecOpen + 1;
ecBuild = ecClose + 1;
ecRun = ecBuild + 1;
ecPause = ecRun + 1;
ecStepInto = ecPause + 1;
ecStepOver = ecStepInto + 1;
ecJumpToEditor = ecUserFirst + 300;
ecToggleFormUnit = ecUserFirst + 301;
@ -309,6 +312,9 @@ begin
ecClose: Result:= 'close';
ecBuild: Result:= 'build program/project';
ecRun: Result:= 'run program';
ecPause: Result:= 'pause program';
ecStepInto: Result:= 'step into';
ecStepOver: Result:= 'step over';
ecJumpToEditor: Result:='jump to editor';
ecToggleFormUnit: Result:='toggle between form and unit';
ecGotoEditor1: Result:= 'goto editor 1';
@ -898,6 +904,9 @@ begin
Add('Close',ecClose,VK_F4,[ssCtrl],VK_UNKNOWN,[]);
Add('Build project/program',ecBuild,VK_F9,[ssCtrl],VK_UNKNOWN,[]);
Add('Run program',ecRun,VK_F9,[],VK_UNKNOWN,[]);
Add('Pause program',ecPause,VK_UNKNOWN,[],VK_UNKNOWN,[]);
Add('Step into',ecStepInto,VK_F7,[],VK_UNKNOWN,[]);
Add('Step over',ecStepOver,VK_F8,[],VK_UNKNOWN,[]);
Add('Go to source editor 1',ecGotoEditor0,VK_1,[ssAlt],VK_UNKNOWN,[]);
Add('Go to source editor 2',ecGotoEditor0,VK_2,[ssAlt],VK_UNKNOWN,[]);

View File

@ -38,7 +38,7 @@ uses
IDEComp, AbstractFormEditor, FormEditor, CustomFormEditor, ObjectInspector,
PropEdits, ControlSelection, UnitEditor, CompilerOptions, EditorOptions,
EnvironmentOpts, TransferMacros, KeyMapping, ProjectOpts, IDEProcs, Process,
UnitInfoDlg;
UnitInfoDlg, Debugger;
const
Version_String = '0.8 alpha';
@ -57,6 +57,9 @@ type
ToggleFormSpeedBtn : TSpeedButton;
NewFormSpeedBtn : TSpeedButton;
RunSpeedButton : TSpeedButton;
PauseSpeedButton : TSpeedButton;
StepIntoSpeedButton : TSpeedButton;
StepOverSpeedButton : TSpeedButton;
OpenFilePopUpMenu : TPopupMenu;
Toolbutton1 : TToolButton;
Toolbutton2 : TToolButton;
@ -99,6 +102,11 @@ type
itmProjectViewSource: TMenuItem;
itmProjectBuild: TMenuItem;
itmProjectRun: TMenuItem;
itmProjectPause: TMenuItem;
itmProjectStepInto: TMenuItem;
itmProjectStepOver: TMenuItem;
itmProjectRunToCursor: TMenuItem;
itmProjectStop: TMenuItem;
itmProjectOptions: TMenuItem;
itmProjectCompilerSettings: TMenuItem;
@ -162,6 +170,11 @@ type
procedure mnuViewProjectSourceClicked(Sender : TObject);
procedure mnuBuildProjectClicked(Sender : TObject);
procedure mnuRunProjectClicked(Sender : TObject);
procedure mnuPauseProjectClicked(Sender : TObject);
procedure mnuStepIntoProjectClicked(Sender : TObject);
procedure mnuStepOverProjectClicked(Sender : TObject);
procedure mnuRunToCursorProjectClicked(Sender : TObject);
procedure mnuStopProjectClicked(Sender : TObject);
procedure mnuProjectCompilerSettingsClicked(Sender : TObject);
procedure mnuProjectOptionsClicked(Sender : TObject);
@ -203,6 +216,11 @@ type
procedure OnBeforeCodeToolBossApplyChanges(Manager: TCodeToolManager;
var Abort: boolean);
procedure OnAfterCodeToolBossApplyChanges(Manager: TCodeToolManager);
// Debugger Events
procedure OnDebuggerChangeState(Sender: TObject);
procedure OnDebuggerCurrentLine(Sender: TObject; const AFilename: String;
const ALine: Integer);
private
FCodeLastActivated : Boolean; //used for toggling between code and forms
FSelectedComponent : TRegisteredComponent;
@ -210,6 +228,7 @@ type
MacroList: TTransferMacroList;
FMessagesViewBoundsRectValid: boolean;
FOpenEditorsOnCodeToolChange: boolean;
TheDebugger: TDebugger;
Function CreateSeperator : TMenuItem;
Procedure SetDefaultsForForm(aForm : TCustomForm);
@ -248,6 +267,11 @@ type
function DoRemoveFromProjectDialog: TModalResult;
function DoBuildProject: TModalResult;
function DoRunProject: TModalResult;
function DoPauseProject: TModalResult;
function DoStepIntoProject: TModalResult;
function DoStepOverProject: TModalResult;
function DoRunToCursor: TModalResult;
function DoStopProject: TModalResult;
function SomethingOfProjectIsModified: boolean;
function DoCreateProjectForProgram(ProgramBuf: TCodeBuffer): TModalResult;
function DoSaveProjectToTestDirectory: TModalResult;
@ -276,10 +300,12 @@ type
FocusEditor: boolean): boolean;
procedure DoShowMessagesView;
function GetTestProjectFilename: string;
function GetTestUnitFilename(AnUnitInfo: TUnitInfo): string;
procedure SaveSourceEditorChangesToCodeCache;
procedure ApplyCodeToolChanges;
procedure DoJumpToProcedureSection;
procedure DoCompleteCodeAtCursor;
function DoInitDebugger: TModalResult;
procedure LoadMainMenu;
procedure LoadSpeedbuttons;
@ -432,7 +458,7 @@ begin
Parent := Self;
Name := 'ComponentNotebook';
// Align := alBottom;
Left := RunSpeedButton.Left + RunSpeedButton.Width + 4;
Left := ToggleFormSpeedBtn.Left + ToggleFormSpeedBtn.Width + 4;
// Top :=50+ 2;
Top := 0;
Width := Self.ClientWidth - Left;
@ -736,14 +762,20 @@ begin
ButtonLeft := n+12+1;
SaveSpeedBtn := CreateButton('SaveSpeedBtn' , 'btn_save' , 1, ButtonLeft, ButtonTop, [mfLeft], @mnuSaveClicked);
SaveAllSpeedBtn := CreateButton('SaveAllSpeedBtn' , 'btn_saveall' , 1, ButtonLeft, ButtonTop, [mfLeft, mfTop], @mnuSaveAllClicked);
// new row
SaveAllSpeedBtn := CreateButton('SaveAllSpeedBtn' , 'btn_saveall' , 1, ButtonLeft, ButtonTop, [mfLeft], @mnuSaveAllClicked);
NewFormSpeedBtn := CreateButton('NewFormSpeedBtn' , 'btn_newform' , 1, ButtonLeft, ButtonTop, [mfLeft], @mnuNewFormClicked);
ToggleFormSpeedBtn := CreateButton('ToggleFormSpeedBtn' , 'btn_toggleform', 1, ButtonLeft, ButtonTop, [mfLeft, mfTop], @mnuToggleFormUnitCLicked);
// new row
ButtonLeft := 1;
ViewUnitsSpeedBtn := CreateButton('ViewUnitsSpeedBtn' , 'btn_viewunits' , 1, ButtonLeft, ButtonTop, [mfLeft], @mnuViewUnitsClicked);
ViewFormsSpeedBtn := CreateButton('ViewFormsSpeedBtn' , 'btn_viewforms' , 1, ButtonLeft, ButtonTop, [mfLeft], @mnuViewFormsClicked);
ToggleFormSpeedBtn := CreateButton('ToggleFormSpeedBtn' , 'btn_toggleform', 1, ButtonLeft, ButtonTop, [mfLeft], @mnuToggleFormUnitCLicked);
NewFormSpeedBtn := CreateButton('NewFormSpeedBtn' , 'btn_newform' , 1, ButtonLeft, ButtonTop, [mfLeft], @mnuNewFormClicked);
RunSpeedButton := CreateButton('RunSpeedButton' , 'btn_run' , 1, ButtonLeft, ButtonTop, [mfLeft, mfTop], @mnuRunProjectClicked);
inc(ButtonLeft,12);
RunSpeedButton := CreateButton('RunSpeedButton' , 'btn_run' , 2, ButtonLeft, ButtonTop, [mfLeft], @mnuRunProjectClicked);
PauseSpeedButton := CreateButton('PauseSpeedButton' , 'btn_pause' , 2, ButtonLeft, ButtonTop, [mfLeft], @mnuPauseProjectClicked);
PauseSpeedButton.Enabled:=false;
StepIntoSpeedButton := CreateButton('StepIntoSpeedButton' , 'btn_stepinto' , 1, ButtonLeft, ButtonTop, [mfLeft], @mnuStepIntoProjectClicked);
StepOverSpeedButton := CreateButton('StepOverpeedButton' , 'btn_stepover' , 1, ButtonLeft, ButtonTop, [mfLeft, mfTop], @mnuStepOverProjectClicked);
// pnlSpeedButtons.Width := ButtonLeft;
// pnlSpeedButtons.Height := ButtonTop;
@ -1068,6 +1100,37 @@ begin
itmProjectRun.OnClick := @mnuRunProjectClicked;
mnuProject.Add(itmProjectRun);
itmProjectPause := TMenuItem.Create(Self);
itmProjectPause.Name:='itmProjectPause';
itmProjectPause.Caption := 'Pause';
itmProjectPause.OnClick := @mnuPauseProjectClicked;
itmProjectPause.Enabled := false;
mnuProject.Add(itmProjectPause);
itmProjectStepInto := TMenuItem.Create(Self);
itmProjectStepInto.Name:='itmProjectStepInto';
itmProjectStepInto.Caption := 'Step into';
itmProjectStepInto.OnClick := @mnuStepIntoProjectClicked;
mnuProject.Add(itmProjectStepInto);
itmProjectStepOver := TMenuItem.Create(Self);
itmProjectStepOver.Name:='itmProjectStepOver';
itmProjectStepOver.Caption := 'Step over';
itmProjectStepOver.OnClick := @mnuStepOverProjectClicked;
mnuProject.Add(itmProjectStepOver);
itmProjectRunToCursor := TMenuItem.Create(Self);
itmProjectRunToCursor.Name:='itmProjectRunToCursor';
itmProjectRunToCursor.Caption := 'Run to cursor';
itmProjectRunToCursor.OnClick := @mnuRunToCursorProjectClicked;
mnuProject.Add(itmProjectRunToCursor);
itmProjectStop := TMenuItem.Create(Self);
itmProjectStop.Name:='itmProjectStop';
itmProjectStop.Caption := 'Stop';
itmProjectStop.OnClick := @mnuStopProjectClicked;
mnuProject.Add(itmProjectStop);
mnuProject.Add(CreateSeperator);
itmProjectCompilerSettings := TMenuItem.Create(Self);
@ -1622,6 +1685,31 @@ begin
DoRunProject;
end;
Procedure TMainIDE.mnuPauseProjectClicked(Sender : TObject);
begin
DoPauseProject;
end;
Procedure TMainIDE.mnuStepIntoProjectClicked(Sender : TObject);
begin
DoStepIntoProject;
end;
Procedure TMainIDE.mnuStepOverProjectClicked(Sender : TObject);
begin
DoStepOverProject;
end;
Procedure TMainIDE.mnuRunToCursorProjectClicked(Sender : TObject);
begin
DoRunToCursor;
end;
Procedure TMainIDE.mnuStopProjectClicked(Sender : TObject);
begin
DoStopProject;
end;
procedure TMainIDE.mnuProjectCompilerSettingsClicked(Sender : TObject);
var frmCompilerOptions:TfrmCompilerOptions;
begin
@ -1640,7 +1728,7 @@ end;
procedure TMainIDE.mnuProjectOptionsClicked(Sender : TObject);
begin
if ShowProjectOptionsDialog(Project)=mrOk then begin
// UpdateMainUnitSrcEdit;
end;
end;
@ -1664,6 +1752,7 @@ procedure TMainIDE.LoadDesktopSettings(
begin
with TheEnvironmentOptions do begin
if WindowPositionsValid then begin
// set window positions
BoundsRect:=MainWindowBounds;
SourceNoteBook.BoundsRect:=SourceEditorBounds;
if MessagesViewBoundsValid then begin
@ -1673,6 +1762,13 @@ begin
ObjectInspectorOptions.AssignTo(ObjectInspector1);
end;
end;
// set global variables
with CodeToolBoss.GlobalValues do begin
Variables[ExternalMacroStart+'LazarusSrcDir']:=
TheEnvironmentOptions.LazarusDirectory;
Variables[ExternalMacroStart+'FPCSrcDir']:=
TheEnvironmentOptions.FPCSourceDirectory;
end;
end;
procedure TMainIDE.OnLoadEnvironmentSettings(Sender: TObject;
@ -1827,7 +1923,6 @@ CheckHeap('TMainIDE.DoNewEditorUnit L '+IntToStr(GetMem_Cnt));
PropertyEditorHook1.LookupRoot := TForm(CInterface.Control);
TDesigner(TempForm.Designer).SelectOnlyThisComponent(TempForm);
end;
//UpdateMainUnitSrcEdit;
FCodeLastActivated:=not (NewUnitType in [nuForm]);
writeln('TMainIDE.DoNewUnit end');
@ -1842,7 +1937,7 @@ var ActiveSrcEdit:TSourceEditor;
ActiveUnitInfo:TUnitInfo;
SaveDialog:TSaveDialog;
NewUnitName,NewFilename,NewPageName:string;
AText,ACaption,CompResourceCode,s,TestFilename: string;
AText,ACaption,CompResourceCode,TestFilename: string;
MemStream,BinCompStream,TxtCompStream:TMemoryStream;
Driver: TAbstractObjectWriter;
Writer:TWriter;
@ -1975,20 +2070,13 @@ writeln('TMainIDE.DoSaveEditorUnit C ',ResourceCode<>nil);
end;
end else begin
// save source to test directory
s:=EnvironmentOptions.TestBuildDirectory;
if s='' then exit;
if s[length(s)]<>OSDirSeparator then s:=s+OSDirSeparator;
if ActiveUnitInfo.UnitName<>'' then begin
TestFilename:=s+lowercase(ActiveUnitInfo.UnitName)+'.pas';
end else if (Project.MainUnit>=0)
and (Project.Units[Project.MainUnit]=ActiveUnitInfo) then begin
TestFilename:=GetTestProjectFilename;
end;
TestFilename:=GetTestUnitFilename(ActiveUnitInfo);
if TestFilename<>'' then begin
Result:=ActiveUnitInfo.WriteUnitSourceToFile(TestFilename);
if Result<>mrOk then exit;
Result:=mrCancel;
end;
end else
exit;
end;
{$IFDEF IDE_DEBUG}
@ -2170,7 +2258,6 @@ writeln('TMainIDE.DoCloseEditorUnit A PageIndex=',PageIndex);
i:=Project.IndexOf(ActiveUnitInfo);
if (i<>Project.MainUnit) and (ActiveUnitInfo.Source.IsVirtual) then begin
Project.RemoveUnit(i);
//UpdateMainUnitSrcEdit;
end;
writeln('TMainIDE.DoCloseEditorUnit end');
Result:=mrOk;
@ -2752,7 +2839,6 @@ writeln('TMainIDE.DoSaveProject A SaveAs=',SaveAs,' SaveToTestDir=',SaveToTestDi
if MainUnitInfo<>nil then MainUnitInfo.Modified:=false;
if MainUnitSrcEdit<>nil then MainUnitSrcEdit.Modified:=false;
end;
//UpdateMainUnitSrcEdit;
UpdateCaption;
end;
@ -3043,7 +3129,6 @@ Begin
if (AnUnitInfo.FormName<>'') then
Project.RemoveCreateFormFromProjectFile(
'T'+AnUnitInfo.FormName,AnUnitInfo.FormName);
//UpdateMainUnitSrcEdit;
end;
end;
end;
@ -3125,46 +3210,222 @@ function TMainIDE.DoRunProject: TModalResult;
// -connect program to debugger
var
TheProcess : TProcess;
ProgramFilename, Ext, AText : String;
ProgramFilename, AText : String;
MainUnitInfo: TUnitInfo;
begin
Result:=mrCancel;
writeln('[TMainIDE.DoRunProject] A');
if ToolStatus<>itNone then begin
if not (ToolStatus in [itNone,itDebugger]) then begin
Result:=mrAbort;
exit;
end;
if not (Project.ProjectType in [ptProgram, ptApplication, ptCustomProgram])
then exit;
or (Project.MainUnit<0) then
exit;
ProgramFilename:=Project.ProjectFile;
if ProgramFilename='' then ProgramFilename:=GetTestProjectFilename;
Ext:=ExtractFileExt(ProgramFilename);
ProgramFilename:=LowerCase(copy(ProgramFilename,1,
length(ProgramFilename)-length(Ext)));
{$ifdef win32}
ProgramFilename:=ProgramFilename+'.exe';
{$endif}
MainUnitInfo:=Project.Units[Project.MainUnit];
ProgramFilename:=ChangeFileExt(MainUnitInfo.Filename,Project.TargetFileExt);
if MainUnitInfo.IsVirtual then ProgramFilename:=GetTestProjectFilename;
if not FileExists(ProgramFilename) then begin
AText:='No program file "'+ProgramFilename+'" found!';
MessageDlg('File not found',AText,mterror,[mbok],0);
MessageDlg('File not found',AText,mtError,[mbCancel],0);
exit;
end;
try
TheProcess:=TProcess.Create(ProgramFilename,
[poRunSuspended,poUsePipes,poNoConsole]);
TheProcess.Execute;
except
on e: Exception do begin
AText:='Error running program "'+ProgramFilename+'": '+e.Message;
MessageDlg(AText,mterror,[mbok], 0);
end;
end;
case EnvironmentOptions.DebuggerType of
dtGnuDebugger:
begin
if TheDebugger=nil then begin
Result:=DoInitDebugger;
if Result<>mrOk then exit;
Result:=mrCancel;
end;
ToolStatus:=itDebugger;
TheDebugger.Run;
end;
else
begin
try
TheProcess:=TProcess.Create(ProgramFilename,
[poRunSuspended,poUsePipes,poNoConsole]);
TheProcess.Execute;
except
on e: Exception do begin
AText:='Error running program "'+ProgramFilename+'": '+e.Message;
MessageDlg(AText,mterror,[mbok], 0);
end;
end;
end;
end;
Result:=mrOk;
writeln('[TMainIDE.DoRunProject] END');
end;
function TMainIDE.DoPauseProject: TModalResult;
begin
Result:=mrCancel;
if (ToolStatus<>itDebugger) or (TheDebugger=nil) then exit;
TheDebugger.Pause;
Result:=mrOk;
end;
function TMainIDE.DoStepIntoProject: TModalResult;
begin
Result:=mrCancel;
if ToolStatus=itNone then begin
Result:=DoInitDebugger;
if Result<>mrOk then exit;
Result:=mrCancel;
ToolStatus:=itDebugger;
end;
if (ToolStatus<>itDebugger) or (TheDebugger=nil) then
exit
else begin
TheDebugger.StepInto;
Result:=mrOk;
end;
end;
function TMainIDE.DoStepOverProject: TModalResult;
begin
Result:=mrCancel;
if ToolStatus=itNone then begin
Result:=DoInitDebugger;
if Result<>mrOk then exit;
Result:=mrCancel;
ToolStatus:=itDebugger;
end;
if (ToolStatus<>itDebugger) or (TheDebugger=nil) then
exit
else begin
TheDebugger.StepOver;
Result:=mrOk;
end;
end;
function TMainIDE.DoStopProject: TModalResult;
begin
Result:=mrCancel;
if (ToolStatus<>itDebugger) or (TheDebugger=nil) then exit;
TheDebugger.Stop;
Result:=mrOk;
end;
function TMainIDE.DoRunToCursor: TModalResult;
var ActiveSrcEdit: TSourceEditor;
ActiveUnitInfo: TUnitInfo;
UnitFilename: string;
begin
Result:=mrCancel;
if ToolStatus=itNone then begin
Result:=DoInitDebugger;
if Result<>mrOk then exit;
Result:=mrCancel;
ToolStatus:=itDebugger;
end;
if ToolStatus<>itDebugger then exit;
GetCurrentUnit(ActiveSrcEdit,ActiveUnitInfo);
if (ActiveSrcEdit=nil) or (ActiveUnitInfo=nil) then begin
MessageDlg('Run to failed','Please open a unit before run.',mtError,
[mbCancel],0);
exit;
end;
if not ActiveUnitInfo.Source.IsVirtual then
UnitFilename:=ActiveUnitInfo.Filename
else
UnitFilename:=GetTestUnitFilename(ActiveUnitInfo);
TheDebugger.RunTo(UnitFilename,ActiveSrcEdit.EditorComponent.CaretY);
end;
function TMainIDE.DoInitDebugger: TModalResult;
var ProgramFilename: string;
MainUnitInfo: TUnitInfo;
begin
Result:=mrCancel;
if Project.MainUnit<0 then exit;
case EnvironmentOptions.DebuggerType of
dtGnuDebugger:
begin
{ ToDo: GnuDebugger
if (TheDebugger<>nil) and (not (TheDebugger is TGnuDebugger)) then begin
TheDebugger.Free;
TheDebugger:=nil;
end;
TheDebugger:=TGnuDebugger.Create;}
end;
else
begin
TheDebugger.Free;
TheDebugger:=nil;
exit;
end;
end;
MainUnitInfo:=Project.Units[Project.MainUnit];
if MainUnitInfo.IsVirtual then
ProgramFilename:=GetTestProjectFilename
else
ProgramFilename:=ChangeFileExt(MainUnitInfo.Filename,Project.TargetFileExt);
TheDebugger.Filename:=ProgramFilename;
TheDebugger.OnState:=@OnDebuggerChangeState;
TheDebugger.OnCurrent:=@OnDebuggerCurrentLine;
// property BreakPointGroups: TDBGBreakPointGroups read FBreakPointGroups; // list of all breakpoints
// property Watches: TDBGWatches read FWatches; // list of all watches localvars etc
Result:=mrOk;
end;
procedure TMainIDE.OnDebuggerChangeState(Sender: TObject);
begin
if (Sender<>TheDebugger) or (Sender=nil) then exit;
RunSpeedButton.Enabled:=(TheDebugger.State in [dsStop,dsPause,dsError]);
PauseSpeedButton.Enabled:=(TheDebugger.State in [dsRun]);
itmProjectRun.Enabled:=RunSpeedButton.Enabled;
itmProjectPause.Enabled:=PauseSpeedButton.Enabled;
case TheDebugger.State of
dsStop:
begin
// program stopped -> end debugging session
TheDebugger.Free;
TheDebugger:=nil;
ToolStatus:=itNone;
end;
dsPause:
begin
// program paused
ToolStatus:=itDebugger;
end;
dsRun:
begin
// program is running
ToolStatus:=itDebugger;
end;
dsError:
begin
// ???
ToolStatus:=itDebugger;
end;
end;
end;
procedure TMainIDE.OnDebuggerCurrentLine(Sender: TObject;
const AFilename: String; const ALine: Integer);
// debugger paused program due to pause or error
// -> show the current execution line in editor
var ActiveSrcEdit: TSourceEditor;
begin
if (Sender<>TheDebugger) or (Sender=nil) then exit;
if DoOpenEditorFile(AFilename,false)<>mrOk then exit;
ActiveSrcEdit:=SourceNoteBook.GetActiveSE;
if ActiveSrcEdit=nil then exit;
ActiveSrcEdit.EditorComponent.CaretXY:=Point(1,ALine);
ActiveSrcEdit.EditorComponent.TopLine:=
ALine-(ActiveSrcEdit.EditorComponent.LinesInWindow div 2);
ActiveSrcEdit.ErrorLine:=ALine;
end;
function TMainIDE.SomethingOfProjectIsModified: boolean;
begin
Result:=(Project<>nil)
@ -3649,13 +3910,27 @@ var TestDir: string;
begin
Result:='';
if (Project.MainUnit<0) then exit;
Result:=ExtractFilename(Project.Units[Project.MainUnit].Source.Filename);
if (Result='') then exit;
TestDir:=EnvironmentOptions.TestBuildDirectory;
if (TestDir='') then exit;
if TestDir[length(TestDir)]<>OSDirSeparator then
TestDir:=TestDir+OSDirSeparator;
Result:=CodeToolBoss.GetSourceType(Project.Units[Project.MainUnit].Source);
if (Result='') then exit;
Result:=TestDir+Result+'.lpr';
Result:=TestDir+Result;
end;
function TMainIDE.GetTestUnitFilename(AnUnitInfo: TUnitInfo): string;
var TestDir: string;
begin
Result:='';
if AnUnitInfo=nil then exit;
TestDir:=EnvironmentOptions.TestBuildDirectory;
if (TestDir='') then exit;
if TestDir[length(TestDir)]<>OSDirSeparator then
TestDir:=TestDir+OSDirSeparator;
Result:=ExtractFilename(AnUnitInfo.Filename);
if Result='' then exit;
Result:=TestDir+Result;
end;
//------------------------------------------------------------------------------
@ -4020,6 +4295,9 @@ end.
{ =============================================================================
$Log$
Revision 1.124 2001/10/18 13:01:30 lazarus
MG: fixed speedbuttons numglyphs>1 and started IDE debugging
Revision 1.123 2001/10/17 13:43:15 lazarus
MG: added find previous to source editor

View File

@ -309,6 +309,7 @@ const
'.pas', '.pas', '.pas', '.pas'
);
DefaultTargetFileExt : string = {$IFDEF win32}'.exe'{$ELSE}''{$ENDIF};
function ProjectTypeNameToType(const s:string): TProjectType;
@ -869,7 +870,7 @@ begin
fModified := false;
fOutputDirectory := '.';
fProjectFile := '';
fTargetFileExt := '';
fTargetFileExt := DefaultTargetFileExt;
fTitle := '';
fUnitList := TList.Create; // list of TUnitInfo
fUnitOutputDirectory := '.';
@ -1024,7 +1025,7 @@ begin
'ProjectOptions/General/ActiveEditorIndexAtStart/Value', -1);
IconPath := xmlcfg.GetValue('ProjectOptions/General/IconPath/Value', './');
TargetFileExt := xmlcfg.GetValue(
'ProjectOptions/General/TargetFileExt/Value', '');
'ProjectOptions/General/TargetFileExt/Value', DefaultTargetFileExt);
Title := xmlcfg.GetValue('ProjectOptions/General/Title/Value', '');
OutputDirectory := xmlcfg.GetValue(
'ProjectOptions/General/OutputDirectory/Value', '.');
@ -1132,7 +1133,7 @@ begin
fModified := false;
fOutputDirectory := '.';
fProjectFile := '';
fTargetFileExt := '';
fTargetFileExt := {$IFDEF win32}'.exe'{$ELSE}''{$ENDIF};
fTitle := '';
fUnitOutputDirectory := '.';
end;
@ -1469,6 +1470,9 @@ end.
{
$Log$
Revision 1.31 2001/10/18 13:01:31 lazarus
MG: fixed speedbuttons numglyphs>1 and started IDE debugging
Revision 1.30 2001/10/15 13:11:27 lazarus
MG: added complete code

View File

@ -1,22 +1,17 @@
/* XPM */
static char * ActiveBreakPoint_xpm[] = {
"16 16 3 1",
"11 11 3 1",
" c None",
". c #000000",
"+ c #FF0000",
" ",
" ",
" ..... ",
" .+++++. ",
" .+++++++. ",
" .+++++++++. ",
" .+++++++++. ",
" .+++++++++. ",
" .+++++++++. ",
" .+++++++++. ",
" .+++++++. ",
" .+++++. ",
" ..... ",
" ",
" ",
" "};
" ..... ",
" .+++++. ",
" .+++++++. ",
".+++++++++.",
".+++++++++.",
".+++++++++.",
".+++++++++.",
".+++++++++.",
" .+++++++. ",
" .+++++. ",
" ..... "};

View File

@ -1,22 +1,17 @@
/* XPM */
static char * InactiveBreakPoint_xpm[] = {
"16 16 3 1",
"11 11 3 1",
" c None",
". c #000000",
"+ c #0DA500",
" ",
" ",
" ..... ",
" .+++++. ",
" .+++++++. ",
" .+++++++++. ",
" .+++++++++. ",
" .+++++++++. ",
" .+++++++++. ",
" .+++++++++. ",
" .+++++++. ",
" .+++++. ",
" ..... ",
" ",
" ",
" "};
" ..... ",
" .+++++. ",
" .+++++++. ",
".+++++++++.",
".+++++++++.",
".+++++++++.",
".+++++++++.",
".+++++++++.",
" .+++++++. ",
" .+++++. ",
" ..... "};

View File

@ -1,80 +1,26 @@
/* XPM */
static char * bookmark0_xpm[] = {
"16 16 61 1",
"11 11 12 1",
" c None",
". c #23422D",
". c #000000",
"+ c #336041",
"@ c #203D29",
"# c #23412C",
"$ c #3C6749",
"% c #5F826A",
"& c #8CA594",
"* c #6B8C75",
"= c #426C4F",
"- c #376344",
"; c #8DA695",
"> c #CAD6CE",
", c #B9C9BE",
"' c #DDE4DF",
") c #95AD9D",
"! c #356143",
"~ c #7F9B88",
"{ c #BCCAC0",
"] c #587D64",
"^ c #7E9A87",
"/ c #D9E1DB",
"( c #4E755A",
"_ c #487055",
": c #C7D3CB",
"< c #62856D",
"[ c #4B7357",
"} c #FCFCFC",
"| c #7A9783",
"1 c #91A998",
"2 c #CBD6CE",
"3 c #386446",
"4 c #FFFFFF",
"5 c #7F9B87",
"6 c #3E684B",
"7 c #366244",
"8 c #678871",
"9 c #F4F6F5",
"0 c #6D8D77",
"a c #567B61",
"b c #EEF2EF",
"c c #849F8D",
"d c #A2B6A8",
"e c #DEE5E0",
"f c #3D684B",
"g c #BAC9BE",
"h c #C4D1C8",
"i c #406A4D",
"j c #CDD8D1",
"k c #8EA796",
"l c #75947F",
"m c #D5DED8",
"n c #63856D",
"o c #779480",
"p c #6E8E78",
"q c #62846D",
"r c #3E694C",
"s c #85A08E",
"t c #C3D0C7",
"u c #AFC0B4",
"v c #668870",
" .++++++. ",
" @++++++++@ ",
" #++++$%&*=+# ",
" @++++-;>,')!+@ ",
".+++++~{]-^/(++.",
"+++++_:<++[}|+++",
"+++++123++[45+++",
"++++62{7++890+++",
"++++abc+++de_+++",
"++++abc++fghi+++",
"++++=jk!!lmn++++",
".++++oeppmq++++.",
" @+++rstuv7+++@ ",
" #++++++++++# ",
" @++++++++@ ",
" .++++++. "};
"@ c #5F826A",
"# c #BBCABF",
"$ c #A3B7AA",
"% c #FFFFFF",
"& c #D1DBD4",
"* c #779580",
"= c #E7ECE9",
"- c #8DA695",
"; c #497155",
" ..... ",
" .+++++. ",
" .++@#$++. ",
".++@%#&$++.",
".++##+*=++.",
".++##+*%++.",
".++##+*%++.",
".++$&+-=++.",
" .+;=%%*+. ",
" .++*@+. ",
" ..... "};

View File

@ -1,62 +1,25 @@
/* XPM */
static char * bookmark1_xpm[] = {
"16 16 43 1",
"11 11 11 1",
" c None",
". c #23422D",
". c #000000",
"+ c #336041",
"@ c #203D29",
"# c #23412C",
"$ c #487155",
"% c #52785E",
"& c #809C89",
"* c #5B7F66",
"= c #3D684A",
"- c #B2C3B7",
"; c #CFD9D2",
"> c #F2F4F2",
", c #89A390",
"' c #396446",
") c #708F79",
"! c #DAE2DD",
"~ c #5C8067",
"{ c #668870",
"] c #E3E9E5",
"^ c #53795F",
"/ c #376344",
"( c #7B9884",
"_ c #C3D0C7",
": c #406A4D",
"< c #487054",
"[ c #D0DAD3",
"} c #ADBFB3",
"| c #497156",
"1 c #D2DBD5",
"2 c #86A18F",
"3 c #6B8B75",
"4 c #F0F3F1",
"5 c #74927D",
"6 c #F4F6F4",
"7 c #567B62",
"8 c #819D8A",
"9 c #CBD6CE",
"0 c #6C8C76",
"a c #8AA391",
"b c #B8C8BD",
"c c #C2CFC6",
"d c #7E9A86",
" .++++++. ",
" @++++++++@ ",
" #++++$%&*++# ",
" @++++=-;>,+++@ ",
".+++++'%)!~++++.",
"++++++++{]^+++++",
"+++++++/(_:+++++",
"+++++++<[}++++++",
"+++++++|12++++++",
"+++++++34*++++++",
"+++++++567++++++",
".++++++89++++++.",
" @+++0abcd:+++@ ",
" #++++++++++# ",
" @++++++++@ ",
" .++++++. "};
"@ c #5F826A",
"# c #8DA695",
"$ c #497155",
"% c #A3B7AA",
"& c #E7ECE9",
"* c #BBCABF",
"= c #779580",
"- c #D1DBD4",
" ..... ",
" .+++++. ",
" .+++@#++. ",
".++$%&*+++.",
".++$=-*+++.",
".++++**+++.",
".++++**+++.",
".++++**+++.",
" .+++**++. ",
" .++@@+. ",
" ..... "};

View File

@ -1,80 +1,26 @@
/* XPM */
static char * bookmark2_xpm[] = {
"16 16 61 1",
"11 11 12 1",
" c None",
". c #23422D",
". c #000000",
"+ c #336041",
"@ c #203D29",
"# c #23412C",
"$ c #3E684B",
"% c #567B62",
"& c #7F9B88",
"* c #8CA594",
"= c #5B7F66",
"- c #3C6749",
"; c #98AE9F",
"> c #9CB1A2",
", c #ACBFB2",
"' c #C0CEC5",
") c #D2DBD5",
"! c #53795F",
"~ c #346042",
"{ c #8BA593",
"] c #E7ECE9",
"^ c #3A6547",
"/ c #3B6648",
"( c #D1DBD4",
"_ c #B2C3B7",
": c #5F826A",
"< c #62846C",
"[ c #346142",
"} c #406A4D",
"| c #D3DDD6",
"1 c #ADBFB2",
"2 c #76947F",
"3 c #E6EBE7",
"4 c #6B8B75",
"5 c #356143",
"6 c #5B7F67",
"7 c #CFD9D2",
"8 c #789681",
"9 c #6D8D77",
"0 c #D0DAD3",
"a c #6C8C76",
"b c #366244",
"c c #3D684B",
"d c #6A8B75",
"e c #A7BAAD",
"f c #466F53",
"g c #64866E",
"h c #A4B8AA",
"i c #8DA695",
"j c #4B7257",
"k c #3F694C",
"l c #A9BCAF",
"m c #476F53",
"n c #4B7358",
"o c #E8EDE9",
"p c #EEF1EF",
"q c #B8C7BC",
"r c #CBD6CE",
"s c #E0E7E2",
"t c #4D7459",
"u c #D6DFD9",
"v c #C2CFC6",
" .++++++. ",
" @++++++++@ ",
" #+++$%&*=++# ",
" @+++-;>,')!~+@ ",
".++++{]^+/(_-++.",
"+++++:<[+}|1/+++",
"+++++++++234++++",
"+++++++5678[++++",
"+++++++90ab+++++",
"+++++cde4+f-++++",
"+++5ghij/klm++++",
".++nopqqqrs++++.",
" @+tuuuuuuv+++@ ",
" #++++++++++# ",
" @++++++++@ ",
" .++++++. "};
"@ c #8DA695",
"# c #BBCABF",
"$ c #A3B7AA",
"% c #497155",
"& c #FFFFFF",
"* c #E7ECE9",
"= c #779580",
"- c #D1DBD4",
"; c #5F826A",
" ..... ",
" .+++++. ",
" .++@#$%+. ",
".++@&#**++.",
".++@@+=&++.",
".+++++--++.",
".+++%*-%++.",
".++%*#++++.",
" .+#&&&&+. ",
" .;====. ",
" ..... "};

View File

@ -1,81 +1,26 @@
/* XPM */
static char * bookmark3_xpm[] = {
"16 16 62 1",
"11 11 12 1",
" c None",
". c #23422D",
". c #000000",
"+ c #336041",
"@ c #203D29",
"# c #23412C",
"$ c #3E684B",
"% c #567B62",
"& c #7F9B88",
"* c #8CA594",
"= c #5E8168",
"- c #3D674A",
"; c #3C6749",
"> c #98AE9F",
", c #B2C3B7",
"' c #ADBFB2",
") c #D3DCD6",
"! c #DEE5E0",
"~ c #779580",
"{ c #346042",
"] c #5E8269",
"^ c #F6F8F6",
"/ c #487055",
"( c #466F52",
"_ c #D4DDD7",
": c #436C50",
"< c #356243",
"[ c #406A4D",
"} c #D3DDD6",
"| c #3B6648",
"1 c #A2B6A8",
"2 c #CCD7CF",
"3 c #4F765B",
"4 c #B0C1B5",
"5 c #B4C5B9",
"6 c #A5B9AB",
"7 c #60836B",
"8 c #5C8067",
"9 c #62846C",
"0 c #D6DFD9",
"a c #D1DBD4",
"b c #53795F",
"c c #7F9B87",
"d c #E9EEEA",
"e c #708F79",
"f c #446D51",
"g c #5B7F66",
"h c #3B6749",
"i c #A9BCAF",
"j c #D5DED8",
"k c #4E755A",
"l c #B5C5BB",
"m c #5E8169",
"n c #A4B8AA",
"o c #C3D0C7",
"p c #4B7358",
"q c #366244",
"r c #B1C2B6",
"s c #C0CEC4",
"t c #B9C8BE",
"u c #8AA492",
"v c #426C4F",
"w c #346142",
" .++++++. ",
" @++++++++@ ",
" #+++$%&*=-+# ",
" @+++;>,')!~{+@ ",
".++++]^/+(_,;++.",
"+++++:~<+[}'|+++",
"++++++++<123++++",
"+++++++4567+++++",
"+++++++890ab++++",
"+++++++++cde++++",
"+++f1g++hij$++++",
".++kdlbmnop++++.",
" @+qgrstuvw+++@ ",
" #++++++++++# ",
" @++++++++@ ",
" .++++++. "};
"@ c #A3B7AA",
"# c #BBCABF",
"$ c #497155",
"% c #E7ECE9",
"& c #D1DBD4",
"* c #5F826A",
"= c #8DA695",
"- c #FFFFFF",
"; c #779580",
" ..... ",
" .+++++. ",
" .++@#@$+. ",
".++@%#&%++.",
".++**+=%++.",
".++++#-*++.",
".++++;#%++.",
".++=@+=-++.",
" .+;---#+. ",
" .+$;*+. ",
" ..... "};

View File

@ -1,75 +1,26 @@
/* XPM */
static char * bookmark4_xpm[] = {
"16 16 56 1",
"11 11 12 1",
" c None",
". c #23422D",
". c #000000",
"+ c #336041",
"@ c #203D29",
"# c #23412C",
"$ c #62846D",
"% c #6E8E78",
"& c #51775D",
"* c #DAE2DC",
"= c #B1C2B6",
"- c #547A60",
"; c #AABCB0",
"> c #F0F3F1",
", c #71907B",
"' c #61836C",
") c #86A18F",
"! c #FBFCFB",
"~ c #63866E",
"{ c #52785D",
"] c #5B7F66",
"^ c #668870",
"/ c #CED8D1",
"( c #466F53",
"_ c #356143",
": c #54795F",
"< c #9FB4A6",
"[ c #547960",
"} c #829D8A",
"| c #ADBFB3",
"1 c #5F826A",
"2 c #B7C7BD",
"3 c #597E65",
"4 c #386446",
"5 c #BDCBC1",
"6 c #8BA493",
"7 c #376345",
"8 c #AEC0B4",
"9 c #D5DED7",
"0 c #BCCBC0",
"a c #BBCABF",
"b c #C0CEC4",
"c c #EDF0EE",
"d c #C8D4CB",
"e c #AFC1B4",
"f c #497156",
"g c #4D7459",
"h c #53795F",
"i c #789581",
"j c #E2E8E4",
"k c #70907A",
"l c #50775C",
"m c #5E8169",
"n c #B5C5B9",
"o c #7F9B87",
"p c #B8C8BD",
"q c #52785E",
" .++++++. ",
" @++++++++@ ",
" #++++++$%++# ",
" @++++++&*=+++@ ",
".++++++-;>,++++.",
"++++++';)!~+++++",
"+++++{;]^/(+++++",
"+++_:<[+}|++++++",
"+++12344567+++++",
"+++890abcdef++++",
"+++ghhhijkl4++++",
".++++++mn++++++.",
" @+++++op+++++@ ",
" #++++q1++++# ",
" @++++++++@ ",
" .++++++. "};
"@ c #779580",
"# c #BBCABF",
"$ c #5F826A",
"% c #D1DBD4",
"& c #FFFFFF",
"* c #A3B7AA",
"= c #8DA695",
"- c #497155",
"; c #E7ECE9",
" ..... ",
" .+++++. ",
" .+++@#$+. ",
".++++%&@++.",
".+++*=&@++.",
".++-;+&@++.",
".++##@&*-+.",
".++#&&&&@+.",
" .++++&@+. ",
" .+++@-. ",
" ..... "};

View File

@ -1,75 +1,25 @@
/* XPM */
static char * bookmark5_xpm[] = {
"16 16 56 1",
"11 11 11 1",
" c None",
". c #23422D",
". c #000000",
"+ c #336041",
"@ c #203D29",
"# c #23412C",
"$ c #406A4D",
"% c #AABDB0",
"& c #D6DFD9",
"* c #D5DED8",
"= c #9EB3A4",
"- c #3B6648",
"; c #436C50",
"> c #C8D4CC",
", c #BBCABF",
"' c #B8C7BC",
") c #B5C5BA",
"! c #75937F",
"~ c #366244",
"{ c #60836A",
"] c #B0C1B5",
"^ c #3E684B",
"/ c #3A6648",
"( c #356243",
"_ c #63866E",
": c #ADBFB2",
"< c #70907A",
"[ c #C2CFC6",
"} c #A0B5A6",
"| c #9EB4A5",
"1 c #6C8C76",
"2 c #53795F",
"3 c #73927D",
"4 c #E3E9E5",
"5 c #789681",
"6 c #BDCBC1",
"7 c #E6EBE8",
"8 c #386445",
"9 c #366243",
"0 c #B3C4B8",
"a c #466F53",
"b c #C4D1C8",
"c c #6A8B74",
"d c #446D50",
"e c #BECCC2",
"f c #51775D",
"g c #497155",
"h c #DAE2DC",
"i c #ADBFB3",
"j c #87A18F",
"k c #ACBEB2",
"l c #B9C8BD",
"m c #426C4F",
"n c #346142",
"o c #5B7F66",
"p c #8AA492",
"q c #8CA594",
" .++++++. ",
" @++++++++@ ",
" #++++++++++# ",
" @+++$%&&&*=-+@ ",
".++++;>,'')!~++.",
"+++++{]^--/(++++",
"+++++_:(++++++++",
"+++++<[}|1~+++++",
"+++++213=45+++++",
"++++++++~67+++++",
"++++^8++90,+++++",
".++abc+d3ef++++.",
" @+ghijklmn+++@ ",
" #nopq1m++++# ",
" @++++++++@ ",
" .++++++. "};
"@ c #BBCABF",
"# c #8DA695",
"$ c #FFFFFF",
"% c #779580",
"& c #E7ECE9",
"* c #A3B7AA",
"= c #497155",
"- c #5F826A",
" ..... ",
" .+++++. ",
" .++@@@#+. ",
".+++$@@#++.",
".++%&@*=++.",
".++%$@&*++.",
".++--+#$++.",
".++##+#$++.",
" .+%$$$*+. ",
" .+=%-+. ",
" ..... "};

View File

@ -1,87 +1,25 @@
/* XPM */
static char * bookmark6_xpm[] = {
"16 16 68 1",
"11 11 11 1",
" c None",
". c #23422D",
". c #000000",
"+ c #336041",
"@ c #203D29",
"# c #23412C",
"$ c #346142",
"% c #62856D",
"& c #5A7E65",
"* c #466E52",
"= c #8DA695",
"- c #B2C3B7",
"; c #9FB4A5",
"> c #7E9B87",
", c #3E684B",
"' c #97AD9E",
") c #A9BCAF",
"! c #6A8B74",
"~ c #ABBDB1",
"{ c #819D8A",
"] c #396547",
"^ c #708F79",
"/ c #B4C4B9",
"( c #5D8168",
"_ c #AABCAF",
": c #4B7357",
"< c #477054",
"[ c #DAE2DC",
"} c #CDD8D0",
"| c #9AB0A0",
"1 c #91AA99",
"2 c #C9D4CC",
"3 c #D5DED8",
"4 c #5F826A",
"5 c #6D8D77",
"6 c #F4F6F5",
"7 c #71907A",
"8 c #3B6649",
"9 c #50765C",
"0 c #E3E9E4",
"a c #B1C2B6",
"b c #7F9B87",
"c c #FFFFFF",
"d c #386446",
"e c #D6DFD8",
"f c #BBCABF",
"g c #7A9783",
"h c #FCFCFC",
"i c #52785E",
"j c #476F53",
"k c #E3E9E5",
"l c #789681",
"m c #4E755A",
"n c #D3DCD6",
"o c #9BB1A1",
"p c #376344",
"q c #96AD9D",
"r c #CAD6CE",
"s c #4C7358",
"t c #356143",
"u c #668871",
"v c #CBD6CF",
"w c #93AB9B",
"x c #ABBDB0",
"y c #53785E",
"z c #688972",
"A c #8CA594",
"B c #7F9B88",
"C c #426C4F",
" .++++++. ",
" @++++++++@ ",
" #+++++$%&++# ",
" @++++*=-;>+++@ ",
".++++,')!++++++.",
"++++,~{]++++++++",
"++++^/(__:++++++",
"+++<[}|1234+++++",
"+++5678+90a+++++",
"+++bc:++def+++++",
"+++ghi++jkl+++++",
".++mnop]qrs++++.",
" @+tuvwqxy++++@ ",
" #++zABC++++# ",
" @++++++++@ ",
" .++++++. "};
"@ c #5F826A",
"# c #BBCABF",
"$ c #497155",
"% c #FFFFFF",
"& c #D1DBD4",
"* c #A3B7AA",
"= c #779580",
"- c #E7ECE9",
" ..... ",
" .+++++. ",
" .++@##@+. ",
".++$%#&%$+.",
".++*&@=+++.",
".++#-%%-++.",
".++#&+@%=+.",
".++*&+$%=+.",
" .+$-%%#+. ",
" .++=@+. ",
" ..... "};

View File

@ -1,69 +1,25 @@
/* XPM */
static char * bookmark7_xpm[] = {
"16 16 50 1",
"11 11 11 1",
" c None",
". c #23422D",
". c #000000",
"+ c #336041",
"@ c #203D29",
"# c #23412C",
"$ c #C2CFC6",
"% c #D6DFD9",
"& c #D4DDD7",
"* c #6C8D76",
"= c #4B7257",
"- c #CBD7CF",
"; c #B8C7BC",
"> c #CFD9D2",
", c #D1DBD4",
"' c #52785D",
") c #6B8B75",
"! c #8CA594",
"~ c #3B6648",
"{ c #3C6749",
"] c #6D8D77",
"^ c #C8D4CC",
"/ c #5B7F66",
"( c #406A4D",
"_ c #376345",
": c #CBD6CE",
"< c #8DA695",
"[ c #9AB0A1",
"} c #9DB2A4",
"| c #346142",
"1 c #346041",
"2 c #6C8C76",
"3 c #AFC0B4",
"4 c #487055",
"5 c #53785E",
"6 c #DBE3DE",
"7 c #688972",
"8 c #426B4F",
"9 c #9FB4A6",
"0 c #85A08E",
"a c #3B6649",
"b c #A1B5A7",
"c c #356243",
"d c #5D8068",
"e c #AEBFB3",
"f c #487054",
"g c #557A60",
"h c #BBCABF",
"i c #6B8C75",
"j c #24402D",
"k c #3D684B",
" .++++++. ",
" @++++++++@ ",
" #++++++++++# ",
" @+++$%%%%%&*+@ ",
".+++=-;;;;>,'++.",
"++++)!~~{]^/++++",
"++++{(++_:<_++++",
"+++++++{[}|+++++",
"++++++1234++++++",
"++++++567+++++++",
"+++++890a+++++++",
".++++!bc+++++++.",
" @+cdef+++++++@ ",
" #ghi+++++++# ",
" jk|++++++@ ",
" .++++++. "};
"@ c #8DA695",
"# c #BBCABF",
"$ c #5F826A",
"% c #D1DBD4",
"& c #FFFFFF",
"* c #E7ECE9",
"= c #A3B7AA",
"- c #779580",
" ..... ",
" .+++++. ",
" .+@####$. ",
".++@##%&$+.",
".+++++*@++.",
".++++=*+++.",
".++++&@+++.",
".+++-&++++.",
" .++#%+++. ",
" .+$$++. ",
" ..... "};

View File

@ -1,90 +1,26 @@
/* XPM */
static char * bookmark8_xpm[] = {
"16 16 71 1",
"11 11 12 1",
" c None",
". c #23422D",
". c #000000",
"+ c #336041",
"@ c #203D29",
"# c #23412C",
"$ c #446D51",
"% c #708F7A",
"& c #8BA493",
"* c #5C8067",
"= c #3A6547",
"- c #456E51",
"; c #AFC0B4",
"> c #BFCDC3",
", c #B3C4B8",
"' c #D0DAD3",
") c #829D8B",
"! c #366244",
"~ c #93AB9B",
"{ c #ADBFB3",
"] c #436C50",
"^ c #91A998",
"/ c #E5EBE7",
"( c #50765C",
"_ c #DFE6E1",
": c #849F8D",
"< c #346142",
"[ c #98AE9F",
"} c #E2E8E4",
"| c #4D7459",
"1 c #D4DED7",
"2 c #BDCBC1",
"3 c #557A60",
"4 c #456E52",
"5 c #CDD8D0",
"6 c #7C9985",
"7 c #7F9B87",
"8 c #DDE4DF",
"9 c #C2CFC7",
"0 c #829E8B",
"a c #396547",
"b c #3D674A",
"c c #98AF9F",
"d c #ABBDB1",
"e c #6A8B74",
"f c #AEC0B4",
"g c #ECF0ED",
"h c #819D8A",
"i c #5E8169",
"j c #EBEFEC",
"k c #416B4E",
"l c #DEE5E0",
"m c #BBCABF",
"n c #789681",
"o c #FBFBFB",
"p c #587D63",
"q c #346041",
"r c #557B61",
"s c #DEE5E1",
"t c #CDD8D1",
"u c #CCD7D0",
"v c #60836B",
"w c #688972",
"x c #B3C3B8",
"y c #70907A",
"z c #356143",
"A c #577C63",
"B c #A0B4A7",
"C c #C3D0C7",
"D c #B2C3B7",
"E c #769480",
"F c #376344",
" .++++++. ",
" @++++++++@ ",
" #+++$%&*=++# ",
" @+++-;>,')!++@ ",
".++++~{]+^/(+++.",
"+++++_:+<[}|++++",
"+++++123456+++++",
"++++=75890a+++++",
"+++bcd3efgh+++++",
"+++ij*++klm+++++",
"+++nopq<rs:+++++",
".++-tuvwxy+++++.",
" @+zABCDEF++++@ ",
" #++++++++++# ",
" @++++++++@ ",
" .++++++. "};
"@ c #8DA695",
"# c #BBCABF",
"$ c #A3B7AA",
"% c #497155",
"& c #E7ECE9",
"* c #D1DBD4",
"= c #FFFFFF",
"- c #779580",
"; c #5F826A",
" ..... ",
" .+++++. ",
" .++@#$%+. ",
".++$&#*&++.",
".++#*+@=++.",
".++%===$++.",
".++$&-@=;+.",
".++#*+%=-+.",
" .+-===&+. ",
" .+%--+. ",
" ..... "};

View File

@ -1,87 +1,26 @@
/* XPM */
static char * bookmark9_xpm[] = {
"16 16 68 1",
"11 11 12 1",
" c None",
". c #23422D",
". c #000000",
"+ c #336041",
"@ c #203D29",
"# c #23412C",
"$ c #6F8E79",
"% c #8CA594",
"& c #7C9985",
"* c #3E694C",
"= c #3C6749",
"- c #708F79",
"; c #BBCAC0",
"> c #B3C4B8",
", c #D1DBD4",
"' c #90A897",
") c #3A6547",
"! c #6D8D77",
"~ c #CBD7CF",
"{ c #456E52",
"] c #577C62",
"^ c #D9E1DC",
"/ c #91A999",
"( c #386446",
"_ c #436D50",
": c #B7C7BB",
"< c #7F9B88",
"[ c #CED8D1",
"} c #BDCCC2",
"| c #3D684B",
"1 c #799782",
"2 c #E6EBE7",
"3 c #698A73",
"4 c #72917B",
"5 c #E5EAE6",
"6 c #87A18F",
"7 c #346142",
"8 c #54795F",
"9 c #D4DDD6",
"0 c #8AA492",
"a c #356243",
"b c #416B4E",
"c c #9DB2A4",
"d c #EBF0ED",
"e c #95AC9C",
"f c #91A998",
"g c #BECCC2",
"h c #E4EAE6",
"i c #587C63",
"j c #436C50",
"k c #97AE9E",
"l c #ADBFB3",
"m c #C8D4CC",
"n c #AABDB0",
"o c #6F8F79",
"p c #C5D2C9",
"q c #466F53",
"r c #3F694C",
"s c #8BA593",
"t c #A5B8AB",
"u c #4F755B",
"v c #497156",
"w c #668871",
"x c #AFC0B4",
"y c #96AD9D",
"z c #366243",
"A c #72917C",
"B c #829D8A",
"C c #567B62",
" .++++++. ",
" @++++++++@ ",
" #++++$%&*++# ",
" @+++=-;>,')++@ ",
".++++!~{+]^/(++.",
"++++_:<+++[}|+++",
"++++123+++[}|+++",
"++++4567+890a+++",
"++++bcdefghi++++",
"+++++jkl0mn+++++",
"+++++++(opq+++++",
".+++++rstu+++++.",
" @+7vwxyv+++++@ ",
" #zABC++++++# ",
" @77++++++@ ",
" .++++++. "};
"@ c #8DA695",
"# c #BBCABF",
"$ c #A3B7AA",
"% c #497155",
"& c #FFFFFF",
"* c #E7ECE9",
"= c #D1DBD4",
"- c #779580",
"; c #5F826A",
" ..... ",
" .+++++. ",
" .++@#$%+. ",
".++@&#*=++.",
".++##+-&++.",
".++$*-#&++.",
".++%=&=&++.",
".++;;+@*++.",
" .+;&&&-+. ",
" .+%-%+. ",
" ..... "};

View File

@ -1,20 +1,24 @@
/* XPM */
static char * btn_run_xpm[] = {
"8 14 3 1",
"16 14 7 1",
" c None",
". c #00FF00",
"+ c #000000",
". ",
" . ",
". . ",
" . . ",
". . . ",
" . . . ",
". . . . ",
" . . . +",
". . . + ",
" . . + ",
". . + ",
" . + ",
". + ",
"++ "};
". c #146600",
"+ c #444444",
"@ c #26B200",
"# c #898989",
"$ c #275919",
"% c #000000",
".. + ",
".@. ++ ",
".@@. +#+ ",
".@@@. +##+ ",
".@@@@. +###+ ",
".@@@@@. +####+ ",
".@@@@@@.+#####+ ",
".@@@@@$%+#####+%",
".@@@@$% +####+% ",
".@@@$% +###+% ",
".@@$% +##+% ",
".@$% +#+% ",
".$% ++% ",
"%% %% "};

View File

@ -119,12 +119,26 @@
+' U V W X Y Z ` ",'#10'" ...+.@.#.$.%.&.*.=.-./ ",'#10'";.>'
+'.- ,.''...).!.n ~.{. "};'#10
);
LazarusResources.Add('btn_pause','XPM',
'/* XPM */'#10'static char * btn_pause_xpm[] = {'#10'"20 14 7 1",'#10'" '#9
+'c None",'#10'".'#9'c #0005A0",'#10'"+'#9'c #494949",'#10'"@'#9'c #0017EA'
+'",'#10'"#'#9'c #0300EF",'#10'"$'#9'c #000000",'#10'"%'#9'c #777777",'#10
+'".... ....++++ ++++",'#10'".@#$ .@#$+%%+ +%%+",'#10'".@#$ .@#$+%%+ '
+' +%%+",'#10'".@#$ .@#$+%%+ +%%+",'#10'".@#$ .@#$+%%+ +%%+",'#10'".@#'
+'$ .@#$+%%+ +%%+",'#10'".@#$ .@#$+%%+ +%%+",'#10'".@#$ .@#$+%%+ +%%'
+'+",'#10'".@#$ .@#$+%%+ +%%+",'#10'".@#$ .@#$+%%+ +%%+",'#10'".@#$ .'
+'@#$+%%+ +%%+",'#10'".@#$ .@#$+%%+ +%%+",'#10'".@#$ .@#$+%%+ +%%+",'
+#10'"$$$$ $$$$++++ ++++"};'#10
);
LazarusResources.Add('btn_run','XPM',
'/* XPM */'#10'static char * btn_run_xpm[] = {'#10'"8 14 3 1",'#10'" '#9'c'
+' None",'#10'".'#9'c #00FF00",'#10'"+'#9'c #000000",'#10'". ",'#10
+'" . ",'#10'". . ",'#10'" . . ",'#10'". . . ",'#10'" . . . '
+' ",'#10'". . . . ",'#10'" . . . +",'#10'". . . + ",'#10'" . . + ",'#10
+'". . + ",'#10'" . + ",'#10'". + ",'#10'"++ "};'#10
'/* XPM */'#10'static char * btn_run_xpm[] = {'#10'"16 14 7 1",'#10'" '#9
+'c None",'#10'".'#9'c #146600",'#10'"+'#9'c #444444",'#10'"@'#9'c #26B200'
+'",'#10'"#'#9'c #898989",'#10'"$'#9'c #275919",'#10'"%'#9'c #000000",'#10
+'".. + ",'#10'".@. ++ ",'#10'".@@. +#+ ",'#10
+'".@@@. +##+ ",'#10'".@@@@. +###+ ",'#10'".@@@@@. +####+ ",'#10
+'".@@@@@@.+#####+ ",'#10'".@@@@@$%+#####+%",'#10'".@@@@$% +####+% ",'#10
+'".@@@$% +###+% ",'#10'".@@$% +##+% ",'#10'".@$% +#+% ",'#10
+'".$% ++% ",'#10'"%% %% "};'#10
);
LazarusResources.Add('btn_saveall','XPM',
'/* XPM */'#10'static char * btn_saveall_xpm[] = {'#10'"15 15 156 2",'#10
@ -250,6 +264,26 @@
+'.c.d.e.f.g.",'#10'"9 h.i.j.k.[.l.a.m.n.o.p.q.r.",'#10'"I s.t.u.9.0.0.v.w'
+'.2 x.y.z.. ",'#10'" A.B.0.C.D.E.F.G.H.I.+ + & "};'#10
);
LazarusResources.Add('btn_stepinto','XPM',
'/* XPM */'#10'static char * btn_stepinto_xpm[] = {'#10'"13 16 5 1",'#10'"'
+' '#9'c None",'#10'".'#9'c #000000",'#10'"+'#9'c #000083",'#10'"@'#9'c #F'
+'FFFFF",'#10'"#'#9'c #838583",'#10'". . ",'#10'" . ",'
+#10'" ",'#10'" . ",'#10'" ",'#10'" '
+' ..... ",'#10'" ... ",'#10'" . ",'#10'" +++++++ "'
+','#10'" +@@@@@+#",'#10'" +@@@@@+#",'#10'" +@@@@@+#",'#10'" '
+' +@@@@@+#",'#10'" +@@@@@+#",'#10'" +++++++#",'#10'" #####'
+'##"};'#10
);
LazarusResources.Add('btn_stepover','XPM',
'/* XPM */'#10'static char * btn_stepover_xpm[] = {'#10'"16 16 5 1",'#10'"'
+' '#9'c None",'#10'".'#9'c #000000",'#10'"+'#9'c #000083",'#10'"@'#9'c #F'
+'FFFFF",'#10'"#'#9'c #838583",'#10'" . . ",'#10'" . . '
+' ",'#10'" ",'#10'". . ",'#10'" '
+' ",'#10'" .....",'#10'" ... ",'#10'" '
+'. ",'#10'" +++++++ ",'#10'" +@@@@@+# ",'#10'" +@@@@@+# '
+' ",'#10'" +@@@@@+# ",'#10'" +@@@@@+# ",'#10'" +@@@@@+# '
+' ",'#10'" +++++++# ",'#10'" ####### "};'#10
);
LazarusResources.Add('btn_toggleform','XPM',
'/* XPM */'#10'static char * btn_toggleform_xpm[] = {'#10'"16 16 145 2",'
+#10'" '#9'c None",'#10'". '#9'c #777A71",'#10'"+ '#9'c #000013",'#10'"@ '

View File

@ -39,28 +39,20 @@ var
gWidth : integer;
gHeight : integer;
DestRect: TRect;
ImgID: integer;
begin
// for default assume only 1 glyph
gWidth := TPixMap(FOriginal).Width;
gHeight := TPixMap(FOriginal).Height;
Result := Rect(0, 0, gWidth, gHeight);
if NumGlyphs > 1 then
begin
gWidth := TPixMap(FOriginal).Width div NumGlyphs;
if (State = bsDown) and (NumGlyphs < 3) then
State := bsUp;
if State = bsDisabled then
Result := Rect(gWidth, 0, (2 * gWidth) - 1, gHeight - 1)
else if State = bsDown then
Result := Rect(2 * gWidth, 0, (3 * gWidth) - 1, gHeight - 1)
else
Result := Rect(0, 0, gWidth - 1, gHeight - 1);
gWidth := gWidth div NumGlyphs;
ImgID:=0;
case State of
bsDisabled: if NumGlyphs>1 then ImgID:=1;
bsDown: if NumGlyphs>2 then ImgID:=2;
end;
Result := Rect((ImgID*gWidth), 0, ((ImgID+1)*gWidth), gHeight);
DestRect:=Client;
inc(DestRect.Left,Offset.X);
inc(DestRect.Right,Offset.X);

View File

@ -224,7 +224,7 @@ const
FillStyles: array[Boolean] of Integer = (BF_MIDDLE, 0);
var
PaintRect: TRect;
DrawFlags: Integer;
DrawFlags, GlyphWidth, GlyphHeight: Integer;
//R : TRect;
Offset: TPoint;
begin
@ -273,8 +273,7 @@ begin
InflateRect(PaintRect, -1, -1);
end;
if FState in [bsDown, bsExclusive]
then begin
if FState in [bsDown, bsExclusive] then begin
if (FState = bsExclusive)
and (not FFlat or not FMouseInControl)
then begin
@ -290,10 +289,15 @@ begin
Offset.X := 0;
Offset.Y := 0;
end;
inc(Offset.X,(PaintRect.Right-PaintRect.Left
-TButtonGlyph(FGlyph).Glyph.Width) div 2);
inc(Offset.Y,(PaintRect.Bottom-PaintRect.Top
-TButtonGlyph(FGlyph).Glyph.Height) div 2);
GlyphWidth:=TButtonGlyph(FGlyph).Glyph.Width;
if TButtonGlyph(FGlyph).NumGlyphs>1 then
GlyphWidth:=GlyphWidth div NumGlyphs;
GlyphHeight:=TButtonGlyph(FGlyph).Glyph.Height;
inc(Offset.X,(PaintRect.Right-PaintRect.Left-GlyphWidth) div 2);
inc(Offset.Y,(PaintRect.Bottom-PaintRect.Top-GlyphHeight) div 2);
//this needs to be done yet.
Assert(False,'Trace:TODO: DRAWTEXTBIDIMODEFLAGS');
@ -526,6 +530,9 @@ end;
{ =============================================================================
$Log$
Revision 1.10 2001/10/18 13:01:33 lazarus
MG: fixed speedbuttons numglyphs>1 and started IDE debugging
Revision 1.9 2001/07/03 10:30:32 lazarus
MG: speedbuttonglyph centered, buttonglyph border fixed