Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
GUIs with dynamic panes
A technique for flexible front panel scaling
Agenda
• Introduction
• A scaling VI
• A scaling class hierarchy
• Adding interaction
• Decoupling
• Afterthoughts
• Questions
Introduction (About)
• Wiebe Walstra
• Wiebe@CARYA
Introduction
Introduction
• What are dynamic panes?
• The code is not:• A product• Finished• Polished
• The code is:• Working for me• Flexible• Freely available
• Omitting 90% of the details
Introduction
DEMO
A Scaling VI
A Scaling VI
• Scaling anything\everything is a problem
• GObject Position is read\write
• GObject Bounds is read only
• Set Size is a pain
A Scaling VI
A Scaling VI
A Scaling VI
A Scaling VISpecial scaling for graphs
and subpanels
A Scaling VI
A Scaling VI
A Scaling VI
DEMO
Object
+ Init Object+ Scale
A Scaling VI
0.0 1.0
Bounds x’ = Ax + B
0.0
1.0y’ = Ay + B
A Scaling VI
DEMO
A scaling class hierarchy
A scaling class hierarchy
A scaling class hierarchy
A Scaling VI
Object
+ Init Object+ Resize
Viewport
+ Init Viewport+ Resize
A scaling class hierarchy
DEMO
A Scaling VI
Object
+ Init Object+ Resize
Viewport
+ Init Viewport+ Resize
Divider
+ Init Divider+ Resize
A scaling class hierarchy
DEMO
A Scaling VI
Object
+ Init Object+ Resize
Viewport
+ Init Viewport+ Resize
Divider
+ Init Divider+ Resize
Common parent. (Why?)
A Scaling VI
Object
+ Init Object+ Resize
Viewport
+ Init Viewport+ Resize
Splitter
+ Init Splitter+ Resize
IObject
+ Resize
What if splitter has a splitter?
A Scaling VI
Object
+ Init Object+ Resize
Viewport
+ Init Viewport+ Resize
Splitter
+ Init Splitter+ Resize
IObject
+ Resize
Splitter and Viewport mostly
the same!
Object
+ Init Object+ Resize
IContainer
# Set Items+ Resize
Viewport
+ Init Viewport
IObject
+ Resize
Splitter
+ Init Splitter
How does Icontainerknow how to scale?
Object
+ Init Object+ Resize
IContainer
# Set Items# Distribute+ Resize
Viewport
# Distribute+ Init Viewport
IObject
+ Resize
Splitter
# Distribute+ Init Splitter
CLASSHIERARCHY
OBJECTHIERARCHY
Adding interaction
Object
…
IContainer
…+Show Hide (Label)
IObject
…+ Set Label+ Show Hide (Label)
Show\hide
DEMO
Adding interaction
Adding interaction
Adding interaction
Object
…
IContainer
…
Viewport
…
IObject
…
Splitter
…
Interaction
…
Object
…
IContainer
…
Viewport
…
IObject
…
Splitter
…
Interaction
…+ On Mouse Move
Object
…
IContainer
…# Hit Splitter
Viewport
…
IObject
…# Hit Splitter
Splitter
…# Hit Splitter
Interaction
…+ On Mouse Move
Object
…
IContainer
…# Hit Splitter+ Resize Pane
Viewport
…
IObject
…# Hit Splitter
Splitter
…# Hit Splitter+ Resize Pane
Interaction
…+ On Mouse Move
Adding interaction
Start splitter VIs
Handled by class
Adding interaction
Adding interaction
DEMO
Decoupling
Decoupling
Object
…
IContainer
…
Viewport
…
IObject
…
Splitter
…
Interaction
…
Interaction by reference
+ Init Interaction by referenceALL METHODS
Decoupling
Decoupling
Decoupling
DEMO
Afterthoughts
Afterthoughts
Afterthoughts
• Plays nice with SubPanels
• More icing on the cake
• Min, max
• Hit detect
• Show Hide is a reg.ex.
• Query visibility
• Events
• Alternatives container
• Update objects in a container
• Load\store screen (coming)
Afterthoughts
• Place to put it
• Documentation, Examples, Manual
• Nasty LV bug
Questions