Panel Actors make it trivially easy to write User Interface Actors. Each UI is just an actor. When you need to communicate between your UIs, you just send it actor framework messages. All of the business to do with showing and hiding your front panel is handled by the MGI Panel Manager Framework
Actor core.vi
Launch Root Panel
or Launch Nested Panel
�That's it! When you launch a Panel Actor, you need to specify the panel type. When the actor is launched Actor core's front panel is inserted into the specified panel.
Panel Actors provide an extremely versatile interface for creating modular, professional user interfaces. Here are some of the features.
Writing professional code is very important. Something that always looks amateur is when the UI is displayed before its contents are populated. Panel Actors help provide an easy way to prevent this. The Panel UI is not shown until your Panel Actor calls the parent implementation of Actor core.vi
. This means that if you need to pre-populate you UI with any data you just need to do it before the Call Parent Method
node. This could mean simple things like populating a control or more complex things like launching nested panels.
When Panel Actors are launched the node waits for the UI to be initialized. Use this to pre-populate the UI (including all nested subpanels) before showing the front panel.
Panel Actors throw a few events. Since most of the time your panel actors will have an Event Handler helper loop, these events can be registered for. These events will tell you when the actor has been initialized and stopped, as well as when the Panel itself changes state. The most important of these events is the Actor.Stopped
event. This event is thrown when the actor is stopped. This event is helpful for terminating your event handler Helper loop. See the examples included in the package for more information about Panel and Panel Actor events.
The Panel Helper class is designed to give developers an easy way to interface with the panel, no matter what type of panel it is. This helps with deferring updates, setting the mouse busy, and other panel specific tasks. The Panel Helper is valid even if the panel type changes.
The Panel Actor assumes that the most specific implementation of Actor Core contains the UI to be shown. This means that if you have an inheritance tree, in which all levels contain a UI, by default the framework would only show the most specific.
Tiered Panels allow you to assemble your UI using each layer of inheritance. Each level just needs to call Add Panel Tier.vi
add the previous layer to the main UI. This allows developers to implement the relevant UI in the proper inheritance level.
A Panel Actor has a few extra messages.
Additionally, a Panel Actor can send a message to itself to launch a Nested Panel using the Send Launch Nested Panel.vi
method.
See Contributing.md for information on how to submit pull requests. Bugs can be reported using the repositories issue tracker.
Added Panel Helper
output to Register for Events.vi
Added Replaced VI
output to Add Panel Tier.vi
Updated Readme and Relinked VIs
Fixed missing connector pane item.
Removed final references to VIPM.
Port from VIPM.
Copyright (c) 2018 Moore Good Ideas, Inc . All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.