CN117827207A - Dynamic construction method, device, equipment and medium of primitive panel - Google Patents

Dynamic construction method, device, equipment and medium of primitive panel Download PDF

Info

Publication number
CN117827207A
CN117827207A CN202410021173.5A CN202410021173A CN117827207A CN 117827207 A CN117827207 A CN 117827207A CN 202410021173 A CN202410021173 A CN 202410021173A CN 117827207 A CN117827207 A CN 117827207A
Authority
CN
China
Prior art keywords
primitive
panel
target
control
parameter set
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.)
Pending
Application number
CN202410021173.5A
Other languages
Chinese (zh)
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.)
CRSC Research and Design Institute Group Co Ltd
Original Assignee
CRSC Research and Design Institute Group Co 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 CRSC Research and Design Institute Group Co Ltd filed Critical CRSC Research and Design Institute Group Co Ltd
Priority to CN202410021173.5A priority Critical patent/CN117827207A/en
Publication of CN117827207A publication Critical patent/CN117827207A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a dynamic construction method, a device, equipment and a medium of a primitive panel. The method comprises the following steps: responding to a panel parameter acquisition request, reading a graphic panel configuration parameter set step by step from a graphic panel configuration file, and writing the graphic panel configuration parameter set into a memory; responding to a primitive panel display request, and drawing to obtain a primitive panel according to the primitive panel configuration parameter set stored in the memory; and visually displaying the primitive panel in a man-machine interaction interface of drawing software. According to the technical scheme provided by the embodiment of the invention, the operations such as adding, deleting and the like on the primitive panel are flexibly realized by modifying the configuration file, and the problem of complex operation faced by modifying the primitive panel in the prior art is solved. Meanwhile, by adopting unified function processing to the point selection event of the primitive, the suitability and operability of the function are enhanced, and the whole scheme is more flexible and faster than the prior art.

Description

