SpectraBuilder FAQs
Upgrading from Version 2.3. to 2.4
The Font files that my project uses are no longer found. How do I fix this
problem?
With SpectraBuilder 2.4, the system fonts "install" method should not be used.
System fonts are no longer used by SpectraBuilder. Default font files are now
provided as part of the SDK. If you have font files of your own to use, place
them in a non-system part of your file system, for example the same directory
as your project (.pre) files.
When I use SpectraBuilder to change the outline effect by setting the attribute
to TRUE, it does not immediately take effect in the Preview window. Why?
With SpectraBuilder versions 2.4 and beyond, you can immediately see the
effects of "Outline"; however you must examine the new Font Attributes called
"Outline Width" and "Outline Opacity". If "Outline" is set to TRUE under Font
Attributes-->Formatting, A non-zero value must be specified for "Outline
Width" and for "Outline Opacity" in order to see the outline in the Preview
Window.
If you want to set the outline width at run-time, you can use the APIs
PWidget_SetOutlineWidth() and PWidget_SetOutlineOpacity().
A Project's Language
How can a language's total size be calculated?
A language's total size is the size of the strings in the string table. The
size of the string table can be seen in SpectraBuilder's Output window on
Export: "Exporting xx strings... yy bytes" where xx is the number of strings in
the string table and yy is the size of that string table.
What is the difference between character size and font size?
The character size is the Unicode characters for the strings that are used in
the language. The font size is the data used by the TrueType font that's
exported. If subsetting is turned on for the project (this can be set with
SpectraBuilder by making the menu selection Project-->Properties), then the
font will contain only the glyphs from the TrueType font that are necessary for
the strings in the project (and Latin-I) and the un-used portions of the font
will be removed.
Does each language have the same size?
The "size" of a language is the count of bytes that are used in the string
translations for that language. Hence, the size of a language will be different
because phrases will translate into different sizes for different languages.
Why is the size for the English language bigger than that of the Korean language?
More English characters are needed to represent a phrase than Korean
characters. Hence, the total size of the English language versions of all the
strings will be larger than the Korean language total.
When a language is added, how does that impact the increase in memory?
Although it's difficult to quantify the increase in memory, the impact of
adding a language involves:
1. The addition of any characters from a font;
2. The Subset Fonts flag (whether on or off); and
3. The translations of all the strings in the string table.
Note that memory increase when adding a European language is smaller than when
adding an Asian or other region language because the font characters are shared
across most European languages.
Layouts
What is an appropriate background color for layouts?
The use of magenta (0x00FF00FF) as the background color for layouts is not a
recommended choice and can cause side effects. Black would be the recommended
choice.
Widgets
What is the maximum number of widgets that SpectraWorks can handle?
SpectraBuilder can create a maximum of 65535 widgets.
Output from Builder
Why am I seeing the message "No interactive widget found\!" in the output window
of Builder after initialization?
This message is simply a warning and does not affect performance. It occurs
when the application code is using AppMgr_ShowLayout() or AppMgr_PushLayout()
with the last argument set to SW_TRUE *and* the designer did not specify a
default interactive widget before saving the Builder project.
If the last argument to AppMgr_ShowLayout() or AppMgr_PushLayout() is set to
SW_TRUE, it will set the new widget focus. In this case, it will search the
layout for the default interactive widget and set the focus there. This option
is provided so that the GUI designer can specify the default focus widget and
the software engineer will not have to do it.
To remove this warning, use SW_FALSE for the last argument in
AppMgr_ShowLayout() or AppMgr_PushLayout().
Is it possible to output a list of widgets?
Each time a project is exported and a Bin file is created, a complete and
detailed list of widgets and all their attributes is output to an XML file.
Is it possible to get any performance measurements from SpectraWorks?
Only light statistical project data is supplied during the Export phase for
memory usage analysis.
How do I implement...
How can I implement "Tab navigation" with SpectraWorks, such as in the example
below?

We refer to ‘tab navigation’ as compound button widgets. This type of
functionality can be achieved using button widgets for “Home”, “Office”, and
“Beach”. Each button widget can use the same ‘skin’ as the others. For each of
the ‘tabs’ in the above example, create a layout widget. Within the layout
widget:
-
Create a button widget that uses the ‘skin’ that is common to all the ‘tabs’.
-
Create a static text widget for the title of the ‘tab’, for example “Home”.
-
Create a bitmap widget for the icon used on that ‘tab’.
-
Create a button on ‘top’ of all of this to capture the user’s “touch”.
-
“Link” the layout widgets together through the widget editor so that they
change state from Normal to Focused or Pressed when appropriate. The skin’s
graphics would be different for each of these states. Also, the bitmap widget
in each layout would have multiple frames, one for each state
-
Set the navigation directions for the buttons so that they can handle the left
and right arrow input, just in case there is no touch-screen on the device that
will display the project.
How do I create a clickable image using SpectraWorks?
In SpectraWorks, bitmap widgets are not “interactive”. One or more button
widgets can be placed on “top” of the bitmap in order to capture the user’s
input. Buttons without skins can be used so that they are transparent and serve
only to capture input. Link the button widget to the bitmap widget so that the
bitmap’s frame automatically changes according to the button’s state.
How do I implement the functionality for a "momentary button"?
More specifically, how do I implement the following functionality: When the
user touches a button, it changes its appearance to be “pressed” and keeps
while the user is holding it down. When the user releases it, it changes back
to its original appearance.
The “pressed” state is already handled in SpectraWorks, so if you build a skin
you can control the appearance of the pressed state by changing the #4 state --
normal, focused, disabled, pressed. SpectraCore manages the widget’s state
automatically so that if the user key state of INPUT_ENTER / INPUT_KEY_DOWN is
sent the widget that’s focused will enter the pressed state until the
INPUT_ENTER / INPUT_KEY_UP is sent.
How do I implement the functionality for a "radio button"?
More specifically, how do I implement the following functionality: When the
user touches a button, it changes its appearance to be “pressed”. When the user
releases it, it keeps the pressed state until the user touches another button.
In SpectraWorks, the radio button is called Toggle. The toggle enters the
“selected” state when it is pressed. The “selected” graphics are the #5-#8
skins positions. The group of buttons (of which only one can be “selected”) is
defined by the Toggle’s parent Layout.
|