Home |
Project Window |
Project WindowThe Window Builder project window is where all information global to the project is maintained. A project consists of any number of source files and associated classes, along with fonts, images, and strings. While it is possible to use multiple project files for a single system, this is discouraged since there is no way in this case for PEG WindowBuilder to prevent the duplication of source code or data. The Project Window Source view displays a tree structure of the top-level windows and each of their child controls. This is the default view to use while creating and editing a new window. To modify the properties of any graphical element, select that element either in Project Window Source view, or, if the element is visible, select the element directly by clicking on it in the Target screen window. Internally, the Project window directly corresponds to and continuously updates the Window Builder project file with extension .wbp (Window Builder Project). The Project window contains a command menu and a PegNotebook control described in the following sections. New/Open/Save/CloseThese commands create, open, save, or close a project file. Add ModuleThis command adds a new source module to the current project. One or more source modules must be added to a new project before you can edit it with Window Builder. The Source page of the notebook must be selected for this command to be active. Import ModuleThis command allows you to import a source module from a second WindowBuilder project. This facility is used to merge project files created by separate developers working on a common project. Add ImageThis command adds a new image to the current project. After an image has been added, it can be used to fill the client area of various controls. The source for the image must be a .BMP (Windows Bitmap), .GIF, .JPG, or .PNG file. Window Builder uses RTPEG-32's run-time image conversion classes that are included with the library to read, decompress and process these images. When you update your output image file, these images will be saved in C++ data array format. The Image page of the notebook must be selected for this command to be active. Add FontThis command is used to add a custom font. Once a font is added, it can be applied to any text-related object simply by dragging the font from the Preview window to the object that should be assigned the custom font. The input for adding a font should be a C++ font file created with FontCapture. The Fonts page of the notebook must be selected for this command to be active. Update | Current Source ModuleThis command instructs Window Builder to update the currently selected source and include files to reflect the changes in the current project. Please refer to section Source Code Generation for details. Update | All Modified Source ModulesThis command instructs Window Builder to update all source modules that have been modified. Before the source files are updated, backup copies are saved to the Backup directory unless this directory has been set to NULL. Update | Generate Image FileThis command instructs Window Builder to re-process all input image files, and save the resulting PegBitmap information to the C++ image file in the source directory. Note that the output image file is completely regenerated each time an image update is performed. If the target system supports 256 or more colors, Window Builder will scan each image in the project, create an optimal palette for displaying those images, remap the image colors back to the optimal palette, RLE (run-length encoding) compress each image, save the custom palette, and save each newly-encoded image file in C++ style source data structures. For 16 color targets, the Update Images command is slightly less complex. In this mode, Window Builder dithers each image to a fixed orthogonal 16-color palette, RLE compresses the images for which this is memory efficient, and saves the resulting bitmaps in C++ style source data structures. For 2 and 4 color targets, the Update Images command simply saves each image in the selected format. String Table | String Table EditorThis command brings up the string table edit window. This window allows you to define the literal strings and string IDs used for each language in the system. The string table is described in detail in a later section, String Table. String Table | Generate String File in Source FormThis command instructs Window Builder to re-create the string data table and associated string ID header file. Note that this file is completely regenerated each time the Update Strings command is issued, and it is therefore not advisable to manually edit the generated string data files. String Table | Export as Unicode Text FileThis command instructs Window Builder to export the string data in a Unicode text file format that can be opened and edited by any external program that supports the Unicode text file format. String Table | Import Unicode Text FileThis command instructs Window Builder to read a Unicode text file and import new string translations from the imported file. When executing this command, Window Builder searches the imported file for StringID names that match existing entries in the string table. When matching StringID names are found, the literal string entries for each language are imported into the Window Builder string table. Note that the Unicode text file must be in the exact format produced by Window Builder during the export operation for this command to be utilized correctly. There is no standard format for Export and Import of string data in Unicode text file format.
|