Modules | Files | Classes | Enumerations
Interface Kit

API for displaying a graphical user interface. More...

Modules

 Layout API
 Provides classes for automatically laying out UIs.
 

Files

file  Alert.h
 BAlert class definition and support enums.
 
file  Bitmap.h
 Defines the BBitmap class and global operators and functions for handling bitmaps.
 
file  CheckBox.h
 Defines the BCheckBox class.
 
file  ColorControl.h
 BColorControl class definition and support enums.
 
file  Control.h
 BControl class definition and support enums.
 
file  Font.h
 BFont class definition, unicode_block class definition, and font-related struct and enum definitions.
 
file  GraphicsDefs.h
 Graphics-related functions and variables used by the Interface Kit.
 
file  IconUtils.h
 Vector icon handling utility class.
 
file  InterfaceDefs.h
 Defines standard interface definitions for controls.
 
file  ListItem.h
 ListItem class definition.
 
file  ListView.h
 ListView class definition.
 
file  Menu.h
 BMenu class definition and support structures.
 
file  MenuBar.h
 BMenuBar class definition and support structures.
 
file  MenuField.h
 BMenuField class definition and support structures.
 
file  MenuItem.h
 BMenuItem class definition.
 
file  OptionPopUp.h
 BOptionPopUp class definition.
 
file  OutlineListView.h
 Provides the BOutlineListView class.
 
file  Picture.h
 BPicture class definition.
 
file  PictureButton.h
 BPictureButton class definition and support structures.
 
file  Point.h
 BPoint class definition.
 
file  Polygon.h
 BPolygon class definition.
 
file  PopUpMenu.h
 BPopUpMenu class definition and support structures.
 
file  RadioButton.h
 BRadioButton class definition.
 
file  Rect.h
 BRect class definition.
 
file  Region.h
 BRegion class definition.
 
file  Screen.h
 Defines the BScreen class and support structures.
 
file  ScrollBar.h
 BScrollBar class definition.
 
file  ScrollView.h
 BScrollView class definition.
 
file  SeparatorItem.h
 BSeparatorItem class definition.
 
file  Shape.h
 BShape and BShapeIterator class definitions.
 
file  Size.h
 BSize class definition and related enum definition.
 
file  StringItem.h
 BStringItem class definition.
 
file  StringView.h
 BStringView class definition.
 
file  TabView.h
 Provides the BTab and BTabView classes.
 
file  TextControl.h
 Provides the BTextControl class.
 
file  TextView.h
 Provides the BTextView class and associated structs.
 
file  ToolTip.h
 Provides the BToolTip class.
 
file  View.h
 BView class definition and support data structures.
 
file  Window.h
 BWindow class definition and support data structures.
 

Classes

class  BAlert
 The BAlert class defines a modal alert dialog which displays a short message and provides a set of labeled buttons that allow the user to respond. More...
 
class  BBitmap
 Access and manipulate digital images commonly known as bitmaps. More...
 
class  BBox
 A rectangular view with a border and an optional label to group related subviews visually. More...
 
class  BButton
 A control used to initiate an action. More...
 
class  BCheckBox
 A user interface element used to make a binary decision. More...
 
class  BColorControl
 BColorControl displays an on-screen color picker. More...
 
class  BControl
 BControl is the base class for user-event handling objects. More...
 
class  BDragger
 A view that allows the user drag and drop a target view. More...
 
class  BFont
 Represents a typeface including its family, style and size. More...
 
class  BIconUtils
 The BIconUtils class provide utility methods for managing and drawing vector icons. More...
 
class  BListItem
 A list item, a member of a BListView or BOutlineListView. More...
 
class  BListView
 Displays a list of items that the user can select and invoke. More...
 
class  BMenu
 Displays a list of menu items including additional menus arranged hierarchically. More...
 
class  BMenuBar
 A window's root menu. More...
 
class  BMenuField
 A labeled pop-up menu. More...
 
class  BMenuItem
 Display item for the BMenu class. More...
 
class  BOptionPopUp
 A BMenuField based BControl implementation. More...
 
