The status bar of the Microsoft Word text editor. What is the Android status bar? What is displayed in the window status bar

  • Date: 21.11.2021

5.5. INSTRUMENT PANEL AND STATUS BAR

Toolbar (Toolbar ) and status bar ( Status Bar ) - this is special new user interface components for creatingfunction-oriented sets of controls. Tool panelcops contains, as a rule, controls that provide quickaccess to the most frequently used commands or object properties. RazliThere are several types of toolbars, focused on the use inspecific applications. Such specialized panels sometimes haveown names (fig. 5.31).

Rice. 5.31. Toolbar examples

The status bar is a special area within the primary window (usuallyat the bottom of it), designed to display information about the current state the names of objects or processes presented in the window, as well as any other contextlocal information, for example, about the state of the keyboard (Fig. 5.32). You can like thisuse the status bar to provide help messagesabout the selected menu item or toolbar button. Like the inst panel ruments, the status bar may contain controls; however, it is recommended to include read-only or non-interactive information. creative elements.

Accessing controls included in a toolbar or strobeku state, implemented either with the mouse, or through other standard means of interaction with these elements. Keyboard interaction based on the use of hotkeys or keys can also be implemented.vis access. If a toolbar or status bar item does not have text label, keyboard accessors for it are ineffective tive. Also, if any access key is already in use in the lane in the private window, it cannot be used to operate the toolbar. On example if the primary window's menu bar is already using some keyaccess, then all events associated with this key will be processed for examplespecific to the menu bar.

Rice. 5.32. Status bar implementations

When a user interacts with a control locatedon the toolbar or status bar, any change is immediate but refers to the current selection (for example, if the toolbar button is before assigned to change the font style in the text, then when this button is pressed the text changes immediately); no further confirmation is required. The only exception is when using the elementcontrol (for example, buttons), requires the user to enter an additionalinformation; the corresponding operation cannot be implemented until the userthe user does not enter the required information. An example of such an exception is selecting an object or setting a parameter value using the dialog box.

For those items in the toolbar or status bar that do not havetext label, a tooltip must be used. The system supports the creation of tooltips for the elements of the standard toolbar.

In order to provide maximum flexibility in the work of panel usersinstruments and status bars must be customizable.The simplest way to do this is to hide (not show) these interface elements. In more complex applications, the user is provided You have the right to change or rearrange items included in toolbars or status bars.

It is also recommended to provide the ability to display each buttonon the toolbar at least two sizes: 24 by 22 and 32 by 30 pixelsfishing. If graphic labels are used to denote buttons, they should be no more than 16 by 16 and 24 by 24 pixels, respectively.

Consider also creating a user-relocatable paneltools. Although the default toolbar appears as at docked to a specific edge of the window or panel in which it is used,allow the user to move it to the other edge or display it as a windowpalette (fig.5.33).

Rice. 5.33. Floating toolbar

To move the toolbar, you need to set the pointer on any free area of ​​the panel and, by clicking the LMB, drag it to a new one a place. If the new position is within hot zone edge of the window, atthe position should automatically dock the panel to the edge of the window (after as the user releases the mouse button). If the new position is outside the window edge hot zone, the toolbar is converted to a palette window. To re-dock the panel to the edge of the window, the user must setchange the pointer on the title bar of the palette window and, by pressing LMB, movethis window until the pointer is in the hot zone; when the user releases the mouse button, the toolbar is displayed in the docked with standing.

Provide visual feedback as you move the toolbar.link by displaying, for example, the movement of a toolbar outline. When the pointer enters the hot zone of the window, reshape the toolbar accordingly so that the user can visually controlration operation (fig. 5.34).

Rice. 5.34. Visualization of toolbar movement

You can also support customization for the toolbar. other options, such as resizing the toolbar. cops, joining several panels, placing them in the required order, etc.

It is not recommended to include in the toolbar and status baritems that the user cannot otherwise access. exceptaddition, always keep the current position, size and other information about the panel tools and status bar so that they can be restored to as it was when the user reopens the application window.

