Index: openacs-4/packages/xotcl-core/tcl/doc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/doc-procs.tcl,v diff -u -r1.6.2.4 -r1.6.2.5 --- openacs-4/packages/xotcl-core/tcl/doc-procs.tcl 26 Feb 2021 19:15:52 -0000 1.6.2.4 +++ openacs-4/packages/xotcl-core/tcl/doc-procs.tcl 26 Feb 2022 14:37:39 -0000 1.6.2.5 @@ -38,7 +38,7 @@ } } - ad_proc -private dotclass {{-is_focus 0} {-documented_methods 1} e} { + ad_proc -private dotclass {{-is_focus 0} {-hide_methods 1} {-documented_methods 1} e} { } { set definition "" if {$is_focus} { @@ -58,11 +58,13 @@ append definition "|" ::xo::api scope_from_object_reference scope e set methods [list] - dot_append_method -documented_methods $documented_methods $e methods proc - dot_append_method -documented_methods $documented_methods $e methods instproc - dot_append_method -documented_methods $documented_methods $e methods instforward - foreach method [lsort $methods] {append definition "$method\\l" } - append definition "\}\"\];\n" + if {!$hide_methods} { + dot_append_method -documented_methods $documented_methods $e methods proc + dot_append_method -documented_methods $documented_methods $e methods instproc + dot_append_method -documented_methods $documented_methods $e methods instforward + foreach method [lsort $methods] {append definition "$method\\l" } + append definition "\}\"\];\n" + } } ad_proc -private dotobject {e} { @@ -76,6 +78,7 @@ {-with_instance_relations 0} {-omit_base_classes 1} {-documented_methods 1} + {-hide_methods 1} {-current_object ""} {-dpi 96} things @@ -87,13 +90,17 @@ set mclasses {} foreach e $things { - if {![::nsf::is object $e] || ($omit_base_classes && [::nsf::is baseclass $e])} continue + if {![::nsf::is object $e] + || ($omit_base_classes && [::nsf::is baseclass $e]) + } continue lappend [expr {[::nsf::is class $e] ? "classes" : "objects"}] $e } set instances "" if {$with_instance_relations} { foreach e $things { - if {![::nsf::is object $e] || ($omit_base_classes && [::nsf::is baseclass $e])} continue + if {![::nsf::is object $e] + || ($omit_base_classes && [::nsf::is baseclass $e]) + } continue set c [$e info class] if {$omit_base_classes && [::nsf::is baseclass $c]} continue if {$c ni $things} {lappend iclasses $c} @@ -150,7 +157,11 @@ } foreach e $classes { - append tclasses [dotclass -is_focus [expr {$e eq $current_object}] -documented_methods $documented_methods $e] + append tclasses [dotclass \ + -is_focus [expr {$e eq $current_object}] \ + -hide_methods $hide_methods \ + -documented_methods $documented_methods \ + $e] } set tobjects {} foreach e $objects { Index: openacs-4/packages/xotcl-core/www/show-object.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/www/show-object.tcl,v diff -u -r1.27.2.9 -r1.27.2.10 --- openacs-4/packages/xotcl-core/www/show-object.tcl 7 Oct 2021 11:06:02 -0000 1.27.2.9 +++ openacs-4/packages/xotcl-core/www/show-object.tcl 26 Feb 2022 14:37:39 -0000 1.27.2.10 @@ -239,6 +239,7 @@ } } set documented_only [expr {$show_methods < 2}] +set hide_methods [expr {$show_methods == 0}] if {[nsv_exists api_library_doc $index]} { array set doc_elements [nsv_get api_library_doc $index] @@ -414,16 +415,13 @@ # Construct the dot code from the provided classes as embedded svg # code. # - # TODO: it would be nice to pass the selected options from the - # dimensional slider to dotcode, since with svg, the dot code - # constructs URLs for navigation in the class tree. - # set dot_code [::xo::dotcode -dpi 72 \ -with_children $with_children \ -with_instance_relations $with_instance_relations \ -omit_base_classes 0 \ -current_object $object \ -documented_methods $documented_only \ + -hide_methods $hide_methods \ $class_hierarchy] set svg [util::inline_svg_from_dot -css {