Phoenix inheritance diagrams

Hi all (mostly Andrea),

I've noticed that when the inheritance diagrams are getting too wide that the style settings in the browser are reducing it to fit the page width, as shown in the attachment. Other than the obvious problem of readability there is also a problem with the imagemap no longer corresponding to the visible positions of the blocks in the image. For example, in the attachment the tooltip shows that the mouse pointer is over the link for the EvtHandler class.

Questions:

* How tricky would it be to keep the image full size but make that block in the document a scrollable section so it doesn't affect the overall width of the document?

* Can we have graphviz/dot generate those diagrams with a vertical layout and a max width? (We may want to do that regardless of the answer for the 1st question.) Or better yet, can we have it use a more compact layout that is a combination of horizontal and vertical so it makes full use of the space given without being overly wide or tall?

* It would be nice to be able to make the inheritance diagram sections be collapsible like the wxWidgets docs do, and remember the setting in a cookie or something for when the user browses to the next page.

* Is there value in having the inheritance diagrams on the module pages in addition to the class pages? I see myself only using it to easily jump to the class page, and I can already do that in the sections following the diagram.

* Can we exclude showing the object, sip.simplewrapper and sip.wrapper types in the diagrams?

Snap004.png

···

--
Robin Dunn
Software Craftsman
http://wxPython.org

Hi Robin,

Hi all (mostly Andrea),

I've noticed that when the inheritance diagrams are getting too wide that
the style settings in the browser are reducing it to fit the page width, as
shown in the attachment. Other than the obvious problem of readability
there is also a problem with the imagemap no longer corresponding to the
visible positions of the blocks in the image. For example, in the
attachment the tooltip shows that the mouse pointer is over the link for the
EvtHandler class.

Questions:

* How tricky would it be to keep the image full size but make that block in
the document a scrollable section so it doesn't affect the overall width of
the document?

* Can we have graphviz/dot generate those diagrams with a vertical layout
and a max width? (We may want to do that regardless of the answer for the
1st question.) Or better yet, can we have it use a more compact layout that
is a combination of horizontal and vertical so it makes full use of the
space given without being overly wide or tall?

This is mostly a GraphViz question, and I am not such an expert with
it... I can get the vertical layout quite easily (and it appears to me
that wxWidgets has the vertical layout by default, as there does not
seem to be any special settings in the "DoxygenLayout.xml" file, and
Doxygen uses Graphviz to generate the graphs). I'll switch to vertical
layout by default.

* It would be nice to be able to make the inheritance diagram sections be
collapsible like the wxWidgets docs do, and remember the setting in a cookie
or something for when the user browses to the next page.

I believe it's possible, it's just another piece of JavaScript to add
to the documentation builder. Other than that, I will have to add that
in the post-processing of the generated HTML documentation, as the
inheritance diagram section will need to be wrapped in a section
divider and the JavaScript script will toggle its visibility on and
off. I'll see what I can do.

* Is there value in having the inheritance diagrams on the module pages in
addition to the class pages? I see myself only using it to easily jump to
the class page, and I can already do that in the sections following the
diagram.

This is a remnants of AGW and the Namespace Diff Tool, I'll remove the
module-level inheritance diagram.

* Can we exclude showing the object, sip.simplewrapper and sip.wrapper types
in the diagrams?

Uh, that's very weird... I am sure it didn't happen with the Classic
binaries (i.e., with SWIG)... I will have to figure out an intelligent
way to manipulate the dot inheritance diagrams to remove the
intermediate sip classes.

I am not sure how much of this I will be able to do in the near
future, I am finally going on holiday tonight for a couple of weeks.
I'll commit any solid change I may make when I get back this evening.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

# ------------------------------------------------------------- #
def ask_mailing_list_support(email):

    if mention_platform_and_version() and include_sample_app():
        send_message(email)
    else:
        install_malware()
        erase_hard_drives()
# ------------------------------------------------------------- #

···

On 17 July 2012 01:52, Robin Dunn wrote:

Robin,

Hi Robin,

Hi all (mostly Andrea),