The status bar also supports the ability to include regulatorto calibrate the window size described in chapter 4. When implementing this possibility, the following should be borne in mind.

It is impossible to simultaneously display the controller in two positions: in the status lineand at the intersection of the window's scroll bars (in its standard position). When on the screen displays a status line containing a regulator, then it must be removed from the standard position; if the user removes the status bar, restore the knob to its standard position.

STANDARD TOOL PANEL BUTTONS

Tab. 5.6 illustrates standard formats for "general purpose" buttons. which can be used in any application.

Table 5.7.

Standard toolbar button formats

Format 16x16

Format 24x24

Function

Create (New)

Open

Print

Preview ( Print Preview)

Undo

Redo

Cut

Paste

Copy

Delete

Find

Replace

Bold [italic] ( Bold)

Italic

Underline [font]

Properties

What is this? [context sensitive prompt mode] ( What’s This)

Open parent folder ( Open parent folder)

Display as large pictograms ( View as large icons)

Display as small pictograms ( View as small icons)

Display as a list ( View as list)

Display as a table ( View as details)

Select (select) area ( Region selection tool)

Use the above images only for the description describedfunctions. Consistency in their use allows the userapply knowledge and skills gained while working with one software productvolume in any other. If one of the standard icons is used to indicate a different function, it can confuse the user. When designing your own toolbar buttons, follow the standard system conventions discussed earlier.

Status bar contains information about the position of the text cursor in the document and the mode of the editor. It is always located at the bottom line of the Word window and is divided into three zones.

On the left is a zone indicating the position of the cursor relative to the document. In it:

The next zone gives the position of the cursor on the current page:

The first two parameters appear in the mode view page markup, third at typing visible text.
The last zone is the editing modes. Here:

Enabling / disabling each mode can be carried out by double-clicking the left mouse button in the area of ​​this mode.

The presence of the status bar is controlled by a dialog Options which is called from the menu WITH service team NS parameters ...... Bookmark View of this dialog contains a "Window" section with a "status bar" parameter.

34. Microsoft Word text processor - window structure, main toolbars. Why is Microsoft Word a processor and not an editor?

The word processor Microsoft Word 2003 is one of the main components of Microsoft Office 2003. The word processor allows you to create, edit, save, view and print text documents, apply formatting to characters, paragraphs, pages, sections and the document as a whole, assign existing character styles, paragraphs, tables and create your own styles. In addition, you can create tables, pictures, charts, formulas, and more in Word.

Microsoft Office 2003 application windows use standard controls or graphical interface components that are combined into larger structures (menus, toolbars, dialog windows) and which provide the ability to control the application window, as well as change the content and form of presentation of information displayed in the window document.

There are four types of windows in Microsoft Office 2003: application windows; document windows; dialog boxes; forms. The document window is displayed in the application window.

Microsoft Office 2003 applications are managed using menus and toolbars. Three types of menus are used in Microsoft Office 2003 applications: the menu bar (the main application menu or drop-down menu); context (pop-up) menu; window (system) menu to change the size and position of the application window.

A toolbar is a string that contains (the most commonly used commands) buttons or icons and drop-down lists. The toolbar provides quick access to commands.

35. Types of operating systems. Operating system WINDOWS - main features.

Types of operating systems by data processing method:

· Batch processing OS(batch) - to perform specific tasks, there are corresponding programs that are executed sequentially. The user does not have the ability to interfere with the course of execution, in other words, there is no interactivity in such operating systems. New jobs are added to the queue and executed sequentially.

· Time-sharing OS(time-sharing) - the OS divides the processor time into intervals that are allocated to application programs according to preset rules. Time-sharing OS allows you to run multiple applications at the same time (mutlitasking) and run multiple users at the same time on the same computer. Time-sharing OSs are interactive. Modern operating systems are built using time-sharing technology.

· Real time OS(real-time) - designed for mission-critical applications where the accuracy of the response time is important. Such applications include medical tracking systems, anti-lock braking systems in cars, control systems for nuclear power plants, etc.