class  BOutlineListView
 Expands upon BListView to display a hierarchical list of items. More...
 
class  BPicture
 Records a series of drawing instructions that can be "replayed" later. More...
 
class  BPictureButton
 A button draw with a BPicture image instead of a text label. More...
 
class  BPoint
 A point on a two-dimensional Cartesian coordinate system. More...
 
class  BPolygon
 A closed, many-sided figure which defines an area in a two-dimensional Cartesian coordinate system. More...
 
class  BPopUpMenu
 Displays a pop-up menu. More...
 
class  BRadioButton
 A user interface control used to select between a set of mutually exclusive options. More...
 
class  BRect
 Defines a rectangular area aligned along pixel dimensions. More...
 
class  BRegion
 An area composed of rectangles. More...
 
class  BScreen
 The BScreen class provides methods to retrieve and change display settings. More...
 
class  BScrollBar
 User interface element used to scroll a target view vertically or horizontally. More...
 
class  BScrollView
 A convenience class used to add scrolling to a target view. More...
 
class  BSeparatorItem
 Display separator item for BMenu class. More...
 
class  BShape
 Encapsulates a Postscript-style "path". More...
 
class  BShapeIterator
 Allows you to iterate through BShape operations. More...
 
class  BSize
 A two-dimensional size. More...
 
class  BStringItem
 A list item of a text string used as a member of a BListView or BOutlineListView. More...
 
class  BStringView
 Draws a non-editable single-line text string, most commonly used as a label. More...
 
class  BTab
 A tab that goes in a BTabView. More...
 
class  BTabView
 A container for BTab objects to display all tabs. More...
 
class  BTextControl
 Displays a labeled text view control. More...
 
class  BTextView
 Displays and manipulates styled text. More...
 
class  BToolTip
 Displays help text on hover. More...
 
class  BView
 View base class. More...
 
class  BWindow
 Window base class. More...
 
struct  edge_info
 The distance that a character outline is inset from its escapement boundaries. More...
 
struct  escapement_delta
 A struct that allows you to specify extra horizontal space to surround each character with. More...
 
struct  font_cache_info
 Font cache parameters. More...
 
struct  font_height
 The amount of vertical space surrounding a character. More...
 
struct  menu_info
 Information about a menu such as font size and family, background color, and flags. More...
 
struct  pattern
 A pattern to use when drawing. More...
 
struct  text_run
 text run struct More...
 
struct  text_run_array
 text run array struct More...
 
struct  tuned_font_info
 Tuning information of fonts used to make it look better when displayed on-screen. More...
 
class  unicode_block
 Describes the blocks of Unicode characters supported by a font. More...
 

Enumerations

enum  alert_type {
  B_EMPTY_ALERT = 0,
  B_INFO_ALERT,
  B_IDEA_ALERT,
  B_WARNING_ALERT,
  B_STOP_ALERT
}
 
enum  alpha_function {
  B_ALPHA_OVERLAY = 0,
  B_ALPHA_COMPOSITE
}
 
enum  border_style {
  B_PLAIN_BORDER,
  B_FANCY_BORDER,
  B_NO_BORDER
}
 
enum  button_spacing {
  B_EVEN_SPACING = 0,
  B_OFFSET_SPACING
}
 
enum  color_control_layout {
  B_CELLS_4x64 = 4,
  B_CELLS_8x32 = 8,
  B_CELLS_16x16 = 16,
  B_CELLS_32x8 = 32,
  B_CELLS_64x4 = 64
}
 
enum  font_direction {
  B_FONT_LEFT_TO_RIGHT = 0,
  B_FONT_RIGHT_TO_LEFT = 1
}
 
enum  font_file_format {
  B_TRUETYPE_WINDOWS = 0,
  B_POSTSCRIPT_TYPE1_WINDOWS = 1
}
 
enum  menu_bar_border {
  B_BORDER_FRAME,
  B_BORDER_CONTENTS,
  B_BORDER_EACH_ITEM
}
 
