CN111580910B - Window processing method and device - Google Patents

Window processing method and device Download PDF

Info

Publication number
CN111580910B
CN111580910B CN202010382204.1A CN202010382204A CN111580910B CN 111580910 B CN111580910 B CN 111580910B CN 202010382204 A CN202010382204 A CN 202010382204A CN 111580910 B CN111580910 B CN 111580910B
Authority
CN
China
Prior art keywords
window
edge
current screen
screen
determining
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.)
Active
Application number
CN202010382204.1A
Other languages
Chinese (zh)
Other versions
CN111580910A (en
Inventor
张守宁
李和意
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Hisense Medical Equipment Co Ltd
Original Assignee
Qingdao Hisense Medical Equipment 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 Qingdao Hisense Medical Equipment Co Ltd filed Critical Qingdao Hisense Medical Equipment Co Ltd
Priority to CN202010382204.1A priority Critical patent/CN111580910B/en
Publication of CN111580910A publication Critical patent/CN111580910A/en
Application granted granted Critical
Publication of CN111580910B publication Critical patent/CN111580910B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning

Landscapes

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

Abstract

The application discloses a window processing method and device, which are used for realizing automatic hiding of a window at the edge of a display screen and straight movement of a display under the condition of multiple display screens. The window processing method provided by the application comprises the following steps: determining that the window reaches the edge of the current screen according to the position of the window dragged by the mouse to move; and judging to hide the window or move the window between screens according to the residual display area of the window on the current screen.

Description

Window processing method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for window processing.
Background
In the process of using a medical assistance system such as an image collaboration system, in order to facilitate the use of a user and perform data interaction with the image collaboration system, a device needs to be deployed at a client, and the device is required to have the following functions:
1. when the user uses the window, the window is displayed on the upper layer of all the windows;
2. hiding when the user does not use the mobile phone;
3. allowing automatic hiding (up, down, left, and right) at the current screen edge;
4. allowing movement between displays;
5. the functions 3 and 4 can be realized by dragging the mouse;
6. can be used as an anchor point to complete the data interactive operation with other programs in the image cooperative system.
The processing mode common in the industry is a suspension form, but the suspension form has the following two functions which cannot be realized simultaneously by dragging and dropping:
1. automatically hiding the edge;
2. movement between displays.
Disclosure of Invention
The embodiment of the application provides a window processing method and device, which are used for realizing automatic hiding of a window at the edge of a display screen and straight movement of a display under the condition of multiple display screens.
The window processing method provided by the embodiment of the application comprises the following steps:
determining that the window reaches the edge of the current screen according to the position of the window dragged by the mouse to move;
and judging to hide the window or move the window between screens according to the residual display area of the window on the current screen.
According to the method, the window is determined to reach the edge of the current screen according to the position of the window dragged by a mouse; and judging to hide or move the window between screens according to the residual display area of the window on the current screen, so that the window can be automatically hidden at the edge of the display screen and can move between the displays under the condition of multiple display screens.
Optionally, determining that the window reaches the edge of the current screen according to the position where the window is dragged by the mouse, specifically including:
when the Y-axis coordinate of the upper edge of the window is a negative number, determining that the window reaches the upper edge of the current screen;
when the X-axis coordinate of the left edge of the window body is a negative number, determining that the window body reaches the left edge of the current screen;
when the Y-axis coordinate of the upper edge of the window + the height of the window is greater than the height of the current screen, determining that the window reaches the lower edge of the current screen;
and when the X-axis coordinate of the left edge of the form + the form width > the current screen width, determining that the form reaches the right edge of the current screen.
Optionally, the step of judging to hide the form or move the form between screens according to the remaining display area of the form on the current screen specifically includes:
determining the residual display area of the window on the current screen as AM;
if the window reaches the upper edge of the current screen, determining the display area of the window on the screen above the current screen to be AU;
if the form reaches the left edge of the current screen, determining the display area AL of the form on the left screen of the current screen;
if the form reaches the lower edge of the current screen, determining the display area AD of the form on the screen below the current screen;
if the form reaches the right edge of the current screen, determining the display area AR of the form on the right screen of the current screen;
selecting a maximum value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the maximum value, if so, recording the maximum value as AX, if not, taking a next-largest value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the next-largest value, if so, recording the next-largest value as AX, if not, taking a next-smallest value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the next-smallest value, if so, recording the next-smallest value as AX, if not, taking a minimum value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the minimum value, if so, recording the minimum value as AX, and if not, recording AX as 0;
and according to the AX and the AM, judging to hide the window or move between screens.
Optionally, according to the AX and the AM, determining to hide the window or move between screens, which specifically includes:
after the AM is enlarged by a preset multiple, comparing the AM with the AX, and if the AM is enlarged by the preset multiple and is larger than or equal to the AX, determining to hide the window; otherwise, determining to move the window between screens.
Optionally, hiding the window specifically includes:
determining an edge E of the form on a current screen;
carrying out deformation processing on the window;
and moving the window after the deformation processing is finished to the edge E.
Optionally, determining an edge E of the form on the current screen, specifically including:
if the frame only reaches one edge on the current screen, recording the edge as an edge E, if the frame reaches two edges on the current screen, calculating the lengths of the two edges covered by the frame in the frame, and selecting the edge corresponding to the longer edge as the edge E.
Optionally, the deforming the window specifically includes:
deforming the window body into a rectangle; the width of the rectangle is a preset number of pixels, and if the window body is a regular polygon, the length of the rectangle obtained after deformation is set as the diameter of an inscribed circle of the regular polygon; if the window body is circular, the length of the rectangle obtained after deformation is set as the diameter of the circle.
Optionally, the method further comprises: the hidden frames are restored.
Another embodiment of the present application provides a computing device, which includes a memory and a processor, wherein the memory is used for storing program instructions, and the processor is used for calling the program instructions stored in the memory and executing any one of the above methods according to the obtained program.
Another embodiment of the present application provides a computer storage medium having stored thereon computer-executable instructions for causing a computer to perform any one of the methods described above.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a frame covering an edge of a display screen according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a form processing method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a window processing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another window processing apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a window processing method and device, which are used for realizing automatic hiding of a window at the edge of a display screen and movement of the window between displays under the condition of multiple display screens. The technical scheme of the embodiment of the application can assist the user in image collaborative conference in a multi-display environment, for example.
The method and the device are based on the same application concept, and because the principles of solving the problems of the method and the device are similar, the implementation of the device and the method can be mutually referred, and repeated parts are not repeated.
Various embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the display sequence of the embodiment of the present application only represents the sequence of the embodiment, and does not represent the merits of the technical solutions provided by the embodiments.
In the technical scheme provided by the embodiment of the application, a regular polygon or a circle is used as the suspension window body, the position of the suspension window body is judged in the process of dragging the suspension window body, and if the position reaches the edge of the current screen, the operation of moving or hiding is carried out. The judgment of the hiding/moving operation is based on the ratio of the window displayed on the current display and other displays. The technical scheme provided by the embodiment of the application comprises the following steps:
1) finishing the recording of the position of the mouse, and judging whether the window body reaches the edge of the display screen:
and the position of the window is moved by pressing and dragging the left button of the mouse, and the position of the window is recorded after the left button is released.
And judging whether the released position reaches the edge of the screen. The judgment method includes, for example:
the upper left corner of the display screen is defined as the origin of coordinates, the right side of the origin of coordinates is the positive direction of an X axis, the left side of the origin of coordinates is the negative direction of the X axis,
the lower part of the origin is positive Y-axis direction, and the upper part is negative Y-axis direction.
Reaching the upper edge: the coordinate of the Y axis of the upper edge of the window body is a negative number;
to the left edge: the X-axis coordinate of the left edge of the window body is a negative number;
to the lower edge: the top window edge Y-axis coordinate + window height > current display height (as shown in fig. 1);
to the right edge: the left edge of the frame X-axis coordinate + frame width > current display width (as shown in fig. 1).
If 1 of the above conditions is met, the corresponding edge is considered to be reached, subsequent judgment is carried out, if none of the conditions is met, the method is considered to be only common dragging, no subsequent processing is carried out, and only the movement of the window position is carried out.
2) Judging to hide the window/move between screens:
firstly, calculating the display area of a window on each screen;
calculating the product of the remaining width and height of the frame displayed on the current screen as AM (shown in FIG. 1);
if the upper edge (any point of the window) is reached, calculating the product of the width and the height displayed by the window on the upper screen (assuming that an upper screen exists above the current screen) as AU ((window height-residual height) × residual width), and if the product is not reached, recording AU as 0;
if the left edge is reached (any point of the window), calculating the product AL of the width and the height displayed by the window on the left screen (assuming that a left screen exists on the left side of the current screen) (residual height x (window width-residual width), and if the product AL does not reach, recording that AL is 0;
if the lower edge (any point of the window) is reached, calculating the product AD (window height-residual height) × residual width) of the width and the height displayed by the window on the lower screen (assuming that a lower screen exists below the current screen), and if the product AD does not reach, recording AD as 0;
if the right edge (any point of the frame) is reached, the product AR of the width and height of the frame displayed on the right screen (assuming a right screen exists on the right side of the current screen) is calculated (remaining height x (frame width-remaining width), and if the left edge is not reached, AR is recorded as 0.
And judging to perform hiding/inter-screen moving operation, wherein the judging mode comprises the following steps:
selecting the maximum value of AU, AL, AD and AR, and judging whether the corresponding direction has a real display, if so, recording the product as AX, if not, not recording, continuously taking the second largest one of AU, AL, AD and AR, and judging whether the corresponding direction has a real display, if so, recording the product as AX, if not, not recording, continuously taking the second-order one of AU, AL, AD and AR, and judging whether the corresponding direction has a real display, if so, recording the product as AX, if not, not recording, continuously taking the minimum of AU, AL, AD and AR, and judging whether the corresponding direction has a real display, if present, this product is recorded as AX, and if none of the displays mentioned above is present, AX is recorded as 0.
It should be noted that: because the operation of the user is mainly concentrated on the main display in the multi-display environment, in order to ensure the user experience and reduce the misoperation of the user to move the floating window body to the non-main display, when comparing the AX with the AM, the weight of the AM needs to be set higher and then compared with the AX. For example, AM x 3 may be followed by comparison with AX. After comparison, the user only moves more than three-fourths of the window to other displays except the main display to perform the moving operation of the window between the displays, and performs the hiding operation under the other conditions.
When AM 3> AX, determine that the user wishes to perform a hidden operation;
when AM x 3< AX, it is determined that the user wishes to perform an operation of moving the window between the displays.
3) Hiding operation:
if the user wants to perform hiding operation, firstly judging the edge needing to be hidden;
firstly, according to the method introduced in point 1), it is determined which edge of the upper, lower, left, and right sides of the display screen the mouse operated by the user reaches, if only one edge of the display screen is reached, the edge is recorded as an edge E, if two edges of the display screen are reached, the two edges need to be compared, the comparison method is to calculate the length of the edge covered in the window, for example, a longer line (the upper edge of the display area) and a shorter line (the right edge of the display) in a circle in fig. 1, and the edge (the upper edge) corresponding to the longer line is recorded as the edge E.
And carrying out deformation treatment on the window body. The rectangle is deformed, the width of the rectangle is 3-5 pixels, the length of the rectangle is calculated differently according to the shape of the window, and the calculation method is as follows:
if the window is a regular polygon: the length of the rectangle obtained after deformation is set as the diameter of an inscribed circle of the regular polygon;
if the window is circular: the length of the rectangle obtained after deformation is set to be the diameter of the circle.
After the deformation processing is finished, the window body is moved to the calculated edge E; wherein,
moving to the upper edge: the Y-axis coordinate of the upper left corner of the window body is 0, the X-axis coordinate uses the X-axis coordinate before deformation, if the X-axis coordinate is less than 0, the X-axis coordinate uses 0, and if the X-axis coordinate + the rectangular length is greater than the screen width, the X-axis coordinate uses the screen width-the rectangular length;
move to the lower edge: the Y-axis coordinate of the upper left corner of the window body is the height of the display and the width of the rectangle, the X-axis coordinate uses the X-axis coordinate before deformation, if the X-axis coordinate is less than 0, the X-axis coordinate uses 0, and if the X-axis coordinate plus the length of the rectangle is greater than the width of the screen, the X-axis coordinate uses the width of the screen and the length of the rectangle;
move to the left edge: the Y-axis coordinate of the upper left corner of the window body is the Y-axis coordinate before deformation, if the Y-axis coordinate is less than 0, the Y-axis coordinate is 0, if the Y-axis coordinate + the rectangle length is greater than the screen height, the Y-axis coordinate is the screen height-rectangle length, and the X-axis coordinate is 0;
move to the right edge: and the Y-axis coordinate at the upper left corner of the window body is the Y-axis coordinate before deformation, if the Y-axis coordinate is less than 0, the Y-axis coordinate is 0, if the Y-axis coordinate + the rectangle length is greater than the screen height, the Y-axis coordinate is the screen height-the rectangle length, and the X-axis coordinate is the display width-the rectangle width.
Regarding concealment recovery:
if the frame is in the hidden state, the user moves the mouse into the shadow of the frame, the size of the frame is restored, and the frame is moved back into the screen. The recovery method is as follows:
hidden at the upper edge: the size of the window is recovered, and the coordinates of the X axis and the Y axis are unchanged;
hidden at the left edge: the size of the window is recovered, and the coordinates of the X axis and the Y axis are unchanged;
hidden at the lower edge: restoring the size of the window, wherein the coordinates of an X axis and a Y axis are equal to the height of the screen and the height of the window;
hidden at the right edge: and (4) recovering the size of the window, wherein the X-axis coordinate is equal to the screen width and the window width, and the Y-axis coordinate is unchanged.
Regarding inter-screen movement:
if the user wants to perform the operation of moving between screens, the operation of moving the screens is performed. Find the display corresponding to AX as stated in point 2) above, move the frame to the corresponding display.
Selection of window shape:
the reasons for selecting the circular or regular polygon shape for the window include:
1. with regular polygon or circular frames, the display scale of the frames between the various display screens is easier to calculate.
2. Simultaneously, the requirements of transverse hiding and longitudinal hiding are met, and the user can be ensured to feel consistent by using the window hiding function.
Problems with data interaction:
the window body can be used as an anchor point to complete data interaction operation with other programs in the image collaboration system. The operation mode comprises the steps of clicking a right mouse button on a window to trigger a menu for processing, interacting with a windows program, using a mode of transmitting parameters when the program is started, firstly judging whether the interaction mode of the corresponding page and a server is a mode of obtaining (GET) or mailing (POST) through interaction with a browser page, and transmitting the parameters through the corresponding mode.
To sum up, the technical scheme that this application embodiment provided can provide one set of convenient anchor point device for the user when using image cooperative system, lets the user under the circumstances of many display screens, quick completion and image cooperative system's interaction to guarantee that the existence of this anchor point can not lead to the demonstration of each display screen to appear in disorder, improve user's operating efficiency, guarantee user experience.
Referring to fig. 2, a window processing method provided in the embodiment of the present application includes:
s101, determining that the window reaches the edge of a current screen according to the position of a mouse dragging the window to move;
for example, the recording of the position of the mouse is completed, whether the window reaches the edge of the display screen is judged, the position of the window is moved by pressing and dragging the left button of the mouse, and the position of the window is recorded after the left button is released. And judging whether the released position reaches the edge of the screen.
S102, according to the remaining display area of the form on the current screen, the form is judged to be hidden or moved among screens.
According to the method, the window is determined to reach the edge of the current screen according to the position of the window dragged by a mouse; and judging to hide or move the window between screens according to the residual display area of the window on the current screen, so that the window can be automatically hidden at the edge of the display screen and can move between the displays under the condition of multiple display screens.
Optionally, determining that the window reaches the edge of the current screen according to the position where the window is dragged by the mouse, specifically including:
when the Y-axis coordinate of the upper edge of the window is a negative number, determining that the window reaches the upper edge of the current screen;
when the X-axis coordinate of the left edge of the window body is a negative number, determining that the window body reaches the left edge of the current screen;
when the Y-axis coordinate of the upper edge of the window + the height of the window is greater than the height of the current screen, determining that the window reaches the lower edge of the current screen;
and when the X-axis coordinate of the left edge of the form + the form width > the current screen width, determining that the form reaches the right edge of the current screen.
Optionally, the step of judging to hide the form or move the form between screens according to the remaining display area of the form on the current screen specifically includes:
determining the residual display area of the window on the current screen as AM;
if the window reaches the upper edge of the current screen, determining the display area of the window on the screen above the current screen to be AU;
if the form reaches the left edge of the current screen, determining the display area AL of the form on the left screen of the current screen;
if the form reaches the lower edge of the current screen, determining the display area AD of the form on the screen below the current screen;
if the form reaches the right edge of the current screen, determining the display area AR of the form on the right screen of the current screen;
selecting a maximum value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the maximum value, if so, recording the maximum value as AX, if not, taking a next-largest value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the next-largest value, if so, recording the next-largest value as AX, if not, taking a next-smallest value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the next-smallest value, if so, recording the next-smallest value as AX, if not, taking a minimum value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the minimum value, if so, recording the minimum value as AX, and if not, recording AX as 0;
and according to the AX and the AM, judging to hide the window or move between screens.
Optionally, according to the AX and the AM, determining to hide the window or move between screens, which specifically includes:
after the AM is expanded by a preset multiple (for example, three times), comparing the AM with the AX, and if the AM is expanded by the preset multiple and is greater than or equal to the AX, determining to hide the window; otherwise, determining to move the window between screens.
For example:
when AM 3> AX, determine that the user wishes to perform a hidden operation;
when AM x 3< AX, it is determined that the user wishes to perform an operation of moving the window between the displays.
Optionally, hiding the window specifically includes:
determining an edge E of the form on a current screen;
carrying out deformation processing on the window; for example: the image is deformed into a rectangle (of course, other figures can be changed), and the width of the rectangle is 3-5 pixels;
and moving the window after the deformation processing is finished to the edge E.
Optionally, determining an edge E of the form on the current screen, specifically including:
if the frame only reaches one edge on the current screen, recording the edge as an edge E, if the frame reaches two edges on the current screen, calculating the lengths of the two edges covered by the frame in the frame, and selecting the edge corresponding to the longer edge as the edge E.
Optionally, the deforming the window specifically includes:
deforming the window body into a rectangle; the width of the rectangle is a preset number of pixels, and if the window body is a regular polygon, the length of the rectangle obtained after deformation is set as the diameter of an inscribed circle of the regular polygon; if the window body is circular, the length of the rectangle obtained after deformation is set as the diameter of the circle.
Optionally, the method further comprises: the hidden frames are restored.
Referring to fig. 3, a window processing apparatus provided in an embodiment of the present application includes:
a memory 11 for storing program instructions;
a processor 12 for calling the program instructions stored in the memory and executing, according to the obtained program:
determining that the window reaches the edge of the current screen according to the position of the window dragged by the mouse to move;
and judging to hide the window or move the window between screens according to the residual display area of the window on the current screen.
Optionally, determining that the window reaches the edge of the current screen according to the position where the window is dragged by the mouse, specifically including:
when the Y-axis coordinate of the upper edge of the window is a negative number, determining that the window reaches the upper edge of the current screen;
when the X-axis coordinate of the left edge of the window body is a negative number, determining that the window body reaches the left edge of the current screen;
when the Y-axis coordinate of the upper edge of the window + the height of the window is greater than the height of the current screen, determining that the window reaches the lower edge of the current screen;
and when the X-axis coordinate of the left edge of the form + the form width > the current screen width, determining that the form reaches the right edge of the current screen.
Optionally, the step of judging to hide the form or move the form between screens according to the remaining display area of the form on the current screen specifically includes:
determining the residual display area of the window on the current screen as AM;
if the window reaches the upper edge of the current screen, determining the display area of the window on the screen above the current screen to be AU;
if the form reaches the left edge of the current screen, determining the display area AL of the form on the left screen of the current screen;
if the form reaches the lower edge of the current screen, determining the display area AD of the form on the screen below the current screen;
if the form reaches the right edge of the current screen, determining the display area AR of the form on the right screen of the current screen;
selecting a maximum value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the maximum value, if so, recording the maximum value as AX, if not, taking a next-largest value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the next-largest value, if so, recording the next-largest value as AX, if not, taking a next-smallest value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the next-smallest value, if so, recording the next-smallest value as AX, if not, taking a minimum value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the minimum value, if so, recording the minimum value as AX, and if not, recording AX as 0;
and according to the AX and the AM, judging to hide the window or move between screens.
Optionally, according to the AX and the AM, determining to hide the window or move between screens, which specifically includes:
after the AM is enlarged by a preset multiple, comparing the AM with the AX, and if the AM is enlarged by the preset multiple and is larger than or equal to the AX, determining to hide the window; otherwise, determining to move the window between screens.
Optionally, hiding the window specifically includes:
determining an edge E of the form on a current screen;
carrying out deformation processing on the window;
and moving the window after the deformation processing is finished to the edge E.
Optionally, determining an edge E of the form on the current screen, specifically including:
if the frame only reaches one edge on the current screen, recording the edge as an edge E, if the frame reaches two edges on the current screen, calculating the lengths of the two edges covered by the frame in the frame, and selecting the edge corresponding to the longer edge as the edge E.
Optionally, the deforming the window specifically includes:
deforming the window body into a rectangle; the width of the rectangle is a preset number of pixels, and if the window body is a regular polygon, the length of the rectangle obtained after deformation is set as the diameter of an inscribed circle of the regular polygon; if the window body is circular, the length of the rectangle obtained after deformation is set as the diameter of the circle.
Optionally, the processor 12 is further configured to: the hidden frames are restored.
Referring to fig. 4, another window processing apparatus provided in an embodiment of the present application includes:
the first unit 21 is configured to determine that the window reaches the edge of the current screen according to a position where the window is dragged by a mouse to move;
and the second unit 22 is configured to determine to hide the window or move the window between screens according to a remaining display area of the window on the current screen.
The functional unit may further execute each process mentioned in the method provided in the embodiment of the present application, which is not described herein again.
The window processing device provided by the embodiment of the application can be any equipment with a computing function, such as a display, a computer, a television, a mobile phone and other products.
It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation. In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiment of the present application provides a computing device, which may specifically be a desktop computer, a portable computer, a smart phone, a tablet computer, a Personal Digital Assistant (PDA), and the like. The computing device may include a Central Processing Unit (CPU), memory, input/output devices, etc., the input devices may include a keyboard, mouse, touch screen, etc., and the output devices may include a Display device, such as a Liquid Crystal Display (LCD), a Cathode Ray Tube (CRT), etc.
The memory may include Read Only Memory (ROM) and Random Access Memory (RAM), and provides the processor with program instructions and data stored in the memory. In the embodiments of the present application, the memory may be used for storing a program of any one of the methods provided by the embodiments of the present application.
The processor is used for executing any one of the methods provided by the embodiment of the application according to the obtained program instructions by calling the program instructions stored in the memory.
Embodiments of the present application provide a computer storage medium for storing computer program instructions for an apparatus provided in the embodiments of the present application, which includes a program for executing any one of the methods provided in the embodiments of the present application.
The computer storage media may be any available media or data storage device that can be accessed by a computer, including, but not limited to, magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs)), etc.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (9)

