@@ -32,7 +32,7 @@ def __init__(self, parent, diagram_info, puml_component, puml_class):
3232 """
3333 wx .Dialog .__init__ (self , parent , wx .ID_ANY , _ ("Diagram Information" ),
3434 style = wx .DEFAULT_DIALOG_STYLE | wx .RESIZE_BORDER )
35- self .SetSize ((700 , 500 ))
35+ self .SetSize ((750 , 550 ))
3636
3737 self .puml_component = puml_component
3838 self .puml_class = puml_class
@@ -48,22 +48,77 @@ def __init__(self, parent, diagram_info, puml_component, puml_class):
4848 info_panel = wx .Panel (notebook )
4949 info_sizer = wx .BoxSizer (wx .VERTICAL )
5050
51+ # Header avec bouton info
52+ info_header = wx .BoxSizer (wx .HORIZONTAL )
53+ info_label = wx .StaticText (info_panel , wx .ID_ANY , _ ("Diagram Statistics" ))
54+ info_label .SetFont (wx .Font (10 , wx .FONTFAMILY_DEFAULT , wx .FONTSTYLE_NORMAL , wx .FONTWEIGHT_BOLD ))
55+ info_help_btn = wx .Button (info_panel , wx .ID_ANY , "?" , size = (25 , 25 ))
56+ info_help_btn .SetToolTip (_ ("Show information about this tab" ))
57+
58+ info_header .Add (info_label , 0 , wx .ALIGN_CENTER_VERTICAL | wx .ALL , 5 )
59+ info_header .Add (info_help_btn , 0 , wx .ALIGN_CENTER_VERTICAL | wx .LEFT , 5 )
60+ info_header .AddStretchSpacer ()
61+
62+ info_sizer .Add (info_header , 0 , wx .EXPAND | wx .ALL , 5 )
63+
5164 text_ctrl = wx .TextCtrl (info_panel , wx .ID_ANY , diagram_info ,
5265 style = wx .TE_MULTILINE | wx .TE_READONLY | wx .TE_WORDWRAP )
5366 info_sizer .Add (text_ctrl , 1 , wx .EXPAND | wx .ALL , 10 )
5467 info_panel .SetSizer (info_sizer )
5568
69+ # Event handler for info button
70+ info_help_btn .Bind (wx .EVT_BUTTON , lambda e : wx .MessageBox (
71+ _ ("This tab shows general statistics about your DEVS model:\n \n "
72+ "• Number of atomic models (basic components)\n "
73+ "• Number of coupled models (hierarchical components)\n "
74+ "• Number of connections between models\n "
75+ "• Hierarchy depth level\n "
76+ "• Number of input/output ports" ),
77+ _ ("Diagram Statistics Help" ),
78+ wx .OK | wx .ICON_INFORMATION
79+ ))
80+
5681 notebook .AddPage (info_panel , _ ("Information" ))
5782
5883 # --- PAGE 2: PlantUML Component Diagram ---
5984 comp_panel = wx .Panel (notebook )
6085 comp_sizer = wx .BoxSizer (wx .VERTICAL )
6186
87+ # Header avec bouton info
88+ comp_header = wx .BoxSizer (wx .HORIZONTAL )
89+ comp_label = wx .StaticText (comp_panel , wx .ID_ANY , _ ("Component Diagram (PlantUML)" ))
90+ comp_label .SetFont (wx .Font (10 , wx .FONTFAMILY_DEFAULT , wx .FONTSTYLE_NORMAL , wx .FONTWEIGHT_BOLD ))
91+ comp_help_btn = wx .Button (comp_panel , wx .ID_ANY , "?" , size = (25 , 25 ))
92+ comp_help_btn .SetToolTip (_ ("Show information about this tab" ))
93+
94+ comp_header .Add (comp_label , 0 , wx .ALIGN_CENTER_VERTICAL | wx .ALL , 5 )
95+ comp_header .Add (comp_help_btn , 0 , wx .ALIGN_CENTER_VERTICAL | wx .LEFT , 5 )
96+ comp_header .AddStretchSpacer ()
97+
98+ comp_sizer .Add (comp_header , 0 , wx .EXPAND | wx .ALL , 5 )
99+
62100 comp_text = wx .TextCtrl (comp_panel , wx .ID_ANY , puml_component ,
63101 style = wx .TE_MULTILINE | wx .TE_READONLY | wx .TE_WORDWRAP | wx .HSCROLL )
64102 comp_text .SetFont (wx .Font (9 , wx .FONTFAMILY_TELETYPE , wx .FONTSTYLE_NORMAL , wx .FONTWEIGHT_NORMAL ))
65103 comp_sizer .Add (comp_text , 1 , wx .EXPAND | wx .ALL , 10 )
66104
105+ # Event handler for component help button
106+ comp_help_btn .Bind (wx .EVT_BUTTON , lambda e : wx .MessageBox (
107+ _ ("Component Diagram shows the STRUCTURAL view of your DEVS model:\n \n "
108+ "• Packages represent coupled models (hierarchical structure)\n "
109+ "• Components represent atomic models (basic components)\n "
110+ "• Arrows show connections between components\n "
111+ "• Ports (in/out) are displayed on each component\n \n "
112+ "This diagram is useful for understanding:\n "
113+ "- Model architecture and composition\n "
114+ "- Data flow between components\n "
115+ "- Hierarchical organization\n \n "
116+ "Use 'Copy to Clipboard' to paste in PlantUML editor\n "
117+ "or 'View Online' to see it rendered directly." ),
118+ _ ("Component Diagram Help" ),
119+ wx .OK | wx .ICON_INFORMATION
120+ ))
121+
67122 # Boutons pour Component diagram
68123 comp_btn_sizer = wx .BoxSizer (wx .HORIZONTAL )
69124
@@ -83,11 +138,46 @@ def __init__(self, parent, diagram_info, puml_component, puml_class):
83138 class_panel = wx .Panel (notebook )
84139 class_sizer = wx .BoxSizer (wx .VERTICAL )
85140
141+ # Header avec bouton info
142+ class_header = wx .BoxSizer (wx .HORIZONTAL )
143+ class_label = wx .StaticText (class_panel , wx .ID_ANY , _ ("Class Diagram (PlantUML)" ))
144+ class_label .SetFont (wx .Font (10 , wx .FONTFAMILY_DEFAULT , wx .FONTSTYLE_NORMAL , wx .FONTWEIGHT_BOLD ))
145+ class_help_btn = wx .Button (class_panel , wx .ID_ANY , "?" , size = (25 , 25 ))
146+ class_help_btn .SetToolTip (_ ("Show information about this tab" ))
147+
148+ class_header .Add (class_label , 0 , wx .ALIGN_CENTER_VERTICAL | wx .ALL , 5 )
149+ class_header .Add (class_help_btn , 0 , wx .ALIGN_CENTER_VERTICAL | wx .LEFT , 5 )
150+ class_header .AddStretchSpacer ()
151+
152+ class_sizer .Add (class_header , 0 , wx .EXPAND | wx .ALL , 5 )
153+
86154 class_text = wx .TextCtrl (class_panel , wx .ID_ANY , puml_class ,
87155 style = wx .TE_MULTILINE | wx .TE_READONLY | wx .TE_WORDWRAP | wx .HSCROLL )
88156 class_text .SetFont (wx .Font (9 , wx .FONTFAMILY_TELETYPE , wx .FONTSTYLE_NORMAL , wx .FONTWEIGHT_NORMAL ))
89157 class_sizer .Add (class_text , 1 , wx .EXPAND | wx .ALL , 10 )
90158
159+ # Event handler for class help button
160+ class_help_btn .Bind (wx .EVT_BUTTON , lambda e : wx .MessageBox (
161+ _ ("Class Diagram shows the IMPLEMENTATION view with inheritance:\n \n "
162+ "• 'DEVS Framework' package: base classes from the framework\n "
163+ " (DomainBehavior, DomainStructure, Coupled, etc.)\n "
164+ "• 'User Models' package: your custom model classes\n "
165+ "• Arrows show inheritance relationships (parent ← child)\n "
166+ "• Methods and attributes are listed for each class\n "
167+ "• Ports (IPorts/OPorts) are shown as attributes\n \n "
168+ "This diagram is useful for understanding:\n "
169+ "- Complete Python class hierarchy\n "
170+ "- Which framework classes your models inherit from\n "
171+ "- Methods implemented in each class\n "
172+ "- Object-oriented structure of your models\n \n "
173+ "Colors:\n "
174+ "- Blue: Atomic models\n "
175+ "- Green: Coupled models\n "
176+ "- Gray: Framework classes" ),
177+ _ ("Class Diagram Help" ),
178+ wx .OK | wx .ICON_INFORMATION
179+ ))
180+
91181 # Boutons pour Class diagram
92182 class_btn_sizer = wx .BoxSizer (wx .HORIZONTAL )
93183
0 commit comments