WO2014128530A1 - 一种基于gui平台的拖拽元素编程的方法及装置 - Google Patents

一种基于gui平台的拖拽元素编程的方法及装置 Download PDF

Info

Publication number
WO2014128530A1
WO2014128530A1 PCT/IB2013/051494 IB2013051494W WO2014128530A1 WO 2014128530 A1 WO2014128530 A1 WO 2014128530A1 IB 2013051494 W IB2013051494 W IB 2013051494W WO 2014128530 A1 WO2014128530 A1 WO 2014128530A1
Authority
WO
WIPO (PCT)
Prior art keywords
programmable
programmable object
component
gui
editing area
Prior art date
Application number
PCT/IB2013/051494
Other languages
English (en)
French (fr)
Inventor
刘勇
Original Assignee
Liu Yong
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 Liu Yong filed Critical Liu Yong
Priority to PCT/IB2013/051494 priority Critical patent/WO2014128530A1/zh
Publication of WO2014128530A1 publication Critical patent/WO2014128530A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Definitions

  • FIG. 1 is a schematic diagram of a device for drag and drop element programming based on a GUI platform.
  • FIG. 2 is a schematic diagram of a drag and drop element programming method based on a GUI platform.
  • FIG. 3 is a related element of a programmable object component saved in a relationship module component.
  • Figure 5a Editing area receiving component Example of code pattern automatic generation rule under drag and drop condition of C++ locale as an example
  • Figure 5b Editing area receiving component Example of code pattern automatic generation rule under drag and drop condition of C++ locale as an example (continued)
  • 6a The method and device for dragging element programming in the C++ language environment is as follows:
  • Figure 1b The method and device for programming drag and drop elements in the C++ language environment of the present invention.
  • 7a The method and device for dragging element programming in the C++ locale environment
  • FIG. 7b The method and device for dragging element programming in the C++ language environment, the interface diagram of the embodiment 1 8 method and device for dragging element programming using C++ language environment as an example FIG.
  • FIG. 9a is a schematic diagram of a method for programming a drag and drop element in the C++ language environment.
  • FIG. 9b is a schematic diagram of a drag and drop element programming method in the C++ language environment.
  • FIG. 10a is a schematic diagram of a drag-and-drop element programming method and a device in the C++ language environment.
  • FIG. 10b is a schematic diagram of a drag-and-drop element programming method in the C++ language environment.
  • 11 is a schematic diagram of a method and a device for programming a dragging element in the C++ language environment.
  • the computer components used in the present invention include a central processing unit (CPU) or a general microprocessor, a memory, a data storage device (e.g., a hard disk), and a display.
  • the process of computing using computer components includes the use of a central processing unit to operate the data bits and store them in a data structure in the data storage device.
  • the data structure is a physical adjustment of the collected data bits, and its physical characteristics are electronic or electromagnetic.
  • the procedural steps or methods mentioned in this elaboration are a series of steps performed by a computer to produce a particular result. These steps are generally performed on physical quantities that can be stored, transferred, combined, compared, or otherwise processed in the form of electronic, electromagnetic or optical signals. These signal types have bits (t), values, symbols, texts, archive records, etc., and represent specific physical quantities. The existence of these signal types is merely a general representation of the physical quantities that are stored inside the computer or budgeted within the computer.
  • the internal computer operation or data processing method usually refers to addition, subtraction, comparison, data movement, and communication between the machine and the machine and the user.
  • the invention discloses a method and a device for dragging elements in a programming environment under a GUI graphical user interaction system to achieve programming purposes.
  • the invention provides a method for programming drag and drop elements based on a GUI platform, which is configured to at least include: analyzing, by a program, a declaration and definition part of a programmable object in a code, obtaining a list of objects existing in a GUI environment or in an edited area Editing the programmable object in the row and the data information of the variable attribute or the function of the function or the associated element of the inheritance relationship, and saving the save module of the data information, the module at least including the identifier of the programmable object and its attribute or method
  • the associated element may also include an associated element such as an inheritance relationship, and the full text is referred to as a relational module component; when dragging a graphical representation element of a programmable object or a text representation symbol field, the dragging may be followed and displayed by using API technology of the GUI system.
  • the graphical representation element or text represents the symbol field, and further utilizes the API technology of the GUI system to display the list of associated elements of the programmable object by querying the relational module component.
  • the visual control for drag and drop selection, the full text is referred to as the programmable object component; in the programming work of the GUI environment, the drag and drop action is received and the rules are automatically generated according to the dragged content and the code style, and the dragged content is formatted or
  • the modified form of the area control referred to as the editing area receiving part of the GUI graphical user interaction system platform.
  • the program analyzes the declaration and definition of the programmable object in the code, obtains the variable information of the programmable object or the data information of the associated element of the function behavior or the inheritance relationship, and saves the data information.
  • a programmable object refers to a key or identifier name and a data structure represented by a statement that can be constructed as a programming object or a programming body in an object list in a programming environment of the GUI platform or in an edited area in the editing area;
  • the programmable object component uses the API technology of the GUI system to draw and display the programmable object to the GUI.
  • a graphical representation element or text in the environment represents a symbol field and represents the programmable object;
  • the programmable object component that is dragged and displayed in the GUI environment, according to the related information stored in the relationship module component, draws a graphic showing the associated element included in the programmable object represented by the programmable object component by using the API technology of the GUI system. Or a list of textual identifiers for drag and drop selection; the user selects to continue dragging the programmable object component body or dragging the graphical or textual identifier of the associated element contained in the programmable object it represents;
  • the editing area receiving component automatically generates rules according to the dragging object condition and the code style, and after the content modification and adjustment of the dragged object content, a new program logic part is formed in the editing area program code flow.
  • the method further includes:
  • Triggering the display of the programmable object component and displaying the event can be triggered by an input device such as a mouse or a touch screen, but is not limited to a mouse or a touch screen, and can be applied to other input devices that can trigger a drag event.
  • an input device such as a mouse or a touch screen, but is not limited to a mouse or a touch screen, and can be applied to other input devices that can trigger a drag event.
  • the method further includes:
  • the relation module component at least saves an associated element such as a property or method of the programmable object. If there is no associated element such as a method of the programmable object, at least an associated element such as a property of the programmable object may be saved, if there is no programmable object
  • the associated element of the attribute can also hold at least the associated element of the method of the programmable object. Relationship module components as needed It is also possible to save associated elements such as the inheritance relationship of the programmable object. For example, in a class application in the C++ language, an associated element that represents the inheritance relationship of the programmable object of the class, such as the name of the parent class, can be saved.
  • the method further includes:
  • the programmable object component can further draw a list of associated elements included in the programmable object represented by the GUI system by using the API technology of the GUI system, and the displayed related element list can follow the dragging action movement.
  • the display can also be displayed at a fixed position in the interface, waiting for the next step to decide whether to continue dragging the programmable object body or dragging the associated elements of the displayed programmable object.
  • the method further includes:
  • the method further includes:
  • the editing area receiving component After receiving the release action of the drag and drop process, the editing area receiving component inputs the cursor position according to the current editing area, the context before and after the current editing area input cursor, and the released programmable object component or the attribute of the programmable object represented by it. Or a method or an inheritance relationship, using a statement of a program language suitable for the current programming work to form a rule, modifying the format of the dragged object or a form, and adjusting it to a statement form applicable to the current line.
  • the specific rules differ as the programming work is applied to different programming languages.
  • Figure 5a and Figure 5b show the drag-and-drop conditions and code pattern auto-generating rules in C++.
  • the method further includes:
  • the present invention can modify or expand the dragging condition and code pattern automatic generation rule by using C++ as an example in FIG. 5a and FIG. 5b to meet the requirements of programming work.
  • the invention provides a device for programming drag and drop elements based on a GUI platform, which at least comprises:
  • the program obtains the programmable object existing in the object list of the GUI environment or the edited line in the editing area and its inclusion by the declaration and definition part of the programmable object in the background analysis code.
  • the data information of the associated attribute of the variable attribute or the function behavior or the inheritance relationship and then used by the program to save the data module, the module saves at least the identifier of the programmable object and its associated attribute or method, and can also be saved.
  • An associated element such as an inheritance relationship is referred to as a relational module component.
  • the relationship module component saves at least the identifier of the programmable object and the associated element of the attribute or method of the programmable object, and can also save the associated element such as the inheritance relationship.
  • a programmable object generally contains a sub-element such as a property or a function behavior in a programming language, or a name element of a parent object having an inheritance relationship, and an associated object that does not have the above-mentioned associated element has an associated element information that is saved. .
  • the relationship module component saves the associated element information of the programmable object, it means that the name identifier of the information of the element is saved or the address saved in the memory is stored in the structure containing the name.
  • the API system of the GUI system is used to display a visual control that displays the list of associated elements included in the programmable object for drag and drop selection, and the full text is referred to as a programmable object component.
  • a programmable object refers to a keyword or identifier name and its representative data structure that can be constructed as a programming object or a programming body in an object list in the programming environment of the GUI platform or in an edited line in the editing area.
  • a programmable object component When a programmable object component is displayed by dragging, and a list of associated elements of the programmable object represented by the programmable object component is displayed by querying the relational module component, it is a graphic element identifier or a text symbol field displaying the associated element.
  • the identifier of the expression such as the variable name or function name or parent object name, or the graphical element identifier that represents the displayed variable or function or parent object as a graphical element.
  • the dragging action is received and the rules are automatically generated according to the dragged content and the code style, and the dragged content is modified in format or expression form to form a new code area control.
  • the editing area receiving part Referred to as the editing area receiving part.
  • the editing area receiving component refers to the programming work of the GUI environment, receives the dragging action and automatically generates rules according to the dragged content and the code style, and forms a new code by modifying the format or expression of the dragged content.
  • the area control which is also the code text editing area, automatically generates rules according to the drag and drop conditions and code styles of C++ as shown in Fig. 5a and Fig. 5b.
  • the content of the dragged object is adjusted to a new code format or style, which appears as part of the new code in the program code text editing area.
  • the code style automatically generates rules, and formats or expresses the new code to be formed according to the content of the object being dragged, the input cursor position of the current editing area, the context before and after the input of the current editing area, and the programming language programming language. Modifications on the changes.
  • any data structure form of the linked list or the array may be used.
  • the program analysis code in the program acquires the associated element of the programmable object and saves it to the event module component 14 as needed.
  • a programmable object refers to a keyword or an identifier name that exists in a list of objects in a programming environment of a GUI platform or in an edited area of an editing area, and can be constructed as a programming object or a programming body, and a data structure represented thereby
  • the relationship module component 11 holds the identifier of the programmable object and the associated element of the attribute or method it contains, as shown in FIG.
  • the identifier of the programmable object and its associated elements are represented by an array structure diagram, which specifically includes a programmable object identifier and an attribute array and a method array and an inheritance relationship array.
  • the programmable object component 12 draws a graphic representation element or a text symbol representation field of the programmable object represented by the GUI system using the API technology of the GUI system, and according to The associated element data of the programmable object represented by the programmable object component 12 stored in the relation module component 11 is displayed on the display device by using the API technology of the GUI system to display the associated element of the programmable object represented by the programmable object component 12.
  • the graphic represents the identity represented by the element or text symbol field for further drag and drop selection.
  • the user can continue to drag and drop the main body of the programmable object component 12 or drag and drop as shown in the foregoing.
  • the identifier of the associated element of the programmable object that is displayed is the name of the graphic element identifier or the text symbol field that displays the associated element, such as the variable name or function name or the parent object name, or is drawn by the graphic element.
  • the editing area receiving section 13 automatically generates rules according to the dragging condition and code pattern of C++ as shown in FIGS. 5a and 5b.
  • a new code style is automatically generated and associated with the new code 15 event in the editing area.
  • the operation function of the dragged programmable object component for programming purposes is completed.
  • the general implementation steps of the present invention are as follows:
  • Step 21 triggering an action of dragging the programmable object from an input device in the list in the programming environment of the GUI platform or in the edited code area in the editing area;
  • Step 22 following the drag operation, the programmable object component 12 displays the name of the graphic element identifier or the literal symbol field of the programmable object represented by the programmable object component 12 by using the API technology of the GUI system to represent the programmable object itself;
  • the programmable object component 12 uses the API technology of the GUI system to display the name of the graphic element identifier or the text symbol field of the associated element of the programmable object represented by the GUI system, to represent the associated element itself, which may be The attribute variable name or function name, which can also be the parent programmable object name of the inheritance relationship, or the graphic element identifier representing itself;
  • Step 24 further selecting and dragging the programmable object component 12 or the displayed associated associated element, to drag and drop into the editing area receiving component 13;
  • Step 25 the editing area receiving component 13 performs formatting or expression modification according to the content and context of the dragged object and using the rules of FIG. 5a and FIG. 5b, such as creating a new object instance, or as a cast, or directly Function call, etc.
  • step 26 the editing area receiving section 13 forms a new code in the editing area.
  • the associated elements of the programmable object are saved.
  • the name identifies or saves the memory address that points to the structure that contains the name.
  • Figure 5a and Figure 513 show the drag-and-drop condition and code pattern automatic generation rule in C++. The rule clarifies how the content of the dragged object is adjusted and modified when the associated element of the programmable object component 12 or the programmable object it represents is dragged and released to the specified position of the editing area receiving component 13. New code.
  • 6a, 6b, 7a, and 7b show a C++ programming environment, including a class name list 61, and a code text editor having an editing area for formatting or modifying the dragged object content.
  • Receiving component 62 receives the C++ programming environment from the class name list 61, and a code text editor having an editing area for formatting or modifying the dragged object content.
  • step 81 as shown in FIG. 6a, the class name "Ma le” is dragged from the list in the programming environment of the GUI platform through an input device such as a touch screen;
  • step 82 as shown in FIG. 6a, following the drag operation, the programmable object component "MaHle" 63 draws the name of the programmable object represented by the GUI system using the API technology of the GUI system;
  • step 83 as shown in Figure 6b, during the drag operation, the programmable object component
  • “Ma le” 63 uses the API technology of the GUI system to draw the names of the associated elements including the "m_Pages”, “m_Price”, “m_Title”, “Open ⁇ ”, “CloseO”, “ShowO” 64.
  • the display mode is set to the fan list display mode, but it is not limited to the fan list display mode;
  • step 84 if necessary, continue to drag "Ma le” 63, and drag and drop into the editing area receiving part 62.
  • step 86 by programming the drag and drop of the programmable object component "MaHle" class, a new code has been formed in the editing area.
  • the present invention will be further described in detail below with reference to specific examples, as shown in Figs. 9a, 9b, 10a, 10b, and 11:
  • this example shows a C++ programming environment, including a class name list 91, and the code text editor has a format for the dragged object content. Or a modified area of the editing area receiving component 92, In step 111, as shown in FIG. 9a, dragging "mafileOl" 93 from the editing area or the edited code line in the programming environment of the GUI platform through an input device such as a touch screen;
  • step 112 as shown in FIG. 9a, following the drag operation, the programmable object component "mafileOl" 94 draws the name of the programmable object represented by the GUI system using the API technology of the GUI system;
  • step 113 as shown in Figure 9b, during the drag operation, the programmable object component
  • the display mode is set to the fan list display mode, but it is not limited to the fan list display mode;
  • step 114 FIG. 10a
  • further selection drag "mafileOl” 94 in association property "m _T lt le” 95 to the trailing member 92 receives the editing area
  • the editing area is a receiving member 92 entire code example a text editing area, and determining the positioning of the new code formed by the dragging programming according to the position of the cursor 101;
  • step 116 at this point, by dragging and programming the programmable object component "mafileOl" class variable, a new code has been formed in the editing area.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明公开了一种基于GUI平台的拖拽元素编程的方法,包括:程序分析代码获取可编程对象的关联元素并保存到关系模块部件,当拖拽可编程对象时,绘制显示可编程对象部件,并根据关系模块部件保存的信息显示属性或函数等关联元素列表,继续拖拽可编程对象部件主体或显示出的列表中的成员,至释放于编辑区控件,编辑区控件根据拖拽的对象内容及上下文做格式或表达形式上的修改,继而在编辑区形成新的代码。本发明同时公开了一种基于GUI平台的拖拽元素编程的装置,使得各模块作用分明,易于维护,方便扩展,还可实现拖拽元素编程的目的。

