mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-04 10:19:52 +01:00
MG: fixes for ide speedbuttons, form.showmodal, initial lazarus.dci
git-svn-id: trunk@314 -
This commit is contained in:
parent
486861c1cc
commit
0182aeaaa8
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -81,6 +81,7 @@ ide/include/linux/lazconf.inc svneol=native#text/pascal
|
||||
ide/include/win32/lazconf.inc svneol=native#text/pascal
|
||||
ide/keymapping.pp svneol=native#text/pascal
|
||||
ide/lazarus.pp svneol=native#text/pascal
|
||||
ide/lazarus_dci.lrs svneol=native#text/pascal
|
||||
ide/lazconf.pp svneol=native#text/pascal
|
||||
ide/lazres.pp svneol=native#text/pascal
|
||||
ide/main.pp svneol=native#text/pascal
|
||||
|
||||
@ -532,6 +532,8 @@ end;
|
||||
|
||||
constructor TEditorOptions.Create;
|
||||
var ConfFileName: string;
|
||||
fs:TFileStream;
|
||||
res:TLResource;
|
||||
begin
|
||||
inherited Create;
|
||||
ConfFileName:=SetDirSeparators(GetPrimaryConfigPath+'/'+EditOptsConfFileName);
|
||||
@ -569,6 +571,20 @@ begin
|
||||
// Code Tools options
|
||||
fCodeTemplateFileName:=SetDirSeparators(GetPrimaryConfigPath+'/lazarus.dci');
|
||||
CopySecondaryConfigFile('lazarus.dci');
|
||||
if not FileExists(fCodeTemplateFileName) then begin
|
||||
res:=LazarusResources.Find('lazarus_dci_file');
|
||||
if (res<>nil) and (res.Value<>'') and (res.ValueType='DCI') then begin
|
||||
try
|
||||
fs:=TFileStream.Create(fCodeTemplateFileName,fmCreate);
|
||||
try
|
||||
fs.Write(res.Value[1],length(res.Value));
|
||||
finally
|
||||
fs.Free;
|
||||
end;
|
||||
except
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TEditorOptions.Destroy;
|
||||
@ -3241,6 +3257,11 @@ begin
|
||||
ModalResult:=mrCancel;
|
||||
end;
|
||||
|
||||
//=============================================================================
|
||||
|
||||
initialization
|
||||
|
||||
{$I lazarus_dci.lrs}
|
||||
|
||||
end.
|
||||
|
||||
|
||||
33
ide/lazarus_dci.lrs
Normal file
33
ide/lazarus_dci.lrs
Normal file
@ -0,0 +1,33 @@
|
||||
LazarusResources.Add('lazarus_dci_file','DCI',
|
||||
'[arrayd | array declaration (var)]'#13#10'array[0..|] of ;'#13#10#13#10'['
|
||||
+'arrayc | array declaration (const)]'#13#10'array[0..|] of = ();'#13#10#13
|
||||
+#10'[cases | case statement]'#13#10'case | of'#13#10' : ;'#13#10' : ;'
|
||||
+#13#10'end;'#13#10' '#13#10'[casee | case statement (with else)]'#13#10
|
||||
+'case | of'#13#10' : ;'#13#10' : ;'#13#10'else ;'#13#10'end;'#13#10' '
|
||||
+#13#10'[classf | class declaration (all parts)]'#13#10'T| = class(T)'#13
|
||||
+#10'private'#13#10#13#10'protected'#13#10#13#10'public'#13#10#13#10'publi'
|
||||
+'shed '#13#10#13#10'end;'#13#10#13#10'[classd | class declaration (no par'
|
||||
+'ts)]'#13#10'T| = class(T)'#13#10#13#10'end;'#13#10#13#10'[classc | class'
|
||||
+' declaration (with Create/Destroy overrides)]'#13#10'T| = class(T)'#13#10
|
||||
+'private'#13#10#13#10'protected'#13#10#13#10'public'#13#10' constructor '
|
||||
+'Create; override;'#13#10' destructor Destroy; override;'#13#10'publishe'
|
||||
+'d '#13#10#13#10'end;'#13#10#13#10'[fors | for (no begin/end)]'#13#10'for'
|
||||
+' | := to do'#13#10#13#10'[forb | for statement]'#13#10'for | := to d'
|
||||
+'o'#13#10'begin'#13#10#13#10'end;'#13#10#13#10'[function | function decla'
|
||||
+'ration]'#13#10'function |(): ;'#13#10'begin'#13#10#13#10'end;'#13#10#13
|
||||
+#10'[ifs | if (no begin/end)]'#13#10'if | then'#13#10#13#10'[ifb | if sta'
|
||||
+'tement]'#13#10'if | then'#13#10'begin'#13#10#13#10'end;'#13#10#13#10'[if'
|
||||
+'e | if then (no begin/end) else (no begin/end)]'#13#10'if | then'#13#10
|
||||
+#13#10'else'#13#10#13#10'[ifeb | if then else]'#13#10'if | then'#13#10'be'
|
||||
+'gin'#13#10#13#10'end'#13#10'else'#13#10'begin'#13#10#13#10'end;'#13#10#13
|
||||
+#10'[procedure | procedure declaration]'#13#10'procedure |();'#13#10'begi'
|
||||
+'n'#13#10#13#10'end;'#13#10#13#10'[trye | try except]'#13#10'try'#13#10' '
|
||||
+' | '#13#10'except'#13#10#13#10'end;'#13#10#13#10'[tryf | try finally]'#13
|
||||
+#10'try'#13#10' | '#13#10'finally'#13#10#13#10'end;'#13#10#13#10'[trycf '
|
||||
+'| try finally (with Create/Free)]'#13#10'|variable := typename.Create; '
|
||||
+#13#10'try'#13#10#13#10'finally'#13#10' variable.Free;'#13#10'end;'#13#10
|
||||
+#13#10'[whileb | while statement]'#13#10'while | do'#13#10'begin'#13#10#13
|
||||
+#10'end;'#13#10#13#10'[whiles | while (no begin)]'#13#10'while | do'#13#10
|
||||
+#13#10'[withb | with statement]'#13#10'with | do'#13#10'begin'#13#10#13#10
|
||||
+'end;'#13#10#13#10'[withs | with (no begin)]'#13#10'with | do'#13#10
|
||||
);
|
||||
@ -330,7 +330,7 @@ end;
|
||||
function LoadSpeedBtnPixMap(const ResourceName:string):TPixmap;
|
||||
begin
|
||||
Result:=TPixmap.Create;
|
||||
Result.TransparentColor:=clNone;
|
||||
//Result.TransparentColor:=clNone;
|
||||
if not LoadPixmapRes(ResourceName,Result) then
|
||||
LoadPixmapRes('default',Result);
|
||||
end;
|
||||
@ -681,12 +681,12 @@ begin
|
||||
n := ButtonLeft;
|
||||
OpenFileArrowSpeedBtn := CreateButton('OpenFileArrowSpeedBtn', 'btn_downarrow' , 1, ButtonLeft, ButtonTop, [mfLeft], @OpenFileDownArrowClicked);
|
||||
OpenFileArrowSpeedBtn.Width := 12;
|
||||
ButtonLeft := n+12;
|
||||
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
|
||||
ButtonLeft := 0;
|
||||
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);
|
||||
@ -3490,6 +3490,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.106 2001/07/06 06:25:37 lazarus
|
||||
MG: fixes for ide speedbuttons, form.showmodal, initial lazarus.dci
|
||||
|
||||
Revision 1.105 2001/07/01 15:55:43 lazarus
|
||||
MG: JumpToCompilerMessage now centered in source editor
|
||||
|
||||
|
||||
@ -1,19 +1,8 @@
|
||||
/* XPM */
|
||||
static char * btn_downarrow_xpm[] = {
|
||||
"11 14 2 1",
|
||||
"5 3 2 1",
|
||||
" c None",
|
||||
". c #000000",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ..... ",
|
||||
" ... ",
|
||||
" . ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
".....",
|
||||
" ... ",
|
||||
" . "};
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* XPM */
|
||||
static char * newform_xpm[] = {
|
||||
"21 18 147 2",
|
||||
static char * btn_newform_xpm[] = {
|
||||
"15 13 147 2",
|
||||
" c None",
|
||||
". c #8D8E93",
|
||||
"+ c #7D8391",
|
||||
@ -148,21 +148,16 @@ static char * newform_xpm[] = {
|
||||
"n. c #020204",
|
||||
"o. c #0D0F0C",
|
||||
"p. c #000100",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" . + @ # $ % & * = - ; > , ' ) ",
|
||||
" ! ~ { { { { { ] ] ^ ^ / ^ ( _ ",
|
||||
" : { { { { ] ] ] ^ ^ ^ ^ ^ < _ ",
|
||||
" [ } | 1 1 2 3 2 4 5 6 7 8 8 9 ",
|
||||
" 0 a b c d e a f g h i j k l m ",
|
||||
" n o p q r s t u v w x y z A B ",
|
||||
" C D E F G H I J K L M N O P Q ",
|
||||
" C R S O T U V W X Y Z Y ` Y . ",
|
||||
" ..+.R @.#.$.R %.&.*.O =.Y -.;. ",
|
||||
" >.R ,.R '.R ).O T !.~.O {.!.]. ",
|
||||
" ^.R R /.(./.R _.:.<.[.}.R |.]. ",
|
||||
" 1.2.3.4.5.6.7.8.9.6.0.a.b.c.d. ",
|
||||
" e.f.g.h.i.j.k.l.k.k.m.i.n.o.p. ",
|
||||
" ",
|
||||
" "};
|
||||
". + @ # $ % & * = - ; > , ' ) ",
|
||||
"! ~ { { { { { ] ] ^ ^ / ^ ( _ ",
|
||||
": { { { { ] ] ] ^ ^ ^ ^ ^ < _ ",
|
||||
"[ } | 1 1 2 3 2 4 5 6 7 8 8 9 ",
|
||||
"0 a b c d e a f g h i j k l m ",
|
||||
"n o p q r s t u v w x y z A B ",
|
||||
"C D E F G H I J K L M N O P Q ",
|
||||
"C R S O T U V W X Y Z Y ` Y .",
|
||||
"..+.R @.#.$.R %.&.*.O =.Y -.;.",
|
||||
">.R ,.R '.R ).O T !.~.O {.!.].",
|
||||
"^.R R /.(./.R _.:.<.[.}.R |.].",
|
||||
"1.2.3.4.5.6.7.8.9.6.0.a.b.c.d.",
|
||||
"e.f.g.h.i.j.k.l.k.k.m.i.n.o.p."};
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* XPM */
|
||||
static char * btn_newunit_xpm[] = {
|
||||
"16 16 21 1",
|
||||
"11 13 21 1",
|
||||
" c None",
|
||||
". c #000000",
|
||||
"+ c #0C0C0C",
|
||||
@ -22,19 +22,16 @@ static char * btn_newunit_xpm[] = {
|
||||
"{ c #0A0A0A",
|
||||
"] c #050505",
|
||||
"^ c #040404",
|
||||
" ",
|
||||
" ..+..+.. ",
|
||||
" .@###$#%. ",
|
||||
" .@##@#&.#. ",
|
||||
" .@###*@=..- ",
|
||||
" .@##;###$#. ",
|
||||
" .@###;$###> ",
|
||||
" .@##,@#'),. ",
|
||||
" .@####!###= ",
|
||||
" .@###$)#,). ",
|
||||
" ~!###,##);% ",
|
||||
" >#!#)#)###. ",
|
||||
" >,#,##!$),+ ",
|
||||
" {..=~..+].^ ",
|
||||
" ",
|
||||
" "};
|
||||
"..+..+.. ",
|
||||
".@###$#%. ",
|
||||
".@##@#&.#. ",
|
||||
".@###*@=..-",
|
||||
".@##;###$#.",
|
||||
".@###;$###>",
|
||||
".@##,@#'),.",
|
||||
".@####!###=",
|
||||
".@###$)#,).",
|
||||
"~!###,##);%",
|
||||
">#!#)#)###.",
|
||||
">,#,##!$),+",
|
||||
"{..=~..+].^"};
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* XPM */
|
||||
static char * btn_openfile_xpm[] = {
|
||||
"16 16 111 2",
|
||||
"16 13 111 2",
|
||||
" c None",
|
||||
". c #020703",
|
||||
"+ c #000100",
|
||||
@ -112,7 +112,6 @@ static char * btn_openfile_xpm[] = {
|
||||
"!. c #090800",
|
||||
"~. c #0E0B00",
|
||||
"{. c #070400",
|
||||
" ",
|
||||
" . + @ ",
|
||||
" # $ % ",
|
||||
" & + ",
|
||||
@ -125,6 +124,4 @@ static char * btn_openfile_xpm[] = {
|
||||
"C D E F G H I J K L M N O P ",
|
||||
"- Q ! R S T U V W X Y Z ` ",
|
||||
" ...+.@.#.$.%.&.*.=.-./ ",
|
||||
";.>.- ,.'...).!.n ~.{. ",
|
||||
" ",
|
||||
" "};
|
||||
";.>.- ,.'...).!.n ~.{. "};
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* XPM */
|
||||
static char * btn_save_xpm[] = {
|
||||
"16 16 166 2",
|
||||
"14 14 166 2",
|
||||
" c None",
|
||||
". c #000100",
|
||||
"+ c #000400",
|
||||
@ -167,19 +167,17 @@ static char * btn_save_xpm[] = {
|
||||
"G. c #01000C",
|
||||
"H. c #050209",
|
||||
"I. c #070800",
|
||||
" ",
|
||||
" . + + . @ @ # $ $ % & * = - ",
|
||||
" = ; > , ' ) ! ~ { ] ^ + / = ",
|
||||
" ( _ : < [ } | 1 2 3 4 5 6 7 ",
|
||||
" ( 8 9 0 a b c d e f g h i . ",
|
||||
" ( j k l m n o p q r s t u v ",
|
||||
" ( w x y z A B C D E F : G H ",
|
||||
" I J K L M N O P Q R S T U V ",
|
||||
" * W X Y Z ` . ...+.@.#.$.%. ",
|
||||
" &.*.=.-.;.>.,.'.).!.~.{.].: ",
|
||||
" &.^./.(._.:.<.[.}.|.1.2.3.k ",
|
||||
" 4.5.6.7.8.9.0.a.b.c.d.e.f.g. ",
|
||||
" 9 h.i.j.k.[.l.a.m.n.o.p.q.r. ",
|
||||
" I s.t.u.9.0.0.v.w.2 x.y.z.. ",
|
||||
" A.B.0.C.D.E.F.G.H.I.+ + & ",
|
||||
" "};
|
||||
". + + . @ @ # $ $ % & * = - ",
|
||||
"= ; > , ' ) ! ~ { ] ^ + / = ",
|
||||
"( _ : < [ } | 1 2 3 4 5 6 7 ",
|
||||
"( 8 9 0 a b c d e f g h i . ",
|
||||
"( j k l m n o p q r s t u v ",
|
||||
"( w x y z A B C D E F : G H ",
|
||||
"I J K L M N O P Q R S T U V ",
|
||||
"* W X Y Z ` . ...+.@.#.$.%.",
|
||||
"&.*.=.-.;.>.,.'.).!.~.{.].: ",
|
||||
"&.^./.(._.:.<.[.}.|.1.2.3.k ",
|
||||
"4.5.6.7.8.9.0.a.b.c.d.e.f.g.",
|
||||
"9 h.i.j.k.[.l.a.m.n.o.p.q.r.",
|
||||
"I s.t.u.9.0.0.v.w.2 x.y.z.. ",
|
||||
" A.B.0.C.D.E.F.G.H.I.+ + & "};
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/* XPM */
|
||||
static char * btn_saveall_xpm[] = {
|
||||
"16 16 156 2",
|
||||
"15 15 156 2",
|
||||
" c None",
|
||||
". c #080A00",
|
||||
"+ c #000200",
|
||||
@ -157,19 +157,18 @@ static char * btn_saveall_xpm[] = {
|
||||
"w. c #030005",
|
||||
"x. c #040006",
|
||||
"y. c #060700",
|
||||
" ",
|
||||
" . + @ # $ % & @ * = + ",
|
||||
" - ; > , ' ) ! ~ { ] ^ ",
|
||||
" / + ( + _ @ : < [ } | - 1 ",
|
||||
" / 2 + 3 4 5 6 7 } 8 9 0 a ",
|
||||
" b { + + + c > d [ e f g h i j ",
|
||||
" k l m n o p q r s t u v w x | ",
|
||||
" ( y z A B B C D E F G H I J K ",
|
||||
" L M j N O P Q R S T U V w W X ",
|
||||
" Y Z I A ` ...+.@.#.$.%.a &.K ",
|
||||
" a *.=.-.{ } ;.>.,.'.).!.~.{.z ",
|
||||
" ].^./.(._.:.<.[.}.|.1.2.K + 3.",
|
||||
" 4.5.6.7.8.9.0.a.].b.c.d.X ",
|
||||
" e.f.g.h.i.j.j.k.. l.a m./ ",
|
||||
" ].n.o.;.p.q.r.s.g t.-. ",
|
||||
" K b u.v.w.x.@ y.{ y. "};
|
||||
" . + @ # $ % & @ * = + ",
|
||||
" - ; > , ' ) ! ~ { ] ^ ",
|
||||
" / + ( + _ @ : < [ } | - 1 ",
|
||||
" / 2 + 3 4 5 6 7 } 8 9 0 a ",
|
||||
"b { + + + c > d [ e f g h i j ",
|
||||
"k l m n o p q r s t u v w x | ",
|
||||
"( y z A B B C D E F G H I J K ",
|
||||
"L M j N O P Q R S T U V w W X ",
|
||||
"Y Z I A ` ...+.@.#.$.%.a &.K ",
|
||||
"a *.=.-.{ } ;.>.,.'.).!.~.{.z ",
|
||||
"].^./.(._.:.<.[.}.|.1.2.K + 3.",
|
||||
"4.5.6.7.8.9.0.a.].b.c.d.X ",
|
||||
"e.f.g.h.i.j.j.k.. l.a m./ ",
|
||||
"].n.o.;.p.q.r.s.g t.-. ",
|
||||
" K b u.v.w.x.@ y.{ y. "};
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
/* XPM */
|
||||
static char * viewunits_xpm[] = {
|
||||
"14 14 3 1",
|
||||
static char * btn_viewunits_xpm[] = {
|
||||
"11 14 3 1",
|
||||
" c None",
|
||||
". c #000000",
|
||||
"+ c #FFFFFF",
|
||||
" .... ",
|
||||
" .++++.. ",
|
||||
" .+++++. ",
|
||||
" ....+++. ",
|
||||
" .++++..+. ",
|
||||
" .+++++.+. ",
|
||||
" ....+++.+. ",
|
||||
" .++++..+... ",
|
||||
" .+++++.+. ",
|
||||
" .+++++.+. ",
|
||||
" .+++++... ",
|
||||
" .+++++. ",
|
||||
" .+++++. ",
|
||||
" ....... "};
|
||||
" .... ",
|
||||
" .++++..",
|
||||
" .+++++.",
|
||||
" ....+++.",
|
||||
" .++++..+.",
|
||||
" .+++++.+.",
|
||||
" ....+++.+.",
|
||||
".++++..+...",
|
||||
".+++++.+. ",
|
||||
".+++++.+. ",
|
||||
".+++++... ",
|
||||
".+++++. ",
|
||||
".+++++. ",
|
||||
"....... "};
|
||||
|
||||
@ -925,10 +925,9 @@ begin
|
||||
Show;
|
||||
CNSendMEssage(LM_ShowModal, Self, nil);
|
||||
Repeat
|
||||
|
||||
Application.ProcessMessages;
|
||||
If ModalResult <> 0 then Close;
|
||||
If Application.FTerminate then ModalResult := mrCancel;
|
||||
Application.HandleMessage;
|
||||
If ModalResult <> 0 then Close;
|
||||
If Application.FTerminate then ModalResult := mrCancel;
|
||||
until ModalResult <> 0;
|
||||
|
||||
Exclude(FFormState, fsModal);
|
||||
@ -939,6 +938,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.23 2001/07/06 06:25:37 lazarus
|
||||
MG: fixes for ide speedbuttons, form.showmodal, initial lazarus.dci
|
||||
|
||||
Revision 1.22 2001/06/28 18:15:03 lazarus
|
||||
MG: bugfixes for destroying controls
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user