The invention generally relates to computer user interfaces (UIs) and to creation of user interfaces. More specifically, embodiments of this invention relate to graphically represented controls within a UI and to programming interfaces allowing software developers to more conveniently create such controls.
There are various known types of input controls which can be included in a graphical user interface (GUI) of a computer. More particularly, software developers have devised multiple ways in which a computer program may generate a graphical mechanism for a user to select an input option. For example, many user interfaces will display a question or statement (e.g., “do you want to save this file”) and images of several buttons corresponding to possible responses. Each of those buttons may be labeled with a response (e.g., “yes,” “no,” “ok,” “cancel,” etc.). A user may then select one of those options by placing a cursor over the button corresponding to the desired option and clicking a physical button on the mouse.
Although it is a good choice for many types of input options, a simple command button does have limitations. For instance, it is sometimes beneficial to provide a user with a more detailed description of several possible input options. However, it can be inconvenient if these additional details are not located near the corresponding controls. As an illustration, assume a user is presented with a dialog UI for configuring user accounts on a computer. As possible choices, an account could be a “limited” or “administrator” account. Because there are implications to either choice that may not be readily apparent to all users, it can be helpful to include additional text describing the two options. For example, a limited account may not be able to change certain computer settings, access certain files or install certain programs; an administrator may have unrestricted access. If the UI dialog simply has a lengthy paragraph describing the implications of either option and provides buttons for each option labeled with a terse description (e.g., “limited” and “administrator”), the user can become distracted. After reading the long paragraph describing the options, the user has to recall specifics of each option based on the terse descriptions. Although different labels could be used for the command buttons corresponding to the two options, it can become impractical to include lengthy text strings for such labels.
Various other types of input controls have been developed to address this problem. On such control is the ubiquitous “radio button.” Such a control typically displays one or more lines of text for each possible input option. Next to the text for each option is a small circle or other region which a user can select with a mouse. Once selected, the region is filled with a black dot or other indication of the selection. Typically, only one of the options can be selected. If a user selects one option and then selects another of the options, the black dot for the first selection is removed. The user then indicates that he or she has made a final decision by pressing a separate command button (e.g., labeled “ok”).
Radio buttons are useful when it is desirable to locate additional text near a control which the user selects to make a choice. Radio buttons do have at least one disadvantage, however. In particular, radio buttons require a user to perform at least two operations to make a selection: selecting the appropriate radio button and then selecting an “ok” (or other) command button. Although this may at first seem insignificant, it is important to remember that computer users may perform numerous operations requiring them to select one of multiple options. Over time, having to perform two mouse movements and mouse button presses for each selection can become inconvenient.
For these and other reasons, there remains a need for user input controls that allow a user to conveniently receive additional description of an input option, but which also minimize the number of movements required for selecting a particular option.
Embodiments of the invention address these and other challenges. In at least some embodiments, the invention includes a command link input control having a main title portion describing an input option corresponding to selection of that command link. Upon selection of the command link, a dialog containing that command link is completed without requiring a user to select additional input controls. The command link may optionally contain a subtitle portion for providing supplementary text further explaining or otherwise elaborating upon the command link. The command link may also contain a glyph.
Upon a user hovering a cursor over a command link, the entire region of a display containing the command link is highlighted. In this manner, the user can easily determine all text that relates to the input option corresponding to that command link. The command link region can be highlighted by, e.g., altering the background color of that region. The command link region can also be highlighted in different manners so as to indicate different states.
The foregoing summary of the invention, as well as the following detailed description of illustrative embodiments, is better understood when read in conjunction with the accompanying drawings, which are included by way of example, and not by way of limitation with regard to the claimed invention.
The following detailed description is divided into three parts. Part I describes an example of a computer system environment in which embodiments of the invention may be implemented. Part II describes examples of at least some programming interfaces which can be used to implement embodiments of the invention. Part III describes embodiments of command link user interface (UI) controls and methods for implementing command links.
I. Example Computing System Environment
The invention is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments and/or configurations that may be suitable for use with the invention include, but are not limited to, personal computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, minicomputers, and the like. The invention is described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
With reference to
Computer 1 typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 1 and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer readable media may include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, and removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by computer 1. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of the any of the above should also be included within the scope of computer readable media.
System memory 4 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 8 and random access memory (RAM) 10. Basic input/output system 12 (BIOS), containing the basic routines that help to transfer information between elements within computer 1, such as during start-up, is typically stored in ROM 8. RAM 10 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 2. By way of example, and not limitation,
Computer 1 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media, discussed above and illustrated in
Computer 1 may operate in a networked environment using logical connections to one or more remote computers, such as remote computer 56. Remote computer 56 may be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to computer 1, although only memory storage device 58 has been illustrated in
When used in a LAN networking environment, computer 1 is connected to LAN 60 through network interface or adapter 64. When used in a WAN networking environment, computer 1 may include modem 66 or other means for establishing communications over WAN 62, such as the Internet. Computer 1 may also access WAN 62 and/or the Internet via network interface 64. Modem 66, which may be internal or external, may be connected to system bus 6 via user input interface 50 or other appropriate mechanism. In a networked environment, program modules depicted relative to computer 1, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,
II. Example Programming Interfaces
A programming interface (or more simply, interface) may be viewed as any mechanism, process or protocol for enabling one or more segment(s) of code to communicate with or access the finctionality provided by one or more other segment(s) of code. Alternatively, a programming interface may be viewed as one or more mechanism(s), method(s), function call(s), module(s), object(s), etc. of a component of a system capable of communicative coupling to one or more mechanism(s), method(s), finction call(s), module(s), etc. of other component(s). The term “segment of code” in the preceding sentence is intended to include one or more instructions or lines of code, and includes, e.g., code modules, objects, subroutines, functions, and so on, regardless of the terminology applied or whether the code segments are separately compiled, or whether the code segments are provided as source, intermediate, or object code, whether the code segments are utilized in a runtime system or process, or whether they are located on the same or different machines or distributed across multiple machines, or whether the functionality represented by the segments of code are implemented wholly in software, wholly in hardware, or a combination of hardware and software. By way of example, and not limitation, terms such as application programming (or program) interface (API), entry point, method, finction, subroutine, remote procedure call, and component object model (COM) interface, are encompassed within the definition of programming interface.
A programming interface may be viewed generically as shown in
Aspects of a programming interface may include the method whereby the first code segment transmits information (where “information” is used in its broadest sense and includes data, commands, requests, etc.) to the second code segment; the method whereby the second code segment receives the information; and the structure, sequence, syntax, organization, schema, timing and content of the information. In this regard, the underlying transport medium itself may be unimportant to the operation of the interface, whether the medium be wired or wireless, or a combination of both, as long as the information is transported in the manner defamed by the interface. In certain situations, information may not be passed in one or both directions in the conventional sense, as the information transfer may be either via another mechanism (e.g. information placed in a buffer, file, etc. separate from information flow between the code segments) or non-existent, as when one code segment simply accesses functionality performed by a second code segment. Any or all of these aspects may be important in a given situation, e.g., depending on whether the code segments are part of a system in a loosely coupled or tightly coupled configuration, and so this description should be considered illustrative and non-limiting.
The concept of a programming interface is known to those skilled in the art. There are various other ways to implement a programming interface. Such other ways may appear to be more sophisticated or complex than the simplistic view of
Factoring. A communication from one code segment to another may be accomplished indirectly by breaking the communication into multiple discrete communications. This is depicted schematically in
Redefinition. In some cases, it may be possible to ignore, add or redefme certain aspects (e.g., parameters) of a programming interface while still accomplishing the intended result. This is illustrated in
Inline Coding. It may also be feasible to merge some or all of the finctionality of two separate code modules such that the “interface” between them changes form. For example, the functionality of
Divorce. A communication from one code segment to another may be accomplished indirectly by breaking the communication into multiple discrete communications. This is depicted schematically in
Rewriting. Yet another possible variant is to dynamically rewrite code to replace the interface functionality with something else but which achieves the same overall result. For example, there may be a system in which a code segment presented in an intermediate language (e.g. Microsoft IL, Java ByteCode, etc.) is provided to a Just-in-Time (JIT) compiler or interpreter in an execution environment (such as that provided by the .Net framework, the Java runtime environment, or other similar runtime type environments). The JIT compiler may be written so as to dynamically convert the communications from the 1st Code Segment to the 2nd Code Segment, i.e., to conform them to a different interface as may be required by the 2nd Code Segment (either the original or a different 2nd Code Segment). This is depicted in
It is also noted that the above-described scenarios for achieving the same or similar result as an interface via alternative embodiments may also be combined in various ways, serially and/or in parallel, or with other intervening code. Thus, the alternative embodiments presented above are not mutually exclusive and may be mixed, matched and combined to produce the same or equivalent scenarios to the generic scenarios presented in
III. Command Links
Shown in
In at least some embodiments, the main title of a command link is a text string specified by the developer of a software program which requests creation of the command link (creation of command links is discussed in more detail below). The main instruction can be used as a primary indication of the action, choice or other option which corresponds to the command link. The main title may, and as shown in a subsequent example, be an answer to a question posed in the dialog. The subtitle is below the main title, and can be used to, e.g., provide supplemental information regarding the option indicated by the main title. In at least some embodiments, the main title text is in a bold font or otherwise rendered so as to be distinguishable from the subtitle text. A glyph may also be included as part of the command link. The glyph may be an icon specified by a software developer, can be a default icon supplied by an OS that generates the command link, or may be omitted altogether. If included, a glyph can be used to provide a user with an additional visual clue regarding the option corresponding to the command link.
In at least some embodiments, a command link is created according to a predefined format. That format specifies the relative locations of the glyph, main title and subtitle within a command link. In some embodiments, the glyph layout is reversed (with the glyph on the right side) for languages read from right to left. The command link format also specifies the maximum area within which a glyph can be included (box 106 in
Although
In at least some embodiments, a command link changes to the “press” state color when a user presses a mouse button, but the user must press and then release the mouse button in order to actually select the command link. If a user places a cursor over a command link, presses a mouse button, and then moves the cursor off of the command link while pressing the mouse button, the command link is not selected. In such a case, the command link would return to the rest state. In some embodiments, after a user moves the cursor off the command link while holding a mouse button down, the command link receives keyboard focus.
In at least some embodiments, a command link can be used in a manner similar to the conventional button control of various versions of the WINDOWS OS. In other words, user selection of a command link can be treated by an application program in a manner similar to user selection of a conventional button, and can be used for initiating a command or some other event. Command links can also have corresponding “hot keys,” or keys which a user can press (perhaps in combination with an ALT or other key) to select the command link. In
Application 200 requests generation of a command link by transmitting that request to programming interface (PI) 202. Although shown in
The information set forth above may be provided directly (i.e., as a value passed as part of the fiction call), indirectly (i.e., as a handle of or pointer to a variable, structure or other object), or both.
Using information received by PI 202 from application program 200, OS 204 automatically generates each requested command link so that the main title will be prominently displayed and distinguished from the subtitle (if there is a subtitle), so that the main title, subtitle (if any) and glyph (if any) have the arrangement and spacing defined by the command link format, so that the proper styles are applied, etc. OS 204 may also automatically size the command link(s) based on the specified text. As previously indicated, the styles of command link text, the spacing of various command link elements, and other aspects of the visual appearance of a command link are controlled by parameters of one or more theme files 206. Accordingly, application 200 is not required to include extensive layout and other formatting data in the function call(s). In this manner, all command links have a consistent layout and appearance.
When a user hovers a cursor over a command link, OS 204 changes the appearance of the command link to indicate the “hover” state. Similarly, OS 204 changes the appearance of a command link when a user selects that link. When a user does select a command link, OS 204 returns data regarding that selection, via PI 202, to application 200. Application 200 then processes that data in a manner defined by the developer of the application.
In at least some embodiments of the invention implemented using versions of the WINDOWS OS, a command link is a standard control which an application can request using many of the same PIs that are used to create a conventional button control. For example, a command link can be created using the CreateWindow function. Because the CreateWindow function is known in the art, it is not extensively discussed herein. Details of the CreateWindow function are available from, e.g., <http://msdn.microsoft.com>. In general, however, the CreateWindow function generates a command link in a manner similar to that in which a conventional button control is generated. Specifically, the command link (like a conventional button) is effectively a smaller “child” window that is created within a dialog or other type of “parent” window. The CreateWindow finction specifies a window class, window title, window style and (optionally) the initial position and size of the command link window. The finction also specifies the command link window's parent and the command link window identifier.
The following sample of code shows one way in which a command link having the main title “My Command Link,” a default glyph and no subtitle can be displayed using the CreateWindow function.
In the above sample, “WC13 BUTTON” is a pointer to a class of windows. In this case, it is a pointer to a class of windows that are rendered as buttons. The parameter “TEXT(“My Command Link”)” specifies the text to be included as the main title of the command link. Alternatively, a pointer to a text string could be used. The flags “WS_CHILD” and “WS_VISIBLE” specify known window styles in existing versions of the WINDOWS OS (respectively, a child window and a window that is initially visible). The flag “BS_NOTIFY” also specifies an existing style (i.e., enabling a button to send BN_KILLFOCUS and BN_SETFOCUS notification messages to a parent window). The parameters “cxChar” and “cyChar+60” specify the initial position of the command link. The parameters “240” and “140” specify the width and height of the command link. The parameter “hwnd” is a handle to the parent or owner window of the command link (e.g., a dialog in which the command link is contained). The parameter “(HMENU)3” is a child window identifier used by a dialog box control to notify its parent about events (e.g., user selection, hovering of a cursor, etc.). The “hinstance” parameter can be ignored. The “BS_COMMANDLINK” flag specifies that a button should be rendered as a command link.
Set forth below is a sample of code which changes the glyph of the command link in Example (1) to “glyph.bmp”.
As persons skilled in the art will appreciate, the above code sample replaces the default glyph with “glyph.bmp” using existing PIs that could be used to associate images with conventional button controls. An alternative manner of replacing a default glyph with “glyph.bmp” (also using existing PIs) is set forth below.
Because a command link includes features not associated with conventional buttons, several programming interfaces are needed in addition to those used with conventional button controls. Specifically, conventional buttons only include a single text string, and do not have a subtitle. Attached hereto are Appendices A through F describing various macros and messages pertaining to the subtitle portions of a command link (a subtitle is referred to as a “note” in the appendices). Because these appendices will be understood by persons skilled in the art, extensive discussion is not included herein. However, set forth below is a sample of code using the “Button_SetNote” macro to specify “This is the subtitle” as the subtitle of the command link created in example (1) above.
Additional programming interfaces can also be used to specify that a command link should not contain a glyph. As but one example, a variable (e.g., “CommandLink Glyph”) could be included in a function call and given a value of “true” if a glyph is to be displayed or “false” if no glyph is to be displayed. As but another possible alternative, a value of “−1” or of some predetermined flag (e.g., “CL_NOGLYPH”) for buttonImageList.himl in example (3) could be defined as a request to not display a glyph.
As indicated above, a command link is automatically sized by the OS in at least some embodiments of the invention. If a command link is too small, there may be insufficient room for all specified text, and needed information may not be displayed.
If a command link is too large, the control may be aesthetically undesirable and/or waste screen area. In some embodiments, a command link either has a default or a specified width. Using that width, the OS then calculates an appropriate height for the command link. In at least some embodiments, an application can also ask the OS to report an ideal size for a command link. The existing BCM_GETIDEALSIZE message in various versions of the WINDOWS OS can be used for this purpose. When used in connection with a conventional button control, the BCM_GETIDEALSIZE message passes the OS a handle to a conventional button control for which an ideal size is to be calculated. In response, the OS calculates that size (based on the text and image list referenced with the passed button handle), and then returns that size to the calling application. In order to obtain the ideal size for a command link, the same BCM_GETIDEALSIZE message format can be used to pass a handle to a command link. In response, the OS calculates an ideal size based on predefmed values for command link margins (e.g., dimensions a-f in
Although specific examples of carrying out the invention have been described, those skilled in the art will appreciate that there are numerous other variations and permutations of the above described systems and techniques. These and other variations fall within the spirit and scope of the invention as set forth in the appended claims. As used in the claims, the phrase “data indicative of” includes pointers or other references to data located elsewhere, as well as the actual data itself. In the claims, various portions are prefaced with letter or number references for convenience. However, use of such references does not imply a temporal relationship not otherwise required by the language of the claims.
Appendix A
Button GetNote Macro
The Button_GetNote macro retrieves the note text. You can use this macro or send the BCM_GETNOTE message explicitly.
Parameters
The Button_SetNote macro sets the note text. You can use this macro or send the BCM_SETNOTE message explicitly.
Parameters
BCM_GETNOTELENGTH message explicitly.
Parameters
To send this message, call the SendMessage finction as follows.
Parameters
To send this message, call the SendMessage function as follows.
Parameters
To send this message, call the SendMessaze function as follows.
Parameters