[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

 

Chapter 10.

 

Pane Properties



This chapter is a reference for the properties in each individual pane class as they appear in the Property Inspector Window.


Pane Properties Overview

Every kind of pane has stored data. Some are very simple, others are more complex. You modify and view this data in the property inspector for the individual pane.

This chapter discusses how to work with a property inspector, and how the structure of the window reflects the nature of the pane. The display of data in the Property Inspector Window is highly modular.

The rest of the chapter is a class-by-class reference to the properties for each pane in PowerPlant.

The topics in this chapter are:

In general, the information in this chapter does not tell you the purpose for each data item in a property inspector, or how to use that item to best effect in a PowerPlant application. See The PowerPlant Book for information on class data members, and how to use them in a PowerPlant application.


Using a Property Inspector Window

You open a pane property inspector in Constructor using one of three methods:

The property inspector displays various options that you can modify. The property inspector is, essentially, a modeless dialog box of sorts. You use standard techniques to modify the contents. Use the mouse to change options and enter fields, or navigate through the edit fields with the Tab and Shift-Tab keys.

Changes in a property inspector take effect in the layout and hierarchy windows quickly. Check box and radio button changes show up immediately. Changes in the edit fields appear as soon as you leave the field by pressing Tab, clicking elsewhere on the screen, or closing the property inspector.

When editing, all normal editing functions apply, including Cut, Copy, Paste and Clear. You can navigate through the text with arrow keys. You can extend the text selection by pressing the Shift key as you click the mouse.

You can undo any change that you make by choosing Undo from the Edit menu. The menu item will be either Undo Info Change or Redo Info Change.


Anatomy of a Property Inspector

With a few exceptions, the property inspector for a particular type of pane reflects its place in the class hierarchy of PowerPlant panes. LPane is the base class for this entire hierarchy, and every type of pane has LPane properties.

Each type of pane usually has additional properties particular to that kind of pane. The items in the property inspector correspond to the data members (including inherited data members) for that pane class in PowerPlant.

For example, Figure 10.1 shows the property inspector for an LCaption object. Notice that the top part of the window has LPane properties, and the bottom part of the window contains the caption-specific data.

Property inspector for an LCaption:

Each property inspector is structured similarly. Properties from LPane appears at the top. Properties specific to the pane appear at the bottom.

In the topics in this chapter, information is presented consistently. The discussion of each class has these sections.

For each class the properties section has an illustration showing the data items specific to that class. Each data item is also explained in a table like this:

Sample table of properties:

 

Item
Specifies
Top/Left  
the top left corner of the pane in its containing view  

The actual property inspector for any pane is typically built out of the properties from each ancestor class, and the specific properties for the pane in question. To see all the properties for a pane, refer to the discussion for each ancestor class as well as the specific pane of interest.

For those cases where the property inspector of a pane is not the sum of all ancestor panes, that fact is noted in the description of the properties.


LPane


Description

The base class for all visual objects in PowerPlant. A pure LPane is not typically added to a PPob resource.


Inheritance

None. LPane is the base class from which all PowerPlant visual classes descend.


Properties

Table 10.2 lists the property inspector for an LPane. Almost all property inspectors display this data at the top of the window.

LPane properties:

 

Item
Specifies
Pane ID  
the pane's ID number, a long value  
Class ID  
a 4-character ID unique to each class  
Width  
the width of the pane  
Height  
the height of the pane  
Visible  
whether the pane is visible at runtime  
Enabled  
whether the pane responds to clicks at runtime  
Bound to left, top, right, bottom  
how the pane bounds change when its containing view changes size  
Top/Left  
the top left corner of the pane in its containing view  
User Constant  
a 32-bit value defined by the programmer  


Special considerations

Binding affects the pane both at runtime and in the Constructor layout editor. If binding is on for any given side of a pane, that side of the pane will remain the same distance from the edge of the enclosing view when you resize the view.

The default value for pane ID is zero. You must change the ID to a unique value if you call FindPaneByID() for the pane. The ID should also be unique if some other pane refers to this pane by ID, such as the ID number of the view contained in an LScroller or LActive Scroller. Otherwise, you can leave the pane ID as zero.

The class ID is used by the URegistrar and UReanimator classes to build the pane at runtime. It corresponds to the class_ID enum at the start of each display class's header. Constructor fills this field in for you automatically when you add a pane from the Catalog Window. If you declare a subclass, you must give it a unique class ID. PowerPlant reserves all IDs that consist entirely of lower case letters. Make sure your class ID has at least one upper-case letter.


Views

The PowerPlant view classes represent panes that can contain other panes. Several are typically used to represent data, however, and do not generally contain other panes. All of these classes derive from LPane via LView.

These classes include:


LView


Description

Base class for all view classes. Also, a generic, simple container for other panes, useful for implementing scrolling and grouping panes in logical containers. This may be a top-level view but can also be added to a PPob.


Inheritance

LView -> LPane


Properties

Table 10.3 lists the properties specific for LView.


LView properties:

 

Item
Specifies
Width, Height  
define the underlying image size, in 32-bit coordinates  
Horiz Scroll Position, Vert Scroll Position  
the initial scroll position of the image within its frame, 0/0 means the top left corner of the image and pane frame coincide  
Horiz Scroll Unit, Vert Scroll Unit  
the number of pixels to scroll when a scroll bar is clicked  
Reconcile Overhang  
how the image behaves when the view extends below and to the right of the bottom right corner of the image  


Special considerations

A view may have an image larger than its bounds. In that case, the image may scroll. If the image is scrolled, Reconcile Overhang is on, and the view grows down and to the right beyond the bottom right of the image, the image will reposition itself to the bottom right of the view. This also happens if you use SetImageSize() to reduce the image and that operation leaves a gap at the bottom or right of the view.

You can make an LView a top-level view. See "Creating a Layout Resource."


See also

The PowerPlant Book chapter on views.


LWindow


Description

A top-level view for a Mac OS window. Can be used for dialog boxes, floating palettes, and document windows.


Inheritance

LWindow->LView -> LPane


Properties

Table 10.4 lists the properties specific for LWindow. Although LWindow descends from LView and LPane, it has a unique property inspector because of the unique and central importance of a window in the Mac OS.


LWindow properties:

 

Item
Specifies
Class ID  
a 4-character ID unique to each class  
Top/Left  
the corner of the window on the desktop  
Width/Height  
the dimensions of the window  
Window Proc  
the type of window, document, modal, movable modal, or floating  
Ref Con  
a programmer-defined 32-bit value  
Window Title  
the window title  
Auto Position  
use Window Manager auto-positioning  
Layer  
window layer: regular, modal, or floating  
Close Box  
whether window has a close box  
Title Bar  
whether window has a title bar  
Resizable  
whether window is resizable  
Size Box  
whether window has a size box  
Zoomable  
whether window has a zoom box  
Initially Visible  
whether window is visible on creation  
Enabled  
whether window is enabled  
Targetable  
whether this window can be a target  
Get Select Click  
whether window should process the click that activates the window  
Hide On Suspend  
whether window should disappear when the application goes into the background  
Delay Select  
whether to respond to clicks when inactive  
Erase On Update  
whether to erase window on update event  
Minimum Width, Minimum Height, Maximum Width, Maximum Height, Standard Width, Standard Height  
specify minimum, maximum, and standard sizes for resizing and zooming  
User Constant  
a programmer-defined 32-bit value  
Has WCTB  
whether window has wctb resource (color table)  
Content Color  
color used in window content  


Special considerations

LWindow is a top-level view. You cannot add an LWindow to an existing PPob. You specify LWindow as the top-level view when you create the PPob resource. See "Creating a Layout Resource."

Some of the information you specify is stored in a WIND resource rather than the PPob. Constructor creates and maintains WIND resources for each LWindow and LDialogBox PPob.

Because windows do not have scrollbars (although views inside windows may scroll), LView scrolling properties are not included.

Any negative number in Maximum or Standard sizes will be adjusted to the appropriate size for the screen by the LWindow functions.

The Window Kind pop-up menu allows you to set the type of window for the Mac Toolbox. This automatically adjusts the WDEF ID field. Options are: Document Window, Modal dialog box, Movable modal, Modal dialog (no border), Modal dialog (shadow border), Rounded Window, Floating window, and Floating window (sidebar).


See also

The PowerPlant Book chapter on windows. PowerPlant Advanced Topics chapter on drag and drop.


LDialogBox


Description

A top-level view for a dialog box.


Inheritance

LDialogBox->LWindow -> LView -> LPane


Properties

Table 10.5 lists the properties specific for LDialogBox. The other properties are identical to LWindow.

LDialogBox properties:

 

Item
Specifies
Default Button ID  
pane ID number of default button  
Cancel Button ID  
pane ID number of cancel button  


Special considerations

LDialogBox is a top-level view. You cannot add an LDialogBox to an existing PPob. You specify LDialogBox as the top-level view when you create the PPob resource. See "Creating a Layout Resource."


See also

The PowerPlant Book chapter on dialogs.


LCheckBoxGroupBox


Description

A view that enables or disables its subviews based on the setting of its own checkbox.


Inheritance

LCheckBoxGroupBox->LView -> LPane


Properties

Table 10.6 lists the properties in LCheckBoxGroupBox. Its other properties are inherited from LView.

LCheckBoxGroupBox properties:

 

Item
Specifies
Value Message  
a 32-bit value, the control's value message  
Initial Value  
the control's initial value  
Group Kind  
the kind of group, Primary or Secondary  
Text Traits  
resource ID of a Txtr resource describing the appearance of this text  
Title  
the group box's title  


LGAFocusBorder


Description

Draws an appropriate border when its sub pane has the focus using the PowerPlant grayscale appearance.


Inheritance

LGAFocusBorder->LView -> LPane


Properties

Table 10.7 lists the properties in LGAFocusBorder. Its other properties are inherited from LView.

LGAFocusBorder properties:

 

Item
Specifies
Inset Sub Pane ID  
the ID of the sub pane it provides a focus border for  
Commander ID  
the ID of the view's commander  
Paint Border's Face  
whether or not the border should be drawn between this view's coordinates and its sub pane.  
Frame Inset Sub Pane  
whether or not the sub pane is inset  
Noth Inset Sub Pane Frame  
whether or not to accomodate items within the subpane, such as scrollbars  
Noth Face for Growbox  
whether or not to accomodate a grow box  
Notch Width/Height  
the number of pixels to adjust the notch for  
Can be Focused?  
whether or not the border view can be focused  
Has the Focus  
whether or not the border view has the focus  


LGrafPortView


Description

A top-level view that acts as the interface between PowerPlant panes and "foreign" code that knows nothing about PowerPlant. This allows you to use PowerPlant panes in other Mac OS frameworks or in other code such as HyperCard XCMDs.


Inheritance

LGrafPortView->LView -> LPane


Properties

Same as LView.


Special considerations

LGrafPortView is a top-level view. You cannot add an LGrafPortView to an existing PPob. You specify LGrafPortView as the top-level view when you create the PPob resource. See "Creating a Layout Resource."


LImageWell


Description

Provides a view to contain a Mac OS 8 image well.


Inheritance

LImageWell->LView -> LPane


Properties

Table 10.8 lists its properties. Its other properties are inherited from LView.

LImageWell properties:

 

Item
Specifies
Value Message  
a 32-bit value, the control's value message  
Content Res Id  
the resource ID of the image to display in the image well  
ContentType  
the type of image to display  


See also

Inside Macintosh: Mac OS 8 Toolbox Reference and Inside Macintosh: Mac OS 8 Human Interface Guidelines


LScroller


Description

A view that contains and scrolls another view. LScroller is not a scroll bar, although the LScroller creates its own scroll bars automatically.


Inheritance

LScroller->LView -> LPane


Properties

Table 10.9 lists the properties specific for this pane. Although LScroller inherits from LView, the LScroller property inspector does not include LView properties. An LScroller contains another view, and does not require LView properties. It is unlikely that the LScroller will itself be scrolled.

LScroller properties:

 

Item
Specifies
Left Indent  
pixels from left edge of view  
Right Indent  
pixels from right edge of view  
Top Indent  
pixels from top edge of view  
Bottom Indent  
pixels from bottom edge of view  
Scrolling View ID  
the pane ID of the view contained in this scroller  


Special considerations

A value of -1 for left or top indent means that the corresponding scroll bar does not appear. The default values of 15 pixels for right and bottom allow room for a resize box in the bottom right corner of the view.

To have your views scroll, create an LScroller and put an LView or derived type inside the scroller. The LScroller coordinates the scrollbars that it creates and the scroll position of the image which is contained within it. If you have a number of panes that you want to scroll together, use an LView object to contain them, and put the view inside the LScroller.

When setting the size of an LScroller, typically you set it to extend one pixel beyond the bounds of the view it encloses, on all four sides. The location and size of the LScroller define the outside of the scroller, which should correspond to the outside of the view being scrolled.


See also

The PowerPlant Book chapter on views.


LActiveScroller


Description

A scrolling view with active update while the user moves the scroll thumb.


Inheritance

LActiveScroller->LScroller -> LView -> LPane


Properties

Same as LScroller.


Special considerations

Same as LScroller.


See also

The PowerPlant Book chapter on views.


LOffscreenView


Description

A view that automatically draws its contents to an offscreen buffer before drawing the image to the screen.


Inheritance

LOffscreenView->LView -> LPane


Properties

Same as LView.


Special considerations

Used for drawing to an offscreen bitmap.


See also

The PowerPlant Book chapter on views.


LPicture


Description

A view that contains a PICT.


Inheritance

LPicture->LView -> LPane


Properties

Table 10.10 lists the properties specific for this pane.

LPicture properties:

 

Item
Specifies
PICT Resource ID  
resource ID of picture in this pane  


Special considerations

If the PICT resource is in the same file as the PPob, Constructor displays the picture in the pane.


LTextEdit


Description

A PowerPlant wrapper pane for the Mac OS Text-Edit. Useful for simple text processing.


Inheritance

LTextEdit->LView -> LPane


Properties

Table 10.11 lists the properties specific for this pane.

LTextEdit properties:

 

Item
Specifies
Text Traits  
resource ID of a Txtr resource describing the appearance of this text  
Initial Text Resource ID  
resource ID of a TEXT resource containing default text  


Special considerations

LTextEdit is a simple wrapper for the Toolbox TextEdit features and suffers from the same limitations, such as a 32K limit on the amoung of text.

LTextEdit supports text in a single style only.


See also

LEditField, The PowerPlant Book chapter on views.


LPrintout


Description

Top-level view for printing.


Inheritance

LPrintout->LView -> LPane


Properties

Table 10.12 lists the properties specific for LPrintout. and represents all the data required for an LPrintout. Other pane and view properties are not necessary.

LPrintout properties:

 

Item
Specifies
Width/Height  
dimensions of the printing area, in pixels  
User Constant  
a programmer-defined 32-bit value  
Class ID  
a 4-character ID unique to each class  
Page Numbering  
page numbering sequence in multi-page documents  
Enabled  
whether pane is enabled  
Active  
whether pane is active  


Special considerations

LPrintout is a top-level view. You cannot add an LPrintout to an existing PPob. You specify LPrintout as the top-level view when you create the PPob resource.


See also

The PowerPlant Book chapter on printing.


LPlaceHolder


Description

Holds another view for printing.


Inheritance

LPlaceholder->LView -> LPane


Properties

Table 10.13 lists the properties specific for LPlaceholder.

LPlaceholder properties:

 

Item
Specifies
Horizontal  
how the occupant view is aligned horizontally  
Vertical  
how the occupant view is aligned vertically  


Special considerations

This view is used for printing only. It holds a regular view temporarily, and then returns the occupant to its original location.


See also

The PowerPlant Book chapter on printing.


LTable


Description

A view containing cells with data of a single length, all cells the same size, and that allows single cell selection.


Inheritance

LTable->LView -> LPane


Properties

Table 10.14 lists the properties specific for LTable.

LTable properties:

 

Item
Specifies
Number of Rows  
number of rows in the table  
Number of Columns  
number of columns in the table  
Row Height  
height of a row, in pixels  
Column Width  
width of a column, in pixels  
Cell Data Size  
number of bytes of data in each cell  


Special considerations

All of the LTable items are 32-bit values.

LTable is being superseded by LTableView, which is more flexible and allows data of varying size.


LTableView


Description

A very flexible view class that allows for cells containing data of varying length, cells of varying size, and multiple cell selection.


Inheritance

LTableView->LView -> LPane


Properties

Same as LView.


Special considerations

You vary behavior of an LTableView class by attaching various helper objects.


See also

Refer to LView. See PowerPlant Advanced Topics chapter on tables.


LHierarchyTable


Description

A table with collapsible rows.


Inheritance

LHierarchyTable->LTableView -> LView -> LPane


Properties

Same as LView.


Special considerations

None.


See also

Refer to LView. See PowerPlant Advanced Topics chapter on tables.


LTextHierTable


Description

A hierarchy table containing text data.


Inheritance

LTextHierTable->LHierarchyTable -> LTableView -> LView -> LPane


Properties

Same as LView.


Special considerations

None.


See also

Refer to LView. See PowerPlant Advanced Topics chapter on tables.


LOutlineTable


Description

A table supporting expandable hierarchies.


Inheritance

LOutlineTable -> LTableView -> LView -> LPane


Properties

Table 10.15 lists the properties specific for LOutlineTable.

LOutlineTable properties:

 

Item
Specifies
Text Traits  
Resource ID of a text traits resource  
First Level Indent  
pixels to indent subsidiary entries  


Special considerations

None.


See also

Refer to LView. See PowerPlant Advanced Topics chapter on tables.


LSmallIconTable


Description

A table containing small icons.


Inheritance

LSmallIconTable->LTableView -> LView -> LPane


Properties

Same as LView.


Special considerations

This is really just a demonstration class of little direct utility.


See also

Refer to LView. See PowerPlant Advanced Topics chapter on tables.


LColumnView


Description

A table with one column, with data of a single length, all cells the same size.


Inheritance

LColumnView->LTableView -> LView -> LPane


Properties

Table 10.16 lists the properties specific for LColumnView.

LColumnView properties:

 

Item
Specifies
Column Width  
width of a column, in pixels  
Row Height  
height of a row, in pixels  
Use Single Selector  
allow one cell selection only  
Use Drag Select  
allow dragging to select cells  
Data Size  
number of bytes of data in each cell  
Double-Click Message  
message sent in response to double-click  
Selection Message  
message sent when selection range changes  


Special considerations

In typical use, you would subclass LColumnView to display data of the appropriate type. You cannot use LColumnView directly.

You specify the number of rows at run-time.

When Use Single Selector is off, you can create a multi-selector to support multiple and discontiguous cell selection.


See also

PowerPlant Advanced Topics chapter on tables.


LTextColumn


Description

An LColumnView to display text.


Inheritance

LTextColumn->LColumnView->LTableView -> LView -> LPane


Properties

Table 10.17 lists the properties specific for LTextColumn.

LTextColumn properties:

 

Item
Specifies
Text Traits ID  
resource ID of a Txtr resource describing the appearance of this text  
STR# Resource ID  
resource ID of an STR# resource containing initial text for cells  


Special considerations

PowerPlant initializes the table with the contents of the STR# resource.


See also

PowerPlant Advanced Topics chapter on tables.


Controls

The control classes represent buttons, check boxes, scroll bars and pop-up menus. All of these classes derive from LPane via LControl.

The control classes are:


LControl

The property inspectors for several derived control classes include the properties for LControl.


Description

LControl is the base class for all other control classes.


Inheritance

LControl->LPane


Properties

Table 10.18 lists the properties specific for LControl.

LControl properties:

 

Item
Specifies
Value Message  
a 32-bit value, the control's value message  
Initial Value  
the control's initial value  
Minimum  
the control's minimum value  
Maximum  
the control's maximum value  


Special considerations

Because LControl does not have a visual representation, it will not be visible in the layout window unless you display pane edges. See "Displaying pane edges."

Constructor automatically makes a RidL resource (list of all the control IDs) for all views that contain controls. You can use this to link listeners (such as Dialog Boxes) to control broadcasters.


See also

The PowerPlant Book chapter on controls.


LStdControl


Description

A generic, standard Mac OS control. LStdControl represents the base class for other standard Mac OS controls, and is used directly for scroll bars.


Inheritance

LStdControl->LControl -> LPane


Properties

Table 10.19 lists the properties specific for LStdControl.

LStdControl properties:

 

Item
Specifies
Control Kind  
the Mac OS control kind  
Text Traits  
resource ID of a Txtr resource describing the appearance of this text  
Title  
the text in the control's name or label  
Toolbox Ref Con  
a programmer-specified 32-bit value  


Special considerations

Some controls, such as scroll bars, have no title. Scroll bars in PowerPlant are LStdControl objects. The default Control Kind value of 16 represents a scroll bar in the Mac OS Control Manager.

The LScroller class makes its own scroll bars using LStdControl.

You may want to use the LStdControl class when you are working with a custom CDEF resource. Set the Control Kind field to CDEF ID plus the variation.


See also

The PowerPlant Book chapter on controls.


LStdButton


Description

A standard Mac OS push button.


Inheritance

LStdButton->LStdControl -> LControl -> LPane


Properties

Table 10.20 lists the properties specific for LStdButton. The LStdButton property inspector is a combination of these properties and LPane.

LStdButton properties:

 

Item
Specifies
Value Message  
a 32-bit value, the control's value message  
Control Kind  
the Mac OS control kind  
Text Traits  
resource ID of a Txtr resource describing the appearance of this text  
Title  
text in the button  
Toolbox Ref Con  
a programmer-specified 32-bit value  


Special considerations

The Control Kind value for a standard button is 0.


See also

The PowerPlant Book chapter on controls.


LStdCheckBox


Description

A standard Mac OS check box.


Inheritance

LStdCheckBox->LStdControl -> LControl -> LPane


Properties

Table 10.21 lists the properties specific for LStdCheckBox. The LStdCheckBox property inspector is a combination of these properties and LPane.

LStdCheckBox properties:

 

Item
Specifies
Value Message  
a 32-bit value, the control's value message  
Initially checked  
initial value of check box  
Control Kind  
the Mac OS control kind  
Text Traits  
resource ID of a Txtr resource describing the appearance of this text  
Title  
text in the check box  
Toolbox Ref Con  
a programmer-specified 32-bit value  


Special considerations

The Control Kind value for a check box should be 1.


See also

The PowerPlant Book chapter on controls.


LStdRadioButton


Description

A standard Mac OS radio button.


Inheritance

LStdRadioButton->LStdControl -> LControl -> LPane


Properties

Table 10.22 lists the properties specific for LStdRadioButton. The LStdRadioButton property inspector is a combination of these properties and LPane.

LStdRadioButton properties:

 

Item
Specifies
Value Message  
a 32-bit value, the control's value message  
Initial Value  
initial value of check box  
Control Kind  
the Mac OS control kind  
Text Traits  
resource ID of a Txtr resource describing the appearance of this text  
Title  
text in the radio button  
Toolbox Ref Con  
a programmer-specified 32-bit value  


Special considerations

The Control Kind value for a radio button should be 2.


See also

The PowerPlant Book chapter on controls. For information about radio groups, see "Working With Radio Groups."


LStdPopupMenu


Description

A standard Mac OS pop-up menu.


Inheritance

LStdPopupMenu->LStdControl -> LControl -> LPane


Properties

Table 10.23 lists the properties specific for LStdPopupMenu. The LStdPopupMenu property inspector is a combination of these properties and LPane.

LStdPopupMenu properties:

 

Item
Specifies
Value Message  
a 32-bit value, the control's value message  
Title Alignment  
alignment options for menu title text  
Menu Resource ID  
resource ID for pop-up menu  
Title Width  
width of menu title in pixels  
Resource List  
that the pop-up menu is a list of resource items, such as fonts or sounds  
Fixed Width  
specifies that the menu should be drawn exactly the same width as the specified pane  
Text Traits  
resource ID of a Txtr resource describing the appearance of the menu items  
Title  
menu title text  
Resource List Type  
4-character resource type if pop-up menu is a resource list  
Initial Menu Item  
number of default menu item  


Special considerations

The Title Style and Title Placement options have no effect on the pop-up menu items.

The Title Width specifies the width of the menu title as part of the entire Width field (an LPane data item). The difference between Width and Title Width is the space available for menu items. You may need to experiment with different widths to display the menu properly at runtime.

You must create a MENU resource that contains the text of the menu items for the pop-up menu.


See also

The PowerPlant Book chapter on controls.


LButton


Description

A graphical button containing a PICT or icon.


Inheritance

LButton->LControl -> LPane


Properties

Table 10.24 lists the properties specific for LButton.

LButton properties:

 

Item
Specifies
Graphics Type  
resource type of image in the button  
Normal Graphic ID  
resource ID of the picture or icon of the button in the unpushed state  
Pushed Graphic ID  
resource ID of the picture or icon of the button in the pushed state  


Special considerations

Choose a resource type from the pop-up menu. Resource types available are ICN#, ICON, and PICT.


See also

The PowerPlant Book chapter on controls.


LCicnButton


Description

A graphical button containing a cicn resource.


Inheritance

LCicnButton->LControl -> LPane


Properties

Table 10.25 lists the properties specific for LCicnButton.

LCicnButton properties:

 

Item
Specifies
Normal Graphic ID  
resource ID of the cicn resource showing the button in the unpushed state  
Pushed Graphic ID  
resource ID of the cicn resource showing the button in the pushed state  


Special considerations

None.


See also

The PowerPlant Book chapter on controls.


LToggleButton


Description

A button with on, off, and transition states.


Inheritance

LToggleButton->LControl -> LPane


Properties

Table 10.26 lists the properties specific for LToggleButton.

LToggleButton properties:

 

Item
Specifies
Graphics Type  
resource type of image in the button  
On Graphic ID  
resource ID of the picture or icon of the button in the on state  
On-Clicked Graphic  
resource ID of the picture or icon of the button clicked while in the on state  
Off Graphic ID  
resource ID of the picture or icon of the button in the off state  
Off-Clicked Graphic  
resource ID of the picture or icon of the button clicked while in the off state  
Transition Graphic  
resource ID of the picture or icon of the button while changing state  


Special considerations

Choose a resource type from the pop-up menu. Resource types available are ICN#, ICON, and PICT.


See also

The PowerPlant Book chapter on controls.


LTextButton


Description

A button with textual rather than graphical content. Typically used as a column head to control sort order.


Inheritance

LTextButton->LControl -> LPane


Properties

Table 10.27 lists the properties specific for LTextButton. The LTextButton property inspector is a combination of these properties and LPane.

LTextButton properties:

 

Item
Specifies
Value Message  
a 32-bit value, the control's value message  
Initial Value  
initial value of the text button  
Button Title  
text in the button  
Text Traits  
resource ID of a Txtr resource describing the appearance of this text  
Selected Text Style  
style options when button is in the on state  


Special considerations

LTextButtons are mutually exclusive buttons and may be added to radio groups. See "Working With Radio Groups."


See also

The PowerPlant Book chapter on controls.


Simple Panes

The simple pane classes represent a variety of visual objects. Most derive directly from LPane. All of them derive from LPane without inheriting from either LView or LControl.

The simple pane classes are:


LIconPane


Description

A pane containing an icon.


Inheritance

LIconPane->LPane


Properties

Table 10.28 lists the properties specific for LIconPane.

LIconPane properties:

 

Item
Specifies
Icon ID  
resource ID of icon in this pane  


Special considerations

The LIconPane is for display only. It does not respond to clicks. To use an icon in a button, see LButton, LCicnButton, or LToggleButton.


See also

The PowerPlant Book chapter on panes.


LCaption


Description

A pane containing static text.


Inheritance

LCaption->LPane


Properties

Table 10.28 lists the properties specific for LCaption.

LCaption properties:

 

Item
Specifies
Text  
static text in the pane, limited to 255 characters  
Text Traits  
resource ID of a Txtr resource describing the appearance of this text  


Special considerations

None.


See also

The PowerPlant Book chapter on panes.


LGroupBox


Description

A titled frame that groups a set of elements visually.


Inheritance

LGroupBox->LCaption -> LPane


Properties

Same as LCaption.


Special considerations

None.


See also

The PowerPlant Book chapter on panes.


LEditField


Description

An editable text field, typically in a dialog box.


Inheritance

LEditField->LPane


Properties

Table 10.30 lists the properties specific for LEditField.

LEditField properties:

 

Item
Specifies
Initial Text  
text in the pane  
Text Traits  
resource ID of a Txtr resource describing the appearance of this text  
Max. Characters  
number of characters allowed in the field, must be 255 or less  
Has Box  
whether the field has a visible frame  
Has Word Wrap  
whether the field uses word wrap  
Auto Scroll  
whether to scroll the text when the user types beyond the end of the field  
Text Buffer  
whether the field uses text buffering  
Outline Highlight  
whether the field shows an outline highlight when the window is inactive  
Inline Input  
whether the field uses inline input  
Uses Text Services  
whether the field uses text services  
Key Filter  
the key filter used for this field  


Special considerations

To ensure that the field big enough to fit the data, set the text traits and then type in the longest expected data. You can see the result in the layout window.

The available key filters are: None, Integer, Alpha-numeric, and Printing Character. See The PowerPlant Book chapter on utilities for information on key filters.

The Text Buffering, Inline Input, and Text Services features are used for two-byte character sets and ideographic languages.


See also

The PowerPlant Book chapter on panes. See LTextEdit for scrolling text fields.

For information on topics such as inline input and text services, see Inside Macintosh: Text.


LListBox


Description

A pane containing a single-column Mac OS List Manager list.


Inheritance

LListBox->LPane


Properties

Table 10.31 lists the properties specific for LListBox.

LListBox properties:

 

Item
Specifies
Horizontal Scrollbar  
whether the pane has a horizontal scrollbar  
Vertical Scrollbar  
whether the pane has a vertical scrollbar  
Has Grow Box  
whether the pane has a grow box  
Has Focus Box  
whether the pane uses a focus box around the current cell in the list  
Double-Click Message  
32-bit value message sent when pane is double-clicked  
Text Traits  
resource ID of a Txtr resource describing the appearance of this text  
LDEF ID  
resource ID of LDEF for the list  
Initial Items  
initial contents of the list box  


Special considerations

LListBox is a wrapper for the Mac OS List Manager. LTableView classes are more flexible.

PowerPlant allows multiple columns. However, you must add them programmatically with the Mac Toolbox. These lists come with their own scrollbars. You should not implement them in Constructor or PowerPlant.


See also

The PowerPlant Book chapter on panes.


Custom Panes

You regularly declare and define custom classes derived from the PowerPlant visual hierarchy. A custom class may have modified or additional behaviors (member functions) and/or additional data members.

If a custom class has no additional data members, you can use the standard Constructor panes to represent the class. When you set the properties for that pane, simply modify the Class ID field to reflect the Class ID you declared for your custom class. See "Simple Custom Panes."

If a custom class has additional data members, you can add them to the property inspector easily. Essentially, you create a CTYP resource. When that resource is available to Constructor, that pane appears in the Catalog Window. See "What a CTYP Resource Does."

You can then use the pane just like any other pane.

 


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 21, 2000