The Trunk: HelpSystem-Core-ct.119.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: HelpSystem-Core-ct.119.mcz

commits-2
Marcel Taeumel uploaded a new version of HelpSystem-Core to project The Trunk:
http://source.squeak.org/trunk/HelpSystem-Core-ct.119.mcz

==================== Summary ====================

Name: HelpSystem-Core-ct.119
Author: ct
Time: 3 October 2019, 1:27:53.283682 am
UUID: 937fe85d-8a7a-be48-bbdf-27efb2ae0dda
Ancestors: HelpSystem-Core-mt.116

Adds a simple menu to HelpBrowser (inspect + explore topic)

=============== Diff against HelpSystem-Core-mt.116 ===============

Item was changed:
  ----- Method: HelpBrowser>>buildTreeWith: (in category 'toolbuilder') -----
  buildTreeWith: builder
 
  ^ builder pluggableTreeSpec new
  model: self;
  nodeClass: HelpTopicListItemWrapper;
  roots: #toplevelTopics;
+ menu: #treeMenu:;
+ keyPress: #treeKey:from:event:;
  getSelected: #currentTopic;
  setSelected: #currentTopic:;
  getSelectedPath: #currentTopicPath;
  setSelectedParent: #currentParentTopic:;
  autoDeselect: false;
  frame: (LayoutFrame
  fractions: (0@0 corner: 0.3@1)
  offsets: (0@ (Preferences standardDefaultTextFont height * 2) corner: 0@0));
  yourself!

Item was added:
+ ----- Method: HelpBrowser>>exploreTopic (in category 'actions') -----
+ exploreTopic
+
+ ^ self currentTopic explore!

Item was added:
+ ----- Method: HelpBrowser>>inspectTopic (in category 'actions') -----
+ inspectTopic
+
+ ^ self currentTopic inspect!

Item was added:
+ ----- Method: HelpBrowser>>treeKey:from:event: (in category 'menus') -----
+ treeKey: aChar from: aView event: anEvent
+
+ anEvent anyModifierKeyPressed ifFalse: [^ false].
+ aChar
+ caseOf: {
+ [$i] -> [self inspectTopic].
+ [$I] -> [self exploreTopic]. }
+ otherwise: [^ false].
+ ^ true!

Item was added:
+ ----- Method: HelpBrowser>>treeListMenu: (in category 'menus') -----
+ treeListMenu: aMenu
+ <treeListMenu>
+
+ self currentTopic ifNil: [^ aMenu].
+
+ aMenu
+ add: 'Inspect (i)' action: #inspectTopic;
+ add: 'Explore (I)' action: #exploreTopic.
+
+ ^ aMenu!

Item was added:
+ ----- Method: HelpBrowser>>treeMenu: (in category 'menus') -----
+ treeMenu: aMenu
+
+ ^ self menu: aMenu for: #(treeListMenu)!