mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-05 17:20:58 +02:00
dockmanager example: test minimize/restore
git-svn-id: trunk@22517 -
This commit is contained in:
parent
da7a635ff0
commit
cda0e731b5
@ -7,6 +7,7 @@ inherited EditorSite: TEditorSite
|
|||||||
ClientWidth = 400
|
ClientWidth = 400
|
||||||
Menu = MainMenu1
|
Menu = MainMenu1
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
|
ShowInTaskBar = stAlways
|
||||||
inherited pnlLeft: TPanel
|
inherited pnlLeft: TPanel
|
||||||
Height = 256
|
Height = 256
|
||||||
end
|
end
|
||||||
@ -100,6 +101,21 @@ inherited EditorSite: TEditorSite
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object MenuItem14: TMenuItem
|
||||||
|
Caption = '&Windows'
|
||||||
|
object mnWindowDump: TMenuItem
|
||||||
|
Caption = '&Dump'
|
||||||
|
OnClick = mnWindowDumpClick
|
||||||
|
end
|
||||||
|
object mnMinimize: TMenuItem
|
||||||
|
Caption = 'Minimize all'
|
||||||
|
OnClick = mnMinimizeClick
|
||||||
|
end
|
||||||
|
object mnRestore: TMenuItem
|
||||||
|
Caption = 'Restore all'
|
||||||
|
OnClick = mnRestoreClick
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object OpenDialog1: TOpenDialog[8]
|
object OpenDialog1: TOpenDialog[8]
|
||||||
Filter = '*.pas|*.pas|All Files|*.*'
|
Filter = '*.pas|*.pas|All Files|*.*'
|
||||||
|
@ -1,31 +1,38 @@
|
|||||||
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
LazarusResources.Add('TEditorSite','FORMDATA',[
|
LazarusResources.Add('TEditorSite','FORMDATA',[
|
||||||
'TPF0'#241#11'TEditorSite'#10'EditorSite'#4'Left'#3'b'#1#6'Height'#3','#1#5'W'
|
'TPF0'#241#11'TEditorSite'#10'EditorSite'#4'Left'#3'b'#1#6'Height'#3','#1#5'W'
|
||||||
+'idth'#3#144#1#7'Caption'#6#10'EditorSite'#12'ClientHeight'#3#25#1#11'Client'
|
+'idth'#3#144#1#7'Caption'#6#10'EditorSite'#12'ClientHeight'#3#25#1#11'Client'
|
||||||
+'Width'#3#144#1#4'Menu'#7#9'MainMenu1'#8'OnCreate'#7#10'FormCreate'#0#241#6
|
+'Width'#3#144#1#4'Menu'#7#9'MainMenu1'#8'OnCreate'#7#10'FormCreate'#13'ShowI'
|
||||||
+'TPanel'#7'pnlLeft'#6'Height'#3#0#1#0#0#241#9'TSplitter'#9'splitLeft'#6'Heig'
|
+'nTaskBar'#7#8'stAlways'#0#241#6'TPanel'#7'pnlLeft'#6'Height'#3#0#1#0#0#241#9
|
||||||
+'ht'#3#0#1#0#0#241#6'TPanel'#8'pnlRight'#4'Left'#3#144#1#6'Height'#3#0#1#0#0
|
+'TSplitter'#9'splitLeft'#6'Height'#3#0#1#0#0#241#6'TPanel'#8'pnlRight'#4'Lef'
|
||||||
+#241#6'TPanel'#9'pnlBottom'#3'Top'#3#4#1#5'Width'#3#144#1#0#0#241#9'TSplitte'
|
+'t'#3#144#1#6'Height'#3#0#1#0#0#241#6'TPanel'#9'pnlBottom'#3'Top'#3#4#1#5'Wi'
|
||||||
+'r'#10'splitRight'#4'Left'#3#140#1#6'Height'#3#0#1#0#0#241#10'TStatusBar'#10
|
+'dth'#3#144#1#0#0#241#9'TSplitter'#10'splitRight'#4'Left'#3#140#1#6'Height'#3
|
||||||
+'StatusBar1'#3'Top'#3#5#1#5'Width'#3#144#1#0#0#241#9'TSplitter'#11'splitBott'
|
+#0#1#0#0#241#10'TStatusBar'#10'StatusBar1'#3'Top'#3#5#1#5'Width'#3#144#1#0#0
|
||||||
+'om'#3'Top'#3#0#1#5'Width'#3#144#1#0#0#242#2#7#9'TMainMenu'#9'MainMenu1'#4'l'
|
+#241#9'TSplitter'#11'splitBottom'#3'Top'#3#0#1#5'Width'#3#144#1#0#0#242#2#7#9
|
||||||
+'eft'#3#240#0#3'top'#2'0'#0#9'TMenuItem'#6'mnFile'#7'Caption'#6#5'&File'#0#9
|
+'TMainMenu'#9'MainMenu1'#4'left'#3#240#0#3'top'#2'0'#0#9'TMenuItem'#6'mnFile'
|
||||||
+'TMenuItem'#6'mnOpen'#7'Caption'#6#5'&Open'#7'OnClick'#7#11'mnOpenClick'#0#0
|
+#7'Caption'#6#5'&File'#0#9'TMenuItem'#6'mnOpen'#7'Caption'#6#5'&Open'#7'OnCl'
|
||||||
+#9'TMenuItem'#9'MenuItem1'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#6'mnExit'#7'Ca'
|
+'ick'#7#11'mnOpenClick'#0#0#9'TMenuItem'#9'MenuItem1'#7'Caption'#6#1'-'#0#0#9
|
||||||
+'ption'#6#5'E&xit'#7'OnClick'#7#11'mnExitClick'#0#0#0#9'TMenuItem'#6'mnView'
|
+'TMenuItem'#6'mnExit'#7'Caption'#6#5'E&xit'#7'OnClick'#7#11'mnExitClick'#0#0
|
||||||
+#7'Caption'#6#5'&View'#0#9'TMenuItem'#9'MenuItem2'#7'Caption'#6#16'Object In'
|
+#0#9'TMenuItem'#6'mnView'#7'Caption'#6#5'&View'#0#9'TMenuItem'#9'MenuItem2'#7
|
||||||
+'spector'#7'OnClick'#7#13'ViewMenuClick'#0#0#9'TMenuItem'#9'MenuItem3'#7'Cap'
|
+'Caption'#6#16'Object Inspector'#7'OnClick'#7#13'ViewMenuClick'#0#0#9'TMenuI'
|
||||||
+'tion'#6#8'Messages'#7'OnClick'#7#13'ViewMenuClick'#0#0#9'TMenuItem'#9'MenuI'
|
+'tem'#9'MenuItem3'#7'Caption'#6#8'Messages'#7'OnClick'#7#13'ViewMenuClick'#0
|
||||||
+'tem4'#7'Caption'#6#13'Code Explorer'#7'OnClick'#7#13'ViewMenuClick'#0#0#9'T'
|
+#0#9'TMenuItem'#9'MenuItem4'#7'Caption'#6#13'Code Explorer'#7'OnClick'#7#13
|
||||||
+'MenuItem'#9'MenuItem5'#7'Caption'#6#9'ToDo List'#7'OnClick'#7#13'ViewMenuCl'
|
+'ViewMenuClick'#0#0#9'TMenuItem'#9'MenuItem5'#7'Caption'#6#9'ToDo List'#7'On'
|
||||||
+'ick'#0#0#9'TMenuItem'#9'MenuItem6'#7'Caption'#6#13'Debug windows'#0#9'TMenu'
|
+'Click'#7#13'ViewMenuClick'#0#0#9'TMenuItem'#9'MenuItem6'#7'Caption'#6#13'De'
|
||||||
+'Item'#9'MenuItem7'#7'Caption'#6#7'Watches'#7'OnClick'#7#13'ViewMenuClick'#0
|
+'bug windows'#0#9'TMenuItem'#9'MenuItem7'#7'Caption'#6#7'Watches'#7'OnClick'
|
||||||
+#0#9'TMenuItem'#9'MenuItem8'#7'Caption'#6#11'BreakPoints'#7'OnClick'#7#13'Vi'
|
+#7#13'ViewMenuClick'#0#0#9'TMenuItem'#9'MenuItem8'#7'Caption'#6#11'BreakPoin'
|
||||||
+'ewMenuClick'#0#0#9'TMenuItem'#9'MenuItem9'#7'Caption'#6#15'Local Variables'
|
+'ts'#7'OnClick'#7#13'ViewMenuClick'#0#0#9'TMenuItem'#9'MenuItem9'#7'Caption'
|
||||||
+#7'OnClick'#7#13'ViewMenuClick'#0#0#9'TMenuItem'#10'MenuItem10'#7'Caption'#6
|
+#6#15'Local Variables'#7'OnClick'#7#13'ViewMenuClick'#0#0#9'TMenuItem'#10'Me'
|
||||||
+#9'Registers'#7'OnClick'#7#13'ViewMenuClick'#0#0#9'TMenuItem'#10'MenuItem11'
|
+'nuItem10'#7'Caption'#6#9'Registers'#7'OnClick'#7#13'ViewMenuClick'#0#0#9'TM'
|
||||||
+#7'Caption'#6#10'Call Stack'#7'OnClick'#7#13'ViewMenuClick'#0#0#9'TMenuItem'
|
+'enuItem'#10'MenuItem11'#7'Caption'#6#10'Call Stack'#7'OnClick'#7#13'ViewMen'
|
||||||
+#10'MenuItem12'#7'Caption'#6#9'Assembler'#7'OnClick'#7#13'ViewMenuClick'#0#0
|
+'uClick'#0#0#9'TMenuItem'#10'MenuItem12'#7'Caption'#6#9'Assembler'#7'OnClick'
|
||||||
+#9'TMenuItem'#10'MenuItem13'#7'Caption'#6#12'Debug Output'#7'OnClick'#7#13'V'
|
+#7#13'ViewMenuClick'#0#0#9'TMenuItem'#10'MenuItem13'#7'Caption'#6#12'Debug O'
|
||||||
+'iewMenuClick'#0#0#0#0#0#242#2#8#11'TOpenDialog'#11'OpenDialog1'#6'Filter'#6
|
+'utput'#7'OnClick'#7#13'ViewMenuClick'#0#0#0#0#9'TMenuItem'#10'MenuItem14'#7
|
||||||
+#25'*.pas|*.pas|All Files|*.*'#4'left'#3'5'#1#3'top'#2'0'#0#0#0
|
+'Caption'#6#8'&Windows'#0#9'TMenuItem'#12'mnWindowDump'#7'Caption'#6#5'&Dump'
|
||||||
|
+#7'OnClick'#7#17'mnWindowDumpClick'#0#0#9'TMenuItem'#10'mnMinimize'#7'Captio'
|
||||||
|
+'n'#6#12'Minimize all'#7'OnClick'#7#15'mnMinimizeClick'#0#0#9'TMenuItem'#9'm'
|
||||||
|
+'nRestore'#7'Caption'#6#11'Restore all'#7'OnClick'#7#14'mnRestoreClick'#0#0#0
|
||||||
|
+#0#242#2#8#11'TOpenDialog'#11'OpenDialog1'#6'Filter'#6#25'*.pas|*.pas|All Fi'
|
||||||
|
+'les|*.*'#4'left'#3'5'#1#3'top'#2'0'#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -41,6 +41,10 @@ type
|
|||||||
MenuItem11: TMenuItem;
|
MenuItem11: TMenuItem;
|
||||||
MenuItem12: TMenuItem;
|
MenuItem12: TMenuItem;
|
||||||
MenuItem13: TMenuItem;
|
MenuItem13: TMenuItem;
|
||||||
|
MenuItem14: TMenuItem;
|
||||||
|
mnRestore: TMenuItem;
|
||||||
|
mnMinimize: TMenuItem;
|
||||||
|
mnWindowDump: TMenuItem;
|
||||||
MenuItem2: TMenuItem;
|
MenuItem2: TMenuItem;
|
||||||
MenuItem3: TMenuItem;
|
MenuItem3: TMenuItem;
|
||||||
MenuItem4: TMenuItem;
|
MenuItem4: TMenuItem;
|
||||||
@ -57,6 +61,9 @@ type
|
|||||||
mnOpen: TMenuItem;
|
mnOpen: TMenuItem;
|
||||||
mnFile: TMenuItem;
|
mnFile: TMenuItem;
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure mnMinimizeClick(Sender: TObject);
|
||||||
|
procedure mnRestoreClick(Sender: TObject);
|
||||||
|
procedure mnWindowDumpClick(Sender: TObject);
|
||||||
procedure ViewMenuClick(Sender: TObject);
|
procedure ViewMenuClick(Sender: TObject);
|
||||||
procedure mnExitClick(Sender: TObject);
|
procedure mnExitClick(Sender: TObject);
|
||||||
procedure mnOpenClick(Sender: TObject);
|
procedure mnOpenClick(Sender: TObject);
|
||||||
@ -74,6 +81,7 @@ var
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
LCLProc,
|
||||||
fFloatingSite;
|
fFloatingSite;
|
||||||
|
|
||||||
{ TEditorSite }
|
{ TEditorSite }
|
||||||
@ -138,6 +146,16 @@ begin
|
|||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TEditorSite.mnMinimizeClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
self.WindowState := wsMinimized;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEditorSite.mnRestoreClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WindowState := wsNormal;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TEditorSite.mnOpenClick(Sender: TObject);
|
procedure TEditorSite.mnOpenClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if OpenDialog1.Execute then begin
|
if OpenDialog1.Execute then begin
|
||||||
@ -145,6 +163,38 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TEditorSite.mnWindowDumpClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
f: TWinControl;
|
||||||
|
s: string;
|
||||||
|
begin
|
||||||
|
DebugLn('--- CustomForms ---');
|
||||||
|
for i := 0 to Screen.CustomFormCount - 1 do begin
|
||||||
|
f := Screen.CustomForms[i];
|
||||||
|
s := f.Name;
|
||||||
|
while f.HostDockSite <> nil do begin
|
||||||
|
f := f.HostDockSite;
|
||||||
|
s := s + ' in ' + f.Name;
|
||||||
|
end;
|
||||||
|
DebugLn(s);
|
||||||
|
end;
|
||||||
|
{ Seems to be the same list
|
||||||
|
}
|
||||||
|
DebugLn('--- Forms ---');
|
||||||
|
for i := 0 to Screen.FormCount - 1 do begin
|
||||||
|
f := Screen.Forms[i];
|
||||||
|
s := f.Name;
|
||||||
|
while f.Parent <> nil do begin
|
||||||
|
f := f.Parent;
|
||||||
|
s := s + ' in ' + f.Name;
|
||||||
|
end;
|
||||||
|
DebugLn(s);
|
||||||
|
end;
|
||||||
|
{}
|
||||||
|
DebugLn('---');
|
||||||
|
end;
|
||||||
|
|
||||||
function TEditorSite.OpenFile(const FileName: string): TObject;
|
function TEditorSite.OpenFile(const FileName: string): TObject;
|
||||||
begin
|
begin
|
||||||
//todo: load the file
|
//todo: load the file
|
||||||
|
@ -8,6 +8,7 @@ object FloatingSite: TFloatingSite
|
|||||||
OnDockDrop = FormDockDrop
|
OnDockDrop = FormDockDrop
|
||||||
OnDockOver = FormDockOver
|
OnDockOver = FormDockOver
|
||||||
OnUnDock = FormUnDock
|
OnUnDock = FormUnDock
|
||||||
|
ShowInTaskBar = stNever
|
||||||
UseDockManager = True
|
UseDockManager = True
|
||||||
LCLVersion = '0.9.29'
|
LCLVersion = '0.9.29'
|
||||||
Visible = True
|
Visible = True
|
||||||
|
@ -4,6 +4,6 @@ LazarusResources.Add('TFloatingSite','FORMDATA',[
|
|||||||
'TPF0'#13'TFloatingSite'#12'FloatingSite'#4'Left'#3#175#1#6'Height'#3','#1#3
|
'TPF0'#13'TFloatingSite'#12'FloatingSite'#4'Left'#3#175#1#6'Height'#3','#1#3
|
||||||
+'Top'#3#242#1#5'Width'#3#144#1#7'Caption'#6#12'FloatingSite'#8'DockSite'#9#10
|
+'Top'#3#242#1#5'Width'#3#144#1#7'Caption'#6#12'FloatingSite'#8'DockSite'#9#10
|
||||||
+'OnDockDrop'#7#12'FormDockDrop'#10'OnDockOver'#7#12'FormDockOver'#8'OnUnDock'
|
+'OnDockDrop'#7#12'FormDockDrop'#10'OnDockOver'#7#12'FormDockOver'#8'OnUnDock'
|
||||||
+#7#10'FormUnDock'#14'UseDockManager'#9#10'LCLVersion'#6#6'0.9.29'#7'Visible'
|
+#7#10'FormUnDock'#13'ShowInTaskBar'#7#7'stNever'#14'UseDockManager'#9#10'LCL'
|
||||||
+#9#0#0
|
+'Version'#6#6'0.9.29'#7'Visible'#9#0#0
|
||||||
]);
|
]);
|
||||||
|
Loading…
Reference in New Issue
Block a user