Chapter 11: Creating the User Interface
105
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
WinLineTo
— Draw a line from the current pen location.
WinMoveRel
— Move the current pen location relative to its current
position.
WinMoveTo
— Move the current pen location.
WinOpen
— Open a window.
WinPixGet
— Return the status of an individual pixel (on or off).
WinPixSet
— Set a pixel.
WinRect
— Draw a rectangle.
WinRemove
— Close a window with the option to not update the
screen.
WinReOpen
— Reopen a window keeping the duplicate image if the
window’s size does not change.
WinScrollH
— Scroll a region horizontally.
WinScrollV
— Scroll a region vertically.
WinStr
— Write a string to the current pen location.
WinStrXY
— Write a string to a specific location.
WinWidth
— Return the width of a window’s client region.
Additionally, there are several utility routines for working with windows.
CalcBitmapSize
— Calculate the size of a bitmap given a pointer to a
BITMAP structure.
ClientToScr
— Merge two SCR_RECTs.
DrawWinBorder
— Redraw the border for a window.
MakeWinRect
— Create a WIN_RECT.
MakeScrRect
— Create a SCR_RECT.
ScrToWin
— Convert a SCR_RECT structure to a WIN_RECT
structure.
SetWinClip
— Set the clipping region for a window.
11.3. Menus
There are two menu types: toolbars and pop-ups. Pop-ups are, for the most part,
toolbars without a menu bar, however, they may have a title (for an example see
Figure 4.2). Menus are limited to three levels (not counting the menu bar).
Menus are divided into two categories: static and dynamic. Examples of both are
included at the end of this chapter. Like all resources, the text strings in a menu
can be localized by using string reference numbers instead of actual text.
Internally, menus are kept as a MENU structure that contain one or more
MENU_ITEM structures at the end. Static menus are created with the resource