CN110633124A - Toolbar display method, apparatus, electronic device and storage medium - Google Patents

Toolbar display method, apparatus, electronic device and storage medium Download PDF

Info

Publication number
CN110633124A
CN110633124A CN201910906848.3A CN201910906848A CN110633124A CN 110633124 A CN110633124 A CN 110633124A CN 201910906848 A CN201910906848 A CN 201910906848A CN 110633124 A CN110633124 A CN 110633124A
Authority
CN
China
Prior art keywords
toolbar
edited
current element
display
display page
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
CN201910906848.3A
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910906848.3A priority Critical patent/CN110633124A/en
Publication of CN110633124A publication Critical patent/CN110633124A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

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

Abstract

The embodiment of the disclosure discloses a toolbar display method, a toolbar display device, an electronic device and a storage medium, wherein the method comprises the following steps: determining the position of the current element to be edited on a display page in real time; calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page; displaying the toolbar according to the display position; the toolbar comprises a functional tool for editing the current element to be edited. According to the technical scheme of the embodiment of the disclosure, the purpose of displaying the toolbar in real time based on the real-time position of the current element to be edited on the display page is achieved.

Description

Toolbar display method, apparatus, electronic device and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of computers, and in particular relates to a toolbar display method, a toolbar display device, electronic equipment and a storage medium.
Background
An online presentation is a slide that makes static files into dynamic files for browsing. An online presentation is mainly composed of several presentation elements, such as text boxes, shapes, pictures, etc. Two or more presentation elements may be combined into a new element, a combination element. For different types of presentation elements, the online presentation provides different functional tools to support editing operations on the presentation elements.
The components used to display different functional tools are called toolbars. In a traditional presentation, a toolbar is displayed on a top menu bar, a right side bar or a bottom toolbar of a browser, a path for a user to operate each function tool is long, and the toolbar is suitable for editing all presentation elements.
Disclosure of Invention
The embodiment of the disclosure provides a toolbar display method and device, electronic equipment and a storage medium, so as to achieve the purpose of displaying a toolbar based on a position of an element to be edited.
In a first aspect, an embodiment of the present disclosure provides a toolbar display method, including:
determining the position of the current element to be edited on a display page in real time;
calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page;
displaying the toolbar according to the display position;
the toolbar comprises a functional tool for editing the current element to be edited.
In a second aspect, an embodiment of the present disclosure further provides a toolbar display apparatus, including:
the determining module is used for determining the position of the current element to be edited on the display page in real time;
the calculation module is used for calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page;
the display module is used for displaying the toolbar according to the display position;
the toolbar comprises a functional tool for editing the current element to be edited.
In a third aspect, an embodiment of the present disclosure further provides an apparatus, where the apparatus includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a toolbar display method according to any of the embodiments of the present disclosure.
In a fourth aspect, the embodiments of the present disclosure also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for executing the toolbar display method according to any one of the embodiments of the present disclosure.
According to the technical scheme of the embodiment of the disclosure, the position of the current element to be edited on the display page is determined in real time; calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page; displaying the toolbar according to the display position; the toolbar comprises a technical means of a functional tool for editing the current element to be edited, and the purpose of displaying the toolbar in real time based on the real-time position of the current element to be edited on the display page is achieved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a schematic flow chart illustrating a toolbar display method according to a first embodiment of the present disclosure;
fig. 2 is a schematic diagram of a reference coordinate system according to an embodiment of the disclosure;
fig. 3 is a schematic diagram illustrating distances between frames of a current element to be edited and frames of a display page according to an embodiment of the present disclosure
Fig. 4 is a flowchart illustrating a toolbar display method according to a second embodiment of the present disclosure;
fig. 5 is a schematic diagram of a process of generating a toolbar according to a second embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a toolbar display apparatus according to a third embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to a fourth embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
Example one
Fig. 1 is a schematic flow chart of a toolbar display method according to an embodiment of the present disclosure, where the method is applicable to a scene where a toolbar needs to be displayed, and typically, for example, in a presentation, a display position of the toolbar is adjusted in real time according to a position of a presentation element to be edited (e.g., a text box), so that a distance between the toolbar and the presentation element to be edited is shortest, a user can conveniently select a function tool from the toolbar to edit the presentation element to be edited, and operation efficiency of the user is improved. Of course, the method can also be applied to other software which needs to carry out a large number of editing operations on the object to be edited, such as various drawing software. The method may be performed by a toolbar display device, which may be implemented in software and/or hardware.
As shown in fig. 1, the toolbar display method provided by the embodiment of the present disclosure includes the following steps:
and step 110, determining the position of the current element to be edited on the display page in real time.
The display page specifically refers to a page seen by a current user, and the display page includes an editing area, such as a drawing area or an editing area capable of editing an object, such as a canvas area in drawing software; the display page also includes other functional areas such as a menu bar, a directory bar, etc.
The specific step of determining the position of the current element to be edited on the display page is to determine the position of the current element to be edited in a drawing area or an editing area of the display page. A certain point in the drawing area is usually selected as the origin of the reference coordinate system, and typically, the vertex at the upper left corner of the drawing area is determined as the origin of the coordinate of the reference coordinate system, and the relative coordinate position of the current element to be edited is determined by the reference coordinate system. Referring specifically to fig. 2, a schematic diagram of a reference coordinate system is shown, wherein the vertex O at the upper left corner of the drawing area 200 is determined as the origin of coordinates (0, 0) of the reference coordinate system.
The current element to be edited can be determined based on a frame selection operation or a click operation of the user, that is, if the user selects a certain element in a frame or clicks a certain element, the element is determined as the current element to be edited.
And step 120, calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page.
The toolbar comprises a functional tool for editing the current element to be edited. The display position of the toolbar corresponding to the current element to be edited specifically refers to a position where the toolbar can be completely displayed, is closest to the current element to be edited, and is convenient for a user to select a functional tool from the toolbar. Preferably, each function tool in the toolbar is displayed directly, rather than being displayed after being folded. It can be understood that, if the function tool is displayed after being folded, when the user needs to select the function tool, the time for the user to search the function tool may be increased, and especially for a new user, it is more difficult to select the folded function tool, which affects the operation efficiency of the user. And directly displaying each function tool can increase the area of the toolbar, so that after the position of the current element to be edited is determined, the display position of the toolbar corresponding to the current element to be edited is calculated based on the position, the size of the toolbar and the size of the display page.
Illustratively, the calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page includes:
calculating a first distance from the bottom frame of the current element to be edited to the bottom frame of the display page based on the position and the size of the display page;
if the first distance is larger than or equal to the height of the toolbar, determining an area between a bottom frame of the current element to be edited and a bottom frame of a display page as a display position of the toolbar;
if the first distance is smaller than the height of the toolbar, calculating a second distance between the top frame of the current element to be edited and the top frame of the display page;
if the second distance is larger than or equal to the height of the toolbar, determining an area between a top frame of the current element to be edited and a top frame of a display page as a display position of the toolbar;
if the second distance is smaller than the height of the toolbar, calculating a third distance from the right frame of the current element to be edited to the right frame of the display page;
if the third distance is larger than or equal to the width of the toolbar, determining an area between a right frame of the current element to be edited and a right frame of a display page as a display position of the toolbar;
if the third distance is smaller than the width of the toolbar, calculating a fourth distance from the left frame of the current element to be edited to the left frame of the display page;
if the fourth distance is greater than or equal to the width of the toolbar, determining an area between a left frame of the current element to be edited and a left frame of a display page as a display position of the toolbar;
and if the fourth distance is smaller than the width of the toolbar, folding and displaying the functional tools in the toolbar to reduce the height or the width of the toolbar.
Specifically, see fig. 3 for a schematic diagram of distances between frames of a current element to be edited and frames of a display page, where a first distance between a bottom frame 301 of the current element to be edited 300 and a bottom frame 311 of the display page 310 is 3111; the second distance from the top border 302 of the element 300 to be edited to the top border 312 of the display page 310 is 3121; a third distance from the right frame 303 of the element 300 to be edited to the right frame 313 of the display page 310 is 3131; the fourth distance from the left border 304 of the current element to be edited to the left border 314 of the display page 310 is 3141. In the embodiment of the present disclosure, the usage habit of the user is fully considered, it is preferable to consider that the toolbar is displayed below the current element to be edited, if the lower space is insufficient to fully display the toolbar, the toolbar is displayed above the current element to be edited, if the upper space is still insufficient to fully display the toolbar, the toolbar is displayed to the right of the current element to be edited, if the right space is still insufficient to fully display the toolbar, the toolbar is displayed to the left of the current element to be edited, and if the spaces below, above, right, and left of the current element to be edited are not enough to fully display the toolbar, the function tools in the toolbar are displayed in a folded manner, so as to reduce the height or width of the toolbar.
It should be noted that the toolbar is allowed to cover or hide other objects in the display page except for the element to be edited currently, because the display position of the toolbar changes in real time along with the change of the position of the element to be edited currently, and when no element to be edited is selected currently, the toolbar is not displayed, that is, the display of the toolbar does not affect other related operations of the user.
And step 130, displaying the toolbar according to the display position.
According to the technical scheme of the embodiment of the disclosure, the position of the current element to be edited on the display page is determined in real time; and calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page so as to enable the distance between the toolbar and the current element to be edited to be closest, and displaying the toolbar according to the display position, thereby achieving the purpose of displaying the toolbar nearby based on the real-time position of the current element to be edited on the display page, shortening the path of a user for selecting a functional tool from the toolbar, and improving the selection efficiency.
Example two
Fig. 4 is a flowchart illustrating a toolbar display method according to a second embodiment of the present disclosure. On the basis of the above embodiment, the embodiment of the present disclosure further optimizes the scheme, and specifically generates a toolbar dedicated to the current element to be edited for the type of the current element to be edited, so as to implement classification and sorting of functional tools applicable to the current element to be edited, and remove functional tools not applicable to the current element to be edited, thereby reducing the total number of functional tools in the toolbar, enabling each functional tool to be directly displayed without being folded, facilitating selection by a user, and improving the operating efficiency of the user.
As shown in fig. 4, the method includes:
and step 410, determining the position of the current element to be edited on the display page in real time.
And 420, combining the set function tools according to the types of the current elements to be edited to generate a toolbar corresponding to the current elements to be edited.
Wherein the setting function tool includes a unique function tool matched with the type and a function tool common to each type of element.
For example, the type of the element to be edited currently is a text box, and it is understood that the unique function tool matched with the text box element includes a function tool for editing a text, such as a function tool related to text editing for setting a font, a font size, a font color, and the like. If the type of the current element to be edited is the shape, the unique function tools matched with the shape element comprise a shape color setting function tool, a shape outline line pattern setting function tool or an outline line color setting function tool and the like. The functional tools common to the various types of elements include, for example: an element level adjusting function tool, an adjusting function tool for adjusting the alignment mode of elements relative to a display page and the like. Combining the set function tools is to add an interface or an entry for realizing each function to the toolbar.
Specifically, referring to the schematic process diagram of generating a toolbar shown in fig. 5, when a user selects a current element to be edited in a frame selection manner or a click selection manner, the type of the selected current element to be edited is determined, and a functional tool is combined according to the type of the current element to be edited to generate a toolbar matched with the current element to be edited. For example, if the type of the current element to be edited is a text box, a unique function tool of the text box element and a function tool common to each type of element are added to the toolbar. And if the number of the current elements to be edited is at least two, judging whether the types of the current elements to be edited are the same, and if the types of the current elements to be edited are different, adding the unique function tool of each type of the current elements to be edited and the function tool common to each type of the current elements to be edited to the toolbar. For example, if there are two elements to be edited currently, namely a text box element and a shape element, then the unique function tool for the text box element, the unique function tool for the shape element, and the function tool common to each type of element are added to the toolbar. And simultaneously, respectively representing the edited function states in the current element to be edited and the matched toolbar, for example, if a user sets a red font for the current element to be edited, displaying the current element to be edited in red, and simultaneously displaying a function tool icon representing the set color in red in the toolbar. Furthermore, in order to realize that multiple users simultaneously edit the same element to be edited, the editing effect executed by each user on the element to be edited is displayed on the display page of each user in real time, namely, each user can see any editing operation executed by other users on the current element to be edited and the element display effect after editing in real time, a monitoring event is set for monitoring the interface change of each function tool without paying attention to the change of the current element to be edited, and the corresponding editing operation and the corresponding effect display operation on the element to be edited are executed as long as the interface of the function tool is changed.
And 430, calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page.
And step 440, displaying the toolbar according to the display position.
And step 450, monitoring the edited data item of the current element to be edited in real time.
Specifically, in order to implement the simultaneous editing operation of multiple users on the same element to be edited, the editing effect executed by each user on the element to be edited is displayed on the display page of each user in real time, that is, each user can see any editing operation performed on the current element to be edited by other users and the element display effect after editing in real time, a monitoring event is set for monitoring the interface change of each function tool, and does not pay attention to the change by who, and as long as the interface of the function tool is changed, the corresponding editing operation and the effect display operation on the element to be edited are executed.
Step 460, applying the edited data item to the current element to be edited, and displaying the edited data item in the toolbar.
For example, if the user sets a red font for the current element to be edited, the current element to be edited is displayed in red, and the function tool icon indicating the set color is displayed in red in the tool bar.
According to the technical scheme of the embodiment of the disclosure, the exclusive toolbar of the current element to be edited is generated according to the type of the current element to be edited, classification and sorting of the functional tools applicable to the current element to be edited are realized, and the functional tools not applicable to the current element to be edited are removed, so that the total number of the functional tools in the toolbar is reduced, each functional tool can be directly displayed without being folded as much as possible, convenience is brought to users for selection, and the operation efficiency of the users is improved.
EXAMPLE III
Fig. 6 is a toolbar display device provided in the third embodiment of the present disclosure, the toolbar display device includes: a determination module 610, a calculation module 620, and a display module 630.
The determining module 610 is configured to determine, in real time, a position of a current element to be edited on a display page; a calculating module 620, configured to calculate, based on the position and the size of the display page, a display position of the toolbar corresponding to the current element to be edited; a display module 630, configured to display the toolbar according to the display position; the toolbar comprises a functional tool for editing the current element to be edited.
On the basis of the above technical solution, the apparatus further includes:
the combination module is used for combining the set function tools according to the types of the current elements to be edited so as to generate a toolbar corresponding to the current elements to be edited;
wherein the setting function tool includes a unique function tool matched with the type and a function tool common to each type of element.
The types of the current element to be edited comprise: at least one of a text box, a picture, or a shape.
On the basis of the above technical solutions, the calculating module 620 is specifically configured to:
calculating a first distance from the bottom frame of the current element to be edited to the bottom frame of the display page based on the position and the size of the display page;
if the first distance is larger than or equal to the height of the toolbar, determining an area between a bottom frame of the current element to be edited and a bottom frame of a display page as a display position of the toolbar;
if the first distance is smaller than the height of the toolbar, calculating a second distance between the top frame of the current element to be edited and the top frame of the display page;
if the second distance is larger than or equal to the height of the toolbar, determining an area between a top frame of the current element to be edited and a top frame of a display page as a display position of the toolbar;
if the second distance is smaller than the height of the toolbar, calculating a third distance from the right frame of the current element to be edited to the right frame of the display page;
if the third distance is larger than or equal to the width of the toolbar, determining an area between a right frame of the current element to be edited and a right frame of a display page as a display position of the toolbar;
if the third distance is smaller than the width of the toolbar, calculating a fourth distance from the left frame of the current element to be edited to the left frame of the display page;
and if the fourth distance is greater than or equal to the width of the toolbar, determining an area between a left frame of the current element to be edited and a left frame of a display page as a display position of the toolbar.
On the basis of the above technical solutions, the calculating module 620 includes:
and the folding unit is used for folding and displaying the functional tools in the toolbar to reduce the height or the width of the toolbar if the fourth distance is smaller than the width of the toolbar.
On the basis of the above technical solutions, the editable content display module is further configured to:
on the basis of the above technical solutions, the apparatus further includes:
the monitoring module is used for monitoring the edited data item of the current element to be edited in real time;
and the showing module is used for applying the edited data item to the current element to be edited and showing the edited data item in the toolbar.
The technical scheme of the embodiment of the disclosure.
The toolbar display device provided by the embodiment of the disclosure can execute the toolbar display method provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the embodiments of the present disclosure.
Example four
Referring now to fig. 7, a schematic diagram of an electronic device (e.g., the terminal device or the server of fig. 7) 400 suitable for implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, the electronic device 400 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage device 406 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 406 including, for example, magnetic tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 409, or from the storage means 406, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
The terminal provided by the embodiment of the present disclosure and the toolbar display method provided by the above embodiment belong to the same inventive concept, and technical details that are not described in detail in the embodiment of the present disclosure may be referred to the above embodiment, and the embodiment of the present disclosure and the above embodiment have the same beneficial effects.
EXAMPLE five
The disclosed embodiments provide a computer storage medium on which a computer program is stored, which when executed by a processor implements the toolbar display method provided by the above embodiments.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having 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. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
determining the position of the current element to be edited on a display page in real time;
calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page;
displaying the toolbar according to the display position;
the toolbar comprises a functional tool for editing the current element to be edited.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a cell does not in some cases constitute a limitation on the cell itself, for example, an editable content display cell may also be described as an "editing cell".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable 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. 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.
According to one or more embodiments of the present disclosure, [ example one ] there is provided a toolbar display method, the method including:
determining the position of the current element to be edited on a display page in real time;
calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page;
displaying the toolbar according to the display position;
the toolbar comprises a functional tool for editing the current element to be edited.
According to one or more embodiments of the present disclosure, [ example two ] there is provided a toolbar display method, optionally, further comprising:
combining the set function tools according to the type of the current element to be edited to generate a toolbar corresponding to the current element to be edited;
wherein the setting function tool includes a unique function tool matched with the type and a function tool common to each type of element.
According to one or more embodiments of the present disclosure, [ example three ] there is provided a toolbar display method, where optionally, the type of the current element to be edited includes: at least one of a text box, a picture, or a shape.
According to one or more embodiments of the present disclosure, an [ example four ] provides a toolbar display method, where optionally, the calculating a display position of a toolbar corresponding to an element to be currently edited based on the position and a size of a display page includes:
calculating a first distance from the bottom frame of the current element to be edited to the bottom frame of the display page based on the position and the size of the display page;
if the first distance is larger than or equal to the height of the toolbar, determining an area between a bottom frame of the current element to be edited and a bottom frame of a display page as a display position of the toolbar;
if the first distance is smaller than the height of the toolbar, calculating a second distance between the top frame of the current element to be edited and the top frame of the display page;
and if the second distance is greater than or equal to the height of the toolbar, determining an area between a top frame of the current element to be edited and a top frame of the display page as a display position of the toolbar.
According to one or more embodiments of the present disclosure, [ example five ] there is provided a toolbar display method, optionally, the calculating a display position of a toolbar corresponding to an element to be currently edited based on the position and a size of a display page, further includes:
if the second distance is smaller than the height of the toolbar, calculating a third distance from the right frame of the current element to be edited to the right frame of the display page;
if the third distance is larger than or equal to the width of the toolbar, determining an area between a right frame of the current element to be edited and a right frame of a display page as a display position of the toolbar;
if the third distance is smaller than the width of the toolbar, calculating a fourth distance from the left frame of the current element to be edited to the left frame of the display page;
and if the fourth distance is greater than or equal to the width of the toolbar, determining an area between a left frame of the current element to be edited and a left frame of a display page as a display position of the toolbar.
According to one or more embodiments of the present disclosure, an [ example six ] provides a toolbar display method, where optionally, the calculating a display position of a toolbar corresponding to an element to be currently edited based on the position and a size of a display page further includes:
and if the fourth distance is smaller than the width of the toolbar, folding and displaying the functional tools in the toolbar to reduce the height or the width of the toolbar.
According to one or more embodiments of the present disclosure, [ example seven ] there is provided a toolbar display method, optionally, further comprising:
monitoring the edited data item of the current element to be edited in real time;
and applying the edited data item to the current element to be edited and showing the edited data item in the toolbar.
According to one or more embodiments of the present disclosure, [ example eight ] there is provided a toolbar display apparatus, the apparatus including:
the determining module is used for determining the position of the current element to be edited on the display page in real time;
the calculation module is used for calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page;
the display module is used for displaying the toolbar according to the display position;
the toolbar comprises a functional tool for editing the current element to be edited.
According to one or more embodiments of the present disclosure, [ example nine ] there is provided an electronic device comprising:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, cause the one or more processors to implement a toolbar display method as follows:
determining the position of the current element to be edited on a display page in real time;
calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page;
displaying the toolbar according to the display position;
the toolbar comprises a functional tool for editing the current element to be edited.
In some examples, the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a toolbar display method as follows:
determining the position of the current element to be edited on a display page in real time;
combining the set function tools according to the type of the current element to be edited to generate a toolbar corresponding to the current element to be edited;
calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page;
displaying the toolbar according to the display position;
the toolbar comprises a functional tool for editing the current element to be edited; the setting function tool comprises a unique function tool matched with the type and a function tool common to all types of elements; the types of the current element to be edited comprise: at least one of a text box, a picture, or a shape.
In some examples, the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a toolbar display method as follows:
determining the position of the current element to be edited on a display page in real time;
calculating a first distance from the bottom frame of the current element to be edited to the bottom frame of the display page based on the position and the size of the display page;
if the first distance is larger than or equal to the height of the toolbar, determining an area between a bottom frame of the current element to be edited and a bottom frame of a display page as a display position of the toolbar;
if the first distance is smaller than the height of the toolbar, calculating a second distance between the top frame of the current element to be edited and the top frame of the display page;
if the second distance is larger than or equal to the height of the toolbar, determining an area between a top frame of the current element to be edited and a top frame of a display page as a display position of the toolbar;
if the second distance is smaller than the height of the toolbar, calculating a third distance from the right frame of the current element to be edited to the right frame of the display page;
if the third distance is larger than or equal to the width of the toolbar, determining an area between a right frame of the current element to be edited and a right frame of a display page as a display position of the toolbar;
if the third distance is smaller than the width of the toolbar, calculating a fourth distance from the left frame of the current element to be edited to the left frame of the display page;
if the fourth distance is greater than or equal to the width of the toolbar, determining an area between a left frame of the current element to be edited and a left frame of a display page as a display position of the toolbar;
if the fourth distance is smaller than the width of the toolbar, folding and displaying the functional tools in the toolbar to reduce the height or the width of the toolbar;
and displaying the toolbar according to the display position.
In some examples, the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a toolbar display method as follows:
determining the position of the current element to be edited on a display page in real time;
calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page;
displaying the toolbar according to the display position;
monitoring the edited data item of the current element to be edited in real time;
applying the edited data item to the current element to be edited and showing the edited data item in the toolbar;
the toolbar comprises a functional tool for editing the current element to be edited.
According to one or more embodiments of the present disclosure, [ example ten ] there is provided a storage medium containing computer-executable instructions which, when executed by a computer processor, are operable to perform a toolbar display method of:
determining the position of the current element to be edited on a display page in real time;
calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page;
displaying the toolbar according to the display position;
the toolbar comprises a functional tool for editing the current element to be edited.
In some examples, the computer-executable instructions, when executed by a computer processor, are for performing a toolbar display method of:
determining the position of the current element to be edited on a display page in real time;
combining the set function tools according to the type of the current element to be edited to generate a toolbar corresponding to the current element to be edited;
calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page;
displaying the toolbar according to the display position;
the toolbar comprises a functional tool for editing the current element to be edited; the setting function tool comprises a unique function tool matched with the type and a function tool common to all types of elements; the types of the current element to be edited comprise: at least one of a text box, a picture, or a shape.
In some examples, the computer-executable instructions, when executed by a computer processor, are for performing a toolbar display method of:
determining the position of the current element to be edited on a display page in real time;
calculating a first distance from the bottom frame of the current element to be edited to the bottom frame of the display page based on the position and the size of the display page;
if the first distance is larger than or equal to the height of the toolbar, determining an area between a bottom frame of the current element to be edited and a bottom frame of a display page as a display position of the toolbar;
if the first distance is smaller than the height of the toolbar, calculating a second distance between the top frame of the current element to be edited and the top frame of the display page;
if the second distance is larger than or equal to the height of the toolbar, determining an area between a top frame of the current element to be edited and a top frame of a display page as a display position of the toolbar;
if the second distance is smaller than the height of the toolbar, calculating a third distance from the right frame of the current element to be edited to the right frame of the display page;
if the third distance is larger than or equal to the width of the toolbar, determining an area between a right frame of the current element to be edited and a right frame of a display page as a display position of the toolbar;
if the third distance is smaller than the width of the toolbar, calculating a fourth distance from the left frame of the current element to be edited to the left frame of the display page;
if the fourth distance is greater than or equal to the width of the toolbar, determining an area between a left frame of the current element to be edited and a left frame of a display page as a display position of the toolbar;
if the fourth distance is smaller than the width of the toolbar, folding and displaying the functional tools in the toolbar to reduce the height or the width of the toolbar;
and displaying the toolbar according to the display position.
In some examples, the computer-executable instructions, when executed by a computer processor, are for performing a toolbar display method of:
determining the position of the current element to be edited on a display page in real time;
calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page;
displaying the toolbar according to the display position;
monitoring the edited data item of the current element to be edited in real time;
applying the edited data item to the current element to be edited and showing the edited data item in the toolbar;
the toolbar comprises a functional tool for editing the current element to be edited.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A toolbar display method, comprising:
determining the position of the current element to be edited on a display page in real time;
calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page;
displaying the toolbar according to the display position;
the toolbar comprises a functional tool for editing the current element to be edited.
2. The method of claim 1, further comprising:
combining the set function tools according to the type of the current element to be edited to generate a toolbar corresponding to the current element to be edited;
wherein the setting function tool includes a unique function tool matched with the type and a function tool common to each type of element.
3. The method of claim 2, wherein the type of the current element to be edited comprises: at least one of a text box, a picture, or a shape.
4. The method according to any one of claims 1-3, wherein the calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page comprises:
calculating a first distance from the bottom frame of the current element to be edited to the bottom frame of the display page based on the position and the size of the display page;
if the first distance is larger than or equal to the height of the toolbar, determining an area between a bottom frame of the current element to be edited and a bottom frame of a display page as a display position of the toolbar;
if the first distance is smaller than the height of the toolbar, calculating a second distance between the top frame of the current element to be edited and the top frame of the display page;
and if the second distance is greater than or equal to the height of the toolbar, determining an area between a top frame of the current element to be edited and a top frame of the display page as a display position of the toolbar.
5. The method according to claim 4, wherein the calculating of the display position of the toolbar corresponding to the element to be edited based on the position and the size of the display page further comprises:
if the second distance is smaller than the height of the toolbar, calculating a third distance from the right frame of the current element to be edited to the right frame of the display page;
if the third distance is larger than or equal to the width of the toolbar, determining an area between a right frame of the current element to be edited and a right frame of a display page as a display position of the toolbar;
if the third distance is smaller than the width of the toolbar, calculating a fourth distance from the left frame of the current element to be edited to the left frame of the display page;
and if the fourth distance is greater than or equal to the width of the toolbar, determining an area between a left frame of the current element to be edited and a left frame of a display page as a display position of the toolbar.
6. The method of claim 5, wherein calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page further comprises:
and if the fourth distance is smaller than the width of the toolbar, folding and displaying the functional tools in the toolbar to reduce the height or the width of the toolbar.
7. The method according to any one of claims 1-3, further comprising:
monitoring the edited data item of the current element to be edited in real time;
and applying the edited data item to the current element to be edited and showing the edited data item in the toolbar.
8. A toolbar display apparatus, comprising:
the determining module is used for determining the position of the current element to be edited on the display page in real time;
the calculation module is used for calculating the display position of the toolbar corresponding to the current element to be edited based on the position and the size of the display page;
the display module is used for displaying the toolbar according to the display position;
the toolbar comprises a functional tool for editing the current element to be edited.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the toolbar display method of any of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the toolbar display method of any one of claims 1-7 when executed by a computer processor.
CN201910906848.3A 2019-09-24 2019-09-24 Toolbar display method, apparatus, electronic device and storage medium Pending CN110633124A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910906848.3A CN110633124A (en) 2019-09-24 2019-09-24 Toolbar display method, apparatus, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910906848.3A CN110633124A (en) 2019-09-24 2019-09-24 Toolbar display method, apparatus, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN110633124A true CN110633124A (en) 2019-12-31

Family

ID=68974356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910906848.3A Pending CN110633124A (en) 2019-09-24 2019-09-24 Toolbar display method, apparatus, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN110633124A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104281385A (en) * 2014-09-17 2015-01-14 北京搜狗科技发展有限公司 Regulating method of input-method keyboard and input-method device
US20160041954A1 (en) * 2014-08-05 2016-02-11 Weebly, Inc. Native Overlay for Rapid Editing of Web Content
CN108089796A (en) * 2016-11-23 2018-05-29 珠海金山办公软件有限公司 The display methods and device of shortcut bar
CN109917986A (en) * 2019-02-25 2019-06-21 努比亚技术有限公司 A kind of menu display method, wearable device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160041954A1 (en) * 2014-08-05 2016-02-11 Weebly, Inc. Native Overlay for Rapid Editing of Web Content
CN104281385A (en) * 2014-09-17 2015-01-14 北京搜狗科技发展有限公司 Regulating method of input-method keyboard and input-method device
CN108089796A (en) * 2016-11-23 2018-05-29 珠海金山办公软件有限公司 The display methods and device of shortcut bar
CN109917986A (en) * 2019-02-25 2019-06-21 努比亚技术有限公司 A kind of menu display method, wearable device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
STACK OVERFLOW: "https://stackoverflow.com/questions/23585505/dynamically-removing-element-from-menu-according-to-screen-size", 《DYNAMICALLY REMOVING ELEMENT FROM MENU ACCORDING TO SCREEN SIZE》 *
郑志泽: "https://www.sohu.com/a/319336472_417040", 《WORD右键菜单,你用好了么?》 *