Graphical (with the presence of a graphical user interface - GUI) - text (command line only);
free - paid;

Open (with the ability to edit the source code) - closed (without the ability to edit the source code);

Client - server;

High stability (resistance to hardware failures) - low stability;

Easy to administer (for an ordinary user) - complex, for system administrators;

16-bit - 32-bit - 64-bit (in the distant past, there were also 8-bit);

With a high level of data security - with a low level of security;

Operating system concept

There are two groups of OS definitions: "a set of programs that control equipment" and "a set of programs that control other programs." Both of them have their exact technical meaning, which, however, becomes clear only with a more detailed consideration of the question of why operating systems are needed at all.

Windows performs the following main functions:

· Convenient, intuitive graphical user interface.

· Multitasking work, i.e. execution of several programs at the same time.

· Unification of the use of computer hardware resources.

Windows features:

· Program writing rules... To work in a Windows environment, a program must be written according to certain rules that differ significantly from those used in MS-DOS.

Windows also allows programs written for MS DOS to run, but programs cannot take advantage of Windows.

· Graphical interface user interface in Windows is based on the idea of ​​a windowed interface, which is also adopted in a number of other modern operating systems (for example, UNIX). Each program has its own window in which messages are exchanged with the user. For clarity, icons (pictograms) depicting individual programs are widely used in Windows.

In addition, the Windows interface is largely standardized, making it easier for users to learn new thresholds.

· Multitasking... The multitasking mode of operation allows you to run several applications at the same time, for example, a word processor, database, game, and switch between them.

· Data exchange between applications... In addition, the exchange of data between applications is possible, which allows, for example, information created in a spreadsheet to be transferred to a text document via the clipboard.

LPTBNOTIFY ptbn = (LPTBNOTIFY) lParam; switch (ptbn-> iItem)

lstrcpy (ptbn-> pszText, "Help"); ptbn-> tbButton.iBitmap = STD_HELP; ptbn-> tbButton.idCommand = 11; ptbn-> tbButton.fsState = TBSTATE_ENABLED; ptbn-> tbButton.fsStyle = TBSTYLE_BUTTON; ptbn-> tbButton.dwData = 0; ptbn-> tbButton.iString = 10;

return 1; case 1:

lstrcpy (ptbn-> pszText, "Delete"); ptbn-> tbButton.iBitmap = STD_DELETE; ptbn-> tbButton.idCommand = 12; ptbn-> tbButton.fsState = TBSTATE_ENABLED; ptbn-> tbButton.fsStyle = TBSTYLE_BUTTON; ptbn-> tbButton.dwData = 0; ptbn-> tbButton.iString = 11;

return 1; default:

If you already have an array of TBBUTTON descriptions, then the quickest way to respond to this message is to use the memcpy function to copy TBBUTTON for each message it receives. Here's how the GADGETS program does this:

lstrcpy (ptbn-> pszText, GetString (ptbn-> iItem)); memcpy (& ptbn-> tbButton, & tbb, sizeof (TBBUTTON));

Status bar

Status bars are information-only windows, often located at the bottom of the main program window. The most common use of the status bar is to display detailed descriptions of menu items as the user views them, just as a waiter comments on a particular menu item in a restaurant. When the menu is not being viewed, programs often display related information in the status bar. The status of the shift keys is also often displayed.

- , , ... In word processor programs, the current page, row, column is also often displayed.

The status bar can operate in two modes, so it can be used to describe menu items and display other program information. In menu item description mode ("simple mode"), the status bar expands to display a simple line of text. In the mode of displaying the program status, one or more windows are displayed in the status bar, each of which is called a "part" of the status bar. A specific portion of the status bar can be created as a niche with a border that appears raised above the surface of the status bar window, or without a border. It is also possible to add child windows such as a clock or a progress bar to the status bar. When you switch the status bar from simple mode to program state display and back again, the status bar retains one set of hidden windows while another set of visible windows is displayed.

Creating a status bar

The simplest way to create a status bar is to call the CreateStatusWindow function:

hwndStatusBar = CreateStatusWindow (

WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | CCS_BOTTOM, "Ready", hwndParent, 2

This function calls the CreateWindow function, which creates a child window with a parent window, hwndParent, with the window text "Ready" (this text appears in the first window of the status bar), an ID of 2. Window style flags are specified in the first parameter.

The table below provides a description of all the style flags that can be used to create a useful status bar. You will probably need to use the SBARS_SIZEGRIP flag most often, because it sets the display of the diagonal hatch in the right corner of the status bar. The rest of the style flags modify the initial state and location of the status bar so that it can be in a different location than at the bottom of the parent window's client area, as determined by the CCS_BOTTOM flag.

Style flag

Description

Performance

Displays a diagonal hatch in

the right corner of the status bar. This area

serves to resize the parent

Initial position

Places the status bar at the top

parent window.

Places the status bar at the bottom

parent window (default).

Prevents movement about the y-axis.

Prohibition of automatic

CCS_NOPARENTALIGN

The status bar sets its height

resizing and

(cy). But does not set its location

location

(x, y) and width (cx). For the appropriate

processing is necessary after creation

send a message about resizing.

Prohibits all automatic movements and

resizing. It prohibits

the following style flags: CCS_TOP,

CCS_BOTTOM, CCS_NOMOVEY and

CCS_NOPARENTALIGN. You must explicitly

set the size and position of the status bar.

Moving and resizing the status bar

When the parent window of the status bar is resized (when a WM_SIZE message is received), the status bar must re-position and resize to stay at the bottom of the parent window's work area. The toolbar resizes in response to the TB_AUTOSIZE message (see earlier in this chapter). The status bar does not have a similar message. Instead, it uses something like the following:

int cxParent = LOWORD (lParam); int cyParent = HIWORD (lParam); int x, y, cx, cy;

// Leave the height of the status bar window unchanged

GetWindowRect (hwndStatusBar, & rWindow); cy = rWindow.bottom - rWindow.top;

y = cyParent - cy; cx = cxParent;

MoveWindow (hwndStatusBar, x, y, cx, cy, TRUE);

This code keeps the height of the status bar unchanged, and modifies its width and position to fit into the desired position on the stage of the parent window.

Supports menu browsing

Users expect Windows programs to display auxiliary information in the status bar about what function a particular menu item performs. Even the casual Windows user quickly learns that there is a much broader effect underneath a single-word menu item. Although experienced users can easily understand the meaning of standard menu commands, sometimes they have to spend a lot of effort to understand the meaning of specific menu items of a particular program.

The window menu sends a WM_MENUSELECT message when the user views menu items and a WM_COMMAND message when the user selects a menu item (see Chapter 10). To support displaying auxiliary information about menu items, process the message

To simplify the process of handling this message and displaying text in the status bar, the shared control library supports the MenuHelp function. This function assumes that there is a table of strings that contains texts of auxiliary information to be displayed, and a data structure that associates menu items with identifiers of text strings from the table. The MenuHelp function is defined as follows:

The first parameter, uMsg, must be equal to WM_MENUSELECT, although the presence of this parameter (and its description in the Win32 documentation) indicates that the processing of the WM_COMMAND message was laid down during the development of the function. The wParam and lParam parameters of the window procedure are passed as the second and third parameters. Taken together, these three parameters describe which part of the menu system the user is viewing, and whether it is an item, a pop-up menu, or a system one.

The sixth parameter, hwndStatus, is a handle to the status bar window. The MenuHelp function sends a status bar-specific SB_SIMPLE message to set the status bar to single window (simple) mode and to display the appropriate text. Later, when the user stops browsing, the MenuHelp function sends another SB_SIMPLE message to return the status bar to multi-window (tricky) mode.

The MenuHelp function uses three other parameters — hMainMenu, hInst, and lpwIDs — to determine which row to display when viewing a menu item. The hInst parameter identifies a module, which can be a DLL instance descriptor or an executable instance descriptor, and is the owner of the table containing the menu strings (which you might assume are loaded using the LoadString function).

The ability to make the MenuHelp function work correctly is to pass the correct value in the fourth and seventh parameters: hMainMenu and lpwIDs. Setting these values ​​correctly is a bit of a trick, as there are three elements to consider: the command menu, the popup menu, and the system menu. Another complication is that the Win32 documentation says that lpwIDs is an array that the MenuHelp function looks for. While it makes sense to use an array to store the underlying values ​​of the string resources, you will have to parse the array yourself, since the MenuHelp function does not.

View menu items

The MenuHelp function calculates a string resource ID for a menu item by appending the command ID value (derived from the low-order word wParam) to the value referenced by lpwIDs. For example, the following call to the MenuHelp function displays string resource 125 on the status bar:

UINT uiStringBase = 100; WPARAM wParam = 25;

MenuHelp (WM_MENUSELECT, wParam, lParam, NULL, hInst, hwndStatus, & uiStringBase);

As shown in the example, the hMainMenu menu handle can be NULL to display command menu items because the MenuHelp function does not use this value for calculation.

The easiest way to match command menu items and string resources is to assign the same values ​​to them. This will set the base of the string to zero and ignore it.

View pop-up menu items

For a pop-up menu, the MenuHelp function calculates the resource string to display in the status bar by adding the (zero-based) index of the pop-up menu to the value referenced by lpwIDs. For this to work correctly, the fourth parameter of the MenuHelp function, hMainMenu, must be set to the handle of the window's popup menu's parent. The structure below provides a convenient way to map menu descriptors to a string resource base:

typedef struct tagPOPUPSTRING

HMENU hMenu; UINT uiString;

In the GADGETS program, in which three menu items contain pop-up menus, this data structure is defined as follows:

POPUPSTRING popstr;

and is initialized when the status bar is created like this:

GetMenu (hwndParent);

IDS_MAIN_MENU;

GetSubMenu (hMainMenu, 2);

IDS_TOOLBAR_MENU;

GetSubMenu (hMainMenu, 3);

IDS_STATUSBAR_MENU;

When the WM_MENUSELECT message is received, the lParam parameter contains the parent window's menu handle. The MenuHelp function's job of finding the correct string resource requires you to search the array and pass the address as the last parameter to the MenuHelp function. The following is how this is done in the GADGETS program:

if ((fuFlags & MF_POPUP) && (! (fuFlags & MF_SYSMENU)))

for (iMenu = 1; iMenu< MAX_MENUS; iMenu++)

For this to work correctly, hMainMenu must be set to the parent menu handle of the popup menu. While we were looking at handling our popup menus, we completely forgot about the system menu.

Viewing the system menu

The MenuHelp function provides status bar indications of auxiliary information for the system menu and system menu items. All that is needed for this are the WM_MENUSELECT message parameters wParam and lParam in the same form as for other types of menu items. In addition, the hMainMenu value must not be equal to the actual system menu handle; NULL is fine.

Now let's combine all of these fragments for menu items, pop-up menus, and system menus. Below is code to illustrate how the GADGETS program processes the WM_MENUSELECT message in order to display auxiliary information on the status bar:

LRESULT Statusbar_MenuSelect (HWND hwnd, WPARAM wParam, LPARAM lParam)

UINT fuFlags = (UINT) HIWORD (wParam); HMENU hMainMenu = NULL;

// Handle non-system popup menus if ((fuFlags & MF_POPUP) && (! (FuFlags & MF_SYSMENU)))

for (iMenu = 1; iMenu< MAX_MENUS; iMenu++)

if ((HMENU) lParam == popstr.hMenu)

hMainMenu = (HMENU) lParam; break;

// Display auxiliary information in the status bar

MenuHelp (WM_MENUSELECT, wParam, lParam, hMainMenu, hInst, hwndStatusBar, & ((UINT) popstr.hMenu));

Status bar

At the bottom of the window there is a status bar (Fig. 1.39). This is another interface element that has undergone changes and improvements in Word 2007.

Rice. 1.39. Status bar


In addition to traditional document data (the total number of pages in the document and the current page number), new items have appeared on the status bar in Word 2007.

Almost all of the information blocks on the status bar are buttons designed for quick access to commands. When you click on the button with the number of pages, the Find and Replace window opens, allowing you to quickly jump to another page in the document. Clicking on the button with the number of words opens the document statistics window, which shows the number of lines, paragraphs, characters without spaces and with spaces. This is very useful when writing articles and abstracts. In previous versions of Word, invoking the statistics window was much less convenient.

If Word has not found any spelling errors in the document, then the spelling check icon is named Spelling errors not found and looks like an open book with a green "birdie". If Word considers some words in the document to be mistaken, then this icon takes the form of a book with a red cross and its name changes to Spelling errors found, click to fix it. When you click on this icon, Word sequentially selects misspelled words in the text and displays a context menu containing options for actions with this word (Fig. 1.40). If there are similar words in the Word dictionary, they are displayed in this menu. If you click on a word in the menu, it will be inserted instead of the erroneous one. Using this menu, you can also skip the current misspelled word and go to the next one, skip all similar misspelled words, or add a word to the program dictionary. This is a very useful feature, since although the Word dictionary is quite extensive, it often does not contain quite common words. This function is especially relevant if you often work with specialized texts, such as medical or technical. After adding a word to the dictionary, it will not be considered erroneous.

Rice. 1.40. Context menu for the misspelled word


If you click on the button that shows the current language of the document, a window for selecting the language in the current document for which the spelling will be checked will open (Fig. 1.41).

Rice. 1.41. Language selection window


In Word 2007, the buttons for switching document view modes have moved to the status bar (in previous versions of Word, they were located to the left of the scroll bar) (see Fig. 1.39). These buttons allow you to select the document view mode: Page Layout, Reading View, Web Document, Outline, and Draft. Various document display modes are used to change the way the user perceives information. These modes are described in more detail in Sec. 2.4.

The Word 2007 status bar now has tools for zooming in on a document. If you click on the image of the current document scale, a dialog box will open in which you can select the desired scale from the proposed values ​​or specify an arbitrary one. In addition, you can change the scale using the slider by dragging it to the left or right to zoom in or out, or by clicking on the round minus or plus buttons. In this case, the scale will decrease or increase by 10%.

If you find it uncomfortable to change the scale using the slider or you never use the button to check spelling, you can remove these blocks from the status bar. In Word 2007, you can customize the commands assigned to it. To do this, right-click on it. In the menu that appears, you can not only disable the display of unnecessary commands, but also enable those that are inactive by default, but may be useful for you (Fig. 1.42). For example, you can turn on the display of the row number, section number, column number, Caps Lock key press, and so on.

Rice. 1.42. Status bar setup menu


Advice

If you have any questions regarding the topics discussed in this chapter, refer to Sec. 11.3 - perhaps you will find the answer to your question.

Status bar displays various current document information and provides access to some Outlook features.

Status bar customization carried out by clicking on it with the right mouse button, which will open an additional dialog box:

Formatted page number- shows the number that is on this page.

Chapter- the ordinal number of the section in which you are located.

Page number- serial number of the current page and the total number of pages.

Vertical position on the page Is the distance from the top edge where the cursor is.

Line number- the ordinal number of the line in which the cursor is located.

Column- ordinal number of the column in which the cursor is located.

Number of words- the total number of words in the document.

Spell checker- shows if there are errors in the document.

Language- indicates which keyboard layout is active.

Bug fixes- Indicates if patch mode is enabled.

Caps lock- indicates if Caps Lock is on.

Replacement- mode change between insert and replace.

View mode shortcuts- allow you to switch between Reading View, Page Layout and Web Document.

Scale slider- allows you to increase or decrease the size of the text. You can use the "+" and "-" buttons, or just move the slider to the right and left.

Scale- allows you to customize the view in more detail.

When you click on the button indicating the percentages, a dialog box will open in which the following settings are available:

  • Setting the scale (both preset options and arbitrary);
  • Placement of the window on the screen (by the width of the page, by the width of the text, the whole page, several pages);