SetOrder
Overview
Section titled “Overview”Sets the rendering order (z-order) for the specified PrismaView. This method controls the layering of views, determining which views appear on top of others during rendering.
Syntax
Section titled “Syntax”void SetOrder(PrismaView view, int order);Parameters
Section titled “Parameters”view (required)
Section titled “view (required)”- Type:
PrismaView - Description: The
PrismaViewfor which to set the rendering order
order (required)
Section titled “order (required)”- Type:
int - Description: The z-order value for the view. Lower values render first (background), higher values render last (foreground)
Return Value
Section titled “Return Value”This method returns void.
Usage Examples
Section titled “Usage Examples”// Set first plugin's view to render on topPrismaUI->SetOrder(firstPluginView, 100);
// Set second plugin's view to render behindPrismaUI->SetOrder(secondPluginView, 1);Behavior Details
Section titled “Behavior Details”- Views are sorted by order value before rendering in
DrawViews() - Lower order values render first (appear behind)
- Higher order values render last (appear on top)
- Multiple views can have the same order value
- New views automatically get
maxOrder + 1on creation
Best Practices
Section titled “Best Practices”- Use Constants: Define layer constants for consistent ordering
- Logical Grouping: Group related views in similar order ranges
- Leave Gaps: Use increments of 10 or 50 to allow for future insertions
- Document Layers: Comment your layer hierarchy for maintainability