Overview
Views are the main UI containers in angr Management. They are dockable panels that display different aspects of the binary analysis. The view system is managed byViewManager and uses Qt Advanced Docking System (QtAds).
View Architecture
View Hierarchy
All views inherit from one of these base classes:Creating Custom Views
BaseView
The foundation for all views:category- View category (e.g., “disassembly”, “functions”)workspace- Reference to workspacedefault_docking_position- “left”, “right”, “top”, “bottom”, “center”base_caption- Display nameindex- View instance number (auto-assigned)icon- View icon (auto-loaded from category)
InstanceView
Views associated with a specific analysis instance:self.instance.project- angr Projectself.instance.cfg- Control Flow Graphself.instance.kb- Knowledge Baseself.instance.states- Simulation states
FunctionView
Views that focus on a specific function:View Synchronization
SynchronizedView
Enables cursor and highlight synchronization between views:set_synchronized_cursor_address(addr)- Update shared cursorset_synchronized_highlight_regions(regions)- Share highlightssync_with_state_object(state)- Sync with another viewdesync()- Stop synchronization
View Manager
TheViewManager handles view lifecycle and docking.
Adding Views
View Manager Methods
Docking Positions
Built-in Views
angr Management includes several built-in views you can reference:DisassemblyView
angrmanagement/ui/views/disassembly_view.py
FunctionsView
Displays function table:angrmanagement/ui/views/functions_view.py
Other Built-in Views
- HexView - Hex editor (
hex_view.py) - StringsView - String references (
strings_view.py) - ConsoleView - IPython console (
console_view.py) - RegistersView - Register values (
registers_view.py) - StackView - Stack contents (
stack_view.py) - StatesView - Simulation states (
states_view.py) - BreakpointsView - Breakpoint list (
breakpoints_view.py) - PatchesView - Binary patches (
patches_view.py) - ProximityView - Proximity graph (
proximity_view.py)
angrmanagement/ui/views/
Complex Widget Example
Creating a custom widget for use in views:View State Management
Publishing View State
Event Handling
Main Window Events
Context Menus
Integration with Workspace
Accessing Workspace Components
Interacting with Other Views
Best Practices
1. Proper Initialization
2. Resource Cleanup
3. Thread Safety
Complete View Example
Next Steps
- Customize appearance with Theming
- Learn about UI Components
- Explore Plugin Development