Some Ideas about Gui

Source: Internet
Author: User
I have been trying to improve the UI part of garnet engine recently. Considering that implementing a complete UI requires a lot of work, you need to find a ready-made open-source library.

Turned on the internet, found the http://www.cegui.org.ui. Strong functions, and is dedicatedProgramAnd has been integrated into ogre. However, this library is too bloated and requires a lot of external dependencies to run, such as FreeType and xerces. It also has weak support for Chinese characters.

I found several lightweight UI libraries on the Internet, such:

Http://guichan.darkbits.org/

Http://www.paragui.org/

Http://www.picogui.org

Without a careful look at their functions, the rough looks are not ideal. If you have time, you can write a UI library by yourself.

If you want to define a standard program interface for the UI and then write different implementations, it is much easier. It also helps to separate the functions and interfaces of the program.

There are currently several alternatives:

1. Define the GUI as a collection of two groups of events:

-A group of events are generated by the GUI based on user input and are responded by the background program;

-Another group of events is generated by the background program and the GUI is responsible for the response;

-The background program and GUI do not know the implementation details of the other party. They can only use these events for interaction;

-These events can also be provided to the other party in the form of "attributes:

-Each attribute consists of the following events:

-For application:

-App_read (...)

-App_write (...)

-On_gui_read (...)

-On_gui_write (...)

-For GUI:

-Gui_read (...)

-Gui_write (...)

-On_app_read (...)

-On_app_write (...)

-The specific GUI format is defined by the script file and transparent to the application, similar to the description file (TBD) of effect)

2. The background program provides a set of functions for GUI calls. Gui provides a set of common functions for creating and customizing user interfaces.

-TBD

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.