Dynamic construction method, device, equipment and medium of primitive panel
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for dynamically constructing a primitive panel.
Background
CAD (Computer Aided Design), computer aided design) software is the most widely used general computer aided design and drawing software at present, and has strong two-dimensional drawing capability and editing function. The secondary development of CAD can be used for customizing and expanding CAD functions, and a primitive panel can be added in a CAD interface through a specific secondary development interface.
However, in the prior art, the primitive panel is fixed, i.e. the panel displays what primitive, how many primitives are displayed, and the primitive is written in the program in advance, so that the whole program needs to be changed when the panel is changed, and the difficulty of modifying and maintaining the primitive is high. Meanwhile, for the operation of selecting the primitives, each primitive corresponds to an event processing function, but in fact, the structures of the processing functions are approximately the same, so that the repeated redundancy of the program is caused, and each primitive also needs to be processed independently, and the operation is complex and the efficiency is low.
Disclosure of Invention
Based on the above, the invention provides a dynamic construction method, a device, equipment and a medium of a primitive panel, so as to solve the problems of complex operation and complex maintenance faced by modifying the primitive panel.
In a first aspect, an embodiment of the present invention provides a method for dynamically constructing a primitive panel, where the method includes:
responding to a panel parameter acquisition request, reading a graphic panel configuration parameter set step by step from a graphic panel configuration file, and writing the graphic panel configuration parameter set into a memory;
responding to a primitive panel display request, and drawing to obtain a primitive panel according to the primitive panel configuration parameter set stored in the memory;
and visually displaying the primitive panel in a man-machine interaction interface of drawing software.
In a second aspect, an embodiment of the present invention further provides a device for dynamically building a primitive panel, where the device includes:
the parameter reading module is used for responding to the panel parameter obtaining request, reading the graphic element panel configuration parameter set step by step from the graphic element panel configuration file, and writing the graphic element panel configuration parameter set into the memory;
the primitive panel drawing module is used for responding to the primitive panel display request and drawing to obtain a primitive panel according to the primitive panel configuration parameter set stored in the memory;
and the graphic primitive panel visual display module is used for visually displaying the graphic primitive panel in a man-machine interaction interface of drawing software.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method for dynamically building primitive panels according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the method for dynamically constructing a primitive panel according to any embodiment of the present invention when executed.
According to the technical scheme provided by the embodiment of the invention, the operations such as adding, deleting and the like on the primitive panel are flexibly realized by modifying the configuration file, and the problem of complex operation faced by modifying the primitive panel in the prior art is solved. In addition, by responding to the panel parameter request and the panel display request, a required human-computer interaction interface can be generated for a user in real time, operability is enhanced, user experience is optimized, and the whole scheme is more flexible and faster than the prior art.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for dynamically constructing a primitive panel according to a first embodiment of the present invention;
FIG. 2 is a flowchart of another method for dynamically constructing a primitive panel according to a second embodiment of the present invention;
FIG. 3 is a diagram of the relationship between objects in a configuration file to which embodiments of the present invention are applicable;
FIG. 4 is a graphical element panel visual interface reference diagram to which embodiments of the present invention are applicable;
FIG. 5 is a schematic structural diagram of a dynamic construction device for primitive panel according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device implementing a method for dynamically constructing a primitive panel according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a method for dynamically constructing a primitive panel according to an embodiment of the present invention, where the method may be performed by a dynamic construction device for a primitive panel, and the dynamic construction device for a primitive panel may be implemented in hardware and/or software, and the dynamic construction device for a primitive panel may be configured in graphics software for providing a primitive panel. As shown in fig. 1, the method includes:
s110, responding to a panel parameter acquisition request, reading a graphic element panel configuration parameter set step by step from a graphic element panel configuration file, and writing the graphic element panel configuration parameter set into a memory.
The method provided by the embodiment comprises a program, a configuration file and a thumbnail file. The graphic element configuration file is an XML format file and comprises four layers, wherein the four layers are mainly used for defining each graphic element in a graphic library, and configuration information of each graphic element is defined, including but not limited to names, attributes, associated thumbnail files and the like of the graphic elements, and each graphic element corresponds to one thumbnail file and is used for displaying an outline drawing of the graphic element in a graphic element panel. The program obtains the information of the target primitive in the panel by reading the parameters in the configuration file, and stores the obtained primitive information in the memory for the program to call at any time.
Optionally, while writing the primitive panel configuration parameter set into the memory, the method may further include:
creating a primitive control class and a label page class, and storing the primitive control class, the label page class and the primitive panel configuration parameter set in an associated manner;
the primitive control class is used for recording all primitive attributes of one primitive control, displaying thumbnail images of the primitive control and sending a mouse click event aiming at the primitive control;
the tab page class is used for adding and destroying the primitive control, maintaining the display of the primitive control when the display window changes, and receiving a mouse click event sent by the primitive control.
The method comprises the steps that two classes are created by a program while configuration parameters are read, wherein the classes comprise a primitive control class and a label page class, the primitive control class inherits a static control CSstatic class, and the CSstatic is used as a static control and can display text strings, icons, pointers, bitmaps and enhanced graphic elements; the tab page class inherits the caduiplaete class, which can be used to create a separate custom panel and add it to the AutoCAD interface, providing custom functions and interactive elements. And establishing an association relation between the parameter set obtained from the configuration file and the primitive control class and the label page class, so that the primitive control under each label page class can respond to the clicking operation of the mouse.
And S120, responding to a primitive panel display request, and drawing to obtain the primitive panel according to the primitive panel configuration parameter set stored in the memory.
And S130, visually displaying the primitive panel in a man-machine interaction interface of drawing software.
Depending on the user requirement, when the user needs to execute the visualization operation on the primitive panel, the parameter set in the configuration file is dynamically read for the program to directly call, so that the primitive panel is drawn and generated according to the related information such as the panel elements and the like stored in the memory.
Further, after the graphic primitive panel is visually displayed in the man-machine interaction interface of the drawing software, the method may further include:
when a clicking event of the primitive control is detected, determining a target selected primitive control corresponding to the clicking event of the primitive control;
when a release event of the primitive control is detected, constructing a primitive insertion command corresponding to the primitive control selected by the target;
and executing the primitive insertion command, creating a primitive object corresponding to the target selected primitive control, and canceling the selected state of the target selected primitive control after inserting the primitive object into the drawing area in the man-machine interaction interface.
After the visual display is carried out on the user side by the primitive panel, a user can execute the clicking operation on a specific primitive control, after the target primitive control is selected by the left key point of the mouse is detected, whether repeated selection is needed to be carried out on the target control is judged, the specific current target primitive control is marked as A, if no primitive control is selected before, the A is directly set to be selected, and further the subsequent operation is executed; if the primitive control B is selected before A, judging that: if b=a, explaining that a is secondary selection of the target control, and canceling the selected state of a at this time; if B is not equal to A, the primitive control selected before is not A, and B is deselected and A is selected instead.
After the selection of the primitive control A is determined, detecting a mouse click state, and when the mouse click is in a release state, creating and executing an insertion command of the primitive control A after the selection, namely, sending a command of inserting the primitive to the CAD by the control A, creating a Jig object in a processing function of the insertion command, transmitting the currently selected primitive control A to the Jig object, and creating and generating the primitive object and inserting the primitive object into a drawing area by the Jig object according to the input primitive control A and related attributes attached to the primitive control A.
Optionally, constructing a primitive insertion command corresponding to the primitive control selected by the target may further include:
and constructing a primitive insertion command corresponding to the target selected primitive control based on a unified primitive insertion function which is pre-established for the primitive panel.
In the technical scheme of the embodiment of the invention, in response to a panel parameter acquisition request, a graphic element panel configuration parameter set is read step by step from a graphic element panel configuration file, and the graphic element panel configuration parameter set is written into a memory; responding to a primitive panel display request, and drawing to obtain a primitive panel according to the primitive panel configuration parameter set stored in the memory; and visually displaying the primitive panel in a man-machine interaction interface of drawing software. The embodiment of the invention flexibly realizes operations such as adding, deleting and the like on the primitive panel by modifying the configuration file, and solves the problem of complex operation faced by modifying the primitive panel in the prior art. Meanwhile, by adopting unified function processing to the point selection event of the primitive, the suitability and operability of the function are enhanced, and the whole scheme is more flexible and faster than the prior art.
Example two
Fig. 2 is a flowchart of another method for dynamically constructing a primitive panel according to the second embodiment of the present invention, where the method is refined based on the foregoing embodiment. As shown in fig. 2, the method includes:
s210, responding to a panel parameter acquisition request, reading the primitive panel configuration file, creating a target panel object of a tag page set class structure every time target first configuration information aiming at a target panel is read, and declaring the target panel object as a global variable.
The panel parameter acquisition request refers to that the program completes the creation of the panel object by reading the parameters in the configuration file in response to the creation instruction initiated when the primitive panel is created. When the field of the palette is read, the panel corresponding to the field is called a target panel, and all parameter information required for constructing the current target panel is called first configuration information. Because each target gallery panel contains a plurality of tag pages, a tag page set class can be constructed for all tag page classes under one target panel, and the gallery panel containing the current tag page set class is taken as a target panel object and declared as a global variable for maintenance.
S220, continuing to read the target first configuration information, creating a target tag page object array of a tag page class structure every time target second configuration information aiming at a target tag page in a target panel is read, and adding the target tag page object array into a target panel object.
And continuing to read the first configuration information of the target panel, if a certain target tag page is read in the first configuration information, acquiring all configuration information required for constructing the target tag page, which is also called second configuration information, constructing all configuration information in the target tag page as an object array of the target tag page, and adding the array into the target panel object, namely, the target panel object comprises a plurality of target tag page object arrays.
And S230, continuously reading target second configuration information corresponding to each target tag page, creating a target primitive object array of a primitive class structure every time target third configuration information corresponding to one target primitive under one target tag page is read, and adding the target primitive object array into the target tag page object array corresponding to the target tag page.
And continuing to read in the second configuration information of the target tag pages, wherein each target tag page comprises a plurality of primitive items, all the configuration information forming the primitive items is called third configuration information, and in the reading process, creating a primitive class object array for each primitive item read, and adding the array into the target tag page object array, namely, the target tag page object array comprises a plurality of primitive class object arrays.
And S240, continuously reading target third configuration information corresponding to each target primitive, and adding each primitive attribute to a target primitive object array corresponding to one target primitive each time each primitive attribute corresponding to the target primitive is read.
And continuing to read in the third configuration information of the target primitive item, wherein each target primitive comprises a plurality of primitive attributes, and adding the primitive attributes to the target primitive class object array when one primitive attribute is read until all the attributes of the primitive are stored in the target primitive class object array.
To better understand the relationships between objects involved in reading a pair of configuration files, FIG. 3 shows a schematic diagram of the hierarchical relationships between panel objects, tag page classes, primitive objects, and attributes.
S250, after the complete reading of the primitive panel configuration file is completed, writing the constructed primitive panel configuration parameter set of the multi-level data structure into a memory.
After all the reading processes of S210-S240 are completed, that is, complete reading of the target panel configuration file is completed, and the read array information under different levels is stored in the memory, so as to respond to the subsequent display requirement of the primitive panel of the user at any time.
And S260, responding to the primitive panel display request, and triggering and executing the primitive panel drawing function.
S270, acquiring each primitive panel configuration parameter from the primitive panel configuration parameter set in real time through the primitive panel drawing function, and drawing to obtain the primitive panel.
And S280, visually displaying the primitive panel in a man-machine interaction interface of drawing software.
When the user needs to use the primitive panel to perform the custom CAD drawing, the configuration parameter set stored in advance in S250 is called to perform drawing and generation of the primitive panel, and the finally generated visual panel reference diagram can refer to fig. 4.
According to the technical scheme, the dynamic construction method of the graphic primitive panel is perfected through refinement of the overall scheme, the graphic primitive panel configuration parameter set is read step by step from the configuration file of the graphic primitive panel, the process of dynamically reading the configuration file is described in detail through further description of the first configuration information, the second configuration information and the third configuration information, the construction of the dynamic panel is truly realized, the panel is more flexible to establish, and the maintenance work of the later-stage graphic primitive panel is greatly facilitated.
Example III
Fig. 5 is a schematic structural diagram of a dynamic construction device for a primitive panel according to a third embodiment of the present invention. As shown in fig. 5, the apparatus includes:
the parameter reading module 510 is configured to respond to a panel parameter obtaining request, step-by-step read a primitive panel configuration parameter set from a primitive panel configuration file, and write the primitive panel configuration parameter set into a memory;
the primitive panel drawing module 520 is configured to respond to a primitive panel display request, and draw a primitive panel according to the primitive panel configuration parameter set stored in the memory;
and the visual display module 530 is configured to visually display the primitive panel in a man-machine interaction interface of drawing software.
According to the technical scheme of the embodiment of the invention, a parameter reading module 510 responds to a panel parameter obtaining request, reads a graphic panel configuration parameter set step by step from a graphic panel configuration file, and writes the graphic panel configuration parameter set into a memory; the primitive panel drawing module 520 responds to the primitive panel display request and draws the primitive panel according to the primitive panel configuration parameter set stored in the memory; the visual display module 530 performs visual display on the primitive panel in a man-machine interaction interface of drawing software. The embodiment of the invention flexibly realizes operations such as adding, deleting and the like on the primitive panel by modifying the configuration file, and solves the problem of complex operation faced by modifying the primitive panel in the prior art. Meanwhile, by adopting unified function processing to the point selection event of the primitive, the suitability and operability of the function are enhanced, and the whole scheme is more flexible and faster than the prior art.
Optionally, based on the above embodiments, the parameter reading module 510 may include:
the configuration file reading unit is used for reading the primitive panel configuration file, creating a target panel object of a tag page set class structure every time target first configuration information aiming at the target panel is read, and declaring the target panel object as a global variable;
the first configuration information reading unit is used for continuously reading the target first configuration information, creating a target tag page object array of a tag page class structure every time target second configuration information aiming at a target tag page in a target panel is read, and adding the target tag page object array into a target panel object;
a second configuration information reading unit, configured to continue to read target second configuration information corresponding to each target tag page, and create a target primitive object array of a primitive class structure and add the target primitive object array to a target tag page object array corresponding to the target tag page whenever target third configuration information corresponding to a target primitive under the target tag page is read;
a third configuration information reading unit, configured to continuously read target third configuration information corresponding to each target primitive, and each time each primitive attribute corresponding to one target primitive is read, each primitive attribute is added to a target primitive object array corresponding to the target primitive;
and the parameter set writing unit is used for writing the constructed primitive panel configuration parameter set of the multi-level data structure into the memory after the complete reading of the primitive panel configuration file is completed.
On the basis of the above embodiment, writing the primitive panel configuration parameter set into the memory further includes:
the associated storage unit is used for creating a primitive control class and a label page class and carrying out associated storage on the primitive control class, the label page class and the primitive panel configuration parameter set;
the primitive control class is used for recording all primitive attributes of one primitive control, displaying thumbnail images of the primitive control and sending a mouse click event aiming at the primitive control;
the tab page class is used for adding and destroying the primitive control, maintaining the display of the primitive control when the display window changes, and receiving a mouse click event sent by the primitive control.
Optionally, based on the foregoing embodiments, the primitive panel drawing module 520 may further include:
the function drawing unit is used for responding to the primitive panel display request and triggering and executing the primitive panel drawing function;
and the primitive panel drawing unit is used for acquiring each primitive panel configuration parameter from the primitive panel configuration parameter set in real time through the primitive panel drawing function, and drawing to obtain the primitive panel.
Optionally, on the basis of the foregoing embodiments, after the graphic primitive panel is visually displayed in the man-machine interaction interface of the drawing software, the method may further include:
the system comprises a clicking event detection unit, a control unit and a control unit, wherein the clicking event detection unit is used for determining that a target corresponding to a clicking event of a primitive control selects the primitive control when detecting the clicking event of the primitive control;
the release event detection unit is used for constructing a primitive insertion command corresponding to the primitive control selected by the target when detecting a release event of the primitive control;
and the inserting command executing unit is used for executing the primitive inserting command, creating a primitive object corresponding to the target selected primitive control, and canceling the selected state of the target selected primitive control after inserting the primitive object into the drawing area in the man-machine interaction interface.
On the basis of the above embodiments, the release event detection unit may be further configured to construct a primitive insertion command corresponding to the target selected primitive control by based on a unified primitive insertion function created in advance for the primitive panel.
The dynamic construction device of the primitive panel provided by the embodiment of the invention can execute the dynamic construction method of the primitive panel provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 6 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the dynamic building of primitive panels.
Namely: responding to a panel parameter acquisition request, reading a graphic panel configuration parameter set step by step from a graphic panel configuration file, and writing the graphic panel configuration parameter set into a memory;
responding to a primitive panel display request, and drawing to obtain a primitive panel according to the primitive panel configuration parameter set stored in the memory;
and visually displaying the primitive panel in a man-machine interaction interface of drawing software.
In some embodiments, the dynamic construction method of the primitive panel may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the above-described method of dynamically building primitive panels may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the dynamic building method of the primitive panel in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for dynamically constructing a primitive panel, comprising:
responding to a panel parameter acquisition request, reading a graphic panel configuration parameter set step by step from a graphic panel configuration file, and writing the graphic panel configuration parameter set into a memory;
responding to a primitive panel display request, and drawing to obtain a primitive panel according to the primitive panel configuration parameter set stored in the memory;
and visually displaying the primitive panel in a man-machine interaction interface of drawing software.
2. The method of claim 1, wherein reading the primitive panel configuration parameter set from the primitive panel configuration file step by step and writing the primitive panel configuration parameter set into the memory comprises:
reading the primitive panel configuration file, creating a target panel object of a tag page set class structure every time target first configuration information aiming at a target panel is read, and declaring the target panel object as a global variable;
continuously reading the target first configuration information, creating a target tag page object array of a tag page class structure every time target second configuration information aiming at a target tag page in a target panel is read, and adding the target tag page object array into a target panel object;
continuously reading target second configuration information corresponding to each target tag page, creating a target primitive object array of a primitive class structure every time target third configuration information corresponding to one target primitive under one target tag page is read, and adding the target primitive object array into the target tag page object array corresponding to the target tag page;
continuously reading target third configuration information corresponding to each target primitive, and adding each primitive attribute to a target primitive object array corresponding to one target primitive when each primitive attribute corresponding to the target primitive is read;
and after the complete reading of the primitive panel configuration file is completed, writing the constructed primitive panel configuration parameter set of the multi-level data structure into a memory.
3. The method of claim 1, wherein writing the set of primitive panel configuration parameters to memory, further comprises:
creating a primitive control class and a label page class, and storing the primitive control class, the label page class and the primitive panel configuration parameter set in an associated manner;
the primitive control class is used for recording all primitive attributes of one primitive control, displaying thumbnail images of the primitive control and sending a mouse click event aiming at the primitive control;
the tab page class is used for adding and destroying the primitive control, maintaining the display of the primitive control when the display window changes, and receiving a mouse click event sent by the primitive control.
4. The method of claim 1, wherein drawing the primitive panel from the set of primitive panel configuration parameters stored in the memory in response to the primitive panel display request comprises:
responding to the primitive panel display request, triggering and executing the primitive panel drawing function;
and acquiring each primitive panel configuration parameter from the primitive panel configuration parameter set in real time through the primitive panel drawing function, and drawing to obtain the primitive panel.
5. The method as recited in claim 1, further comprising:
responding to a configuration request for the graphic element panel configuration file, and displaying the currently stored graphic element panel configuration file in a man-machine interaction interface of drawing software so as to update the content in the graphic element panel configuration file by a user;
and responding to a configuration completion instruction of the graphic primitive panel configuration file, and triggering and generating a panel parameter acquisition request after updating and storing the graphic primitive panel configuration file.
6. The method of claim 3, further comprising, after visually displaying the primitive panel in a human-machine interactive interface of drawing software:
when a clicking event of the primitive control is detected, determining a target selected primitive control corresponding to the clicking event of the primitive control;
when a release event of the primitive control is detected, constructing a primitive insertion command corresponding to the primitive control selected by the target;
and executing the primitive insertion command, creating a primitive object corresponding to the target selected primitive control, and canceling the selected state of the target selected primitive control after inserting the primitive object into the drawing area in the man-machine interaction interface.
7. The method of claim 6, wherein constructing a primitive insertion command corresponding to a target selected primitive control comprises:
and constructing a primitive insertion command corresponding to the target selected primitive control based on a unified primitive insertion function which is pre-established for the primitive panel.
8. A dynamic building device for a primitive panel, comprising:
the parameter reading module is used for responding to the panel parameter obtaining request, reading the graphic element panel configuration parameter set step by step from the graphic element panel configuration file, and writing the graphic element panel configuration parameter set into the memory;
the primitive panel drawing module is used for responding to the primitive panel display request and drawing to obtain a primitive panel according to the primitive panel configuration parameter set stored in the memory;
and the graphic primitive panel visual display module is used for visually displaying the graphic primitive panel in a man-machine interaction interface of drawing software.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform a method of dynamically building a primitive panel as claimed in any one of claims 1 to 7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement a method of dynamically building a primitive panel as claimed in any one of claims 1 to 7 when executed.
CN202410021173.5A 2024-01-05 2024-01-05 Dynamic construction method, device, equipment and medium of primitive panel Pending CN117827207A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410021173.5A CN117827207A (en) 2024-01-05 2024-01-05 Dynamic construction method, device, equipment and medium of primitive panel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410021173.5A CN117827207A (en) 2024-01-05 2024-01-05 Dynamic construction method, device, equipment and medium of primitive panel