Description

背景技术 编程或软件的编辑创作一直是以键盘打字输入为主流操作实现方法, 但是随着以触摸屏为主流输入设备的便携移动设备出现, 触摸屏等为主流 输入操作方法的软件和应用越来越多, 而编程软件也需要更好的釆用触摸 屏、 鼠标等操作方法, 以适应越来越移动便携的操作要求。 如何在编程环 境中利用非传统键盘输入方法进行高效率的程序编辑等问题, 就显得更加 被需要解决。
发明总结
附图说明 图 1一种基于 GUI平台的拖拽元素编程的装置示意图 图 2—种基于 GUI平台的拖拽元素编程的方法示意图 图 3在关系模块部件中保存的可编程对象部件包涵的关联元素之釆用单向链 表结构示意图 图 在关系模块部件中保存的可编程对象部件包涵的关联元素之釆用数组结
图 5a编辑区接收部件在 C++语言环境为例的拖拽条件下代码样式自动生成 规则示例 图 5b编辑区接收部件在 C++语言环境为例的拖拽条件下代码样式自动生成 规则示例 (续) 图 6a本发明以 C++语言环境为例的拖拽元素编程的方法及装置实施例 1界面 示意图 1 图 6b本发明以 C++语言环境为例的拖拽元素编程的方法及装置实施例 1界面 示意图 2 图 7a本发明以 C++语言环境为例的拖拽元素编程的方法及装置实施例 1界面 示意图 3 图 7b本发明以 C++语言环境为例的拖拽元素编程的方法及装置实施例 1界面 示意图 4 图 8本发明以 C++语言环境为例的拖拽元素编程的方法及装置实施例 1方法 流程示意图 图 9a本发明以 C++语言环境为例的拖拽元素编程的方法及装置实施例 2界面 示意图 1 图 9b本发明以 C++语言环境为例的拖拽元素编程的方法及装置实施例 2界面 示意图 2 图 10a本发明以 C++语言环境为例的拖拽元素编程的方法及装置实施例 2界面 示意图 3 图 10b本发明以 C++语言环境为例的拖拽元素编程的方法及装置实施例 2界面 示意图 4 图 11本发明以 C++语言环境为例的拖拽元素编程的方法及装置实施例 2方法 流程示意图
发明说明 本创作发明所用的计算机组件包含中央处理单元 (CPU) 或一般微处理 器、 存储器、 资料储存装置 (如硬盘) 及显示器。 利用计算机组件进行运算 的过程, 包含了利用中央处理单元将资料位元进行操作并且存储于资料储存 装置中的资料结构 (data structure) 中。 该资料结构是将所搜集之资料位元进 行物理上的调整, 其物理特性属于电子或电磁特性。
本创作说明所提到之程序步骤或方法是利用计算机执行以产生特定结果 的一系列步骤。 这些步骤一般而言都是对物理量进行处理, 这些物理量可以 透过电子、 电磁或光学讯号的形式来加以储存、 传递、 结合、 比较或以其他 方式的处理。 这些讯号种类有位元 ( t) 、 数值、 符号、 文字、 档案记录等 , 并且分别代表特定的物理量。 这些讯号种类的存在仅仅作为储存于计算机 内部或于计算机内部进行预算之物理量的一般表示方式。 计算机内部运算或 资料处理方式通常亦指加减运算、 比较、 资料移动, 透过机器的运算与机器 和使用者之间的沟通来进行。 本发明公开了一种 GUI图形用户交互系统下编程环境中拖拽元素而达到 编程目的的方法及装置。
该方法对比传统纯粹依赖键盘进行编码的编程方法能有效降低对桌面办 公环境的依赖, 减少对传统的键盘输入法的依赖, 提升编程工作的移动应用 体验。 为达到上述目的, 本发明的技术方案是这样实现的:
本发明提供了一种基于 GUI平台的拖拽元素编程的方法, 用于至少包括 : 通过程序分析代码中可编程对象的声明与定义部分, 获取存在于 GUI环境 的对象列表中或编辑区内已编辑行中的可编程对象及其包涵的变量属性或函 数行为或继承关系之关联元素的数据信息, 并保存该数据信息的保存模块, 该模块至少包涵可编程对象的标识及其属性或方法这样的关联元素, 也可包 涵继承关系这样的关联元素, 全文简称关系模块部件; 在拖拽可编程对象之 图形表示元素或文字表示符号字段时, 能跟随拖拽并利用 GUI系统的 API技术 显示该图形表示元素或文字表示符号字段, 并进一步可利用 GUI系统的 API技 术, 通过查询关系模块部件, 罗列显示出该可编程对象包涵的关联元素列表 以供拖拽选择的可视化控件, 全文简称可编程对象部件; GUI环境的编程 工作中, 接收拖拽动作并根据拖拽入的内容与代码样式自动生成规则, 对 拖拽入的内容进行格式或表达形式上的修改的区域控件, 简称编辑区接收 部件的 GUI图形用户交互系统平台中。 包括:
程序分析代码中可编程对象的声明与定义, 获取可编程对象包涵的变 量属性或函数行为或继承关系之关联元素的数据信息, 并对此数据信息进 行保存。 可编程对象是指存在于 GUI平台的编程环境中的对象列表中或编 辑区内已编辑行中的可以作为编程对象或编程主体进行语句构造的关键字 或标识符名称及其代表的数据结构;
当 GUI界面中可编程对象之图形表示元素或文字表示符号字段被触摸 屏、 鼠标等输入设备拖拽时, 跟随拖拽, 可编程对象部件利用 GUI系统的 API技术绘制显示该可编程对象之于 GUI环境中的图形表示元素或文字表示 符号字段, 并代表该可编程对象;
在 GUI环境下被拖拽而显示的可编程对象部件, 根据关系模块部件中 保存的关联信息, 利用 GUI系统的 API技术绘制显示出该可编程对象部件代 表的可编程对象包涵的关联元素之图形或文字标识的列表以供拖拽选择; 用户根据需要选择继续拖拽可编程对象部件主体或拖拽其代表的可编 程对象所包涵的关联元素的图形或文字标识;
拖拽至编辑区接收部件释放, 编辑区接收部件依据拖拽对象条件及代 码样式自动生成规则, 对拖拽入的对象内容做内容修改调整之后在编辑区 程序代码流程中形成新的程序逻辑部分。 上述方案中, 该方法进一步包括:
触发可编程对象部件的被拖拽而显示事件, 可由鼠标、 触摸屏等输入 设备触发, 但并不局限于鼠标、 触摸屏, 也可适用于其他可以触发拖拽事 件的输入设备。 上述方案中, 该方法进一步包括:
关系模块部件至少保存可编程对象的属性或方法这样的关联元素, 如 果不存在可编程对象的方法这样的关联元素, 也可以至少保存可编程对象 的属性这样的关联元素, 如果不存在可编程对象的属性这样的关联元素, 也可以至少保存可编程对象的方法这样的关联元素。 关系模块部件根据需 要, 也可以保存可编程对象的继承关系这样的关联元素, 比如在 C++语言 中的类应用中, 可以保存表示类的可编程对象之继承关系的关联元素, 如 父级类的名称。 上述方案中, 该方法进一步包括:
当拖拽开始后, 跟随拖拽动作, 可编程对象部件可进一步利用 GUI系 统的 API技术绘制显示其代表的可编程对象所包涵的关联元素列表, 所显 示的关联元素列表可以跟随拖拽动作移动显示, 也可以于界面中固定的位 置显示出来, 等待下一步用户决定是继续拖拽可编程对象部件主体还是去 拖拽所显示出来的可编程对象之关联元素。 上述方案中, 该方法进一步包括:
显示可编程对象之关联元素时, 也以图形或文字符号表示, 一般是显 示变量名、 函数名、 继承关系之父类名。 上述方案中, 该方法进一步包括:
编辑区接收部件在接收到拖拽过程的释放动作后, 依据当前编辑区输 入光标位置、 当前编辑区输入光标前后的上下文、 以及被释放的可编程对 象部件或其所代表的可编程对象的属性或方法或继承关系, 运用适用于当 前编程工作的程序语言的语句构成规则, 对被拖拽入的对象内容进行格式 或表达形式上的修改, 调整为适用于当前行的语句形式。 具体规则随着编 程工作运用于不同的编程语言而不同, 如图 5a和图 5b为以 C++为例的拖拽 条件及代码样式自动生成规则。 上述方案中, 该方法进一步包括:
随着编程工作的要求或编程语言的釆用需求, 本发明可对如图 5a和图 5b为以 C++为例的拖拽条件及代码样式自动生成规则进行修改或扩充, 以 适应编程工作的要求。 本发明提供了一种基于 GUI平台的拖拽元素编程的装置, 至少包括:
1)程序通过后台分析代码中可编程对象的声明与定义部分, 获取存在 于 GUI环境的对象列表中或编辑区内已编辑行中的可编程对象及其包涵的 变量属性或函数行为或继承关系之关联元素的数据信息, 继而被程序用来 保存该数据信息的保存模块, 该模块至少保存可编程对象的标识及其属性 或方法这样的关联元素, 也可保存继承关系这样的关联元素, 全文简称关 系模块部件。
关系模块部件至少保存可编程对象的标识及可编程对象的属性或方法 之关联元素, 也可保存继承关系等关联元素。 可编程对象在编程语言中一 般含有属性或函数行为等子元素, 或有继承关系的父级对象的名称元素, 个别不具有上述关联元素的可编程对象其被保存的相关联的元素信息为空 。 当关系模块部件保存可编程对象之关联的元素信息时, 是指保存该元素 信息的名称标识或保存指向包含该名称的结构于内存中保存的地址。
2)在拖拽可编程对象之图形表示元素或文字表示符号字段时, 能跟随 拖拽并利用 GUI系统的 API技术显示该图形表示元素或文字表示符号字段, 并进一步可利用 GUI系统的 API技术, 通过查询关系模块部件, 利用 GUI系 统的 API技术罗列显示出该可编程对象包涵的关联元素列表以供拖拽选择的 可视化控件, 全文简称可编程对象部件。
可编程对象是指存在于 GUI平台的编程环境中的对象列表中或编辑区 内已编辑行中的可以作为编程对象或编程主体进行语句构造的关键字或标 识符名称及其代表的数据结构。
当拖拽而显示可编程对象部件, 并需要通过查询关系模块部件进而显 示该可编程对象部件代表的可编程对象之关联元素的列表时, 是指显示相 关联元素的图形元素标识或文字符号字段表达的标识, 如变量名或函数名 或父级对象名, 或以图形元素绘制显示的代表变量或函数或父级对象的图 形元素标识。
3) GUI环境的编程工作中, 接收拖拽动作并根据拖拽入的内容与代码样 式自动生成规则, 对拖拽入的内容进行格式或表达形式上的修改而形成新 的代码的区域控件, 简称编辑区接收部件。
编辑区接收部件, 指 GUI环境的编程工作中, 接收拖拽动作并根据拖 拽入的内容与代码样式自动生成规则, 对拖拽入的内容进行格式或表达形 式上的修改而形成新的代码的区域控件, 该区域也同为代码文本编辑区, 根据如图 5a和图 5b所示的以 C++为例的拖拽条件及代码样式自动生成规则, 将拖拽入的对象内容调整为新的代码格式或样式, 作为新的代码部分出 现在程序代码文本编辑区中。 代码样式自动生成规则, 依据被拖拽入的 对象内容、 当前编辑区输入光标位置、 当前编辑区输入光标前后的上下 文、 编辑区程序语言构造规则来对要形成的新的代码做格式或表达形式 上的修改调整。 其中, 关系模块部件中保存可编程对象的关联元素时, 可釆用链表 或数组的任意数据结构形式。
具体实施方式 下面结合附图及具体实施例对本发明再作进一步详细的说明。
如图 1所示, 根据需要, 程序中发生程序分析代码获取可编程对象的 关联元素并保存到关系模块部件 14的事件。 可编程对象是指存在于 GUI平 台的编程环境中的对象列表中或编辑区内已编辑行中的可以作为编程对 象或编程主体进行语句构造的关键字或标识符名称及其代表的数据结构 如图 1所示, 关系模块部件 11中保存可编程对象的标识及其所包涵的 属性或方法之关联元素, 如图 3所示, 为在关系部件模块 11中保存的可编 程对象的标识及其包涵的关联元素之釆用单向链表结构示意图, 具体包 涵可编程对象的标识及其属性数据链表和方法数据链表和继承关系数据 链表, 如图 4所示, 为在关系部件模块 11中保存的可编程对象的标识及其 包涵的关联元素之釆用数组结构示意图, 其具体包涵可编程对象标识和 属性数组和方法数组和继承关系数组。
如图 1所示, 当输入设备触发拖拽操作 15事件发生时, 可编程对象部 件 12利用 GUI系统的 API技术绘制显示其所代表的可编程对象的图形表示 元素或文字符号表示字段, 并根据关系模块部件 11中保存的可编程对象部 件 12所代表之可编程对象的关联元素数据, 于显示设备上, 利用 GUI系统 的 API技术绘制显示可编程对象部件 12代表的可编程对象之关联元素的图 形表示元素或文字符号字段表示的标识以供进一步拖拽选择。 用户可于 下一步选择继续拖拽可编程对象部件 12主体或拖拽前文所述绘制显示出的 可编程对象部件 12所代表的可编程对象之关联元素的标识。 所绘制显示出 的可编程对象之关联元素的标识, 是指显示相关联元素的图形元素标识或 文字符号字段表达的名称, 如变量名或函数名或父级对象名, 或以图形元 素绘制显示的代表变量或函数或父级对象的图形元素标识。
如图 1所示, 当拖拽操作释放于编辑区接收部件 13上时, 编辑区接收部 件 13根据如图 5a和图 5b所示的以 C++为例的拖拽条件及代码样式自动生成 规则来自动生成新的代码样式, 并伴生在编辑区形成新的代码 15事件。 完 成该拖拽可编程对象部件达到编程目的的操作功能。 如图 2所示, 本发明一般实施步骤如下:
步骤 21 , 从 GUI平台的编程环境中的列表内或编辑区内已编辑的代码 行中, 由触摸屏等输入设备触发拖拽可编程对象的动作;
步骤 22, 跟随拖拽操作, 可编程对象部件 12利用 GUI系统的 API技术显 示可编程对象部件 12所代表的可编程对象的图形元素标识或文字符号字段 表示的名称, 以代表可编程对象本身;
步骤 23, 根据需要, 可编程对象部件 12利用 GUI系统的 API技术显示其 所代表的可编程对象之包涵的关联元素的图形元素标识或文字符号字段表 示的名称, 以代表关联元素本身, 可以是属性变量名或函数名, 也可以是 继承关系之父级可编程对象名, 或代表其自身的图形元素标识;
步骤 24, 根据需要, 可进一步选择拖拽可编程对象部件 12或显示出的 相关联的关联元素, 至拖拽入编辑区接收部件 13 ;
步骤 25 , 编辑区接收部件 13根据拖拽入的对象内容及上下文并运用如 图 5a和图 5b的规则, 做格式或表达形式上的修改, 比如新建对象实例, 或 作为强制类型转换, 或直接函数调用等;
步骤 26, 编辑区接收部件 13在编辑区形成新的代码。 如图 3、 图 4所示的数据结构示意图中, 不论是变量属性链表或变量属 性数组、 函数方法链表或函数方法数组、 继承关系链表或继承关系数组, 其中都保存可编程对象的关联元素之名称标识或保存指向包含该名称的结 构的内存地址。 如图 5a和图 513为以 C++为例的拖拽条件及代码样式自动生成规则, 该 规则明确了当可编程对象部件 12或其代表的可编程对象之关联元素被拖拽 并释放到编辑区接收部件 13的指定位置时, 被拖拽入的对象之内容如何被 调整修改并形成的新的代码。
以下结合具体实例, 如图 6a、 图 6b、 图 7a、 图 7b、 图 8所示, 对本发明 做进一步详细的说明:
其中, 图 6a、 图 6b、 图 7a、 图 7b展示的为一 C++编程环境, 包括类名 称列表 61 , 代码文本编辑器兼具有对被拖拽入的对象内容做格式或样式修 改的编辑区接收部件 62 ,
于步骤 81中, 如图 6a, 通过触摸屏等输入设备从 GUI平台的编程环境 中的列表内拖拽类名 "Ma le" ;
于步骤 82中, 如图 6a, 跟随拖拽操作, 可编程对象部件 "MaHle" 63 利用 GUI系统的 API技术绘制显示其代表的可编程对象的名称;
于步骤 83中, 如图 6b , 在拖拽操作过程中, 可编程对象部件
"Ma le"63利用 GUI系统的 API技术绘制显示其代表的可编程对象所包涵的 关联元素的名称 "m_Pages" 、 "m_Price" 、 "m_Title" 、 "Open〇" 、 "CloseO" 、 "ShowO" 64 , 本例中设定显示方式为扇形列表显示方式, 但不限于扇形列表显示方式;
于步骤 84中, 如图 7a, 根据需要, 选择继续拖拽 "Ma le" 63, 至拖 拽入编辑区接收部件 62 , 示例中编辑区接收部件 62为整个代码文本编辑区 , 并根据光标 71所在的位置, 确定本次拖拽编程形成的新代码的定位; 于步骤 85中, 如图 7b , 编辑区接收部件 62根据如图 5a和图 5b所示第 05 条规则, 自动生成一变量名, 并形成代码样式为 "Ma le mafile01=" 72 ;
于步骤 86中, 至此, 通过对可编程对象部件 "MaHle" 类的拖拽编程 完成, 已在编辑区形成新的代码。 以下结合具体实例, 如图 9a、 图 9b、 图 10a、 图 10b、 图 11所示, 对本 发明做进一步详细的说明:
其中, 如图 9a、 图 9b、 图 10a、 图 10b所示, 本例展示的为一 C++编程 环境, 包括类名称列表 91 , 代码文本编辑器兼具有对被拖拽入的对象内容 做格式或样式修改的编辑区接收部件 92 , 于步骤 111中, 如图 9a , 通过触摸屏等输入设备从 GUI平台的编程环境 中的编辑区或已编辑的代码行中拖拽 "mafileOl " 93 ;
于步骤 112中, 如图 9a , 跟随拖拽操作, 可编程对象部件 "mafileOl " 94 利用 GUI系统的 API技术绘制显示其代表的可编程对象的名称;
于步骤 113中, 如图 9b , 在拖拽操作过程中, 可编程对象部件
"mameOr'94利用 GUI系统的 API技术绘制显示其代表的可编程对象所属类之 所包涵的关联元素的名称 "m_Pages" 、 "m_Price" 、 "m_Title" 、
"OpenO" 、 "CloseO" 、 "Show()" , 本例中设定显示方式为扇形列表显 示方式, 但不限于扇形列表显示方式;
于步骤 114中, 如图 10a, 根据需要, 选择进一步拖拽 "mafileOl " 94的 关联属性 "m_Tltle" 95至拖拽入编辑区接收部件 92 , 示例中编辑区接收部件 92为整个代码文本编辑区, 并根据光标 101所在位置确定本次拖拽编程形成 的新代码的定位;
于步骤 115中, 如图 10b, 编辑区接收部件 92根据如图 5a和图 5b所示第 09 条规则, 自动生成代码样式 "mafileOl. m_Title=" 102 ;
于步骤 116中, 至此, 通过对可编程对象部件 "mafileOl " 类变量的拖拽 编程完成, 已在编辑区形成新的代码。 以上所述, 仅为本发明的实施例而已, 并非用于限定本发明的保护范 围, 凡在本发明的精神和原则之内所作的任何修改, 等同替换和改进等, 均应包含在本发明的保护范围之内。