enum  menu_layout {
  B_ITEMS_IN_ROW = 0,
  B_ITEMS_IN_COLUMN,
  B_ITEMS_IN_MATRIX
}
 
enum  source_alpha {
  B_PIXEL_ALPHA = 0,
  B_CONSTANT_ALPHA
}
 
enum  tab_position {
  B_TAB_FIRST = 999,
  B_TAB_FRONT,
  B_TAB_ANY
}
 
enum  undo_state {
  B_UNDO_UNAVAILABLE,
  B_UNDO_TYPING,
  B_UNDO_CUT,
  B_UNDO_PASTE,
  B_UNDO_CLEAR,
  B_UNDO_DROP
}
 
enum  window_alignment {
  B_BYTE_ALIGNMENT = 0,
  B_PIXEL_ALIGNMENT = 1
}
 
enum  window_feel {
  B_NORMAL_WINDOW_FEEL = 0,
  B_MODAL_SUBSET_WINDOW_FEEL = 2,
  B_MODAL_APP_WINDOW_FEEL = 1,
  B_MODAL_ALL_WINDOW_FEEL = 3,
  B_FLOATING_SUBSET_WINDOW_FEEL = 5,
  B_FLOATING_APP_WINDOW_FEEL = 4,
  B_FLOATING_ALL_WINDOW_FEEL = 6
}
 
enum  window_look {
  B_BORDERED_WINDOW_LOOK = 20,
  B_NO_BORDER_WINDOW_LOOK = 19,
  B_TITLED_WINDOW_LOOK = 1,
  B_DOCUMENT_WINDOW_LOOK = 11,
  B_MODAL_WINDOW_LOOK = 3,
  B_FLOATING_WINDOW_LOOK = 7
}
 
enum  window_type {
  B_UNTYPED_WINDOW = 0,
  B_TITLED_WINDOW = 1,
  B_MODAL_WINDOW = 3,
  B_DOCUMENT_WINDOW = 11,
  B_BORDERED_WINDOW = 20,
  B_FLOATING_WINDOW = 21
}
 

Detailed Description

API for displaying a graphical user interface.

The Interface Kit holds all the classes you'll need to develop a GUI. Building on the messaging facilities provided by the Application Kit, the Interface Kit can be used to create a responsive and attractive graphical user interface.

The most important class in the Interface Kit is the BView class, which handles drawing and user interaction. Pointer and keyboard events are processed in this class.

Another important class is the BWindow class, which holds BViews and makes them visible to the user. The BWindow class also handles BView focusing and BMessage dispatching, among other things.

A new addition Haiku has added over the BeOS API is the Layout API, which is based around the BLayoutItem and BLayout classes. These classes will take care of making sure all your GUI widgets end up where you want them, with enough space to be useful. You can start learning the Layout API by reading the introduction .

Enumeration Type Documentation

◆ alert_type

enum alert_type

Determines which icon (if any) is displayed in the alert dialog. Choose one option. If the constructor doesn't include an alert_type argument than B_EMPTY_ALERT is used.

Since
BeOS R3
Enumerator
B_EMPTY_ALERT 

No icon

Since
BeOS R3
B_INFO_ALERT 
alert_info_32.png

Info icon

Since
BeOS R3
B_IDEA_ALERT 
alert_idea_32.png

Idea icon

Since
BeOS R3
B_WARNING_ALERT 
alert_warning_32.png

Warning icon

Since
BeOS R3
B_STOP_ALERT 
alert_stop_32.png

Stop icon

Since
BeOS R3

◆ alpha_function

Blending alpha function constants.

Since
BeOS R3
Enumerator
B_ALPHA_OVERLAY 

Used for drawing a image with transparency over an opaque background.

Since
BeOS R3
B_ALPHA_COMPOSITE 

Used to composite two or more transparent images together offscreen to produce a new image drawn using B_ALPHA_OVERLAY mode.

Since
BeOS R3

◆ border_style

Collection of flags that determine the border style drawn around a BBox.

Since
BeOS R3
Enumerator
B_PLAIN_BORDER 
B_PLAIN_BORDER.png

