CN101408843B - Method and apparatus for generating program menu - Google Patents

Method and apparatus for generating program menu Download PDF

Info

Publication number
CN101408843B
CN101408843B CN2008102192087A CN200810219208A CN101408843B CN 101408843 B CN101408843 B CN 101408843B CN 2008102192087 A CN2008102192087 A CN 2008102192087A CN 200810219208 A CN200810219208 A CN 200810219208A CN 101408843 B CN101408843 B CN 101408843B
Authority
CN
China
Prior art keywords
button
information
forms
menu
control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2008102192087A
Other languages
Chinese (zh)
Other versions
CN101408843A (en
Inventor
司徒健聪
周虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vtron Group Co Ltd
Original Assignee
Vtron Technologies Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vtron Technologies Ltd filed Critical Vtron Technologies Ltd
Priority to CN2008102192087A priority Critical patent/CN101408843B/en
Publication of CN101408843A publication Critical patent/CN101408843A/en
Application granted granted Critical
Publication of CN101408843B publication Critical patent/CN101408843B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for generating program menus and a system thereof. The method includes reading XML files that comprise form elements, push button elements and function elements; analyzing the XML files according to preset rules and generating form controls according to the form elements, push button controls corresponding to the form controls according to the push button elements and the functions corresponding to the push button controls according to the function elements. In the method and the device, the function elements consist of a function name and a function parameter and therefore the separation of interface design from the function parameter coding is realized. A programmer only needs to compile corresponding function parameters according to the function name, with the load relieved. The code reusability is relatively high and the compiling efficiency is high. Moreover, the program menus are generated by the XML files which can be easily modified. The generated menus are displayed on a screen in a floating way, not affecting the display effect of programs on the full screen.

Description

A kind of method of generator program menu and device thereof
Technical field
The present invention relates to computer application field, relate in particular to a kind of method and device thereof of generator program menu.
Background technology
The programmer is when writing great majority and need carry out the program of full screen display, and an inevasible problem is exactly how to handle the demonstration of relevant procedures menu.The purpose of full screen display program is in order to obtain better display effect.Programmer and secondary development personnel and user should show reliable operation interface (programs menu) as far as possible when not hindering program master interface display for ease.When the program of configuration giant-screen equipment demonstration, the programmer more needs a reliable operation interface (programs menu) to handle.
In the prior art when the full screen display routine; The generator program menu is generally taked the design of Pop-up, promptly shows the programs menu that ejects in the relevant position at program display interface, according to different user's requests; The secondary development personnel need write the different programs menu, and it is lower to write efficient.Carrying out program run when design, the programmer also must spend the plenty of time and write code for the appearance style that the INTERFACE DESIGN personnel design except write function code, increased programmer's burden.
Summary of the invention
The invention provides a kind of method and device thereof of generator program menu, it can not influence the display effect of full frame program, and code reusability is higher, has alleviated programmer's workload.
Technical scheme of the present invention is: a kind of method of generator program menu comprises step:
Read the XML file, said XML file comprises forms element, button element and functional element; Said forms element comprises frame size data message and forms name information, and said button element comprises the Background information and the button name information of button, and said functional element comprises function name information and functional parameter information;
Resolve said XML file according to pre-defined rule, generate form control, generate the button control corresponding, generate the corresponding function of said button control according to said functional element with said form control according to said button element according to said forms element; Said pre-defined rule is: said programs menu comprises several form controls, and each form control comprises several button controls, and each button control comprises several function;
Obtain the coordinate range of display screen; Calculate the coordinate position of said programs menu after dragging; Judge said coordinate position whether in the coordinate range of said display screen, if not, said coordinate position is adapted in the coordinate range of said display screen.
A kind of device of generator program menu comprises:
Read module is used to read the XML file, and said XML file comprises forms element, button element and functional element; Said forms element comprises frame size data message and forms name information, and said button element comprises the Background information and the button name information of button, and said functional element comprises function name information and functional parameter information;
Parsing module is used for resolving said XML file according to pre-defined rule; This pre-defined rule is: said programs menu comprises several form controls, and each form control comprises several button controls, and each button control comprises several function;
Generation module is used for generating form control according to said forms element, generates the button control corresponding with said form control according to said button element, generates the corresponding function of said button control according to said functional element;
Description of drawings
Correcting module; Be used to obtain the coordinate range of display screen, calculate the coordinate position of said programs menu after dragging, judge that said coordinate position is whether in the coordinate range of said display screen; If not, said coordinate position is adapted in the coordinate range of said display screen.
The method of generator program menu of the present invention and device thereof; Functional element is made up of function name and functional parameter; Realized separating of INTERFACE DESIGN (function name symbol) and functional parameter coding; When carrying out the program run design, the programmer only needs to write the function corresponding parameter according to function name and gets final product, and has alleviated programmer's burden.According to different user's requests, the secondary development personnel need not write diverse programs menu, as long as rewrite the function corresponding name, the code reuse rate of same programs menu is higher, writes the efficient height.And programs menu of the present invention generates by the XML file, and XML file modification ratio is easier to, and the programs menu of generation is presented on the screen through ralocatable mode, can not influence the display effect of full frame program.
Fig. 1 is the process flow diagram of the method for generator program menu of the present invention;
Fig. 2 is the structured flowchart () of the device of generator program menu of the present invention;
Fig. 3 is the structured flowchart (two) of the device of generator program menu of the present invention;
Fig. 4 is the structured flowchart (three) of the device of generator program menu of the present invention.
Embodiment
Below in conjunction with accompanying drawing and specific embodiment the present invention is done a detailed elaboration.
The method of generator program menu of the present invention comprises step, like Fig. 1, S101, reads the XML file, and said XML file comprises forms element, button element and functional element; Wherein said forms element comprises frame size data message and forms name information, and said button element comprises the Background information and the button name information of button, and said functional element comprises function name information and functional parameter information.Forms name information is the keyword message of forms, and button name information is the keyword message of button, and function name information is the keyword message of function.In one embodiment, when system initialization, system can read the XML file of describing programs menu, element value is read in each variable of structure according to forms element, button element and functional element, forms the structure aggregate of 3 layers of tree construction.
S102, resolve said XML file according to pre-defined rule, said pre-defined rule is: said programs menu comprises several form controls, and each form control comprises several button controls, and each button control comprises several function.This pre-defined rule is 3 layers of tree structure.
S103, generate form control, generate the button control corresponding, generate the function of said button control correspondence according to said functional element with said form control according to said button element according to said forms element.This step is to accomplish the generation of programs menu, and programs menu comprises three layers, forms a tree structure, and wherein ground floor is a form control, and the second layer is the button control under the form control, and the 3rd layer is each corresponding function of said button control.
The method of generator program menu of the present invention; Functional element is made up of function name and functional parameter; Realized separating of INTERFACE DESIGN (function name symbol) and functional parameter coding; When carrying out the program run design, the programmer only needs to write the function corresponding parameter according to function name and gets final product, and has alleviated programmer's burden.According to different user's requests, the secondary development personnel need not write diverse programs menu, as long as rewrite the function corresponding name, the code reuse rate of same programs menu is higher, writes the efficient height.And programs menu of the present invention generates by the XML file, and XML file modification ratio is easier to, and the programs menu of generation is presented on the screen through ralocatable mode, can not influence the display effect of full frame program.
In one embodiment, said forms element can also comprise forms figure information, window position information and forms transparence information, and said button element also comprises button positions information.These forms figure information is the outward appearance or the Background information of form control, and the form control that window position information promptly generates is positioned at the position coordinates of display screen, and button positions information is the position coordinates of button control in display screen.Position and the outward appearance or the Background information of form control and button control can be designed like this according to user or programmer's actual needs, user or programmer's individual demand can be satisfied.
In addition; Said XML file can also comprise dll file; Can the Background information of said forms figure information and said button be encapsulated in the dll file, can not see large quantities of picture files under programmer's written program catalogue like this, can prevent that picture resource from being revised arbitrarily.When picture resource is revised in secondary development, also be efficiently very convenient in addition, also the condition of the outward appearance picture of self defining programm menu as required be provided for the user.
After the function of the button control of generator program menu; Can also comprise step; Obtain the coordinate range of display screen, calculate the coordinate position of said programs menu after dragging, judge that said coordinate position is whether in the coordinate range of said display screen; If not, said coordinate position is adapted in the coordinate range of said display screen.The user can make programs menu remain in the display screen when dragging programs menu like this, makes things convenient for the user to click, and can not drag to display screen to programs menu with exterior domain.
After the function of the button control of generator program menu, can also comprise step, write down the number of clicks of said button control, the front and back order of the button control that generates according to the number of clicks adjustment of said button control.Can adjust the front and back order of button control like this according to user's use habit, be user-friendly to.
The present invention has also disclosed a kind of device of generator program menu, and it comprises, like Fig. 2, and read module, parsing module and generation module.
Read module is used to read the XML file, and said XML file comprises forms element, button element and functional element; Said forms element comprises frame size data message and forms name information, and said button element comprises the Background information of button, and said functional element comprises function name information and functional parameter information;
Parsing module is used for resolving said XML file according to pre-defined rule; This pre-defined rule is: said programs menu comprises several form controls, and each form control comprises several button controls, and each button control comprises several function;
Generation module is used for generating form control according to said forms element, generates the button control corresponding with said form control according to said button element, generates the corresponding function of said button control according to said functional element.
Wherein, in one embodiment, said forms element can also comprise forms figure information, window position information and forms transparence information, and said button element also comprises button positions information.These forms figure information is the outward appearance or the Background information of form control, and the form control that window position information promptly generates is positioned at the position coordinates of display screen, and button positions information is the position coordinates of button control in display screen.Position and the outward appearance or the Background information of form control and button control can be designed like this according to user or programmer's actual needs, user or programmer's individual demand can be satisfied.
In one embodiment; The device of generator program menu of the present invention can also comprise package module, and it is connected with said read module, like Fig. 3; It is used for the Background information of said button control and said forms figure information are encapsulated in dll file, and this dll file is included in the said XML file.Can not see large quantities of picture files under programmer's written program catalogue like this, can prevent that picture resource from being revised arbitrarily.When picture resource is revised in secondary development, also be efficiently very convenient in addition, also the condition of the outward appearance picture of self defining programm menu as required be provided for the user.
In one embodiment, the device of generator program menu of the present invention can also comprise correcting module, and it is connected with said generation module; Like Fig. 4; Be used to obtain the coordinate range of display screen, calculate the coordinate position of said programs menu after dragging, judge that said coordinate position is whether in the coordinate range of said display screen; If not, said coordinate position is adapted in the coordinate range of said display screen.The user can make programs menu remain in the display screen when dragging programs menu like this, makes things convenient for the user to click, and can not drag to display screen to programs menu with exterior domain.
In one embodiment, the device of generator program menu of the present invention can also comprise the menu control module, is used to provide the forms control interface, receives the operation information of user to said programs menu, carries out corresponding operation according to this operation information.The user can operate the programs menu of generation through this forms control interface.In concrete the application; The information that operation information can be classified into the information relevant with the programs menu interface and have nothing to do with the programs menu interface; For the information relevant with the programs menu interface, the menu control module can receive this category information, operates accordingly according to such information and executing.For with the irrelevant information in programs menu interface, the menu control module can be issued the program Main form with this category information through the forms control interface, which kind of function lets the program Main form judge be and deal with.When certain button control is clicked; The menu control module can receive the system information that button control is clicked; The ID of the button control that the parameter through system information can obtain to be clicked; Find the functional parameter information of the button control of being clicked afterwards according to ID, can carry out corresponding operation, simultaneously operating result is sent to the program Main form through the forms control interface according to this functional parameter info menu control module.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of within spirit of the present invention and principle, being done, be equal to replacement and improvement etc., all should be included within the claim protection domain of the present invention.

Claims (8)

1. the method for a generator program menu is characterized in that, comprises step:
Read the XML file, said XML file comprises forms element, button element and functional element; Said forms element comprises frame size data message and forms name information, and said button element comprises the Background information and the button name information of button, and said functional element comprises function name information and functional parameter information;
Resolve said XML file according to pre-defined rule, generate form control, generate the button control corresponding, generate the corresponding function of said button control according to said functional element with said form control according to said button element according to said forms element; Said pre-defined rule is: said programs menu comprises several form controls, and each form control comprises several button controls, and each button control comprises several function;
Obtain the coordinate range of display screen; Calculate the coordinate position of said programs menu after dragging; Judge said coordinate position whether in the coordinate range of said display screen, if not, said coordinate position is adapted in the coordinate range of said display screen.
2. the method for generator program menu according to claim 1; It is characterized in that: said XML file also comprises dll file; Said forms element also comprises forms figure information, and the Background information of these forms figure information and said button is encapsulated in the said dll file.
3. the method for generator program menu according to claim 1 is characterized in that: said forms element also comprises forms figure information, window position information and forms transparence information, and said button element also comprises button positions information.
4. according to the method for the described generator program menu of the arbitrary claim of claim 1 to 3; It is characterized in that: generate the corresponding function of said button control according to said functional element after; Also comprise step: write down the number of clicks of said button control, adjust the front and back order of the button control of generation according to the number of clicks of said button control.
5. the device of a generator program menu is characterized in that, comprising:
Read module is used to read the XML file, and said XML file comprises forms element, button element and functional element; Said forms element comprises frame size data message and forms name information, and said button element comprises the Background information and the button name information of button, and said functional element comprises function name information and functional parameter information;
Parsing module is used for resolving said XML file according to pre-defined rule; This pre-defined rule is: said programs menu comprises several form controls, and each form control comprises several button controls, and each button control comprises several function;
Generation module is used for generating form control according to said forms element, generates the button control corresponding with said form control according to said button element, generates the corresponding function of said button control according to said functional element;
Correcting module; Be used to obtain the coordinate range of display screen, calculate the coordinate position of said programs menu after dragging, judge that said coordinate position is whether in the coordinate range of said display screen; If not, said coordinate position is adapted in the coordinate range of said display screen.
6. the device of generator program menu according to claim 5; It is characterized in that: also comprise package module; Also comprise dll file at said XML file; When said forms element information also comprises forms figure information, the Background information of these forms figure information and said button is encapsulated in the said dll file.
7. the device of generator program menu according to claim 5 is characterized in that: said forms element also comprises forms figure information, window position information and forms transparence information, and said button element also comprises button figure information and button positions information.
8. according to the device of the described generator program menu of the arbitrary claim of claim 5 to 7; It is characterized in that: also comprise the menu control module; Be used to provide the control interface of programs menu, receive the operation information of user, carry out corresponding operation according to this operation information to said programs menu.
CN2008102192087A 2008-11-18 2008-11-18 Method and apparatus for generating program menu Expired - Fee Related CN101408843B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008102192087A CN101408843B (en) 2008-11-18 2008-11-18 Method and apparatus for generating program menu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008102192087A CN101408843B (en) 2008-11-18 2008-11-18 Method and apparatus for generating program menu

Publications (2)

Publication Number Publication Date
CN101408843A CN101408843A (en) 2009-04-15
CN101408843B true CN101408843B (en) 2012-05-09

Family

ID=40571864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008102192087A Expired - Fee Related CN101408843B (en) 2008-11-18 2008-11-18 Method and apparatus for generating program menu

Country Status (1)

Country Link
CN (1) CN101408843B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043618B (en) * 2009-10-22 2013-05-22 北大方正集团有限公司 Method and device for controlling display style of window object
CN101923431A (en) * 2010-06-18 2010-12-22 北京神州泰岳软件股份有限公司 Method and system for dynamically generating context menu of topological graph node
CN102385595A (en) * 2010-08-30 2012-03-21 腾讯科技(深圳)有限公司 User list multiplex method and device for micro blogs
CN102841748A (en) * 2012-07-12 2012-12-26 深圳市邦健电子有限公司 Menu management method and processing device for monitoring equipment with display screen
CN112181411A (en) * 2020-09-25 2021-01-05 深圳市元征科技股份有限公司 Menu generation method, menu generation device and diagnosis equipment
TWI783463B (en) * 2021-04-28 2022-11-11 博橡科技股份有限公司 Method for generating a human-machine interface, computer readable storage medium, computing device, and function operating device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1889039A (en) * 2006-06-26 2007-01-03 韩荣华 Method for realizing universal browsing device tool bar based on XML
CN101017660A (en) * 2006-02-07 2007-08-15 天惠光科技有限公司 A method for displaying the object on the multiple display devices under the window operation environment
CN101101545A (en) * 2006-07-07 2008-01-09 乐金电子(昆山)电脑有限公司 Method for managing multiple language using expansible mark language and resource packet
CN101241433A (en) * 2008-03-04 2008-08-13 浪潮集团山东通用软件有限公司 Accomplishing method based on relationship -type database application program dynamic tool
CN101246424A (en) * 2008-02-22 2008-08-20 深圳国人通信有限公司 Menu automatic generation system and method for based on file
CN101303872A (en) * 2008-03-25 2008-11-12 杭州赛利科技有限公司 Method and system for organization management of play menu of multimedia player

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101017660A (en) * 2006-02-07 2007-08-15 天惠光科技有限公司 A method for displaying the object on the multiple display devices under the window operation environment
CN1889039A (en) * 2006-06-26 2007-01-03 韩荣华 Method for realizing universal browsing device tool bar based on XML
CN101101545A (en) * 2006-07-07 2008-01-09 乐金电子(昆山)电脑有限公司 Method for managing multiple language using expansible mark language and resource packet
CN101246424A (en) * 2008-02-22 2008-08-20 深圳国人通信有限公司 Menu automatic generation system and method for based on file
CN101241433A (en) * 2008-03-04 2008-08-13 浪潮集团山东通用软件有限公司 Accomplishing method based on relationship -type database application program dynamic tool
CN101303872A (en) * 2008-03-25 2008-11-12 杭州赛利科技有限公司 Method and system for organization management of play menu of multimedia player

Also Published As

Publication number Publication date
CN101408843A (en) 2009-04-15

Similar Documents

Publication Publication Date Title
KR101456506B1 (en) An authoring tool for web applications and the authoring method thereof
US9524273B2 (en) Method and system for generating a web page layout using nested drop zone widgets having different software functionalities
US7039875B2 (en) Computer user interfaces that are generated as needed
CN108984172B (en) Interface file generation method and device
CN101408843B (en) Method and apparatus for generating program menu
JP5651121B2 (en) Data object management and automatic linking
CN106062711A (en) Compound controls
CN103814371A (en) Simulation of Web applications and secondary devices in a Web browser, Web application development tools, and methods using the same
CN103778178A (en) Method and system for reconfiguring snapshot of virtual machine (VM)
Macik et al. Context-sensitive, cross-platform user interface generation
US11205036B2 (en) Method and system for implementing contextual widgets
CN111625226B (en) Prototype-based man-machine interaction design implementation method and system
CN104317587A (en) Automatic android mobile device oriented application generation method
CN113535165A (en) Interface generation method and device, electronic equipment and computer readable storage medium
JP2013518321A (en) Pattern-based user interface
CN109976803A (en) A kind of generation method and device of file
CN115495069A (en) Model-driven coal industry software flow implementation method, device and equipment
KR101519381B1 (en) Apparatus and method for making web application using html5
CN117762519A (en) Component management method, device, computer equipment and storage medium
KR102067661B1 (en) Widget authoring system and method thereof
US20110131512A1 (en) Updateable running application
CN109800368A (en) H5 navigation bar push button configuration method, device, computer equipment and storage medium
JP2988911B1 (en) Automatic program generator
Li et al. Research on a pattern-based user interface development method
KR101456507B1 (en) An authoring apparatus for applying n-screen to web application ui and the method for the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 510670 Guangdong Province, Guangzhou high tech Industrial Development Zone Kezhu Road No. 233

Patentee after: Wei Chong group Limited by Share Ltd

Address before: 510663 Guangzhou province high tech Industrial Development Zone, Guangdong, Cai road, No. 6, No.

Patentee before: Guangdong Weichuangshixun Science and Technology Co., Ltd.

CP03 Change of name, title or address
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120509

Termination date: 20171118

CF01 Termination of patent right due to non-payment of annual fee