Claims

权利要求
1、 本发明提供了一种基于 GUI平台的拖拽元素编程的方法, 其特征在 于, 该方法用于至少包括关系模块部件、 可编程对象部件、 编辑区接收部件 的图形用户交互系统中; 该方法包括:
程序分析代码中可编程对象的声明与定义, 获取可编程对象包涵的变量 属性或函数行为或继承关系之关联元素的数据信息, 并对此数据信息进行保 存。 可编程对象是指存在于 GUI平台的编程环境中的对象列表中或编辑区内 已编辑行中的可以作为编程对象或编程主体进行语句构造的关键字或标识符 名称及其代表的数据结构; 当 GUI界面中可编程对象之图形表示元素或文字 表示符号字段被触摸屏、 鼠标等输入设备拖拽时, 跟随拖拽, 可编程对象部 件利用 GUI系统的 API技术绘制显示该可编程对象之于 GUI环境中的图形表示 元素或文字表示符号字段, 并代表该可编程对象; 在 GUI环境下被拖拽而显 示的可编程对象部件, 根据关系模块部件中保存的关联信息, 利用 GUI系统 的 API技术绘制显示出该可编程对象部件代表的可编程对象包涵的关联元素 的图形或文字标识列表以供拖拽选择; 用户根据需要选择继续拖拽可编程对 象部件主体或拖拽显示出的其代表的可编程对象所包涵的关联元素的图形或 文字标识; 拖拽至编辑区接收部件释放, 编辑区接收部件依据拖拽对象条件 及代码样式自动生成规则, 对拖拽入的对象内容做内容修改调整之后在编辑 区程序代码流程中形成新的程序逻辑部分。
2、 根据权利要求 1所述的方法, 其特征在于, 该方法进一步包括: 程序分析代码中可编程对象的声明与定义部分, 以获取可编程对象及其 包涵的变量属性或函数行为或继承关系之关联元素的数据信息的工作, 作为 本发明的方法与装置运行的支持, 此工作于程序后台运行。
3、 根据权利要求 1所述的方法, 其特征在于, 该方法进一步包括: 触发可编程对象部件的被拖拽而显示事件, 可由鼠标、 触摸屏等输入设 备触发, 但并不局限于鼠标、 触摸屏, 也可适用于其他可以触发拖拽事件的 输入设备。
4、 根据权利要求 1所述的方法, 其特征在于, 该方法进一步包括: 关系模块部件至少保存可编程对象的变量属性或函数方法这样的关联元 素, 如果不存在可编程对象的函数方法这样的关联元素, 也可以至少保存可 编程对象的变量属性这样的关联元素, 如果不存在可编程对象的变量属性这 样的关联元素, 也可以至少保存可编程对象的函数方法这样的关联元素。 关 系模块部件根据需要, 也可以保存可编程对象的继承关系这样的关联元素, 如果不需要保存继承关系, 也可以不保存可编程对象的继承关系这样的关联 元素。 不存在或不需要保存关联元素, 在关系模块部件中的保存内容为空。
5、 根据权利要求 1所述的方法, 其特征在于, 该方法进一步包括: 当拖拽开始后, 跟随拖拽动作, 可编程对象部件可进一步利用 GUI系统 的 API技术绘制显示其代表的可编程对象所包涵的关联元素列表, 所显示的 关联元素列表可以跟随拖拽动作移动显示, 也可以于界面中固定的位置显示 出来, 等待下一步用户决定是继续拖拽可编程对象部件主体还是去拖拽所显 示出来的可编程对象之关联元素。 显示可编程对象之关联元素时, 也以图形 或文字符号表示。
6、 根据权利要求 1所述的方法, 其特征在于, 该方法进一步包括: 显示可编程对象之关联元素时, 也以图形或文字符号表示, 一般是显示 变量名、 函数名、 继承关系之父类名。
7、 根据权利要求 1所述的方法, 其特征在于, 该方法进一步包括: 编辑区接收部件在接收到拖拽过程的释放动作后, 依据当前编辑区输入 光标位置、 当前编辑区输入光标前后的上下文、 以及被释放的可编程对象部 件或其所代表的可编程对象的属性或方法或继承关系, 运用适用于当前编程 工作的程序语言的语句构成规则, 对被拖拽入的对象内容进行格式或表达形 式上的修改, 调整为适用于当前行的语句形式。
8、 根据权利要求 1所述的方法, 其特征在于, 该方法进一步包括: 根据本发明说明书内所示例的为针对 C++语言的一种基于 GUI平台的拖 拽元素编程的方法及装置, 但本发明的应用并不仅仅局限于适用 C++语言, 也不局限于图 5a和图 5b所示的规则条目, 根据编程工作要求, 图 5a和图 5b所 示的规则条目可被修改或扩充, 并可应用于其他编程语言。 对规则的修改与 扩充不影响本发明之精神
9、 本发明提供了一种基于 GUI平台的拖拽元素编程的装置, 其特征 在于, 该装置至少包括: 关系模块部件、 可编程对象部件、 编辑区接收部 件; 其中:
关系模块部件, 指程序分析代码中可编程对象的声明与定义部分, 获 取存在于 GUI环境的对象列表中或编辑区内已编辑行中的可编程对象及其 包涵的变量属性或函数行为或继承关系之关联元素的数据信息后, 用来保 存该数据信息的保存模块, 该模块至少保存可编程对象的标识及其属性或 方法这样的关联元素, 也可保存继承关系这样的关联元素。
可编程对象部件, 指在拖拽可编程对象之图形表示元素或文字表示符 号字段时, 能跟随拖拽并利用 GUI系统的 API技术显示该图形表示元素或 文字表示符号字段, 并进一步可利用 GUI系统的 API技术, 通过查询关系 模块部件中保存的该可编程对象的关联元素数据信息, 利用 GUI系统的 API技术罗列显示出该可编程对象包涵的关联元素列表以供拖拽选择的可 视化控件。
编辑区接收部件, 指 GUI环境的编程工作中, 接收拖拽动作并根据拖 拽入的对象内容与代码样式自动生成规则, 对拖拽入的对象内容进行格式 或表达形式上的修改而形成新的代码的区域控件, 该区域也同为代码文本 编辑区。
10、 根据权利要求 9所述的装置, 其特征在于, 该装置进一步包括: 关系模块部件中, 保存可编程对象的关联元素时, 可釆用链表或数组 的任意数据结构形式。
11、 根据权利要求 9所述的装置, 其特征在于, 该装置进一步包括: 可编程对象在编程语言中一般含有变量属性或函数行为等子元素, 或 有继承关系的父级对象的名称元素, 个别不具有上述关联元素的可编程对 象其被保存在关系模块部件中的相关联的元素信息为空。 当关系模块部件 保存可编程对象之关联的元素信息时, 是指创建一块内存区保存该元素信 息的名称标识或保存指向包含该名称的结构于内存中保存的地址。
PCT/IB2013/051494 2013-02-25 2013-02-25 一种基于gui平台的拖拽元素编程的方法及装置 WO2014128530A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/IB2013/051494 WO2014128530A1 (zh) 2013-02-25 2013-02-25 一种基于gui平台的拖拽元素编程的方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/IB2013/051494 WO2014128530A1 (zh) 2013-02-25 2013-02-25 一种基于gui平台的拖拽元素编程的方法及装置

