| NAB plug-in for MWT user guide June 21, 2006 |
Contents
![]()
|
Chapter 3 Views
3.1 Name and Function of Each View
This tool offers a variety of work windows, which are referred to as views.
The following table lists views offered by this tool and outlines their functions.
|
View name |
Functional outline |
|
[C/C++ Projects] |
Displays a list of existing projects in the workspace in use. |
|
[NAB/MWT Tree] |
Displays a tree of existing instances in the project being edited. |
|
[NAB/MWT List] |
Displays a list of the child instances under the selected instance. |
|
[NAB/MWT Editor] |
Enables screen elements of an active window to be allocated and edited visually with mouse operations on a visual representation of the screen. |
|
[NAB/MWT Properties] |
Enables instance properties to be specified. |
|
[NAB/MWT Procedures] |
Enables event procedures to be specified and edited. |
|
[NAB/MWT Attributes] |
Enables instance attributes to be specified. |
|
[NAB/MWT Object Box] |
Enables a class to be selected for an instance allocated in the [NAB/MWT Editor] view. |
Figure: Views and their default positions

You can move and close views on Eclipse. Also, Eclipse can retain the current status of a view and display the view in the same status the next time that Eclipse starts.To reset a view to its default values, select [Reset Perspective] from the [Window] menu.
3.2 [C/C++ Projects] View
Figure: [C/C++ Projects] view

This view displays a list of existing projects in the workspace in use.
Resources such as files in projects are displayed in a tree-like structure.
The [C/C++ Projects] menu contains a menu and icons for project operations.
|
Item |
Functional outline |
|
New |
Creates a project/application window. |
|
Copy |
Copies the selected project. |
|
Paste |
Pastes a copied project. |
|
Delete |
Deletes the selected project. |
|
Move |
Moves the selected project. |
|
Import |
Imports a NAB/MWT project file or WideStudio/MWT project file. |
|
Export |
Exports a NAB/MWT project file or WideStudio/MWT project file. |
|
Close Project |
Closes the selected project. |
|
Open Project |
Opens the selected project. |
|
Properties |
Makes settings for an environment to build the selected project. |
3.2.1 General operations and settings
Projects can be used and settings can be made for them in the same way as JDT and CDT projects on Eclipse.

For details on [Properties] settings of this tool, see Section 4.1, "Setting Up a Build Environment."
3.2.2 Importing a project
3.2.2.1 Importing a NAB/MWT project file
This section explains the procedure for importing a NAB/MWT project file.
Procedure
- Select [Import ...] from the [File] menu.
Figure: Selecting [Import...]

- Select [Existing Projects into workspace] in the [Import...] dialog box, and click the [Next] button.
Figure: [Import...] dialog box

- Select [Browse...] next to the [Select root directory] text box in the [Import...] dialog box. And, select the folder of the workspace or the NAB/MWT project.
Figure: [Import...] dialog box

- From the list of NAB/MWT projects in the [Project...] area in the [Import...] dialog box, select the project to be imported, and click the [Exit] button.
Figure: Example of selecting the Hello2 project

- The imported project is displayed in the [C/C++ Projects] view.
Figure: Selecting the Hello2 project (example)

3.2.2.2 Importing a WideStudio/MWT project file
This section explains the procedure for importing a WideStudio/MWT project file.
Procedure
- Select [import ...] from the [File] menu.
Figure: Selecting [Import...]

- Select [WideStudio/MWT Project] in the [Import...] dialog box.
Figure: [Import...] dialog box

- Click the [Browse...] button to the right of [WideStudio/MWT Project file] in the [Import WideStudio/MWT Project] dialog box. And, select a WideStudio/MWT project file.
If the file uses another programming language, select the language in the [Programming language] text box.
Figure: [Import...] dialog box

- Click the [Exit] button in the [Import WideStudio/MWT Project] dialog box.
Figure: Selecting the sample project "Hello" (example)

- The imported project is displayed in the [C/C++ Projects] view as shown below.
Figure: View displaying the sample project "Hello" (example)

3.2.3 NAB/MWT project files
This section looks briefly at files created by the application builder.
To create a project and develop an application, different types of files must be created.
|
File name |
Description |
|
.project |
Standard Eclipse project file |
|
.cdtproject |
CDT project file |
|
project-name.prj |
Project settings |
|
project-name.cpp |
Source file automatically created during compilation |
|
project-name.wns |
Retained list of registered windows in a project |
|
project-name.col |
Retained user-defined color settings of a project |
|
application-window-name.win |
Retained information on an application window configuration |
|
application-window-name.cpp |
Source file automatically created during compilation |
|
event-procedure-function-name.cpp |
Source file of a registered event procedure |
3.3 [NAB/MWT Tree] View
Figure: [NAB/MWT Tree] view