Similar Documents

Publication Publication Date Title
CN112184738B (en) Image segmentation method, device, equipment and storage medium
US11720235B2 (en) Method and apparatus for browsing table in document, and electronic device and storage medium
CN110389807B (en) Interface translation method and device, electronic equipment and storage medium
CN111399956A (en) Content display method and device applied to display equipment and electronic equipment
CN110688829B (en) Table generation method, apparatus, device and storage medium
CN110471594B (en) Page adjusting method, device, equipment and medium
CN111291244B (en) House source information display method, device, terminal and storage medium
EP4258165A1 (en) Two-dimensional code displaying method and apparatus, device, and medium
CN110825286B (en) Image processing method and device and electronic equipment
CN114528816B (en) Collaborative editing information display method and device, electronic equipment and readable medium
WO2024051639A1 (en) Image processing method, apparatus and device, and storage medium and product
CN113220752A (en) Display method and device and electronic equipment
CN112256221A (en) Information display method and device and electronic equipment
CN113506356B (en) Method and device for drawing area map, readable medium and electronic equipment
CN110633124A (en) Toolbar display method, apparatus, electronic device and storage medium
CN111338827B (en) Method and device for pasting form data and electronic equipment
CN111258582B (en) Window rendering method and device, computer equipment and storage medium
CN113656128A (en) Page generation method and device and electronic equipment
CN111199519B (en) Method and device for generating special effect package
CN113672122A (en) Image processing method and device and electronic equipment
CN112214665A (en) Content display method and device, electronic equipment and computer readable storage medium
US12045442B2 (en) Method and apparatus for browsing table in document, and electronic device and storage medium
CN114327188B (en) Form layout method, form layout device, electronic equipment and computer readable medium
CN111445551B (en) Image design method and device, electronic equipment and storage medium
CN112395826B (en) Text special effect processing method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191231