1. A method for window processing, the method comprising:
determining that the window reaches the edge of the current screen according to the position of the window dragged by the mouse to move;
according to the remaining display area of the window on the current screen, the window is judged to be hidden or moved among screens;
the method for determining the window to reach the edge of the current screen according to the position of the window dragged by the mouse to move specifically comprises the following steps:
when the Y-axis coordinate of the upper edge of the window is a negative number, determining that the window reaches the upper edge of the current screen;
when the X-axis coordinate of the left edge of the window body is a negative number, determining that the window body reaches the left edge of the current screen;
when the Y-axis coordinate of the upper edge of the window + the height of the window is greater than the height of the current screen, determining that the window reaches the lower edge of the current screen;
and when the X-axis coordinate of the left edge of the form + the form width > the current screen width, determining that the form reaches the right edge of the current screen.
2. The method according to claim 1, wherein the step of judging whether to hide the frame or move the frame between screens according to the remaining display area of the frame on the current screen comprises:
determining the residual display area of the window on the current screen as AM;
if the window reaches the upper edge of the current screen, determining the display area of the window on the screen above the current screen to be AU;
if the form reaches the left edge of the current screen, determining the display area AL of the form on the left screen of the current screen;
if the form reaches the lower edge of the current screen, determining the display area AD of the form on the screen below the current screen;
if the form reaches the right edge of the current screen, determining the display area AR of the form on the right screen of the current screen;
selecting a maximum value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the maximum value, if so, recording the maximum value as AX, if not, taking a next-largest value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the next-largest value, if so, recording the next-largest value as AX, if not, taking a next-smallest value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the next-smallest value, if so, recording the next-smallest value as AX, if not, taking a minimum value from AU, AL, AD and AR, judging whether a real screen exists in a direction corresponding to the minimum value, if so, recording the minimum value as AX, and if not, recording AX as 0;
and according to the AX and the AM, judging to hide the window or move between screens.
3. The method according to claim 2, wherein determining to hide or move the frame between screens according to the AX and AM comprises:
after the AM is enlarged by a preset multiple, comparing the AM with the AX, and if the AM is enlarged by the preset multiple and is larger than or equal to the AX, determining to hide the window; otherwise, determining to move the window between screens.
4. The method according to claim 1, wherein hiding the window specifically comprises:
determining an edge E of the form on a current screen;
carrying out deformation processing on the window;
and moving the window after the deformation processing is finished to the edge E.
5. The method according to claim 4, wherein determining an edge E that the frame arrives at on the current screen specifically comprises:
if the frame only reaches one edge on the current screen, recording the edge as an edge E, if the frame reaches two edges on the current screen, calculating the lengths of the two edges covered by the frame in the frame, and selecting the edge corresponding to the longer edge as the edge E.
6. The method according to claim 4, wherein the deforming the window specifically comprises:
deforming the window body into a rectangle; the width of the rectangle is a preset number of pixels, and if the window body is a regular polygon, the length of the rectangle obtained after deformation is set as the diameter of an inscribed circle of the regular polygon; if the window body is circular, the length of the rectangle obtained after deformation is set as the diameter of the circle.
7. The method of claim 1, further comprising: the hidden frames are restored.
8. A computing device, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory to perform the method of any of claims 1 to 7 in accordance with the obtained program.
9. A computer storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any one of claims 1 to 7.
CN202010382204.1A 2020-05-08 2020-05-08 Window processing method and device Active CN111580910B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010382204.1A CN111580910B (en) 2020-05-08 2020-05-08 Window processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010382204.1A CN111580910B (en) 2020-05-08 2020-05-08 Window processing method and device

