





技术领域technical field
本申请涉及计算机领域,尤其涉及一种临时显示对象管理方法、装置、设备及存储介质。The present application relates to the computer field, and in particular to a temporary display object management method, device, equipment and storage medium.
背景技术Background technique
在设计软件中,当一个或多个实体被选中时,往往需要触发一些操作选项或者一些辅助信息的显示,这些操作选项或者辅助信息称为临时显示对象。常见的临时显示对象有三类:选择临时显示对象、命令临时显示对象、吸附捕捉临时显示对象。选择显示对象主要是由选择集变化触发,根据不同的选中实体显示出不同的临时显示对象,比如显示拖动的句柄;又比如,用户在拖动绘图软件中所绘制的构件。命令临时显示对象通常指的是由菜单栏上按钮触发的命令,这些命令需要一些临时显示对象来辅助用户进行操作;捕捉吸附临时显示对象指的是当画线等命令触发时,需要捕捉吸附其它线的端点,这时候需要一些临时显示对象来说明当前的状态。In design software, when one or more entities are selected, it is often necessary to trigger the display of some operation options or some auxiliary information, and these operation options or auxiliary information are called temporary display objects. There are three common types of temporary display objects: select temporary display objects, command temporary display objects, and snap to capture temporary display objects. The selection of the display object is mainly triggered by the change of the selection set. Different temporary display objects are displayed according to different selected entities, such as the handle of the drag; another example is the component drawn by the user in the drag drawing software. The command temporary display object usually refers to the command triggered by the button on the menu bar. These commands need some temporary display objects to assist the user to operate; the snapping and adsorption temporary display object refers to the need to snap and adsorb other The end point of the line, at this time some temporary display objects are needed to illustrate the current state.
由于临时显示对象显示逻辑复杂,所以需要一套管理方案来管理这些对象。现有技术对这些临时对象的管理没有好的解决方案,往往逻辑散在各个模块中,这样导致管理混乱,维护成本高。Due to the complex display logic of temporary display objects, a set of management solutions is required to manage these objects. The existing technology does not have a good solution for the management of these temporary objects, and the logic is often scattered in each module, which leads to management confusion and high maintenance costs.
发明内容Contents of the invention
本申请提供了一种临时显示对象管理方法、装置、设备及存储介质,用以解决现有的方案存在的管理混乱、维护成本高的问题。The present application provides a temporary display object management method, device, equipment and storage medium, which are used to solve the problems of chaotic management and high maintenance cost in existing solutions.
第一方面,提供一种临时显示对象管理方法,包括:In the first aspect, a temporary display object management method is provided, including:
获取当前被操作的显示对象的临时显示对象类别;Get the temporary display object category of the currently operated display object;
确定与所述临时显示对象类别对应的管理流程;determining a management process corresponding to the temporary display object category;
按照所述管理流程生成并管理与所述显示对象对应的临时显示对象。A temporary display object corresponding to the display object is generated and managed according to the management process.
可选地,获取当前被操作的显示对象的临时显示对象类别,包括:Optionally, obtain the temporary display object category of the currently operated display object, including:
若所述显示对象的吸附捕捉功能被开启,确定所述显示对象的临时显示对象类别为吸附捕捉临时显示对象;If the suction capture function of the display object is turned on, determine that the temporary display object category of the display object is the suction capture temporary display object;
若所述显示对象为预设显示对象,且吸附捕捉功能未被开启,确定所述显示对象的临时显示对象类别为选择临时显示对象;If the display object is a preset display object, and the adsorption capture function is not enabled, determine that the temporary display object category of the display object is a selected temporary display object;
若所述显示对象基于命令被操作,确定所述临时显示对象的临时显示对象类别为命令临时显示对象。If the display object is operated based on the command, it is determined that the temporary display object category of the temporary display object is a command temporary display object.
可选地,所述显示对象的临时显示对象类别为选择临时显示对象;Optionally, the temporary display object category of the display object is to select a temporary display object;
按照所述管理流程生成并管理与所述显示对象对应的临时显示对象,包括:Generate and manage temporary display objects corresponding to the display objects according to the management process, including:
通过选择管理器组件向临时显示对象管理器组件发送选择变更事件,所述选择变更事件包括所述临时显示对象的标识,所述选择变更事件用于指示生成与所述显示对象对应的临时显示对象;Send a selection change event to the temporary display object manager component through the selection manager component, the selection change event includes the identifier of the temporary display object, and the selection change event is used to instruct generation of a temporary display object corresponding to the display object ;
当所述临时显示对象管理器组件响应于所述选择变更事件,确定具有在先生成的历史选择临时显示对象时,通过所述临时显示对象管理器组件和临时显示对象的基础组件,对所述历史选择临时显示对象进行隐藏处理和解激活处理;When the temporary display object manager component determines in response to the selection change event that a temporary display object has been selected in the previously generated history, the temporary display object manager component and the basic component of the temporary display object are used to Historical selection of temporarily displayed objects for hiding and deactivation processing;
在所述隐藏处理和解激活处理后,通过所述临时显示对象管理器组件和选择临时显示对象的工厂组件,创建与所述显示对象对应的第一临时显示对象;After the hiding process and deactivation process, create a first temporary display object corresponding to the display object through the temporary display object manager component and the factory component for selecting a temporary display object;
通过所述临时显示对象管理器组件和所述临时显示对象的基础组件,对所述第一临时显示对象进行激活并显示。The first temporary display object is activated and displayed through the temporary display object manager component and the basic component of the temporary display object.
可选地,通过所述临时显示对象管理器组件和临时显示对象的基础组件,对所述历史选择临时显示对象进行隐藏处理和解激活处理,包括:Optionally, by using the temporary display object manager component and the temporary display object basic component, performing hiding processing and deactivation processing on the historically selected temporary display object, including:
通过所述临时显示对象管理器组件向所述临时显示对象的基础组件发送隐藏请求,所述隐藏请求用于隐藏所述历史选择临时显示对象;sending a hiding request to the basic component of the temporary display object through the temporary display object manager component, the hiding request is used to hide the historically selected temporary display object;
响应于所述隐藏请求,通过所述临时显示对象的基础组件对所述历史选择临时显示对象进行隐藏处理,并将隐藏处理的结果返回所述临时显示对象管理器组件;In response to the hiding request, hide the historically selected temporary display object through the basic component of the temporary display object, and return the result of the hiding processing to the temporary display object manager component;
当所述隐藏处理的结果指示隐藏成功后,通过所述临时显示对象管理器组件向所述临时显示对象的基础组件发送解激活请求,所述解激活请求用于解激活所述历史选择临时显示对象;When the result of the hiding process indicates that the hiding is successful, the temporary display object manager component sends a deactivation request to the basic component of the temporary display object, and the deactivation request is used to deactivate the temporary display of the historical selection object;
响应于所述解激活请求,通过所述临时显示对象的基础组件对所述历史选择临时显示对象进行解激活处理,并将解激活处理的结果返回所述临时显示对象管理器组件。In response to the deactivation request, the base component of the temporary display object performs deactivation processing on the historically selected temporary display object, and returns the result of the deactivation processing to the temporary display object manager component.
可选地,通过所述临时显示对象管理器组件和选择临时显示对象的工厂组件,创建与所述显示对象对应的第一临时显示对象,包括:Optionally, creating a first temporary display object corresponding to the display object through the temporary display object manager component and the factory component for selecting a temporary display object, including:
通过所述临时显示对象管理器组件,向所述选择临时显示对象的工厂组件发送创建请求,所述创建请求包括所述显示对象的标识;sending a creation request to the factory component for selecting a temporary display object through the temporary display object manager component, the creation request including the identifier of the display object;
响应于所述创建请求,通过所述选择临时显示对象的工厂组件创建与所述显示对象的标识对应的所述第一临时显示对象。In response to the creation request, the first temporary display object corresponding to the identifier of the display object is created by the factory component for selecting a temporary display object.
可选地,所述显示对象的临时显示对象类别为吸附捕捉临时显示对象;Optionally, the temporary display object category of the display object is a temporary display object for snapping;
按照所述管理流程生成并管理与所述显示对象对应的临时显示对象,包括:Generate and manage temporary display objects corresponding to the display objects according to the management process, including:
通过吸附捕捉管理器组件、临时显示对象管理器组件和捕捉吸附临时显示对象的工厂组件,创建与所述显示对象对应的第二临时显示对象;Create a second temporary display object corresponding to the display object by absorbing the capture manager component, the temporary display object manager component, and the factory component that captures the temporary display object;
通过所述临时显示对象管理器组件和临时显示对象的基础组件,激活并显示所述第二临时显示对象。The second temporary display object is activated and displayed through the temporary display object manager component and the base component of the temporary display object.
可选地,所述显示对象的临时显示对象类别为命令临时显示对象;Optionally, the temporary display object category of the display object is a command temporary display object;
按照所述管理流程生成并管理与所述显示对象对应的临时显示对象,包括:Generate and manage temporary display objects corresponding to the display objects according to the management process, including:
按照所述命令,生成并显示与所述显示对象对应的第三临时显示对象。According to the command, a third temporary display object corresponding to the display object is generated and displayed.
第二方面,提供一种临时显示对象管理装置,包括:In a second aspect, a temporary display object management device is provided, including:
获取模块,用于获取当前被操作的显示对象的临时显示对象类别;An acquisition module, configured to acquire the temporary display object category of the currently operated display object;
确定模块,用于确定与所述临时显示对象类别对应的管理流程;A determining module, configured to determine a management process corresponding to the temporary display object category;
处理模块,用于按照所述管理流程生成并管理与所述显示对象对应的临时显示对象。A processing module, configured to generate and manage a temporary display object corresponding to the display object according to the management process.
第三方面,提供一种电子设备,包括:处理器、存储器和通信总线,其中,处理器和存储器通过通信总线完成相互间的通信;In a third aspect, an electronic device is provided, including: a processor, a memory, and a communication bus, wherein the processor and the memory complete mutual communication through the communication bus;
所述存储器,用于存储计算机程序;The memory is used to store computer programs;
所述处理器,用于执行所述存储器中所存储的程序,实现第一方面所述的临时显示对象管理方法。The processor is configured to execute the program stored in the memory to implement the temporary display object management method described in the first aspect.
第四方面,提供一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现第一方面所述的临时显示对象管理方法。In a fourth aspect, a computer-readable storage medium is provided, storing a computer program, and implementing the temporary display object management method in the first aspect when the computer program is executed by a processor.
本申请实施例提供的上述技术方案与现有技术相比具有如下优点:本申请实施例提供的该方法,获取当前被操作的显示对象的临时显示对象类别;确定与临时显示对象类别对应的管理流程;按照管理流程生成并管理与显示对象对应的临时显示对象。本实施例的方案对设计软件中三类临时对象的显示逻辑进行了抽象,通过对不同临时显示对象提出不同的管理方法来进行管理。好处是让业务层只关心临时显示对象对应的业务逻辑,不需要特别关注临时对象的创建销毁,同时规范了临时显示对象对命令的调用逻辑。Compared with the prior art, the above-mentioned technical solution provided by the embodiment of the present application has the following advantages: the method provided by the embodiment of the present application obtains the temporary display object category of the currently operated display object; determines the management corresponding to the temporary display object category Process: Generate and manage temporary display objects corresponding to display objects according to the management process. The solution of this embodiment abstracts the display logic of the three types of temporary objects in the design software, and manages them by proposing different management methods for different temporary display objects. The advantage is that the business layer only cares about the business logic corresponding to the temporary display object, and does not need to pay special attention to the creation and destruction of the temporary object, and at the same time regulates the logic of calling the command for the temporary display object.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, In other words, other drawings can also be obtained from these drawings without paying creative labor.
图1为本申请实施例中临时显示对象管理方法的各模块的结构示意图;FIG. 1 is a schematic structural diagram of each module of the temporary display object management method in the embodiment of the present application;
图2为本申请实施例中临时显示对象管理方法的流程示意图;FIG. 2 is a schematic flowchart of a method for temporarily displaying object management in an embodiment of the present application;
图3为本申请实施例中对于选择临时显示对象的具体管理流程的流程示意图;FIG. 3 is a schematic flow diagram of a specific management process for selecting a temporary display object in an embodiment of the present application;
图4为本申请实施例中对于选择临时显示对象的具体管理流程的流程示意图;FIG. 4 is a schematic flow diagram of a specific management process for selecting a temporary display object in an embodiment of the present application;
图5为本申请实施例中临时显示对象管理装置的结构示意图;FIG. 5 is a schematic structural diagram of a temporary display object management device in an embodiment of the present application;
图6为本申请实施例中电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device in an embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, but not all of them. Based on the embodiments in the present application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present application.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first" and "second" in the description and claims of the present application and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.
本申请实施例提供一种临时显示对象管理方法,该方法可应用于电子设备中。本实施例所描述电子设备可以包括终端或者服务器。终端可以是诸如手机、平板电脑、笔记本电脑、掌上电脑、PAD(Personal Digital Assistant,个人数字助理)、PMP(Portable MediaPlayer,便捷式多媒体播放器)、导航装置等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。An embodiment of the present application provides a temporary display object management method, which can be applied to electronic devices. The electronic device described in this embodiment may include a terminal or a server. The terminal can be a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a handheld computer, a PAD (Personal Digital Assistant, a personal digital assistant), a PMP (Portable MediaPlayer, a portable multimedia player), a navigation device, etc., and a mobile terminal such as a digital TV, Stationary terminals for desktop computers, etc.
请参见图1,图1为电子设备中实现本实施例中临时显示对象管理方法的各模块的结构示意图。Please refer to FIG. 1 . FIG. 1 is a schematic structural diagram of modules in an electronic device implementing the method for managing temporary display objects in this embodiment.
TmpDispManager(临时显示对象管理器组件),临时显示对象管理器组件主要是维护三类临时对象(即命令、选择、捕捉吸附临时显示对象),以及选择和捕捉吸附临时显示对象的创建工厂,同时负责监听和响应选择事件。TmpDispManager (temporary display object manager component), the temporary display object manager component mainly maintains three types of temporary objects (namely, command, selection, capture and adsorption temporary display objects), as well as the creation factory of selection and capture and adsorption temporary display objects, and is responsible for Listen for and respond to selection events.
onSelectionChangeEvent,选择集变更的响应器。onSelectionChangeEvent, responder for selection changes.
setSelectionTmpDispFactory,设置选择临时显示对象的创建工厂,通常不同类型的视图拥有不同的工厂,每个视图都有它对应的临时显示对象管理器。setSelectionTmpDispFactory, set selection temporary display object creation factory, usually different types of views have different factories, each view has its corresponding temporary display object manager.
setSnapTmpDispFactory,设置吸附捕捉临时显示对象的创建工厂addCmdTmpDisp,添加某个命令相关临时显示对象,临时显示对象管理器对于命令临时显示对象是弱管理,主要的状态维护是在命令本身。setSnapTmpDispFactory, set the creation factory addCmdTmpDisp for snapping and capturing temporary display objects, add a command-related temporary display object, the temporary display object manager has weak management for the command temporary display object, and the main state maintenance is in the command itself.
removeCmdTmpDisp,删除某个命令相关的临时显示对象。removeCmdTmpDisp, delete a temporary display object related to a command.
removeCmdTmpDisps,删除某个命令所有相关的临时显示对象。removeCmdTmpDisps, remove all temporary display objects related to a command.
getCmdTmpDisps,获得命令临时显示对象。getCmdTmpDisps, get command temporary display object.
createSnapTmpDisp,创建吸附捕捉临时显示对象。createSnapTmpDisp, create a snapping temporary display object.
removeSnapTmpDisp,删除吸附捕捉临时显示对象。removeSnapTmpDisp, delete snapping temporary display object.
getSelectionTmpDisps,获取选择临时显示对象。getSelectionTmpDisps, get selection temporary display object.
TmpDispSelectFactory,选择临时显示对象的工厂组件,用于创建选择相关的临时显示对象。TmpDispSelectFactory, a factory component for selecting temporary display objects, used to create temporary display objects related to selection.
TmpDispSnapFactory,捕捉吸附临时显示对象的工厂组件,用于创建捕捉吸附相关的临时显示对象。TmpDispSnapFactory, a factory component for snapping temporary display objects, used to create snapping-related temporary display objects.
TmpDisp,临时显示对象的基础组件。TmpDisp, the underlying component of a temporary display object.
activate,临时显示对象被激活时调用。activate, called when the temporary display object is activated.
deactivate,临时显示对象被解除激活时调用。deactivate, called when the temporary display object is deactivated.
hide,隐藏临时显示对象。hide, hide the temporary display object.
show,显示临时显示对象。show, display the temporary display object.
draw,绘画临时显示对象。draw, drawing temporary display objects.
executeCmd,执行命令对象。executeCmd, execute command object.
postCmdMessage,给命令发送消息。postCmdMessage, send a message to the command.
addChildTmpDisp,添加子临时显示对象。addChildTmpDisp, add child temporary display object.
removeChildTmpDisp,删除子临时显示对象。removeChildTmpDisp, delete the child temporary display object.
getChildTmpDisps,获取所有的子临时显示对象。getChildTmpDisps, get all child temporary display objects.
MessageCmd,消息命令,用于执行修改数据层实体对象的操作。MessageCmd, a message command, is used to perform the operation of modifying the entity object of the data layer.
如图2所示,该方法可以包括以下步骤:As shown in Figure 2, the method may include the following steps:
步骤201、获取当前被操作的显示对象的临时显示对象类别。
本实施例中,临时显示对象类别包括吸附捕捉临时显示对象、选择临时显示对象以及命令临时显示对象这三类。关于这三类临时显示对象的详细描述可见前文,此次暂不展开描述。In this embodiment, the categories of temporary display objects include three types: snapping and capturing temporary display objects, selecting temporary display objects, and commanding temporary display objects. The detailed description of these three types of temporary display objects can be found in the previous article, and the description will not be expanded this time.
一个具体实施例中,提供以下获取显示对象的临时显示对象类别的实现:In a specific embodiment, the following implementation of obtaining the temporary display object category of the display object is provided:
若显示对象的吸附捕捉功能被开启,确定显示对象的临时显示对象类别为吸附捕捉临时显示对象;若显示对象为预设显示对象,且吸附捕捉功能未被开启,确定显示对象的临时显示对象类别为选择临时显示对象;若显示对象基于命令被操作,确定临时显示对象的临时显示对象类别为命令临时显示对象。If the snapping function of the display object is turned on, determine the temporary display object category of the display object as the snapping temporary display object; if the display object is a default display object, and the snapping function is not turned on, determine the temporary display object category of the display object To select a temporary display object; if the display object is operated based on a command, determine the temporary display object category of the temporary display object as a command temporary display object.
本实施例中的预设显示对象可以人为设置,比如设置预设显示对象为绘图人员在绘图软件中所回执的矩形或线段等,本实施例对此不作具体限定。The preset display object in this embodiment can be set artificially, for example, setting the preset display object as a rectangle or a line segment received by a drafter in a drawing software, which is not specifically limited in this embodiment.
本实施例中的命令可以为绘图软件的菜单栏中的命令,本实施例对此不作具体限定。The commands in this embodiment may be commands in the menu bar of the drawing software, which is not specifically limited in this embodiment.
步骤202、确定与临时显示对象类别对应的管理流程。Step 202: Determine the management process corresponding to the temporary display object category.
步骤203、按照管理流程生成并管理与显示对象对应的临时显示对象。Step 203: Generate and manage a temporary display object corresponding to the display object according to the management process.
本实施例基于临时显示对象类别对不同临时显示对象类别的显示对象进行分类管理,以此可以增加重用,减少冗余。In this embodiment, display objects of different temporary display object categories are classified and managed based on the temporary display object category, so as to increase reuse and reduce redundancy.
一个具体实施例中,若显示对象的临时显示对象类别为选择临时显示对象,那么按照对应的管理流程生成并管理与显示对象对应的临时显示对象具体可以为:In a specific embodiment, if the temporary display object category of the display object is selected temporary display object, then generating and managing the temporary display object corresponding to the display object according to the corresponding management process can specifically be:
通过选择管理器组件向临时显示对象管理器组件(TmpDisManager)发送选择变更事件,选择变更事件用于指示选择对象标识的变更;当临时显示对象管理器组件响应于选择变更事件,确定具有在先生成的历史选择临时显示对象时,通过临时显示对象管理器组件和临时显示对象的基础组件(:TmpDisp),对历史选择临时显示对象进行隐藏处理(hide)和解激活处理(deactivate);在隐藏处理和解激活处理后,通过临时显示对象管理器组件和选择临时显示对象的工厂组件(TmpDisSelectFactory),创建与显示对象对应的第一临时显示对象;通过临时显示对象管理器组件和临时显示对象的基础组件,对第一临时显示对象进行激活(activate)并显示(show)。The selection manager component sends a selection change event to the temporary display object manager component (TmpDisManager), and the selection change event is used to indicate the change of the selection object identifier; when the temporary display object manager component responds to the selection change event, it determines that When selecting a temporary display object in the history, through the temporary display object manager component and the basic component (: TmpDisp) of the temporary display object, the historical selection temporary display object is hidden (hide) and deactivated (deactivate); After the activation process, create the first temporary display object corresponding to the display object through the temporary display object manager component and the factory component (TmpDisSelectFactory) for selecting the temporary display object; through the temporary display object manager component and the basic component of the temporary display object, The first temporary display object is activated (activated) and displayed (show).
其中,对历史选择临时显示对象进行隐藏处理和解激活处理的具体实现过程可以为:Among them, the specific implementation process of hiding and deactivating the temporary display object of historical selection can be as follows:
通过临时显示对象管理器组件向临时显示对象的基础组件发送隐藏请求,隐藏请求用于隐藏历史选择临时显示对象;响应于隐藏请求,通过临时显示对象的基础组件对历史选择临时显示对象进行隐藏处理,并将隐藏处理的结果返回临时显示对象管理器组件;当隐藏处理的结果指示隐藏成功后,通过临时显示对象管理器组件向临时显示对象的基础组件发送解激活请求,解激活请求用于解激活历史选择临时显示对象;响应于解激活请求,通过临时显示对象的基础组件对历史选择临时显示对象进行解激活处理,并将解激活处理的结果返回临时显示对象管理器组件。Send a hidden request to the basic component of the temporary display object through the temporary display object manager component, and the hidden request is used to hide the historical selection temporary display object; in response to the hidden request, hide the historical selection temporary display object through the temporary display object basic component , and return the hidden processing result to the temporary display object manager component; when the hidden processing result indicates that the hiding is successful, the temporary display object manager component sends a deactivation request to the basic component of the temporary display object, and the deactivation request is used to deactivate Activate the history selection temporary display object; in response to the deactivation request, deactivate the history selection temporary display object through the basic component of the temporary display object, and return the result of the deactivation processing to the temporary display object manager component.
其中创建与显示对象对应的第一临时显示对象的具体实现过程可以为:The specific implementation process of creating the first temporary display object corresponding to the display object may be:
通过临时显示对象管理器组件,向选择临时显示对象的工厂组件发送创建请求,创建请求包括显示对象的标识;响应于创建请求,通过选择临时显示对象的工厂组件创建与显示对象的标识对应的第一临时显示对象。Through the temporary display object manager component, send a creation request to the factory component that selects the temporary display object, and the creation request includes the identification of the display object; in response to the creation request, create the first corresponding to the identification of the display object through the factory component that selects the temporary display object A temporary display object.
请参见3,图3为本实施例给出的对于选择临时显示对象的具体管理流程。Please refer to 3, FIG. 3 is a specific management process for selecting a temporary display object given in this embodiment.
一个具体实施例中,若显示对象的临时显示对象类别为吸附捕捉临时显示对象,吸附捕捉临时显示对象的管理策略跟选择临时显示对象的管理策略有所不同,主要体现在吸附捕捉临时显示对象是一次创建并持久存在并且一种吸附捕捉策略一个临时显示对象,选择临时显示对象是不停销毁不停创建,所以按照对应的管理流程生成并管理与显示对象对应的临时显示对象具体可以为:In a specific embodiment, if the temporary display object category of the display object is the adsorption capture temporary display object, the management strategy for the adsorption capture temporary display object is different from the management strategy for selecting the temporary display object, which is mainly reflected in whether the adsorption capture temporary display object is One-time creation and persistent existence and an adsorption and capture strategy for a temporary display object. Selecting a temporary display object means that it will be destroyed and created continuously. Therefore, according to the corresponding management process, the temporary display object corresponding to the display object can be generated and managed as follows:
通过吸附捕捉管理器组件、临时显示对象管理器组件和捕捉吸附临时显示对象的工厂组件(TmpDisSnapFactory),创建与显示对象对应的第二临时显示对象;通过临时显示对象管理器组件和临时显示对象的基础组件,激活并显示第二临时显示对象。Create a second temporary display object corresponding to the display object through the adsorption capture manager component, the temporary display object manager component and the factory component (TmpDisSnapFactory) that captures the temporary display object; through the temporary display object manager component and the temporary display object Base component that activates and displays a second temporary display object.
请参见4,图4为本实施例给出的对于选择临时显示对象的具体管理流程。Please refer to 4, FIG. 4 is a specific management process for selecting a temporary display object given in this embodiment.
一个具体实施例中,若显示对象的临时显示对象类别为命令临时显示对象,那么按照对应的管理流程生成并管理与显示对象对应的临时显示对象具体可以为:按照命令,生成并显示与显示对象对应的第三临时显示对象。In a specific embodiment, if the temporary display object category of the display object is a command temporary display object, then generating and managing the temporary display object corresponding to the display object according to the corresponding management process can specifically be: generate and display the display object according to the command The corresponding third temporary display object.
本实施例对于命令临时显示对象本方案采用是弱管理策略,因为命令临时显示对象的创建主要由命令本身负责,但命令不管对象的销毁,销毁主要由临时对象管理器负责。This embodiment adopts a weak management strategy for the command temporary display object, because the creation of the command temporary display object is mainly responsible for the command itself, but the command does not care about the destruction of the object, and the destruction is mainly responsible for the temporary object manager.
本实施例提供的技术方案,获取当前被操作的显示对象的临时显示对象类别;确定与临时显示对象类别对应的管理流程;按照管理流程生成并管理与显示对象对应的临时显示对象。本实施例的方案对设计软件中三类临时对象的显示逻辑进行了抽象,通过对不同临时显示对象提出不同的管理方法来进行管理。好处是让业务层只关心临时显示对象对应的业务逻辑,不需要特别关注临时对象的创建销毁,同时规范了临时显示对象对命令的调用逻辑。The technical solution provided by this embodiment acquires the temporary display object category of the currently operated display object; determines the management process corresponding to the temporary display object category; generates and manages the temporary display object corresponding to the display object according to the management process. The solution of this embodiment abstracts the display logic of the three types of temporary objects in the design software, and manages them by proposing different management methods for different temporary display objects. The advantage is that the business layer only cares about the business logic corresponding to the temporary display object, and does not need to pay special attention to the creation and destruction of the temporary object, and at the same time regulates the logic of calling the command for the temporary display object.
基于同一构思,本申请实施例中提供了一种临时显示对象管理装置,该装置的具体实施可参见方法实施例部分的描述,重复之处不再赘述,如图5所示,该装置主要包括:Based on the same concept, an embodiment of the present application provides a temporary display object management device. For the specific implementation of the device, please refer to the description of the method embodiment, and the repetition will not be repeated. As shown in Figure 5, the device mainly includes :
获取模块501,用于获取当前被操作的显示对象的临时显示对象类别;An
确定模块502,用于确定与临时显示对象类别对应的管理流程;A determining
处理模块503,用于按照管理流程生成并管理与显示对象对应的临时显示对象。The
获取模块501用于:The
若显示对象的吸附捕捉功能被开启,确定显示对象的临时显示对象类别为吸附捕捉临时显示对象;If the snapping function of the display object is enabled, determine the temporary display object category of the display object as the snapping temporary display object;
若显示对象为预设显示对象,且吸附捕捉功能未被开启,确定显示对象的临时显示对象类别为选择临时显示对象;If the display object is a preset display object, and the snapping function is not enabled, make sure that the temporary display object category of the display object is selected as a temporary display object;
若显示对象基于命令被操作,确定临时显示对象的临时显示对象类别为命令临时显示对象。If the display object is operated based on the command, it is determined that the temporary display object category of the temporary display object is the command temporary display object.
可选地,显示对象的临时显示对象类别为选择临时显示对象;Optionally, the temporary display object category of the display object is to select a temporary display object;
处理模块503用于:The
通过选择管理器组件向临时显示对象管理器组件发送选择变更事件,选择变更事件包括临时显示对象的标识,选择变更事件用于指示生成与显示对象对应的临时显示对象;Send a selection change event to the temporary display object manager component through the selection manager component, the selection change event includes the identifier of the temporary display object, and the selection change event is used to instruct generation of a temporary display object corresponding to the display object;
当临时显示对象管理器组件响应于选择变更事件,确定具有在先生成的历史选择临时显示对象时,通过临时显示对象管理器组件和临时显示对象的基础组件,对历史选择临时显示对象进行隐藏处理和解激活处理;When the temporary display object manager component determines that there is a previously generated historical selection temporary display object in response to the selection change event, the historical selection temporary display object is hidden through the temporary display object manager component and the basic component of the temporary display object Deactivation processing;
在隐藏处理和解激活处理后,通过临时显示对象管理器组件和选择临时显示对象的工厂组件,创建与显示对象对应的第一临时显示对象;After the hiding process and deactivation process, a first temporary display object corresponding to the display object is created through the temporary display object manager component and the factory component for selecting the temporary display object;
通过临时显示对象管理器组件和临时显示对象的基础组件,对第一临时显示对象进行激活并显示。The first temporary display object is activated and displayed through the temporary display object manager component and the basic component of the temporary display object.
可选地,处理模块503用于:Optionally, the
通过临时显示对象管理器组件向临时显示对象的基础组件发送隐藏请求,隐藏请求用于隐藏历史选择临时显示对象;Send a hide request to the basic component of the temporary display object through the temporary display object manager component, and the hide request is used to hide the historical selection of the temporary display object;
响应于隐藏请求,通过临时显示对象的基础组件对历史选择临时显示对象进行隐藏处理,并将隐藏处理的结果返回临时显示对象管理器组件;In response to the hiding request, hide the historically selected temporary display object through the basic component of the temporary display object, and return the result of the hiding processing to the temporary display object manager component;
当隐藏处理的结果指示隐藏成功后,通过临时显示对象管理器组件向临时显示对象的基础组件发送解激活请求,解激活请求用于解激活历史选择临时显示对象;When the result of the hiding process indicates that the hiding is successful, a deactivation request is sent to the basic component of the temporary display object through the temporary display object manager component, and the deactivation request is used to deactivate the historically selected temporary display object;
响应于解激活请求,通过临时显示对象的基础组件对历史选择临时显示对象进行解激活处理,并将解激活处理的结果返回临时显示对象管理器组件。In response to the deactivation request, deactivate the historically selected temporary display object through the basic component of the temporary display object, and return the result of the deactivation processing to the temporary display object manager component.
可选地,处理模块503用于:Optionally, the
通过临时显示对象管理器组件,向选择临时显示对象的工厂组件发送创建请求,创建请求包括显示对象的标识;Through the temporary display object manager component, send a creation request to the factory component that selects the temporary display object, and the creation request includes the identification of the display object;
响应于创建请求,通过选择临时显示对象的工厂组件创建与显示对象的标识对应的第一临时显示对象。In response to the creation request, a first temporary display object corresponding to the identification of the display object is created by selecting the factory component of the temporary display object.
可选地,显示对象的临时显示对象类别为吸附捕捉临时显示对象;Optionally, the temporary display object category of the display object is a snapping temporary display object;
处理模块503用于:The
通过吸附捕捉管理器组件、临时显示对象管理器组件和捕捉吸附临时显示对象的工厂组件,创建与显示对象对应的第二临时显示对象;Create a second temporary display object corresponding to the display object by absorbing the capture manager component, the temporary display object manager component, and the factory component that captures the temporary display object;
通过临时显示对象管理器组件和临时显示对象的基础组件,激活并显示第二临时显示对象。A second temporary display object is activated and displayed through the temporary display object manager component and the underlying component of the temporary display object.
可选地,显示对象的临时显示对象类别为命令临时显示对象;Optionally, the temporary display object category of the display object is a command temporary display object;
处理模块503用于:The
按照命令,生成并显示与显示对象对应的第三临时显示对象。According to the command, a third temporary display object corresponding to the display object is generated and displayed.
基于同一构思,本申请实施例中还提供了一种电子设备,如图6所示,该电子设备主要包括:处理器601、存储器602和通信总线603,其中,处理器601和存储器602通过通信总线603完成相互间的通信。其中,存储器602中存储有可被处理器601执行的程序,处理器601执行存储器602中存储的程序,实现如下步骤:Based on the same idea, an electronic device is also provided in the embodiment of the present application. As shown in FIG. The
获取当前被操作的显示对象的临时显示对象类别;Get the temporary display object category of the currently operated display object;
确定与临时显示对象类别对应的管理流程;Determine the management process corresponding to the temporary display object category;
按照管理流程生成并管理与显示对象对应的临时显示对象。A temporary display object corresponding to the display object is generated and managed according to the management process.
上述电子设备中提到的通信总线603可以是外设部件互连标准(PeripheralComponent Interconnect,简称PCI)总线或扩展工业标准结构(Extended IndustryStandard Architecture,简称EISA)总线等。该通信总线603可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The
存储器602可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。可选地,存储器还可以是至少一个位于远离前述处理器601的存储装置。The
上述的处理器601可以是通用处理器,包括中央处理器(Central ProcessingUnit,简称CPU)、网络处理器(Network Processor,简称NP)等,还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Application SpecificIntegrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned
在本申请的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当该计算机程序在计算机上运行时,使得计算机执行上述实施例中所描述的临时显示对象管理方法。In yet another embodiment of the present application, a computer-readable storage medium is also provided, and a computer program is stored in the computer-readable storage medium. When the computer program is run on a computer, the computer is made to execute the above-mentioned embodiment. Describes the temporary display object management method.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。该计算机可以时通用计算机、专用计算机、计算机网络或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、微波等)方式向另外一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如软盘、硬盘、磁带等)、光介质(例如DVD)或者半导体介质(例如固态硬盘)等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e. Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, microwave, etc.) to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The usable medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk), and the like.
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relative terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these No such actual relationship or order exists between entities or operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
以上所述仅是本发明的具体实施方式,使本领域技术人员能够理解或实现本发明。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所申请的原理和新颖特点相一致的最宽的范围。The above descriptions are only specific embodiments of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Accordingly, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310131425.5ACN116243828A (en) | 2023-02-02 | 2023-02-02 | Temporary display object management method, device, equipment and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310131425.5ACN116243828A (en) | 2023-02-02 | 2023-02-02 | Temporary display object management method, device, equipment and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN116243828Atrue CN116243828A (en) | 2023-06-09 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310131425.5APendingCN116243828A (en) | 2023-02-02 | 2023-02-02 | Temporary display object management method, device, equipment and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN116243828A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090288062A1 (en)* | 2008-05-19 | 2009-11-19 | Lee Edward Lowry | Mechanism to support orphaned and partially configured objects |
| CN102870106A (en)* | 2010-04-30 | 2013-01-09 | 微软公司 | Temporary formatting and charting of selected data |
| CN103885673A (en)* | 2012-12-20 | 2014-06-25 | 国际商业机器公司 | Method and device for object selection |
| CN106415416A (en)* | 2014-06-12 | 2017-02-15 | 三菱电机株式会社 | Rendering software |
| CN112351188A (en)* | 2019-08-06 | 2021-02-09 | 三星电子株式会社 | Apparatus and method for displaying graphic elements according to objects |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090288062A1 (en)* | 2008-05-19 | 2009-11-19 | Lee Edward Lowry | Mechanism to support orphaned and partially configured objects |
| CN102870106A (en)* | 2010-04-30 | 2013-01-09 | 微软公司 | Temporary formatting and charting of selected data |
| CN103885673A (en)* | 2012-12-20 | 2014-06-25 | 国际商业机器公司 | Method and device for object selection |
| CN106415416A (en)* | 2014-06-12 | 2017-02-15 | 三菱电机株式会社 | Rendering software |
| CN112351188A (en)* | 2019-08-06 | 2021-02-09 | 三星电子株式会社 | Apparatus and method for displaying graphic elements according to objects |
| Publication | Publication Date | Title |
|---|---|---|
| EP3726376B1 (en) | Program orchestration method and electronic device | |
| CN106506401A (en) | A traffic management method and mobile terminal | |
| CN106951335A (en) | A kind of process guard method and mobile terminal | |
| CN108804194A (en) | Notification bar message treatment method, device, user terminal and readable storage medium storing program for executing | |
| US20240323272A1 (en) | Modifying the type of interaction between a mobile computing device and a peripheral device based on proximity | |
| CN110389809A (en) | Method and device for displaying information | |
| CN112965799A (en) | Task state prompting method and device, electronic equipment and medium | |
| CN109547335A (en) | Conversation message treating method and apparatus | |
| CN111694626A (en) | Application skipping method and device, terminal and storage medium | |
| CN106302995A (en) | The acquisition methods of a kind of log-on message and mobile terminal | |
| CN106254694A (en) | A kind of method of incoming call blocking, mobile terminal and core net | |
| WO2017190457A1 (en) | Sms-message editing method and terminal | |
| CN114301862B (en) | Message expediting method, device, system and storage medium | |
| JP7666812B2 (en) | Notification processing method and device using notification presets | |
| CN116243828A (en) | Temporary display object management method, device, equipment and storage medium | |
| CN107566610A (en) | A kind of message prompt method, mobile terminal and computer-readable recording medium | |
| CN110874143B (en) | Sensor data acquisition method, intelligent terminal, storage medium and electronic equipment | |
| CN105872267A (en) | Short message management method and mobile terminal | |
| CN104978398A (en) | Method for music playing and terminal device | |
| WO2019134288A1 (en) | Method, apparatus and computer device for implementing view controller | |
| US9030377B2 (en) | Smart device notifications for surface computing | |
| CN108845845B (en) | Method, device, electronic device and storage medium for creating a shortcut key | |
| CN106921567A (en) | The method and mobile terminal of a kind of instant message treatment | |
| CN107360316A (en) | Call processing method, mobile terminal and computer-readable recording medium | |
| CN111639895A (en) | Package distribution method and device, terminal equipment and storage medium |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |