Non-trivial applications require complex user interfaces. The goal is to keep them as simple as possible but the fact fact of the matter is that if software needs to do a lot of stuff then there are going to be a lot of controls and indicators. User interfaces can always be split up conceptually (these controls are for loading while those controls are for previewing data, for example) but splitting them up in LabVIEW can often be daunting. We must make compromises.
The MGI Panel Manager toolkit abstracts away these complexities. This makes it trivially simple to build an application with UIs with multiple layers of subpanels, nice dialogs, or any other presentation format.
The Panel class is the base interface for the library. Every UI that will eventually be shown uses the panel interface. The base framework supports two different panel types: Window and Subpanel. Since the framework is extendable, other panel types can be added at any time.
The frontpanel that uses the Panel interface doesn't have to know anything about the type of panel it will be inserted in. That makes it really do things like:
The Subpanel type manages inserting and removing front panels from subpanels. Subpanels are the key to splitting up large, complex UIs into small, maintainable chunks of code.
Windows are the base panel type for every application. When a panel with a window type is initialized the VI's front panel is shown.
Windows need to be placed in a logical spot on the display. There are several ways to tell the framework where to place the new window:
Alignment is simple. You can specify Top, Center, or Bottom for vertical alignment and Left, Center or Right for horizontal alignment.
There are 3 built in types of offset. Again, this is a extendable interface.
When docking and undocking into subpanels, or when launching windows in different contexts it is often useful to manually specify the size of the window to be shown. There are 4 built in types of window size
See Contributing.md for information on how to submit pull requests. Bugs can be reported using the repositories issue tracker.
Updated Readme and Relinked VIs
Port from VIPM Version
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.