Vyzor

From Mudlet
Jump to navigation Jump to search

Author

Name
Erik Pettis
Forum Name
Oneymus

About

Beta Release
January 8th, 2012

Vyzor is a GUI framework that provides an object-oriented interface for Mudlet's Labels and Qt's Stylesheets. It provides Frames (Vyzor's container object) mapped to Mudlet's borders, which update dynamically or maintain a size specified by the user. Users creates Frames, and can define them using values relative to parent Frames; in this way, you can have widgets that properly map to, say, the right side of the main console. All Frames can be filled with Components, which map directly to Stylesheet Properties.

References

Qt 4.7 Reference Sheet

Project

Known Issues

  1. Needs a usage guide. Oi.
  • In progress!
  1. Why doesn't "vyzor help" work?
  2. Text in Gauge captions only works at one size. Will need to be handled dynamically.

ToDo

  1. Implement Component inheritance to mimic Stylesheet cascading.
  2. Add Chat Compound for the ever-popular tabbed chat module.
  3. Allow relative sizes for Margin, Border, and Padding Components.
  4. Nested Labels (see GeyserLabel.lua)
  5. Allow Adding Frames to and Removing Frames from Box Compound
    1. The idea here is for run-time editing, but since you can't change Label layering post-creation, is this even feasible? In fact, I should assess the feasibility of ANY run-time modifications to GUI state.
  6. Raise a VyzorLoad Event after module is loaded.
  7. Fix Gradients to use tables for stop/Color pairs.
  8. Modify Hover Component functions to resemble Frame counterparts.

Updates

2012-01-18

Additions
  1. Added MiniConsole support.
  2. Added Map support.
  3. Added Gauge support via new type: Compound.
Fixes
  1. Solved a previously unknown problem with top and bottom Border Frames maximizing.

2012-01-23

Additions
  1. A new alias, "vyzor help|vyhelp|vyh". In theory, would open the documentation in a browser. Didn't work for me.
Fixes
  1. Gradients now work properly. The change to LuaJIT required a change in variable arguments.
  2. Options.DrawOrder now functions. Border Frames (and children) will now be drawn in the specified order.
  3. Borders and Backgrounds should now function without content (Brush or Image).

2012-02-06

Additions
  1. Gauges:
    • Can now supply a table of Frames as the last argument to the Gauge constructor. These Frames will be used when current values exceed the maximum value. If there are no overflow gauges (or current exceeds overflow), the final Gauge will properly draw at 100%.
    • Gauges now have an internally generated caption Frame. This can be echoed to using <gauge>:Echo(text). If no text is supplied, the Gauge will echo according to a supplied TextFormat (should be string.format compatible, with two values).
    • Gauges are now created with AutoEcho true, meaning they will echo to the Gauge every time Update is called. This can be turned off with <gauge>.AutoEcho = false
  2. Frames and MiniConsoles now possess wrappers for the remaining relevant Mudlet functions:
    • Echo
    • CEcho
    • DEcho
    • HEcho
    • EchoLink
    • EchoPopup
    • Paste
    • Clear
  3. Additionally, Frames possess two new Properties:
    • Callback - Used to set a callback function. Must be a string.
    • CallbackArguments - Used to pass arguments to a callback function. Should be a table.
  4. MiniConsoles also have AppendBuffer(), but functionality seems identical to Paste().
Fixes
  1. Frames should now be guaranteed to draw in the correct order, thanks to the addition of a custom OrderedTable() function. See vyzor/lib for details.

2012-02-26

Additions
  1. Created a Vyzor page on the Mudlet Wiki. In order to maintain brevity of this post, the Known Issues, ToDo, and Update lists will be maintained there. Additionally, there will some day be a usage guide and (possibly) documentation there. There will, however, always be the last update on this post for easy reference.
  2. Added a Box Compound that automatically arranges Frames.
    1. Boxes can be Horizontal (left->right), Vertical (top->bottom), or in a Grid (left->right, top->bottom).
    2. This is set via BoxMode Enum.
    3. This will lead to a Chat Compound and a Nested Labels (fly-out) Compound.
Fixes
  1. Resolved an issue with setting MiniConsole properties post-creation. I had put the function in the wrong place. =p

Documentation

API Reference
Link
This is comprehensive reference to Vyzor's API. Everything necessary to work with Vyzor should be contained herein.
Sample Walkthrough
Link
This is a walkthrough of the SampleGUI package I provided to showcase Vyzor.
Source Documentation
Link
This is an HTML dump of the auto-generated source documentation of Vyzor. Produced by NaturalDocs.

License

Copyright (c) 2012 Erik Pettis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.