The right and bottom sides of the box are darker than the top and left sides to produce a shadow effect and make the box look like it is raised slightly above the surrounding surface.

Since
BeOS R3
B_FANCY_BORDER 
B_FANCY_BORDER.png

The border is a bevelled to give it a 3D effect. The border is uniform in appearance on all four sides. This is the default appearance.

Since
BeOS R3
B_NO_BORDER 

No border.

Since
BeOS R3

◆ button_spacing

Determines how the buttons on the alert dialog are spaced relative to each other. Choose one option. If the constructor doesn't include a button_spacing argument than B_EVEN_SPACING is used.

Since
BeOS R3
Enumerator
B_EVEN_SPACING 

If the alert dialog has more than one button than the buttons are spaced evenly across the bottom of the alert dialog.

Since
BeOS R3
B_OFFSET_SPACING 

If the alert dialog has more than one button than the leftmost button is offset to the left-hand side of the dialog while the rest of the buttons are grouped on the right. This is useful to separate off a leftmost "Cancel" or "Delete" button.

Since
BeOS R3

◆ color_control_layout

Enumeration of the color control layout options.

Since
BeOS R3
Enumerator
B_CELLS_4x64 

Cells are arranged in 4 columns, 64 rows.

Since
BeOS R3
B_CELLS_8x32 

Cells are arranged in 8 columns, 32 rows.

Since
BeOS R3
B_CELLS_16x16 

Cells are arranged in 16 columns, 16 rows.

Since
BeOS R3
B_CELLS_32x8 

Cells are arranged in 32 columns, 8 rows.

Since
BeOS R3
B_CELLS_64x4 

Cells are arranged in 64 columns, 4 rows.

Since
BeOS R3

◆ font_direction

Determines the direction of the text rendered by the font, left-to-right or right-to-left.

Since
BeOS R3
Enumerator
B_FONT_LEFT_TO_RIGHT 

Left to right.

Since
BeOS R3
B_FONT_RIGHT_TO_LEFT 

Right to left.

Since
BeOS R3

◆ font_file_format

Font file format, TrueType™ or PostScript™ Type1.

See also
BFont::FileFormat()
Since
BeOS R4
Enumerator
B_TRUETYPE_WINDOWS 

TrueType™ font file format.

Since
BeOS R4
B_POSTSCRIPT_TYPE1_WINDOWS 

PostScript™ Type1 font file format.

Since
BeOS R4

◆ menu_bar_border

Menu bar border style constants.

See also
BMenuBar::SetBorder()
Since
BeOS R3
Enumerator
B_BORDER_FRAME 

The border is drawn around the entire menu bar.

Since
BeOS R3
B_BORDER_CONTENTS 

The border is drawn around the list of items.

Since
BeOS R3
B_BORDER_EACH_ITEM 

The border is drawn around each individual item.

Since
BeOS R3

◆ menu_layout

Constants to define the layout of the menu items in a menu.

Since
BeOS R3
Enumerator
B_ITEMS_IN_ROW 

Items are arranged in a row, one next to the other.

Since
BeOS R3
B_ITEMS_IN_COLUMN 

Items are arranged in a column, one on top of the other.

Since
BeOS R3
B_ITEMS_IN_MATRIX 

Items are arranged in a matrix, a free-form arrangement that you create.

Since
BeOS R3

◆ source_alpha

Blending alpha mode constants.

Since
BeOS R3
Enumerator
B_PIXEL_ALPHA 

Use the alpha value of each pixel when drawing a bitmap.

Since
BeOS R3
B_CONSTANT_ALPHA 

Use the alpha channel of the view's high color.

Since
BeOS R3

◆ tab_position

Tab position flags

Since
BeOS R3
Enumerator
B_TAB_FIRST 

First tab in the tab view.

Since
BeOS R3
B_TAB_FRONT 

Front most tab in the tab view.

Since
BeOS R3
B_TAB_ANY 

Any tab in the tab view.

Since
BeOS R3

◆ undo_state

