The Interface Kit Table of Contents | The Interface Kit Index |
This section lists the various global variables, constants, and types that the Interface Kit defines.
Declared in: be/interface/Font.h
|
These global BFont objects are created when the BApplication object is constructed. They encapsulate the three system fonts—the plain font which is used for labels and small stretches of text in the user interface, the bold font which is used for window and group titles, and the fixed font which is used in Terminal windows and other places where a fixed-width font is required.
These objects cannot be modified directly, nor are they modified when the user redefines a system font. The user's changed preferences don't affect running applications.
See also: the BFont class
Declared in: be/interface/InterfaceDefs.h
Constant |
---|
B_ALIGN_LEFT |
B_ALIGN_RIGHT |
B_ALIGN_CENTE R |
These constants define the alignment data type. They determine how lines of text and labels are aligned by BTextView, BStringView, and BMenuField objects.
See also: BTextView::SetAlignment()
Declared in: be/interface/InterfaceDefs.h
Constant |
---|
B_WIDTH_AS_USUAL |
B_WIDTH_FROM_LABEL |
B_WIDTH_FROM_WIDEST |
These constants define the button_width type. They determine how the width of a set of buttons will be set—whether they're set to a minimal width, a width just sufficient to accommodate the button's own label, or a width sufficient to accommodate the widest label of all the buttons.
The constants are used by the BAlert and BTabView classes.
Declared in: be/interface/InterfaceDefs.h
Constant |
---|
B_PLAIN_BORDER |
B_FANCY_BORDER |
B_NO_BORDER |
These constants define how BBox objects and BScrollViews are bordered.
See also: the BScrollView and BBox classes
Declared in: be/interface/InterfaceDefs.h
Constants in the first group stand for the ASCII characters they name. They're defined only for characters that normally don't have visible symbols.
Constants in the second group are Unicode UTF-8 encodings of common characters that have multibyte representations. These constants are strings that can be concatenated with other strings—for example, to set a button label that ends in an ellipsis:
myButton->SetLablel("Options"B_UTF_ELLIPSIS);
See also: "Function Key Constants" below
Declared in: be/interface/GraphicDefs.h
These constants define the color_space data type. A color space describes three properties of screens and bitmap images:
See the "Color Spaces" section in the "Drawing" section of this chapter for a fuller explanation of these color spaces.
See also: "Colors" in the "Drawing" section of this chapter, the BBitmap and BScreen classes
Declared in: be/interface/Control.h
Constant | Value |
---|---|
B_CONTROL_O N | 1 |
B_CONTROL_OF F | 0 |
These constants define the bipolar states of a typical control device.
See also: BControl::SetValue()
Declared in: be/interface/View.h
Constant | Meaning |
---|---|
B_ENTERED_VIE W | The cursor has just entered a view. |
B_INSIDE_VIEW | The cursor has moved within the view. |
B_EXITED_VIEW | The cursor has left the view |
These constants describe the cursor's transit through a view. Each MouseMoved() notification includes one of these constants as an argument, to inform the BView whether the cursor has entered the view, moved while inside the view, or exited the view.
See also: BView::MouseMoved()
Declared in: be/interface/InterfaceDefs.h
Constant |
---|
B_CONTROL_TABLE |
B_OPTION_CAPS_SHIFT_TA BLE |
B_OPTION_CAPS_TABLE |
B_OPTION_SHIFT_TABLE |
B_OPTION_TABLE |
B_CAPS_SHIFT_TABLE |
B_CAPS_TABLE |
B_SHIFT_TABLE |
B_NORMAL_TABLE |
These constants determine which combinations of modifiers can cause a key to be the "dead" member of a two-key combination.
See also: get_key_map()
Declared in: be/interface/GraphicsDefs.h
Constant | Constant |
---|---|
B_OP_COPY | B_OP_ADD |
B_OP_OVER | B_OP_SUBTRA CT |
B_OP_ERAS E | B_OP_BLEND |
B_OP_INVE RT | B_OP_MIN |
B_OP_SELE CT | B_OP_MAX |
These constants define the drawing_mode data type. The drawing mode is a BView graphics parameter that determines how the image being drawn interacts with the image already in place in the area where it's drawn. The various modes are explained under "Drawing Modes" in the "Drawing" section of this chapter.
See also: "Drawing Modes" in the "Drawing" section of this chapter, BView::SetDrawingMode()
Declared in: be/interface/Font.h
Constant |
---|
B_FONT_LEFT_TO_RIG HT |
B_FONT_RIGHT_TO_LE FT |
These constants tell whether a font is used for text that's read left-to-right or right-to-left. Thus is an inherent property of the font.
See also: BFont::Direction()
Declared in: be/interface/Font.h
Constant |
---|
B_UNICODE_UTF8 |
B_ISO_8859_1 |
B_ISO_8859_2 |
B_ISO_8859_3 |
B_ISO_8859_4 |
B_ISO_8859_5 |
B_ISO_8859_6 |
B_ISO_8859_7 |
B_ISO_8859_8 |
B_ISO_8859_9 |
B_ISO_8859_10 |
B_MACINTOSH_ROMA N |
The constants name the various character encodings that the BeOS supports. B_UNICODE_UTF8 is the default encoding. It matches ASCII values for 7-bit character codes but uses multiple bytes to encode other values in the Unicode standard.
See also: BFont::SetEncoding(), "Character Encoding" in the "Responding to the User" section of this chapter
Declared in: be/interface/Font.h
Constant |
---|
B_DISABLE_ANTIALIASI NG |
B_IS_FIXED |
B_HAS_TUNED_FONT |
The first flag, B_DISABLE_ANTIALIASING, is passed to a BFont object to turn antialiasing off. Antialiasing should be turned off when printing, but should generally be left on when drawing to the screen.
The other two flags enable get_font_family() and get_font_style() to give information about a font. B_IS_FIXED indicates that the font is nonproportional. B_HAS_TUNED_FONT indicates that the family or style has one or more tuned fonts—bitmap fonts that have been adjusted to look good on the screen—for some set of font properties (such as size and shear).
See also: BFont::SetFlags(), get_font_family()
Declared in: be/interface/Font.h
Constant | Value |
---|---|
B_FONT_FAMILY_NAME_LENG TH | 63 |
B_FONT_STYLE_NAME_LENG TH | 63 |
These constants define the maximum length of names for font families and styles, exclusive of a null terminator. They're used in the definition of the font_family and font_style types.
See also: font_family under "Defined Types" below
Declared in: be/interface/View.h
Constant |
---|
B_FONT_FAMILY_AND_STY LE |
B_FONT_SIZE |
B_FONT_SHEAR |
B_FONT_ROTATION |
B_FONT_SPACING |
B_FONT_ENCODING |
B_FONT_FACE |
B_FONT_FLAGS |
B_FONT_ALL |
These constants list the font properites that can be set for a BView individually or in combination. The constants form a mask that's passed, along with a BFont object, to BView's SetFont() and BTextView's SetFontAndColor() functions. For example:
myView->SetFont(theFont, B_FONT_SIZE | B_FONT_ENCODING);
B_FONT_ALL stands for all properties of the BFont.
See also: BView::SetFont()
Declared in: be/interface/Font.h
Constant |
---|
B_CHAR_SPACING |
B_STRING_SPACIN G |
B_BITMAP_SPACIN G |
B_FIXED_SPACING |
These constants enumerate the four modes for positioning characters in a line of text.
See also: BFont::SetSpacing()
Declared in: be/interface/InterfaceDefs.h
These constants stand for the various keys that are mapped to the B_FUNCTION_KEY character. When the B_FUNCTION_KEY character is reported in a key-down event, the application can determine which key produced the character by testing the key code against these constants. (Control-p also produces the B_FUNCTION_KEY character.)
See also: "Character Mapping" in the Keyboard Information appendix
Declared in: be/app/AppDefs.h
These constants identify interface messages—system messages that are delivered to BWindow objects. Each constant conveys an instruction to do something in particular (B_ZOOM) or names a type of event (B_KEY_DOWN).
See also: "Interface Messages" in the "Responding to the User" section of this chapter
Declared in: be/interface/ListView.h
Constant |
---|
B_SINGLE_SELECTION_LIS T |
B_MULTIPLE_SELECTION_ LIST |
These constants distinguish between lists that permit the user to select only one item at a time and those that allow multiple items to be selected.
See also: the BListView class
Declared in: be/interface/Screen.h
|
This constant stands for the main screen, the screen that has the origin of the screen coordinate system at its left top corner. (Currently only one screen can be attached to the computer and it is the main screen.)
See also: screen_id
Declared in: be/interface/MenuBar.h
Constant | Meaning |
---|---|
B_BORDER_FRAME | Put a border inside the entire frame rectangle. |
B_BORDER_CONTEN TS | Put a border around the group of items only. |
B_BORDER_EACH_IT EM | Put a border around each item. |
These constants can be passed as an argument to BMenuBar's SetBorder() function.
See also: BMenuBar::SetBorder()
Declared in: be/interface/Menu.h
These constants define the menu_layout data type. They distinguish the ways that items can be arranged in a menu or menu bar—they can be laid out from end to end in a row like a typical menu bar, stacked from top to bottom in a column like a typical menu, or arranged in some custom fashion like a matrix.
See also: the BMenu and BMenuBar constructors
Declared in: be/interface/InterfaceDef.h
These constants designate the Shift, Option, Control, Command, and Menu modifier keys and the lock states set by the Caps Lock, Scroll Lock, and Num Lock keys. They're typically used to form a mask that describes the current, or required, modifier states.
For each variety of modifier key, there are constants that distinguish between the keys that appear at the left and right of the keyboard, as well as one that lumps both together. For example, if the user is holding the left Control key down, both B_CONTROL_KEY and B_LEFT_CONTROL_KEY will be set in the mask.
See also: modifiers(), BWindow::AddShortcut(), the BMenu constructor
Declared in: be/interface/View.h
Constant |
---|
B_PRIMARY_MOUSE_BUTTON |
B_SECONDARY_MOUSE_BUTT ON |
B_TERTIARY_MOUSE_BUTTON |
These constants name the mouse buttons. Buttons are identified, not by their physical positions on the mouse, but by their roles in the user interface.
See also: BView::GetMouse(), set_mouse_map()
Declared in: be/interface/InterfaceDef.h
Constant |
---|
B_HORIZONTA L |
B_VERTICAL |
These constants define the orientation data type that distinguishes between the vertical and horizontal orientation of graphic objects. It's currently used only to differentiate scroll bars.
See also: the BScrollBar and BScrollView classes
Declared in: be/interface/GraphicsDef.h
These constants name the three standard patterns defined in the Interface Kit.
B_SOLID_HIGH is a pattern that consists of the high color only. It's the default pattern for all BView drawing functions that stroke lines and fill shapes.
B_SOLID_LOW is a pattern with only the low color. It's used mainly to erase images
(to replace them with the background color).
B_MIXED_COLORS alternates pixels between the high and low colors in a checkerboard pattern. The result is a halftone midway between the two colors. This pattern can produce fine gradations of color, especially when the high and low colors are set to two colors that are already quite similar.
See also: "Patterns" in the "Drawing" section of this chapter
Declared in: be/interface/View.h
Constants |
---|
B_FOLLOW_LEFT |
B_FOLLOW_RIGHT |
B_FOLLOW_LEFT_RIGHT |
B_FOLLOW_H_CENTER |
B_FOLLOW_TOP |
B_FOLLOW_BOTTOM |
B_FOLLOW_TOP_BOTTO M |
B_FOLLOW_V_CENTER |
B_FOLLOW_ALL |
B_FOLLOW_NONE |
These constants are used to set the behavior of a view when its parent is resized. They're explained under the BView constructor.
See also: the BView constructor, BView::SetResizingMode()
Declared in: be/interface/GraphicsDef.h
B_8_BIT_640x400 | |||
B_8_BIT_640x480 | B_15_BIT_640x480 | B_16_BIT_640x480 | B_32_BIT_640x480 |
B_8_BIT_800x600 | B_15_BIT_800x600 | B_16_BIT_800x600 | B_32_BIT_800x600 |
B_8_BIT_1024x768 | B_15_BIT_1024x768 | B_16_BIT_1024x768 | B_32_BIT_1024x768 |
B_8_BIT_1152x900 | B_15_BIT_1152x900 | B_16_BIT_1152x900 | B_32_BIT_1152x900 |
B_8_BIT_1280x1024 | B_15_BIT_1280x1024 | B_16_BIT_1280x1024 | B_32_BIT_1280x1024 |
B_8_BIT_1600x1200 | B_15_BIT_1600x1200 | B_16_BIT_1600x1200 | B_32_BIT_1600x1200 |
These constants are currently used to configure the screen—to set its depth and the size of the pixel grid it displays—as well as to report which configurations are possible. However, they may not be supported in the future. 15-bit depths are not currently supported
See also: set_screen_space(), get_screen_info()
Declared in: be/interface/ScrollBar.h
Constant |
---|
B_H_SCROLL_BAR_HEIG HT |
B_V_SCROLL_BAR_WIDT H |
These constants record the recommended thickness of scroll bars. They should be used to help define the frame rectangles passed to the BScrollBar constructor.
See also: the BScrollBar class
Declared in: be/interface/Font.h
Constant |
---|
B_TRUNCATE_END |
B_TRUNCATE_BEGINNIN G |
B_TRUNCATE_MIDDLE |
B_TRUNCATE_SMART |
These constants instruct a BFont where it should remove characters from a set of strings to shorten them.
See also: BFont::GetTruncatedStrings()
Declared in: be/interface/GraphicsDefs.h
|
These constants set transparent pixel values in a bitmap image. B_TRANSPARENT_8_BIT designates a transparent pixel in the B_CMAP8 color space, and B_TRANSPARENT_32_BIT designates a transparent pixel in the B_RGB32 color space.
Transparency is explained in the "Drawing Modes" part of the "Drawing" section of this chapter. Drawing modes other than B_OP_COPY preserve the destination image where a source bitmap is transparent.
See also: "Drawing Modes" in the "Drawing" section of this chapter, the BBitmap class, BView::SetViewColor()
Declared in: be/interface/View.h
Constant | Meaning |
---|---|
B_FULL_UPDATE_ON_RE SIZE | Include the entire view in the clipping region. |
B_WILL_DRAW | Allow the BView to draw. |
B_PULSE_NEEDED | Report pulse events to the BView. |
B_FRAME_EVENTS | Report view-resized and view-moved events. |
B_NAVIGABLE | Let users navigate to the view with the Tab key. |
B_NAVIGABLE_JUMP | Mark the view for Control-Tab navigation. |
These constants can be combined to form a mask that sets the behavior of a BView object. They're explained in more detail under the class constructor. The mask is passed to the constructor, or to the SetFlags() function.
See also: the BView constructor, BView::SetFlags()
Declared in: be/interface/Window.h
Constant | Constant |
---|---|
B_NOT_MOVABLE | B_NOT_CLOSABLE |
B_NOT_H_RESIZABLE | B_NOT_ZOOMABLE |
B_NOT_V_RESIZABLE | B_NOT_MINIMIZABL E |
B_NOT_RESIZABLE | B_WILL_FLOAT |
B_WILL_ACCEPT_FIRST_CLI CK |
These constants set the behavior of a window. They can be combined to form a mask that's passed to the BWindow constructor.
See also: the BWindow constructor
Declared in: be/interface/Window.h
Constant | Meaning |
---|---|
B_MODAL_WINDOW | The window is a modal window. |
B_BORDERED_WINDO W | The window has a border but no title tab. |
B_TITLED_WINDOW | The window has a border and a title tab. |
B_DOCUMENT_WINDO W | The window has a border, tab and resize knob. |
These constants describe the various kinds of windows that can be requested from the Application Server.
See also: the BWindow constructor
Declared in: be/interface/Window.h
Constant |
---|
B_CURRENT_WORKSPA CE |
B_ALL_WORKSPACES |
These constants are used—along with designations of specific workspaces—to associate a set of one or more workspaces with a BWindow.
See also: the BWindow constructor, BWindow::SetWorkspaces()
Declared in: be/interface/Alert.h
|
These constants name the various types of alert panel.
See also: "alert_type Constants", the BAlert constructor
Declared in: be/interface/InterfaceDefs.h
|
Alignment constants determine where lines of text are placed in a view.
See also: "alignment Constants", BTextView::SetAlignment()
Declared in: be/interface/Alert.h
|
These constants name the methods that can be used to determine how wide to make the buttons in an alert panel.
See also: "button_width Constants", the BAlert constructor
Declared in: be/interface/GraphicsDefs.h
|
This structure contains information about the 8-bit color context for a particular screen. All applications that display on the screen share the same color map.
See also: BScreen::ColorMap()
Declared in: be/interface/GraphicsDefs.h
|
Color space constants determine the depth and interpretation of bitmap images. They're described under "Colors" in the "Drawing" section of this chapter.
See also: "color_space Constants"
Declared in: be/interface/GraphicsDefs.h
|
The drawing mode determines how source and destination images interact.
See also: "Drawing Modes" in the "Drawing" section of this chapter, "drawing_mode Constants"
Declared in: be/interface/Font.h
|
This structure records information about the location of a character outline within the horizontal space allotted to the character. Edges separate one character from adjacent characters on the left and right. They're explained under the GetEdges() function in the BFont class.
See also: BFont::GetEscapements()
Declared in: be/interface/Font.h
|
This structure contains values that should be added to the width of each character in a string when the string is drawn.
See also: BView::DrawString(), BFont::GetEscapements()
Declared in: be/interface/Font.h
|
This type distinguishes between fonts that are read left-to-right (B_FONT_LEFT_TO_RIGHT) and those that are read right-to-left (B_FONT_RIGHT_TO_LEFT).
See also: BFont::Direction()
Declared in: be/interface/InterfaceDefs.h
|
This type defines a string long enough to hold the name of a font family—64 characters including the null terminator.
See also: get_font_family()
Declared in: be/interface/Font.h
|
This type combines the three vertical measurements that determine the height of a line of text.
See also: BFont::GetHeight()
Declared in: be/interface/InterfaceDefs.h
|
This type defines a string long enough to hold the name of a font style—64 characters including the null terminator.
See also: get_font_style()
Declared in: be/interface/View.h
|
This structure is used to get information about the current state of the keyboard in the absence of B_KEY_DOWN messages.
See also: get_key_info()
Declared in: be/interface/InterfaceDefs.h
|
This structure maps the physical keys on the keyboard to their functions in the user interface. It holds the tables that assign characters to key codes, set up dead keys, and determine which keys function as modifiers. There's just one key map shared by all applications running on the same machine.
See also: get_key_map()
Declared in: be/interface/MenuBar.h
|
This type enumerates the ways that a menu bar can be bordered.
See also: BMenuBar::SetBorder(), "menu_bar_border Constants" above
Declared in: be/interface/Menu.h
|
This structure records the user's menu preferences.
See also: set_menu_info() , the BMenu class
Declared in: be/interface/Menu.h
|
This type distinguishes the various ways that items can arranged in a menu or menu bar.
See also: the BMenu class, "menu_layout Constants" above
Declared in: be/interface/InterfaceDefs.h
|
This structure maps mouse buttons to their roles as the B_PRIMARY_MOUSE_BUTTON, B_SECONDARY_MOUSE_BUTTON, or B_TERTIARY_MOUSE_BUTTON.
See also: set_mouse_map()
Declared in: be/interface/InterfaceDefs.h
|
This type distinguishes between the B_VERTICAL and B_HORIZONTAL orientation of scroll bars.
See also: the BScrollBar and BScrollView classes
Declared in: be/interface/GraphicsDefs.h
|
A pattern is a arrangement of two colors—the high color and the low color—in an 8-pixel by 8-pixel square. Pixels are specified in rows, with one byte per row and one bit per pixel. Bits marked 1 designate the high color; those marked 0 designate the low color. An example and an illustration are given under "Patterns" in the "Drawing section of this chapter.
See also: "Pattern Constants" above
Declared in: be/interface/PrintJob.h
|
This structure defines the header information for a print job. Although declared publicly, it currently is used only internally by the BPrintJob class.
Declared in: be/interface/GraphicsDefs.h
|
This type specifies a full 32-bit color. Each component can have a value ranging from a minimum of 0 to a maximum of 255.
The alpha component, which is designed to specify the coverage of the color (how transparent or opaque it is), is currently ignored. However, an rgb_color can be made completely transparent by assigning it the special value, B_TRANSPARENT_32_BIT.
See also: BView::SetHighColor()
Declared in: be/interface/Screen.h
|
This type is a unique identifier for a screen. The constant B_MAIN_SCREEN_ID is a screen_id that identifies the main screen.
See also: the BScreen class
Declared in: be/interface/InterfaceDefs.h
|
This structure holds information about a screen. Its fields are explained under the get_screen_info() global function.
See also: get_screen_info()
Declared in: be/interface/InterfaceDefs.h
|
This structure captures the user's preferences for how scroll bars should behave and appear.
See also: set_scroll_bar_info(), the BScrollBar class
Declared in: be/interface/TextView.h
|
The BTextView class uses this structure to keep track of a sequence of characters that are displayed in the same font and color.
See also: BTextView::SetRunArray()
Declared in: be/interface/TextView.h
|
The BTextView class uses this structure to associate character formats with the text it displays.
See also: BTextView::SetRunArray()
Declared in: be/interface/Font.h
|
This structure lists the properties of a font that has a counterpart that's been tuned to improve its appearance on-screen. The tuned counterpart will be used whenever the font is the BView's current font and DrawString() draws to the screen.
See also: BFont::GetTunedInfo(), get_font_family()
Declared in: be/interface/Window.h
|
This type describes the various kinds of windows that can be requested from the Application Server.
See also: the BWindow constructor, "window_type Constants"
The Interface Kit Table of Contents | The Interface Kit Index |
Copyright © 2000 Be, Inc. All rights reserved..