Publications (1)

Publication Number Publication Date
CN117827207A true CN117827207A (en) 2024-04-05

Family

ID=90518877

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410021173.5A Pending CN117827207A (en) 2024-01-05 2024-01-05 Dynamic construction method, device, equipment and medium of primitive panel

Country Status (1)

Country Link
CN (1) CN117827207A (en)

Similar Documents

Publication Publication Date Title
US20130191714A1 (en) Fill by example animation and visuals
CN110471700B (en) Graphic processing method, apparatus, storage medium and electronic device
CN112947916B (en) Method, apparatus, device and storage medium for implementing online canvas
CN116662039B (en) Industrial information parallel detection method, device and medium based on shared memory
CN113536755A (en) Method, device, electronic equipment, storage medium and product for generating poster
CN117234582A (en) Project code processing method and device, electronic equipment and storage medium
CN117827207A (en) Dynamic construction method, device, equipment and medium of primitive panel
CN113419806B (en) Image processing method, device, computer equipment and storage medium
CN114564268A (en) Equipment management method and device, electronic equipment and storage medium
CN113342413B (en) Method, apparatus, device, medium, and article for processing components
CN113656533A (en) Tree control processing method and device and electronic equipment
CN114741072B (en) Page generation method, device, equipment and storage medium
CN114879889B (en) Processing method, processing device, revocation system, electronic equipment and storage medium
CN114371889B (en) Event configuration method, device, electronic equipment and storage medium
CN112540711B (en) Control method, device and equipment for selecting three-dimensional space object at webpage end
CN112948245B (en) Element debugging method, device, equipment, storage medium and program product
CN117876526A (en) Drawing method and device of flow chart, electronic equipment and storage medium
CN117785215A (en) Implementation method and device of end cloud integrated platform, electronic equipment and medium
CN115858891A (en) Visual display method and device of data, electronic equipment and storage medium
CN116340689A (en) Website processing method and device
CN115761093A (en) Rendering method, rendering device, electronic equipment and storage medium
CN116578372A (en) Editing method, device, equipment and storage medium for large data screen
CN117742711A (en) Low-code-oriented page rendering method and device, electronic equipment and storage medium
CN115600988A (en) To-do task generation method, device, equipment and medium
CN117371416A (en) Project document generation method, device, equipment and storage medium

Legal Events

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