Publications (2)

Publication Number Publication Date
CN111580910A CN111580910A (en) 2020-08-25
CN111580910B true CN111580910B (en) 2022-03-25

Family

ID=72113287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010382204.1A Active CN111580910B (en) 2020-05-08 2020-05-08 Window processing method and device

Country Status (1)

Country Link
CN (1) CN111580910B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115617295A (en) * 2022-10-21 2023-01-17 武汉海微科技有限公司 Multi-screen interaction method, device, equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102566931B (en) * 2011-12-31 2015-05-20 奇智软件(北京)有限公司 Method and device for displaying suspended window
CN104808919A (en) * 2015-04-29 2015-07-29 努比亚技术有限公司 Interface display control method and device
CN105872647A (en) * 2015-12-14 2016-08-17 乐视网信息技术(北京)股份有限公司 Video switching method and system

Also Published As

Publication number Publication date
CN111580910A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN109164964B (en) Content sharing method and device, terminal and storage medium
CN107577495A (en) interface display method, device and terminal
US9208698B2 (en) Device, method, and graphical user interface for manipulating a three-dimensional map view based on a device orientation
CN107562323A (en) icon moving method, device and terminal
CN107589900A (en) Multi-screen display method, device, terminal and storage medium
CN109144370B (en) Screen capturing method, device, terminal and computer readable medium
WO2017185459A1 (en) Method and apparatus for moving icons
CN107632874A (en) interface display method, device and terminal
CN110619683B (en) Three-dimensional model adjustment method, device, terminal equipment and storage medium
US20210205698A1 (en) Program, electronic device, and method
CN104063128A (en) Information processing method and electronic equipment
US11275501B2 (en) Creating tables using gestures
US10643580B2 (en) Method and device for switching playing mode of a mobile terminal, storage medium and program
US20210055859A1 (en) Graphic display method and apparatus
CN107748656A (en) A kind of picture display process, device, terminal and storage medium
CN111127469A (en) Thumbnail display method, device, storage medium and terminal
CN107566632A (en) Interface of input method display methods, device and terminal
CN111580910B (en) Window processing method and device
US10872455B2 (en) Method and portable electronic device for changing graphics processing resolution according to scenario
CN107562346A (en) Terminal control method, device, terminal and computer-readable recording medium
US20160364031A1 (en) Storage medium, display control device, display control system, and display method
CN110989880A (en) Interface element processing method and device and readable storage medium
CN112947805A (en) Icon sorting method and device
CN114579229A (en) Information presentation method and device
WO2023029475A1 (en) Model perspective method, intelligent terminal and storage 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
GR01 Patent grant
GR01 Patent grant