This view displays a hierarchical list of created application windows and allocated instances in one of the application windows.
An instance at the top of the tree is treated as an application window.
The [NAB/MWT Tree] view contains a menu and icons for instance operations.
|
Item |
Functional outline |
|
Display |
Displays an application window. |
|
Dismiss |
Hides an application window. |
|
Save |
Saves an application window. |
|
Copy |
Copies the selected instance. |
|
Paste |
Pastes a copied instance. |
|
Delete |
Deletes the selected instance. |
3.4 [NAB/MWT List] View
Figure: [NAB/MWT List] view

This view displays a list of the allocated child instances under the selected instance.
The [NAB/MWT List] view contains a menu and icons for instance operations.
|
Item |
Functional outline |
|
Display |
Displays an application window. |
|
Dismiss |
Hides an application window. |
|
Save |
Saves an application window. |
|
Copy |
Copies the selected instance. |
|
Paste |
Pastes a copied instance. |
|
Delete |
Deletes the selected instance. |
3.5 [NAB/MWT Editor] View
Figure: [NAB/MWT Editor] view

This view enables you to allocate and edit running screen images visually by operating the mouse.
A window created from the [NAB/MWT Editor] view is referred to as an application window.
This view has functions for allocating and interactively editing GUI instances, such as buttons, forms, and text fields.
Tabs at the top of the [NAB/MWT Editor] view list all application windows being edited, and the windows are managed individually.
You can display any of the application windows being edited, by selecting the tab that has the name of the application window.
The [NAB/MWT Editor] view contains a menu and icons for instance operations.
|
Item |
Functional outline |
|
Copy |
Copies the selected instance. |
|
Paste |
Pastes a copied instance. |
|
Properties |
Displays property information on the selected instance in the [NAB/MWT Properties] view. |
|
Procedure |
Displays procedure information on the selected instance in the [NAB/MWT Procedure] view. |
|
Attribute |
Displays attribute information on the selected instance in the [NAB/MWT Attributes] view. |
|
Delete |
Deletes the selected instance. |
|
Undo |
Undoes changes to an edited instance. |
|
Save |
Saves an edited instance to a file. |
3.6 [NAB/MWT Properties] View
Figure: [NAB/MWT Properties] view

This view displays a list of properties of the selected instance and their values, and it enables you to specify and change property values.
3.6.1 Editing instance properties
In the [NAB/MWT Tree], [NAB/MWT List], or [NAB/MWT Editor] view, select the instance you want to edit, and specify property values by entering them from the keyboard (direct input), in the file selection dialog box, in the color selection dialog box, or in a combo box, depending on the property type.
3.6.2 Defining an instance as an array
Usually, an instance is defined with a symbol name (variable name) in a program.
To control an instance as a loop, you can define the instance as an array by specifying an array name for the instance.
An instance that is defined as an array can be accessed as an array-type external variable.

No application window itself can be defined as an array.
This section explains the procedure for defining an instance as an array.
Procedure
- In the [NAB/MWT Editor] view, select the instance you want to define as an array, and specify the number of array elements in the name for the array in the [Name] text box in the [NAB/MWT Properties] view.
Figure: Example of an array

3.7 [NAB/MWT Attributes] View
Figure: [NAB/MWT Attributes] view

