⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wguistrg.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
📖 第 1 页 / 共 2 页
字号:
.chap The &company String Editor
.*
.if &e'&dohelp eq 0 .do begin
.section Introduction
.do end
.*
.np
.ix 'String Editor'
To group together text strings in your application, you can use string
tables. A string table is a list of strings such as error messages,
prompts, and other text you want your application to display. Each
string in the string table has a unique number, called an identifier,
associated with it. When the application presents the user with a
message, it searches for the appropriate identifier and displays the
associated string, regardless of the textual content of the string.
.np
The &company String Editor enables you to create string tables for your
application. The String Editor stores these tables in the resource file. You
can have multiple string tables in a resource file, which allows you to
logically group the text strings for your application. Since a string
table is simply another Windows resource that is separate from the
source code, you can use the String Editor to do such things as
translate your strings into another language or make your strings more
concise without having to change the source code.
.*
.section Using the String Editor
.*
.np
This section discusses the following topics:
.begbull $compact
.bull
Starting the String Editor
.bull
Quitting the String Editor
.bull
The String Editor Menu Bar
.bull
The String Editor Toolbar
.endbull
.*
.beglevel
.*
.section Starting the String Editor
.*
.np
.ix 'String Editor' 'start'
.ix 'start' 'String Editor'
The String Editor may be invoked in one of two ways. The first
involves first starting the Resource Editor then starting the String
Editor. The second way the editor may be started is from the &company IDE.
.np
To start the String Editor from the Resource Editor,
you must first open the Resource Editor.
How you proceed depends on whether you are
opening a new (empty) string table or an existing string table. The
String Editor works on resources found in resource files.
:CMT. This is a new screen snap shot
.figure *depth='3.20' *scale=53 *file='STR1' The String Editor window
.*
.beglevel
.*
.section Creating a New String Table
.*
.ix 'String Editor' 'create string table'
.ix 'String Table' 'create'
.begstep To create a new string table:
.step Double click on the Resource Editor icon
in your Windows Program Manager.
.result
The &company Resource Editor window opens.
.step Open a new or existing resource file.
.result
.if &e'&dohelp eq 0 .do begin
Refer to the chapter entitled :HDREF refid='resedit'. for more
information.
.do end
.step Choose New
from the Resource menu.
.result
A cascading menu appears from the New menu item.
.step Choose String
from the New cascading menu.
.result
The &company String Editor window opens which contains an empty Strings list.
.endstep
.*
.section Opening an Existing String Table
.*
.ix 'String Table' 'open'
.ix 'String Editor' 'open existing table'
.begstep To edit the contents of an existing string table:
.step Double click on the Resource Editor icon
in your Windows Program Manager.
.result
The &company Resource Editor window opens.
.step Open an existing resource file.
.result
.if &e'&dohelp eq 0 .do begin
Refer to the chapter entitled :HDREF refid='resedit'. for more
information.
.do end
The Resource window for the existing resource file displays buttons
representing each existing resource type.
.step Select the string table button
to view all existing string tables.
.orstep Choose Menu
from the cascading menu that appears when you choose View from the
Resource menu.
.result
The String Tables list appears revealing all string tables in this resource file.
.step Double click on the existing string table you want to open.
.orstep Click on the desired string table
to select it, then
.bd choose Edit from the Resource menu
on the &company Resource Editor window.
.result
The &company String Editor window opens and displays the existing string
items for the selected string table.
.endstep
.*
.endlevel
.*
.section Quitting the String Editor
.*
.np
.ix 'String Editor' 'leave'
.ix 'leave' 'String Editor'
To exit the String Editor, choose Exit from the File menu of the &company String
Editor window.
.np
If you made changes to strings but did not save the information, a
message box prompts you to save before exiting. Choose Yes to save the
changes and exit the String Editor, No to exit the String Editor
without saving the changes, or Cancel to return to the String Editor.
.np
When you exit the String Editor, the application remembers the
directory in which you last opened or saved a string table (not the
resource file). The next time you open a string table, the last directory
accessed appears in the File Selection dialog so you do not have to
reenter its path. This feature makes the String Editor more convenient
and efficient to use.
.*
.section The String Editor Menu Bar
.*
:CMT. This is a new screen snap shot
.figure *depth='1.67' *scale=66 *file='STR2' The String Editor menu bar
.np
.ix 'String Editor' 'Menu bar'
.ix 'Menu bar' 'String Editor'
The menu bar consists of the following five menus:
.begpoint $break
.point File
Clear and save the string table, and exit the String Editor
.point Edit
Access the clipboard functions, hide or show the toolbar, and delete a
string item
.point Resource
Change the string table memory flags and copy it into another resource file
.point String
Insert a new string item
.point Help
Access on-line help information
.endpoint
.np
To see the function of an item in the menu bar, position your cursor
over the item and hold down the mouse button. A description of the
item appears in the status line at the bottom of the screen. If you do
not want to select the menu item, drag the cursor off of the menu item
before releasing the mouse button.
.*
.section The String Editor Toolbar
.*
.np
.ix 'String Editor' 'toolbar'
In the &company String Editor window, the toolbar appears below the menu
bar. When the toolbar is shown choose Hide Toolbar from the Edit menu
to hide it. When the toolbar is hidden you can display it by choosing
Show Toolbar from the Edit menu.
:CMT. .figure *depth='4.86' *scale=180 *file='STR2' You can access seven String Editor functions from the toolbar.
.figure *depth='0.88' *scale=76 *file='STR3' You can access seven String Editor functions from the toolbar.
.np
The following explains the function each toolbar button performs,
as well as the equivalent menu item.
.begpoint
.point Clear
Clear the string table. This is equivalent to the item Clear in the
File menu.
.point Update
Update the resource file with this string table. This is equivalent to the
item Update in the File menu.
.point Cut
Cut the current string table to the clipboard. This is equivalent to
the item Cut in the Edit menu.
.point Copy
Copy the current string table to the clipboard. This is equivalent to
the item Copy in the Edit menu.
.point Paste
Paste the string table from the clipboard to the current string table.
This is equivalent to the item Paste in the Edit menu.
.point Insert
Insert the new string item into the string table. This is equivalent
to the item Insert New Item in the Strings menu.
.point Delete
Delete the selected string item from the string table. This is
equivalent to the item Delete in the Edit menu.
.endpoint
.np
To see the function of an item in the toolbar, position your cursor
over the desired button. A description of the button's function
appears in the status line at the bottom of the window.
.*
.endlevel
.*
.section Using the String Editor Window
.*
.np
.ix 'String Editor' 'window'
The &company String Editor window contains a menu bar, toolbar, and
status line to help you create and edit string items. The rest of the
window, the workspace, is divided into four sections:
.begbull $compact
.bull
String Text Field
.bull
String ID Field
.bull
Action Buttons
.bull
Strings List
.endbull
:CMT. .figure *depth='4.86' *scale=180 *file='STR2' The &company String Editor window contains a menu bar, toolbar, workspace, and status line.
.figure *depth='3.20' *scale=53 *file='STR4' The String Editor window contains a menu bar, toolbar, workspace, and status line.
.*
.beglevel
.*
.section String Text Field
.*
.np
The String Text field in the &company String Editor window contains the
text for the string item you are defining. Whatever appears in this
field will appear in your application.
.*
.section String ID Field
.*
.np
.ix 'String ID field'
.ix 'String Editor' 'String ID field'
The two String ID fields contains:
.begbull $compact
.bull
the identifier associated with the string item
.bull
the symbol information for the specified string
.endbull
.np
Creating a string item automatically creates a relationship between
the string item and its identifier, the String ID. In your source code
you reference the string item by its String ID.
.begnote
.note Note:
Both String ID fields currently contain the same numerical information
because the String Editor does not yet support symbols.
.endnote
.*
.section String Editor: Action Buttons
.*
.np
.ix 'Action Buttons'
.ix 'String Editor' 'Action Buttons'
The action buttons control how the information in the attributes area is
handled by the editor.
The Insert button will use the contents of the
attributes area to create a new entry in the string table.
The Change button will use the contents of the
attributes area to modify the current entry in the string table.
The Reset button will discard the contents of the
attributes area and reset them to those of the current entry in the
string table.
The Insert button is the default button when the ENTER key is pressed
and no other button has the focus.
.*
.section Strings List
.*
.np
.ix 'Strings List'
.ix 'String Editor' 'strings list'
The Strings list displays all of the string items in the current
string table. The string items appear in ascending numerical order by
String ID.
.*
.endlevel

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -