You've already forked lazarus-ccr
RxFPC:new options for RxMDI. See demo. thx user rtn from freepascal.ru
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6128 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<Version Value="11"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
@@ -23,9 +23,10 @@
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="1">
|
||||
<Mode0 Name="default"/>
|
||||
</Modes>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
|
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectSession>
|
||||
<Version Value="9"/>
|
||||
<Version Value="11"/>
|
||||
<BuildModes Active="Default"/>
|
||||
<Units Count="6">
|
||||
<Units Count="13">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos X="43" Y="10"/>
|
||||
<UsageCount Value="22"/>
|
||||
<UsageCount Value="25"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
@@ -19,9 +19,9 @@
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="41"/>
|
||||
<CursorPos X="34" Y="67"/>
|
||||
<UsageCount Value="22"/>
|
||||
<TopLine Value="72"/>
|
||||
<CursorPos X="70" Y="89"/>
|
||||
<UsageCount Value="25"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
@@ -35,7 +35,7 @@
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="3"/>
|
||||
<CursorPos X="6" Y="11"/>
|
||||
<UsageCount Value="22"/>
|
||||
<UsageCount Value="25"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="unit3.pas"/>
|
||||
@@ -46,7 +46,7 @@
|
||||
<UnitName Value="Unit3"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos Y="19"/>
|
||||
<UsageCount Value="22"/>
|
||||
<UsageCount Value="25"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="unit4.pas"/>
|
||||
@@ -57,7 +57,7 @@
|
||||
<UnitName Value="Unit4"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos X="32" Y="8"/>
|
||||
<UsageCount Value="22"/>
|
||||
<UsageCount Value="25"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="../../rxmdi.pas"/>
|
||||
@@ -67,24 +67,183 @@
|
||||
<CursorPos Y="711"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<UnitName Value="RxMDI"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="262"/>
|
||||
<CursorPos X="24" Y="281"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="../../../../lcl/buttons.pp"/>
|
||||
<UnitName Value="Buttons"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="219"/>
|
||||
<CursorPos Y="304"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="/home/install/source/fpcsrc/rtl/objpas/classes/classesh.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1854"/>
|
||||
<CursorPos X="14" Y="1905"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="../../../../lcl/controls.pp"/>
|
||||
<UnitName Value="Controls"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="176"/>
|
||||
<CursorPos X="44" Y="195"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="../../rxcontrols/RxMDICloseIcon.lrs"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="../../rxtools/rxconst.pas"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="96"/>
|
||||
<CursorPos X="3" Y="112"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="/home/install/source/fpcsrc/rtl/objpas/classes/reader.inc"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="771"/>
|
||||
<CursorPos X="53" Y="789"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit12>
|
||||
</Units>
|
||||
<JumpHistory Count="4" HistoryIndex="3">
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="74" Column="26" TopLine="44"/>
|
||||
<Caret Line="117" Column="44" TopLine="80"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="75" Column="26" TopLine="45"/>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="161" Column="15" TopLine="143"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="82" Column="26" TopLine="47"/>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="432" Column="3" TopLine="427"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="67" Column="34" TopLine="56"/>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="160" Column="15" TopLine="142"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="117" Column="44" TopLine="80"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="161" Column="15" TopLine="143"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="439" Column="31" TopLine="408"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="117" Column="44" TopLine="89"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="103" Column="3" TopLine="89"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="160" Column="15" TopLine="142"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="415" Column="31" TopLine="410"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="877" TopLine="851"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="283" Column="56" TopLine="252"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="177" Column="85" TopLine="141"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="302" Column="3" TopLine="299"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="145" Column="15" TopLine="128"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="108" Column="55" TopLine="89"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="110" Column="55" TopLine="91"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="118" TopLine="91"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="119" Column="12" TopLine="92"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="53" Column="15" TopLine="35"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="283" Column="5" TopLine="275"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="146" Column="17" TopLine="137"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="142" Column="8" TopLine="133"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="147" Column="20" TopLine="141"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="312" Column="33" TopLine="301"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../../rxcontrols/rxmdi.pas"/>
|
||||
<Caret Line="281" Column="24" TopLine="262"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="91" Column="58" TopLine="72"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="89" Column="70" TopLine="72"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
<Modes Count="0" ActiveMode="default"/>
|
||||
</RunParams>
|
||||
</ProjectSession>
|
||||
</CONFIG>
|
||||
|
Binary file not shown.
@@ -1,33 +1,35 @@
|
||||
object Form1: TForm1
|
||||
Left = 527
|
||||
Height = 423
|
||||
Height = 435
|
||||
Top = 222
|
||||
Width = 581
|
||||
Width = 613
|
||||
Caption = 'MainForm'
|
||||
ClientHeight = 400
|
||||
ClientWidth = 581
|
||||
ClientHeight = 407
|
||||
ClientWidth = 613
|
||||
Menu = MainMenu1
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.9.0.0'
|
||||
WindowState = wsMaximized
|
||||
object ToolPanel1: TToolPanel
|
||||
Left = 0
|
||||
Height = 31
|
||||
Top = 0
|
||||
Width = 581
|
||||
Width = 613
|
||||
Items = <>
|
||||
Options = []
|
||||
CustomizeShortCut = False
|
||||
Align = alTop
|
||||
BorderWidth = 4
|
||||
ClientHeight = 31
|
||||
ClientWidth = 581
|
||||
ClientWidth = 613
|
||||
TabOrder = 0
|
||||
object RxMDICloseButton1: TRxMDICloseButton
|
||||
AnchorSideTop.Control = ToolPanel1
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = ToolPanel1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 553
|
||||
Left = 585
|
||||
Height = 22
|
||||
Top = 4
|
||||
Width = 23
|
||||
@@ -56,30 +58,41 @@ object Form1: TForm1
|
||||
object RxMDITasks1: TRxMDITasks
|
||||
Left = 0
|
||||
Height = 25
|
||||
Top = 356
|
||||
Width = 581
|
||||
Top = 360
|
||||
Width = 613
|
||||
Align = alBottom
|
||||
FlatButton = True
|
||||
Options = [rxtoMidleClickClose]
|
||||
end
|
||||
object StatusBar1: TStatusBar
|
||||
Left = 0
|
||||
Height = 19
|
||||
Top = 381
|
||||
Width = 581
|
||||
Panels = <>
|
||||
Height = 22
|
||||
Top = 385
|
||||
Width = 613
|
||||
Panels = <
|
||||
item
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
Width = 150
|
||||
end>
|
||||
SimplePanel = False
|
||||
end
|
||||
object RxMDIPanel1: TRxMDIPanel
|
||||
Left = 0
|
||||
Height = 325
|
||||
Height = 329
|
||||
Top = 31
|
||||
Width = 581
|
||||
Width = 613
|
||||
CloseButton = RxMDICloseButton1
|
||||
TaskPanel = RxMDITasks1
|
||||
Align = alClient
|
||||
BevelOuter = bvLowered
|
||||
HideCloseButton = False
|
||||
OnChangeCurrentChild = RxMDIPanel1ChangeCurrentChild
|
||||
end
|
||||
object ActionList1: TActionList
|
||||
left = 440
|
||||
top = 72
|
||||
Left = 440
|
||||
Top = 72
|
||||
object sysClose: TAction
|
||||
Category = 'System'
|
||||
Caption = 'Close'
|
||||
@@ -100,16 +113,46 @@ object Form1: TForm1
|
||||
Caption = 'New single MDI form'
|
||||
OnExecute = Action3Execute
|
||||
end
|
||||
object optShowInfoLabel: TAction
|
||||
Category = 'Options'
|
||||
Caption = 'Show info label'
|
||||
Checked = True
|
||||
OnExecute = optShowInfoLabelExecute
|
||||
end
|
||||
object optMidleMouseClickClose: TAction
|
||||
Category = 'Options'
|
||||
Caption = 'Midle mouse button close form'
|
||||
Checked = True
|
||||
OnExecute = optMidleMouseClickCloseExecute
|
||||
end
|
||||
object optHideCloseButton: TAction
|
||||
Category = 'Options'
|
||||
Caption = 'Hide close button'
|
||||
Checked = True
|
||||
OnExecute = optHideCloseButtonExecute
|
||||
end
|
||||
end
|
||||
object MainMenu1: TMainMenu
|
||||
left = 408
|
||||
top = 72
|
||||
Left = 408
|
||||
Top = 72
|
||||
object MenuItem1: TMenuItem
|
||||
Caption = 'System'
|
||||
object MenuItem2: TMenuItem
|
||||
Action = sysClose
|
||||
end
|
||||
end
|
||||
object MenuItem8: TMenuItem
|
||||
Caption = 'Options'
|
||||
object MenuItem9: TMenuItem
|
||||
Action = optShowInfoLabel
|
||||
end
|
||||
object MenuItem10: TMenuItem
|
||||
Action = optMidleMouseClickClose
|
||||
end
|
||||
object MenuItem11: TMenuItem
|
||||
Action = optHideCloseButton
|
||||
end
|
||||
end
|
||||
object MenuItem3: TMenuItem
|
||||
Caption = 'MDI forms'
|
||||
object MenuItem4: TMenuItem
|
||||
@@ -129,7 +172,7 @@ object Form1: TForm1
|
||||
object Timer1: TTimer
|
||||
Interval = 500
|
||||
OnTimer = Timer1Timer
|
||||
left = 451
|
||||
top = 117
|
||||
Left = 451
|
||||
Top = 117
|
||||
end
|
||||
end
|
||||
|
@@ -16,6 +16,12 @@ type
|
||||
Action1: TAction;
|
||||
Action2: TAction;
|
||||
Action3: TAction;
|
||||
MenuItem11: TMenuItem;
|
||||
optHideCloseButton: TAction;
|
||||
MenuItem10: TMenuItem;
|
||||
optMidleMouseClickClose: TAction;
|
||||
MenuItem9: TMenuItem;
|
||||
optShowInfoLabel: TAction;
|
||||
MenuItem1: TMenuItem;
|
||||
MenuItem2: TMenuItem;
|
||||
MenuItem3: TMenuItem;
|
||||
@@ -23,6 +29,7 @@ type
|
||||
MenuItem5: TMenuItem;
|
||||
MenuItem6: TMenuItem;
|
||||
MenuItem7: TMenuItem;
|
||||
MenuItem8: TMenuItem;
|
||||
sysClose: TAction;
|
||||
ActionList1: TActionList;
|
||||
MainMenu1: TMainMenu;
|
||||
@@ -35,10 +42,15 @@ type
|
||||
procedure Action1Execute(Sender: TObject);
|
||||
procedure Action2Execute(Sender: TObject);
|
||||
procedure Action3Execute(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure optHideCloseButtonExecute(Sender: TObject);
|
||||
procedure optMidleMouseClickCloseExecute(Sender: TObject);
|
||||
procedure optShowInfoLabelExecute(Sender: TObject);
|
||||
procedure RxMDIPanel1ChangeCurrentChild(Sender: TRxMDIPanel; AForm: TForm);
|
||||
procedure sysCloseExecute(Sender: TObject);
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
procedure UpdateOptions;
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
@@ -62,12 +74,23 @@ end;
|
||||
procedure TForm1.Timer1Timer(Sender: TObject);
|
||||
begin
|
||||
if Assigned(ActiveControl) then
|
||||
StatusBar1.SimpleText:=ActiveControl.Caption
|
||||
StatusBar1.Panels[0].Text:=ActiveControl.Caption
|
||||
else
|
||||
StatusBar1.SimpleText:='<NONE>'
|
||||
StatusBar1.Panels[0].Text:='<NONE>'
|
||||
;
|
||||
end;
|
||||
|
||||
procedure TForm1.UpdateOptions;
|
||||
begin
|
||||
RxMDICloseButton1.ShowInfoLabel:=optShowInfoLabel.Checked;
|
||||
if optMidleMouseClickClose.Checked then
|
||||
RxMDITasks1.Options:=RxMDITasks1.Options + [rxtoMidleClickClose]
|
||||
else
|
||||
RxMDITasks1.Options:=RxMDITasks1.Options - [rxtoMidleClickClose];
|
||||
|
||||
RxMDIPanel1.HideCloseButton:=optHideCloseButton.Checked;
|
||||
end;
|
||||
|
||||
procedure TForm1.Action1Execute(Sender: TObject);
|
||||
begin
|
||||
RxMDIPanel1.ChildWindowsCreate(Form2, TForm2);
|
||||
@@ -86,5 +109,38 @@ begin
|
||||
RxMDIPanel1.ChildWindowsAdd(Form4);
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
UpdateOptions;
|
||||
end;
|
||||
|
||||
procedure TForm1.optHideCloseButtonExecute(Sender: TObject);
|
||||
begin
|
||||
optHideCloseButton.Checked:=not optHideCloseButton.Checked;
|
||||
UpdateOptions;
|
||||
end;
|
||||
|
||||
procedure TForm1.optMidleMouseClickCloseExecute(Sender: TObject);
|
||||
begin
|
||||
optMidleMouseClickClose.Checked:=not optMidleMouseClickClose.Checked;
|
||||
UpdateOptions;
|
||||
end;
|
||||
|
||||
procedure TForm1.optShowInfoLabelExecute(Sender: TObject);
|
||||
begin
|
||||
optShowInfoLabel.Checked:=not optShowInfoLabel.Checked;
|
||||
UpdateOptions;
|
||||
end;
|
||||
|
||||
procedure TForm1.RxMDIPanel1ChangeCurrentChild(Sender: TRxMDIPanel; AForm: TForm
|
||||
);
|
||||
begin
|
||||
if Assigned(AForm) then
|
||||
StatusBar1.Panels[1].Text:=AForm.Caption
|
||||
else
|
||||
StatusBar1.Panels[1].Text:='<NONE>'
|
||||
;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
Reference in New Issue
Block a user