RxFPC:RxMDI - new property RxMDIPanel1.WindowMenu - show MDI windows in main menu

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6792 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2019-01-17 08:37:42 +00:00
parent 5514aca70f
commit a858d685fa
6 changed files with 165 additions and 11 deletions

View File

@ -19,8 +19,6 @@
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
@ -85,6 +83,9 @@
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf3"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>

View File

@ -4,12 +4,12 @@ object Form1: TForm1
Top = 222
Width = 613
Caption = 'MainForm'
ClientHeight = 407
ClientHeight = 410
ClientWidth = 613
Menu = MainMenu1
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '1.9.0.0'
LCLVersion = '2.1.0.0'
WindowState = wsMaximized
object ToolPanel1: TToolPanel
Left = 0
@ -59,7 +59,7 @@ object Form1: TForm1
object RxMDITasks1: TRxMDITasks
Left = 0
Height = 25
Top = 360
Top = 364
Width = 613
Align = alBottom
FlatButton = True
@ -67,8 +67,8 @@ object Form1: TForm1
end
object StatusBar1: TStatusBar
Left = 0
Height = 22
Top = 385
Height = 21
Top = 389
Width = 613
Panels = <
item
@ -81,15 +81,17 @@ object Form1: TForm1
end
object RxMDIPanel1: TRxMDIPanel
Left = 0
Height = 329
Height = 333
Top = 31
Width = 613
CloseButton = RxMDICloseButton1
TaskPanel = RxMDITasks1
Align = alClient
BevelOuter = bvLowered
Options = []
HideCloseButton = False
OnChangeCurrentChild = RxMDIPanel1ChangeCurrentChild
WindowMenu = WindowItems
end
object ActionList1: TActionList
Left = 440
@ -132,6 +134,11 @@ object Form1: TForm1
Checked = True
OnExecute = optHideCloseButtonExecute
end
object wndCloseAll: TAction
Category = 'Windows'
Caption = 'Close all...'
OnExecute = wndCloseAllExecute
end
end
object MainMenu1: TMainMenu
Left = 408
@ -169,6 +176,12 @@ object Form1: TForm1
Action = Action3
end
end
object WindowItems: TMenuItem
Caption = 'Window'
object MenuItem13: TMenuItem
Action = wndCloseAll
end
end
end
object Timer1: TTimer
Interval = 500

View File

@ -16,6 +16,9 @@ type
Action1: TAction;
Action2: TAction;
Action3: TAction;
WindowItems: TMenuItem;
MenuItem13: TMenuItem;
wndCloseAll: TAction;
MenuItem11: TMenuItem;
optHideCloseButton: TAction;
MenuItem10: TMenuItem;
@ -49,6 +52,7 @@ type
procedure RxMDIPanel1ChangeCurrentChild(Sender: TRxMDIPanel; AForm: TForm);
procedure sysCloseExecute(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure wndCloseAllExecute(Sender: TObject);
private
procedure UpdateOptions;
public
@ -80,6 +84,11 @@ begin
;
end;
procedure TForm1.wndCloseAllExecute(Sender: TObject);
begin
RxMDIPanel1.CloseAll;
end;
procedure TForm1.UpdateOptions;
begin
RxMDICloseButton1.ShowInfoLabel:=optShowInfoLabel.Checked;