1. Technical Field
Embodiments of the present disclosure relate to graphical user interface (GUI), and particularly to a system and a method for managing display of a GUI in an electronic device.
2. Description of Related Art
In a traditional method of designing a graphical user interface (GUI), size of a layout of the GUI needs to be declared and defined in programs in advance. Furthermore, a display position and a size of each pane of the layout are also need to be defined in advance. However, the display and the size of each pane of the layout are generally already pre-defined. Therefore, the design of the GUI may lack diversification and individualization, as there is no clear location and display method about the panes of the layout.
The disclosure, including the accompanying drawings, is illustrated by way of examples and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
In general, the word “module,” as used herein, refers to logic embodied in hardware or firmware unit, or to a collection of software instructions, written in a programming language. One or more software instructions in the modules may be embedded in firmware unit, such as in an EPROM. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media may include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
The storage system 30 stores data of the electronic device 1, such as graphical data relating to the GUI 11. In one embodiment, the storage system 30 may be a memory of the electronic device 1, or an external storage card, such as a smart media card, or a secure digital card. The at least one processor 50 executes one or more computerized codes and other applications for the electronic device 1, to provide the functions of the management system 20.
As shown in
In step S10, the reading module 200 reads parameters of panes in the GUI 11. In some embodiments, the parameters may include, but are not limited to, coordinates of an upper left vertex, a length and a width of each pane in the arranged layout.
In step S11, the processing module 202 calculates a coordinate set including coordinates of four vertexes of each of the panes, and records the coordinate set according to a predetermined format. In one embodiment, the predetermined format is {coordinates of upper left vertex, coordinates of upper right vertex, coordinates of lower right vertex, coordinates of lower left vertex}. The processing module 202 calculates the coordinate set according to the coordinates of the upper left vertex, of the length and of the width of each of the panes. For example, an X coordinate value of the upper right vertex of one of the panes is equal to a sum of an X coordinate value of the upper left vertex of the pane and the length of the pane, and a Y coordinate value of the upper left vertex of the pane is equal to a Y coordinate value of the upper left vertex. In one embodiment, a coordinate system of the electronic device presets a point in the upper left vertex of the display device 10 as an origin, a right horizontal direction of the display device 10 as a positive direction of an x-axis, and a down vertical direction of the display device 10 as a positive direction of a y-axis.
In step S12, the marking module 204 marks an order of each of the panes according to a predetermined mode, and stores the read parameters of each of the panes according to the marked order in the storage system 30. The predetermined mode may be a recursive rotation mode, and detail steps of marking the panes are shown in
In step S13, when the GUI 11 is displayed on the display device 10, the displaying module 206 reads and displays the panes of the GUI 11 on the display device 10 according to the marked order from the storage system 30. In one embodiment, the GUI 11 may be displayed by another display device (such as video wall or screen), and the panes in the GUI 11 may be displayed one by one in a clockwise rotation mode.
In step S121, the marking module 204 searches for a first unlabelled pane in the GUI 11 which is right adjoined to the reference pane. If the first unlabelled pane has been found, step S122 is implemented. If no first unlabelled pane has been found, step S123 is implemented. In one embodiment, a difference between an X coordinate value of an upper left vertex of the first unlabelled pane and an X coordinate value of the upper right vertex of the reference pane is less than a preset value, and a Y coordinate value of the upper right vertex of the reference pane is greater than or equal to a Y coordinate value of the upper left vertex and lower than or equal to a Y coordinate value of the left vertex of the first unlabelled pane.
In step S122, the marking module 204 labels the found unlabelled pane in sequence, and determines the searched unlabelled pane to be the reference pane, then step S121 is implemented. For example, the marking module 204 labels the first found unlabelled pane adjoining the right of the first pane with a label of “2”.
In step S123, the marking module 204 searches for a second unlabelled pane in the GUI 11 which is below adjoined to the reference pane. If the second unlabelled pane has been found, step S122 is implemented. If no second unlabelled pane has been found, step S124 is implemented. In one embodiment, a difference between the Y coordinate value of an upper left vertex of the second unlabelled pane and a Y coordinate value of the upper right vertex of the reference pane is less than a preset value, and an X coordinate value of the upper right vertex of the reference pane is greater than or equal to an X coordinate value of the upper left vertex and lower than or equal to an X coordinate value of the upper right vertex of the second unlabelled pane.
In step S124, the marking module 204 searches for a third unlabelled pane in the GUI 11 which is left adjoined to the reference pane. If the third unlabelled pane has been found, step S122 is implemented. If no third unlabelled pane has been found, step S125 is implemented. In one embodiment, a difference between the X coordinate value of an upper left vertex of the third unlabelled pane and an X coordinate value of the lower left vertex of the reference pane is less than a preset value, and a Y coordinate value of the upper right vertex of the reference pane is greater than or equal to a Y coordinate value of the upper right vertex and lower than or equal to a Y coordinate value of the upper right vertex of the third unlabelled pane.
In step S125, the marking module 204 searches for a fourth unlabelled pane in GUI 11 which is above adjoined to the reference pane. If the fourth unlabelled pane has been found, step S122 is implemented. If no fourth unlabelled pane has been found, step S126 is implemented. In one embodiment, a difference between the Y coordinate value of an upper left vertex of the fourth unlabelled pane and a Y coordinate value of the lower left vertex of the reference pane is less than a preset value, and an X coordinate value of the upper left vertex of the reference pane is greater than or equal to an X coordinate value of the lower left vertex and lower than or equal to an X coordinate value of the lower right vertex of the fourth unlabelled pane.
In step S126, the marking module 204 determines whether there are any panes in the GUI 11 that have not been labeled. If there are one or more panes that have not been labeled, step S122 is implemented. If there is no pane that has not been labeled, that is, all of the panes in the GUI 11 have been labeled, the procedure ends. As shown in
All of the processes described above may be embodied in, and be fully automated via, functional code modules executed by one or more general-purpose processors. The code modules may be stored in any type of non-transitory computer-readable medium or other storage device. Some or all of the methods may alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory computer-readable medium may be a hard disk drive, a compact disc, a digital video disc, a tape drive or other suitable storage medium.
The described embodiments are merely possible examples of implementations, set forth for a clear understanding of the principles of the present disclosure. Many variations and modifications may be made without departing substantially from the spirit and principles of the present disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and the described inventive embodiments, and the present disclosure is protected by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
101126889 | Jul 2012 | TW | national |