Publications (1)

Publication Number Publication Date
WO2014128530A1 true WO2014128530A1 (zh) 2014-08-28

Family

ID=51390563

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/IB2013/051494 WO2014128530A1 (zh) 2013-02-25 2013-02-25 一种基于gui平台的拖拽元素编程的方法及装置

Country Status (1)

Country Link
WO (1) WO2014128530A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023071452A1 (zh) * 2021-10-28 2023-05-04 北京字跳网络技术有限公司 一种组件的控制方法、装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0893757A2 (en) * 1997-07-24 1999-01-27 Casio Computer Co., Ltd. Program construction assisting system
CN101369143A (zh) * 2007-08-17 2009-02-18 台达电子工业股份有限公司 可编程控制器程序编辑方法
US20090106680A1 (en) * 2007-10-17 2009-04-23 International Business Machines Corporation Drag and drop object attribute assignment for objects in a graphical user interface (gui)
CN101826016A (zh) * 2010-05-13 2010-09-08 天津大学 支持多核并行程序设计的可视化建模及代码框架生成方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0893757A2 (en) * 1997-07-24 1999-01-27 Casio Computer Co., Ltd. Program construction assisting system
CN101369143A (zh) * 2007-08-17 2009-02-18 台达电子工业股份有限公司 可编程控制器程序编辑方法
US20090106680A1 (en) * 2007-10-17 2009-04-23 International Business Machines Corporation Drag and drop object attribute assignment for objects in a graphical user interface (gui)
CN101826016A (zh) * 2010-05-13 2010-09-08 天津大学 支持多核并行程序设计的可视化建模及代码框架生成方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023071452A1 (zh) * 2021-10-28 2023-05-04 北京字跳网络技术有限公司 一种组件的控制方法、装置、电子设备及存储介质