I've noticed that when the inheritance diagrams are getting too wide that
the style settings in the browser are reducing it to fit the page width, as
shown in the attachment. Other than the obvious problem of readability
there is also a problem with the imagemap no longer corresponding to the
visible positions of the blocks in the image. For example, in the
attachment the tooltip shows that the mouse pointer is over the link for the
EvtHandler class.

Questions:

* How tricky would it be to keep the image full size but make that block in
the document a scrollable section so it doesn't affect the overall width of
the document?

* Can we have graphviz/dot generate those diagrams with a vertical layout
and a max width? (We may want to do that regardless of the answer for the
1st question.) Or better yet, can we have it use a more compact layout that
is a combination of horizontal and vertical so it makes full use of the
space given without being overly wide or tall?

This is mostly a GraphViz question, and I am not such an expert with
it... I can get the vertical layout quite easily (and it appears to me
that wxWidgets has the vertical layout by default, as there does not
seem to be any special settings in the "DoxygenLayout.xml" file, and
Doxygen uses Graphviz to generate the graphs). I'll switch to vertical
layout by default.

This should now be implemented in SVN, although the inheritance images
still needs to be horizontally centered in the HTML pages. I didn't
have time to adjust it, but the most likely place to look for a
possible HTML tag to center them is in the `templates.py` file, in the
TEMPLATE_INHERITANCE module variable.

To get the old behaviour back (i.e., horizontal GraphViz images),
change the `rankdir` arguments from "TB" to "LR" in the
`inheritance.py` script.

* It would be nice to be able to make the inheritance diagram sections be
collapsible like the wxWidgets docs do, and remember the setting in a cookie
or something for when the user browses to the next page.

I believe it's possible, it's just another piece of JavaScript to add
to the documentation builder. Other than that, I will have to add that
in the post-processing of the generated HTML documentation, as the
inheritance diagram section will need to be wrapped in a section
divider and the JavaScript script will toggle its visibility on and
off. I'll see what I can do.

I have tried to tackle this one by using a modification of the
wxWidgets HTML approach, but with little success. I am not that good
with JavaScript, and I have run out of time today :slight_smile: . If no one
gives it a try, I'll implement it when I get back from holidays.

* Is there value in having the inheritance diagrams on the module pages in
addition to the class pages? I see myself only using it to easily jump to
the class page, and I can already do that in the sections following the
diagram.

This is a remnants of AGW and the Namespace Diff Tool, I'll remove the
module-level inheritance diagram.

The module-level inheritance diagrams are not generated anymore. To
get back the old behaviour, look for an "IMPORTANT" comment in the
`librarydescription.py` script.

* Can we exclude showing the object, sip.simplewrapper and sip.wrapper types
in the diagrams?

Uh, that's very weird... I am sure it didn't happen with the Classic
binaries (i.e., with SWIG)... I will have to figure out an intelligent
way to manipulate the dot inheritance diagrams to remove the
intermediate sip classes.

This problem still stands, I haven't had time to look into it. Mostly,
the inheritance classes need to be tweaked to exclude the "sip." ones
(while still retaining the link between the last non-sip class from
the start and the first non-sip class after the sip classes). If
someone wants to give it a go, I believe the best place to hack it is
in the _class_info method in the `inheritance.py` script, and
especially in the recursive function called `recurse`. Otherwise I'll
do it myself when I get back.

See you soon :slight_smile:

···

On 17 July 2012 10:14, Andrea Gavana wrote:

On 17 July 2012 01:52, Robin Dunn wrote:

--
Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

# ------------------------------------------------------------- #
def ask_mailing_list_support(email):

    if mention_platform_and_version() and include_sample_app():
        send_message(email)
    else:
        install_malware()
        erase_hard_drives()
# ------------------------------------------------------------- #

Thanks Andrea, enjoy your vacation. I should do that again one of these years... :slight_smile:

···

On 7/17/12 1:14 AM, Andrea Gavana wrote:

I am not sure how much of this I will be able to do in the near
future, I am finally going on holiday tonight for a couple of weeks.

--
Robin Dunn
Software Craftsman