This view is used to specify attributes of the selected instance in a program.
You can specify the application window type and variable attributes (whether to define it as a global variable) of an allocated instance in a program.
The following table lists the window types that can be set.
|
Window type |
Description |
|
Normal window |
Defines a window used normally by applications. |
|
Class definition |
Defines a window as a class when a class library has been created. The window instance name is used directly as a class name. |
|
Use object store |
Isolates window configuration information from an application and outputs it to a data file named "window-name.oof". |
The following sections explain procedures for creating a class library and a stored data file.
3.7.1 Creating a class library
You can create a class when [Class definition] is set as the window type of an instance in an application window.
The following table lists how items for an application window are treated when the application window is defined as a class.
|
Item |
Treatment |
|
Application window instance name |
Treated as the class name of a new inherited class. |
|
Application window instance class |
Treated as the source of a new inherited class. |
|
Allocated instance in application window |
Accessed by a member variable of a new inherited class. |
|
Event procedure set for allocated instance in application window |
Defined as a member method of a new inherited class. |
3.7.1.1 Setting (or changing) the base class for creating other classes
A class that is used as the top window is usually treated as the base class for classes created with this tool.
The procedure to do this is explained below.
Procedure
- In the window that is defined as a class, allocate the instance whose class you want to make the base class.
- Select the application window instance, and specify the name of the instance whose class has been made the base class in the setting for each inherited instance.
3.7.1.2 Adding a property to a created class
You can add a new property to a created class.
The following table lists the items that are specified to add a property.
|
Item |
Description |
|
Property name |
Specifies the property name retained in a program. |
|
Property type |
Specifies the property type retained in a program. |
|
Variable name |
Specifies the name of the member variable that retains property values. |
|
Default value |
Specifies the initial property values. |
|
Attribute |
Specifies property type information. This type information includes the following:
|
|
Builder title |
Specifies the title character string displayed for a property in the [NAB/MWT Properties] view. |
|
Select menu |
Specifies the menu that is displayed in the [NAB/MWT Properties] view and used to make selections. |
3.7.1.3 Adding a trigger to a created class
You can add a new trigger to a created class.
There are two kinds of triggers: a predefined trigger and a user-defined trigger.
|
Item |
Description |
|
Triggers |
Trigger predefined by the system |
|
User Trigger |
Trigger arbitrarily defined by the user |
3.7.2 Using the Store function
Window configuration information can be isolated from an application and output to a data file. This data file is referred to as a stored data file.
Since the data file can be read without rebuilding the application and the name generated for the file is "application-window-name.oof", this function has the following advantages:
- Application memory conservation and quick startup
Because stored data files are loaded while applications are running, the amount of unnecessary memory resources can be reduced and the startup time can be shortened.
- Enabling online maintenance while an application is running
You can build an application for online maintenance (maintenance without compilation) by loading an application window while the application is running.
You also can change the shape and design of an instance to create an application that supports skin changes.
Procedure
- Select the application window you want made into a stored data file, and select [Use object store] in [Window type] in the [NAB/MWT Attributes] view.
Figure: Selecting [Use object store]

3.8 [NAB/MWT Procedures] View
Figure: [NAB/MWT Procedures] view

This view is used to manage programs to assist in operations for an instance that calls an event procedure written in a programming language.
The [NAB/Procedures] view contains a menu and icons for event procedure operations.
|
Item |
Functional outline |
|
Add procedure |
Adds a new procedure. |
|
Properties |
Used to edit procedure attributes. |
|
Edit procedure |
Used to edit a procedure written in a programming language. |
|
Delete procedures |
Deletes a procedure. |
Specify [Procedure Name], [Function Name], and [Trigger] for [Add procedure] or [Properties].
An arbitrary character string can be specified in [Procedure Name].
The character string specified in [Function Name] can be called as a function, in conformance with programming language specifications.
[Trigger] indicates the time of an event that generates a trigger for an instance.
A trigger can be specified for each event procedure. The procedure starts when the trigger is generated.
Available triggers for event procedures are roughly categorized into four types.
|
Trigger type |
Description |
|
Trigger that is generated at the time of an instance status change |
This trigger is generated when the instance status (e.g., display status) changes. |
|
Trigger that is generated at the time of a mouse status change |
This trigger is generated when the mouse is operated. |
|
Trigger that is generated at the time of a keyboard status change |
This trigger is generated when the keyboard is operated (e.g., a key is pressed). |
|
Other |
- |
3.9 [NAB/MWT Object Box] View
Figure: [NAB/MWT Object Box] view

This view displays a list of instance icons.

Instances listed in the [NAB/MWT Object Box] view correspond to instances and classes of the MWT library distributed from WideStudio.org.For details on their specifications and functions, see the relevant manual at WideStudio.org.
http://www.widestudio.org/
Instances contained in the [NAB/MWT Object Box] view are roughly categorized into five types.
The following table outlines each type.
|
Instance type |
Description |
|
Windows |
Instances used in application windows, dialog boxes, and child windows |
|
Forms |
Instances that can place child instances on instances |
|
Commands |
Instances that perform various display operations |
|
Drawing |
Instances that perform mainly drawing operations |
|
Non-GUI |
Instances that operate without visual display |
To allocate an instance to an application window, select the icon of the desired class, and allocate it in the [NAB/MWT Editor] view.
Contents
![]()
|





