summaryrefslogtreecommitdiff
path: root/docview/src
diff options
context:
space:
mode:
Diffstat (limited to 'docview/src')
-rw-r--r--docview/src/frm_main.pas24
1 files changed, 24 insertions, 0 deletions
diff --git a/docview/src/frm_main.pas b/docview/src/frm_main.pas
index 6f95a590..cff84d9e 100644
--- a/docview/src/frm_main.pas
+++ b/docview/src/frm_main.pas
@@ -58,6 +58,7 @@ type
miFile: TfpgPopupMenu;
miSettings: TfpgPopupMenu;
miBookmarks: TfpgPopupMenu;
+ miView: TfpgPopupMenu;
miHelp: TfpgPopupMenu;
miDebug: TfpgPopupMenu;
ToolBar: TfpgBevel;
@@ -108,6 +109,8 @@ type
procedure miFileOpenSpecialClicked(Sender: TObject);
procedure miFileCloseClicked(Sender: TObject);
procedure miConfigureClicked(Sender: TObject);
+ procedure miViewExpandAllClicked(Sender: TObject);
+ procedure miViewCollapseAllClicked(Sender: TObject);
procedure miHelpProdInfoClicked(Sender: TObject);
procedure miHelpAboutFPGui(Sender: TObject);
procedure miHelpCmdLineParams(Sender: TObject);
@@ -426,6 +429,16 @@ begin
ShowConfigForm;
end;
+procedure TMainForm.miViewExpandAllClicked(Sender: TObject);
+begin
+ tvContents.FullExpand;
+end;
+
+procedure TMainForm.miViewCollapseAllClicked(Sender: TObject);
+begin
+ tvContents.FullCollapse;
+end;
+
procedure TMainForm.miHelpProdInfoClicked(Sender: TObject);
var
s: TfpgString;
@@ -2310,6 +2323,15 @@ begin
AddMenuItem('Show', '', nil);
end;
+ miView := TfpgPopupMenu.Create(self);
+ with miView do
+ begin
+ Name := 'miView';
+ SetPosition(292, 216, 132, 20);
+ AddMenuItem('Expand All', '', @miViewExpandAllClicked);
+ AddMenuItem('Collapse All', '', @miViewCollapseAllClicked);
+ end;
+
miHelp := TfpgPopupMenu.Create(self);
with miHelp do
begin
@@ -2506,6 +2528,8 @@ begin
MainMenu.AddMenuItem('&Debug', nil).SubMenu := miDebug;
FFileOpenRecent.SubMenu := miOpenRecentMenu;
+ tvContents.PopupMenu := miView;
+
// correct default visible tabsheet
PageControl1.ActivePageIndex := 0;
end;