Similar Documents

Publication Publication Date Title
US11423359B2 (en) Managing tasks in a content management system
US11989694B2 (en) Managing projects in a content management system
US10324828B2 (en) Generating annotated screenshots based on automated tests
US10762277B2 (en) Optimization schemes for controlling user interfaces through gesture or touch
KR102111080B1 (ko) 다수의 애플리케이션 버전의 분배
US8793598B2 (en) Cross-browser web dialog platform
US20140033084A1 (en) Method and apparatus for filtering object-related features
US20140282217A1 (en) Window grouping and management across applications and devices
US9418178B2 (en) Controlling a size of hierarchical visualizations through contextual search and partial rendering
US20100257479A1 (en) Graphical User Interface with Dynamic Toolbar Search Functionality
EP2992420B1 (en) Content-based directional placement application launch
US20140047409A1 (en) Enterprise application development tool
US11880323B2 (en) System and method for building and implementing automated workflows
US11126787B2 (en) Generating responsive content from an electronic document
CN110032324A (zh) 一种文本选中方法及终端
JP6033752B2 (ja) ファイル位置のショートカットおよびウィンドウの配置構成
CN104516674A (zh) 文字处理方法和装置
US20150356105A1 (en) Techniques for processing digital assets for editing in a digital asset editing computer program
US20140372886A1 (en) Providing help on visual components displayed on touch screens
US10635458B2 (en) Systems and methods for generating a self-updating maintenance page
US20140282477A1 (en) Automatic updating of data in application programs
WO2014128530A1 (zh) 一种基于gui平台的拖拽元素编程的方法及装置
US11163938B2 (en) Providing semantic based document editor
EP2111599A2 (en) Method and apparatus for managing descriptors in system specifications
CN104866115A (zh) 一种字符输入方法及浏览器

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13875618

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13875618

Country of ref document: EP

Kind code of ref document: A1