Abstract:
A method, system, and memory for reshaping a window are provided. The method includes the step of reshaping the frame of a window around information displayed in the window in accordance with a preference setting and in response to a command from user controls. The system includes a display for displaying information stored in a window, user controls, and a processor for reshaping the frame of the window around the information in response to a command from the user controls. The memory includes computer readable program code that is stored in the memory. The program code directs a computer system to reshape the frame of a window around information that is displayed within the window.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates generally to graphical user interfaces (GUIs) of computer operating systems and application programs and, more particularly, but without limitation, to a method and system for modifying windows. 
     2. Background Information and Description of Related Art 
     A computer workstation requires an operating system to manage and direct workstation objects during the performance of workstation tasks, such as adding/deleting users, printing, storing/retrieving data, adding/removing peripherals, etc. Before the performance of a workstation task, the user typically must access the operating system and input a command that directs the operating system to perform the desired task. Graphical user interfaces (&#34;GUIs&#34;) provide an interface between a user and the operating system. GUIs typically represent objects (e.g., documents, printers, hard drives, programs, etc) as icons on a display screen. These icons may be individually opened as windows to show attributes of the object. 
     FIG. 1 illustrates a prior art, pictorial view of multiple stacked windows. Computer display screen 8 concurrently displays windows 2, 4, and 6. Window 2 is &#34;stacked on&#34; (i.e. positioned over) window 4, which is stacked on window 6. Window 2 includes the frame that surrounds the window, title bar 10 (which indicates that the window contains a document), margin 3, and the text in the document. The text in window 2 cannot be fully viewed because the window has been reduced in size. 
     A user frequently desires to selectively resize each stacked window so that it is as small as possible, but still displays its full contents. For example, the user may desire to simultaneously view the contents of all the opened windows by making each window as small as possible. Using a GUI, the user can manipulate the horizontal and vertical size and arrangement of the windows. That is, the user can manipulate the size and/or position of a window on the screen. For example, to manipulate the vertical size and/or position of window 2, the user first positions mouse cursor 1 over the bottom frame edge of window 2 (see FIG. 1), presses a mouse button (not shown), and then drags the mouse cursor upward or downward to adjust the position of the bottom frame edge of window 2. The user can also drag the top frame edge of window 2. Further, in a similar fashion, the user can adjust the horizontal size and/or position of window 2. 
     If window 2 is horizontally resized, left margin 3 remains. However, the size of margin 3 will be proportionally reduced or increased according to the horizontal size reduction or increase, respectively. If the right frame edge is positioned closer to the left frame edge (i.e. reduced in size), even less of the text can be viewed by the user. Similarly, if the bottom frame edge is positioned closer to the top frame edge, even less of the text can be viewed by the user. Therefore, when windows are selectively reduced in horizontal and vertical size, frequently their contents cannot be entirely seen. 
     Accordingly, there is a need for a technique that enables a user to modify the shape of a window so that the window is the smallest possible size, yet continues to display its contents. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide a method and system for reshaping a window. The method includes the step of reshaping the window around information within the window according to a reshape preference setting. 
     The system includes a display for displaying the window, a processor, and, in response to a command from user controls, means for controlling the processor to reshape the window around information within the window according to a reshape preference setting. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 illustrates a prior art pictorial view of multiple, stacked windows. 
     FIG. 2 is a schematic diagram of representative hardware for use with the present invention. 
     FIG. 3 is a pictorial view of resizable windows according to the present invention. 
     FIG. 4 is a menu for setting the reshape preference setting. 
     FIG. 5 is a flow chart of the reshaping function according to the present invention. 
     FIG. 6 is a pictorial view of the resizable windows of FIG. 3 showing the scroll bar feature according to the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The following detailed description is of the best presently contemplated mode for carrying out the invention. This detailed description is not to be viewed in a limiting sense, but is made merely for the purpose of illustrating the general principles of the invention, the scope of which is only defined by the appended claims. 
     The preferred embodiment of the present invention includes a system, method, and memory for reshaping windows. The preferred embodiment forms part of an enhanced graphical user interface (GUI) utilized by a user to access an operating system in the management and direction of workstation operations. More specifically, the preferred embodiment is implemented within the Window Manager, which is part of the GUI that interfaces with the AIX™ operating system. However, one skilled in the art will readily recognize that the present invention could be implemented in any operating system desktop or graphical user interface of an application program. 
     The present invention may be practiced in any suitable hardware configuration, such as the hardware configuration illustrated in FIG. 2, or, alternatively, a laptop computer. Referring to FIG. 2, workstation 200 includes any suitable central processing unit 10, such as a conventional microprocessor (e g., Intel&#39;s™ Pentium™ or IBM&#39;s™ PowerPC™), and a number of other units interconnected via system bus 12. Illustratively, workstation 200 includes random access memory (&#34;RAM&#34;) 14, read only memory (&#34;ROM&#34;) 16, display adapter 36 for connecting system bus 12 to display device 38, and I/O adapter 18 for connecting peripheral devices (e.g. disk and tape drives 20) to system bus 12. Workstation 200 further includes user interface adapter 22 for connecting keyboard 24, mouse 26, speaker 28, microphone 32, and/or other user interface devices, such as a touch screen device (not shown), to system bus 12. Communication adapter 34 connects workstation 200 to a data processing network. 
     The enhanced GUI, as computer readable program code, resides within a machine-readable media (e.g., memory) to direct the operation of workstation 200. Any suitable memory may retain the GUI, such as RAM 14, ROM 16, a magnetic diskette (e.g., floppy diskette), CD-ROM, magnetic tape, or optical disk (the last four being located in disk and tape drives 20). While the specification describes the GUI as performing the features of the invention, in actuality, the GUI merely provides the instructions for the microprocessor to perform those features. 
     Referring to FIG. 3, multiple stacked windows can each display information (e.g. text, graphics, icons). In this example, a text processing application (e.g. word processor spreadsheet, database) is running within window 300. Alternatively, any suitable application could run within window 300. In a first embodiment, the GUI allows a user to dynamically reshape the window frame of window 300 around each line of text (referred to as the &#34;shrink wrap&#34; mode), as shown in window 320. As such, only the window frame, title bar, menu bar, and text of window 320 can be viewed because the GUI removes all empty space in client space, such as left and right margins and blank lines at the beginning and end of the text (e.g. top and bottom margins), from the window. 
     Scroll bar icon 330 enables the GUI to generate a scroll bar (described herein, see FIG. 6) so that the user can scroll text (e.g. information) within window 320. In response to scrolling text, the GUI dynamically reshapes window frame 332 around each line of text as it is scrolled. Reshaper icon 306 allows the user to reshape window frame 332 of window 320 to its original state (i.e. window 300). 
     In a second embodiment, the GUI reshapes window frame 332 of window 300 in a rectangular fashion around the text (e.g. information) according to the most significant horizontal and most significant vertical text positions, as shown in window 310 (referred to as the &#34;min X/Y mode&#34;). As such, the window frame, title bar, menu bar, and text of window 310 are viewed. However, the GUI removes some empty (e.g. white) space, such as left and right margins and blank lines at the beginning and end of the text (e.g. top and bottom margins), from the window. 
     Scroll bar icon 331 enables the GUI to generate a scroll bar so that the user can scroll text (e.g. information) within window 310. In response, the GUI dynamically reshapes window frame 332 around the text as it is scrolled. Reshaper icon 306 allows the user to reshape window frame 332 of window 310 to its original state (i.e. window 300). 
     To reshape a window, the GUI provides a &#34;reshaper icon&#34; that allows a user to initiate the reshaping of a window. FIG. 3 illustrates reshaper icon 305, which is positioned in the title bar of window 300. Alternatively, reshaper icon 305 may be positioned anywhere in the window. Any suitable pointing device, such as a mouse, may be used to position a mouse cursor over reshaper icon 305. In the preferred embodiment, one click of a first button on the mouse activates reshaper icon 305. Upon activating reshaper icon 305, the shape of that window on the display screen transforms to the shape of the prior setting (referred to as the &#34;reshape preference setting&#34;), which is either the shrink wrap mode (see window 310) or the min x/y mode (see window 320). 
     If the user desires to change the reshape preference setting, the user positions the mouse cursor over reshape icon 305 and clicks the second button on the mouse. In response, menu 410 appears. Using the mouse, the user may select shrink wrap button 420, min x/y button 425, help button 430, or quit button 440. If the user selects quit button 440, menu 410 disappears and the reshape preference setting remains unaltered. Help button 430 provides a dialogue (not shown) with instructions on how to operate reshape icon 305. Once the user has selected shrink wrap button 420 or min x/y button 425, the user may save the preference setting in a database table (not shown) within the GUI (not shown) for that window by selecting OK button 450. 
     FIG. 5 illustrates a flow chart for reshaping a window according to the preferred embodiment. Referring to FIGS. 3, 4 and 5, at 510, a determination is made as to whether the user desires to change the reshape preference setting. In the preferred embodiment, the GUI automatically sets the reshape preference setting to the shrink wrap mode. If the user desires to change this state, he/she does so by positioning the mouse cursor over reshape icon 305 and clicking the second mouse button. In response, the GUI presents menu 410 to the user who, in turn, makes a selection at 520 or 530 as to which mode is desired. The selected mode, if any, is saved in the database table within the GUI at either 525 or 535, respectively. This database table contains all information for reshaping the particular window. 
     A determination is made at 540 as to whether the user desires to reshape the window. The user does this by positioning the mouse cursor over reshape icon 305 and clicking the first mouse button. If done, at 545, the GUI retrieves the last shape setting (e.g. state) from the database table within the GUI for that particular window. 
     If the last setting was the shrink wrap mode, at 546, the GUI saves a copy of the current window shape state in the database table and, at 560, retrieves (e.g. initiates a fetch) for the extents of the application running in the window. To do this, the operating system scans each line of the application for the two most extreme character positions within each line. That is, the operating system scans each line for the left most and right most character positions. Alternatively, any suitable conventional application, such as Common Desktop Environment™ or CorelDraw™, could provide the GUI with the extents information. 
     At 565, the GUI adjust the left most and right most vertical frame position (e.g. vertical frame segment) for each line of the window to those left most and right most character positions plus one position, respectively. All empty lines at the beginning and end of the text (e.g. top and bottom margins) are removed from the window. The GUI then horizontally connects each vertical frame segment. The scroll bar function will be described herein. 
     Alternately, if the last state was the min X/Y mode, at 547, the GUI saves the current window state in a database for that window and, at 550, retrieves (e.g. initiates a fetch) for the extents of the application running in the window. To do this, the operating system scans each of the lines and records the two most extreme character positions within that line. That is, the operating system scans each line for the left most and right most character position and stores those two character positions in a database list. The operating system then examines the database list for the most extreme left position and the most extreme right position of any one line within the application. Alternatively, any suitable conventional application could provide the GUI with the extents information which, in turn, would determine the most extreme left position and the most extreme right position of any one line within the application. 
     At 555, the GUI dynamically and uniformly adjust the left and right vertical frame positions to the most extreme left position plus one position and the most extreme right position plus one position, respectively. The GUI then horizontally connects the left most and right most vertical frames. The scroll bar function will be described herein. 
     FIG. 6 is a pictorial view of the resizable windows of FIG. 3, showing the scroll bar feature according to the preferred embodiment. Referring to FIGS. 5 and 6, after reshaping the window at 565 to the shrink wrap mode, at 570, the user makes a determination as to whether he/she desires to scroll the text in the window. If not desired, at 574, a determination is made as to whether the user desires to change the window back to the original state. To do this, the user selects reshaper icon 306. In response, the GUI searches the database table for that window and retrieves the saved original version of the window. Otherwise, control returns to 570. 
     If the user desires to scroll the text in the window, any suitable pointing device, such as a mouse, may be used to position the mouse cursor over the right arrow of scroll bar icon 330. Over the right arrow, one click of a first button on the mouse causes the GUI to generate scroll bar 635. Scroll bars are well known to those skilled in the art. The length of slider 660 tells the user how much application, if any, extends below window 320. At 571, the GUI monitors up and down arrows 640 and 641 of scroll bar 635. At 572, a determination is made as to whether up arrow 640 or down arrow 641 has been selected. If not selected, control returns to 570, where the GUI determines if the left arrow number of scroll bar icon 330 has been selected. If the left arrow has been selected, the GUI removes scroll bar 635 from window 320. 
     If either up arrow 640 or down arrow 641 of scroll bar 653 has been selected, at 573, the GUI scrolls the application either up or down, depending on whether the up or down arrow was selected. Control then returns to 560 where the GUI begins the process of reshaping the window. 
     Alternatively, again referring to FIGS. 5 and 6, after reshaping the window at 555 to the min x/y mode, at 580, the user makes a determination as to whether he/she desires to scroll the text in the window. If not desired, at 584, a determination is made as to whether to change the window back to the original state. To do this, the user selects scroll bar icon 306 of window 310. In response, the GUI searches the database for that window and retrieves the saved original version of the window. Otherwise, control returns to 580. 
     If the user desires to scroll the text in window 310, any suitable pointing device, such as a mouse, may be used to position the mouse cursor over the right arrow of scroll bar icon 331. One click of a first button on the mouse causes the GUI to generate scroll bar 636. At 581, the GUI monitors up and down arrows 650 and 651 of scroll bar 636. At 582, a determination is made as to whether either up arrow 650 or down arrow 651 has been selected. If not selected, control returns to 580, where the GUI determines if the left arrow of scroll bar icon 331 has been selected. If the left arrow has been selected, the GUI removes scroll bar 636 from window 310. 
     If either up arrow 650 or down arrow 651 of scroll bar has been selected, at 583, the GUI scrolls the application either up or down depending on whether the up or down arrow was selected. Control then returns to 550 where the GUI begins the process of reshaping the window. 
     The above process of the preferred embodiment is further illustrated by the following code: 
     
         ______________________________________Preference setting selection:If Shrink wrap mode selected thenset WINDOWMODE = SHRINK;ElseIf Min X/Y mode selected thenset WINDOWMODE = MINXY;Endif;Else...process other preferences available...Endif;Window Mode Change:If (WINDOWMODE = SHRINK) thenScan application for extents from every line;Determine windows shape from extents received fromoperating system;Execute Reshape/Resize event processing;ElseIf (WINDOWMODE = MINXY) thenScan application for extents;Determine the most extreme left and most extreme rightpositions;Determine windows shape from the most extremepositions;Execute Reshape event processing;Endif;Endif;Reshape/Resize:Unmanage window to prevent partial redrawing;Adjust window shape and or size according to extentspassed;If scroll bar needed then create scroll bars;EndifManage window to redraw new shape/size______________________________________ 
    
     Alternatively, the above process could be implemented using the following code: 
     
         ______________________________________Preference setting selection:If Shrink wrap mode selected thenset WINDOWMODE = SHRINK;ElseIf Min X/Y mode selected thenset WINDOWMODE = MINXY;Endif;Else...process other preferences available...Endif;Window Mode Change:If (WINDOWMODE = SHRINK) thenSend GET.sub.-- EXTENTS message to application;Determine windows shape from extents received fromapplication;Execute Reshape/Resize event processing;ElseIf (WINDOWMODE = MINXY) thenSend GET.sub.-- XY.sub.-- DIMENSIONS message to application;Determine windows shape from extents received fromapplication;Execute Reshape/Resize event processing;Endif;Endif;Reshape/Resize:Unmanage window to prevent partial redrawing;Adjust window shape and or size according to extents passed;If scroll bar needed thencreate scroll bars;Endif;Manage window to redraw new shape/size;______________________________________ 
    
     While the invention has been shown and described with reference to particular embodiments thereof, it will be understood by those skilled in the art that the foregoing and other changes in form and detail may be made therein without departing from the spirit and scope of the invention.