enum undo_state

Undo state flags.

Since
BeOS R3
Enumerator
B_UNDO_UNAVAILABLE 
Since
BeOS R3
B_UNDO_TYPING 
Since
BeOS R3
B_UNDO_CUT 
Since
BeOS R3
B_UNDO_PASTE 
Since
BeOS R3
B_UNDO_CLEAR 
Since
BeOS R3
B_UNDO_DROP 
Since
BeOS R3

◆ window_alignment

Define window alignment.

Since
BeOS R3
Enumerator
B_BYTE_ALIGNMENT 

Aligns window in terms of frame buffer offsets. Affects only horizontal origin and width, can't align right and bottom edges in this mode.

Since
BeOS R3
B_PIXEL_ALIGNMENT 

Aligns window in pixel coordinates.

Since
BeOS R3

◆ window_feel

Window feel constants, define window behavior.

Since
BeOS R3
Enumerator
B_NORMAL_WINDOW_FEEL 

Behaves like a normal, non-modal, non-floating window.

Since
BeOS R3
B_MODAL_SUBSET_WINDOW_FEEL 

Blocks all windows in its subset when displayed. Visible only if a window in its subset is visible.

Since
BeOS R3
B_MODAL_APP_WINDOW_FEEL 

Blocks all windows in its app when displayed. Visible only if a window in its app is visible.

Since
BeOS R3
B_MODAL_ALL_WINDOW_FEEL 

Blocks all windows across the entire system when displayed. Always visible in all workspaces.

Since
BeOS R3
B_FLOATING_SUBSET_WINDOW_FEEL 

Floats above all windows in its subset when displayed. Visible only if a window in its subset is the frontmost window.

Since
BeOS R3
B_FLOATING_APP_WINDOW_FEEL 

Floats above all windows in its app when displayed. Visible only if a window in its app is the frontmost window.

Since
BeOS R3
B_FLOATING_ALL_WINDOW_FEEL 

Floats above all windows across the entire system when displayed. Always visible in all workspaces.

Since
BeOS R3

◆ window_look

Window look constants, define window appearance.

Since
BeOS R3
Enumerator
B_BORDERED_WINDOW_LOOK 

No title bar, thin border, no resize control.

Since
BeOS R3
B_NO_BORDER_WINDOW_LOOK 

A borderless rectangle with no provisions to move or close the window.

Since
BeOS R5
B_TITLED_WINDOW_LOOK 

Like B_DOCUMENT_WINDOW_LOOK, but with a resize corner instead of a resize thumb.

Since
BeOS R3
B_DOCUMENT_WINDOW_LOOK 

Large title bar, thick border, draggable resize corner thumb.

Since
BeOS R3
B_MODAL_WINDOW_LOOK 

For modal dialogs: no title bar, thick border, resize corner depending on the B_NOT_RESIZABLE flag.

Since
BeOS R3
B_FLOATING_WINDOW_LOOK 

For floating sub windows: small title bar, thin border, resize corner.

Since
BeOS R3

◆ window_type

Combined window look and feel constants. Define both the appearance and behavior of a window.

Since
BeOS R3
Enumerator
B_UNTYPED_WINDOW 

A window of unknown or undefined type.

Since
BeOS R3
B_TITLED_WINDOW 

B_TITLED_WINDOW_LOOK and B_NORMAL_WINDOW_FEEL.

Since
BeOS R3
B_MODAL_WINDOW 

B_MODAL_WINDOW_LOOK and B_MODAL_APP_WINDOW_FEEL.

Since
BeOS R3
B_DOCUMENT_WINDOW 

B_DOCUMENT_WINDOW_LOOK and B_NORMAL_WINDOW_FEEL.

Since
BeOS R3
B_BORDERED_WINDOW 

B_BORDERED_WINDOW_LOOK and B_NORMAL_WINDOW_FEEL.

Since
BeOS R3
B_FLOATING_WINDOW 

B_FLOATING_WINDOW_LOOK and B_FLOATING_APP_WINDOW_FEEL.

Since
BeOS R3