Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Enumerations | Variables
View.h File Reference

BView class definition and support data structures. More...

Classes

class  BView
 View base class. More...
 

Namespaces

namespace  BPrivate
 Internal or experimental API.
 

Macros

#define _RESIZE_MASK_   (0xffff)
 Resize mask. Do not use.
 
#define B_MOUSE_BUTTON(n)   (1 << ((n) - 1))
 Compute mouse button mask for button n.
 

Enumerations

enum  {
  B_PRIMARY_MOUSE_BUTTON = B_MOUSE_BUTTON(1) ,
  B_SECONDARY_MOUSE_BUTTON = B_MOUSE_BUTTON(2) ,
  B_TERTIARY_MOUSE_BUTTON = B_MOUSE_BUTTON(3)
}
 
enum  {
  B_ENTERED_VIEW = 0 ,
  B_INSIDE_VIEW ,
  B_EXITED_VIEW ,
  B_OUTSIDE_VIEW
}
 
enum  {
  B_POINTER_EVENTS = 0x00000001 ,
  B_KEYBOARD_EVENTS = 0x00000002
}
 
enum  {
  B_LOCK_WINDOW_FOCUS = 0x00000001 ,
  B_SUSPEND_VIEW_FOCUS = 0x00000002 ,
  B_NO_POINTER_HISTORY = 0x00000004 ,
  B_FULL_POINTER_HISTORY = 0x00000008
}
 
enum  coordinate_space {
  B_CURRENT_STATE_COORDINATES ,
  B_PREVIOUS_STATE_COORDINATES ,
  B_VIEW_COORDINATES ,
  B_PARENT_VIEW_DRAW_COORDINATES ,
  B_PARENT_VIEW_COORDINATES ,
  B_WINDOW_COORDINATES ,
  B_SCREEN_COORDINATES
}
 A coordinate or drawing space. More...
 
enum  rect_tracking_style {
  B_TRACK_WHOLE_RECT ,
  B_TRACK_RECT_CORNER
}
 
enum  set_font_mask {
  B_FONT_FAMILY_AND_STYLE = 0x00000001 ,
  B_FONT_SIZE = 0x00000002 ,
  B_FONT_SHEAR = 0x00000004 ,
  B_FONT_ROTATION = 0x00000008 ,
  B_FONT_SPACING = 0x00000010 ,
  B_FONT_ENCODING = 0x00000020 ,
  B_FONT_FACE = 0x00000040 ,
  B_FONT_FLAGS = 0x00000080 ,
  B_FONT_FALSE_BOLD_WIDTH = 0x00000100 ,
  B_FONT_ALL = 0x000001FF
}
 

Variables

const uint32 _B_RESERVED1_ = 0x40000000UL
 Reserved for future use.
 
const uint32 _VIEW_BOTTOM_ = 3UL
 View bottom mask variable. Do not use.
 
const uint32 _VIEW_CENTER_ = 5UL
 View center mask variable. Do not use.
 
const uint32 _VIEW_LEFT_ = 2UL
 View left mask variable. Do not use.
 
const uint32 _VIEW_RIGHT_ = 4UL
 View right mask variable. Do not use.
 
const uint32 _VIEW_TOP_ = 1UL
 View top mask variable. Do not use.
 
const uint32 B_DRAW_ON_CHILDREN = 0x00800000UL
 Indicates that the view responds to the DrawAfterChildren() hook method.
 
const uint32 B_FOLLOW_ALL = B_FOLLOW_ALL_SIDES
 Equivalent to B_FOLLOW_ALL_SIDES.
 
const uint32 B_FOLLOW_ALL_SIDES
 Follow all sides resize mask parameter. Equivalent to B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP_BOTTOM. The view will be resized with its parent view both horizontally and vertically.
 
const uint32 B_FOLLOW_BOTTOM = _rule_(_VIEW_BOTTOM_, 0, _VIEW_BOTTOM_, 0)
 The margin between the bottom of the view and the bottom of its parent remains constant.
 
const uint32 B_FOLLOW_H_CENTER = _rule_(0, _VIEW_CENTER_, 0, _VIEW_CENTER_)
 The view maintains a constant relationship to the horizontal center of its parent view.
 
const uint32 B_FOLLOW_LEFT = _rule_(0, _VIEW_LEFT_, 0, _VIEW_LEFT_)
 The margin between the left side of the view and the left side of its parent remains constant.
 
const uint32 B_FOLLOW_LEFT_RIGHT = _rule_(0, _VIEW_LEFT_, 0, _VIEW_RIGHT_)
 The margin between the left and right sides of the view and the left and right sides of its parent both remain constant.
 
const uint32 B_FOLLOW_LEFT_TOP = B_FOLLOW_TOP | B_FOLLOW_LEFT
 The margins between the left and top sides of the view and the left and top sides of its parent remain constant.
 
const uint32 B_FOLLOW_NONE = 0
 Follow none resize mask parameter. Equivalent to B_FOLLOW_LEFT | B_FOLLOW_TOP. The view maintains its position in its parent's coordinate system but not in the screen coordinate system.
 
const uint32 B_FOLLOW_RIGHT = _rule_(0, _VIEW_RIGHT_, 0, _VIEW_RIGHT_)
 The margin between the right side of the view and the right side of its parent remains constant.
 
const uint32 B_FOLLOW_TOP = _rule_(_VIEW_TOP_, 0, _VIEW_TOP_, 0)
 The margin between the top of the view and the top of its parent remains constant.
 
const uint32 B_FOLLOW_TOP_BOTTOM = _rule_(_VIEW_TOP_, 0, _VIEW_BOTTOM_, 0)
 The margin between the top and bottom sides of the view and the top and bottom sides of its parent both remain constant.
 
const uint32 B_FOLLOW_V_CENTER = _rule_(_VIEW_CENTER_, 0, _VIEW_CENTER_, 0)
 The view maintains a constant relationship to the vertical center of its parent view.
 
const uint32 B_FRAME_EVENTS = 0x04000000UL
 View responds to frame move and resize events.
 
const uint32 B_FULL_UPDATE_ON_RESIZE = 0x80000000UL
 Redraw the entire view on resize.
 
const uint32 B_INPUT_METHOD_AWARE = 0x00400000UL
 Indicates the view understands input method add-ons, as used for complex text input in CJK and other languages.
 
const uint32 B_INVALIDATE_AFTER_LAYOUT = 0x00080000UL
 Indicates that the view should be redraw after being added to a layout.
 
const uint32 B_NAVIGABLE = 0x02000000UL
 The view is able to receive focus for keyboard navigation. Typically focus is indicated by drawing a blue rectangle around the view.
 
const uint32 B_NAVIGABLE_JUMP = 0x08000000UL
 Indicates this is the default keyboard navigation view.
 
const uint32 B_PULSE_NEEDED = 0x10000000UL
 Indicates that the view accepts Pulse() messages.
 
const uint32 B_SCROLL_VIEW_AWARE = 0x00200000UL
 Indicates the view will properly manage scrollbars that have been targeted to it, i.e. update their ranges and proportions.
 
const uint32 B_SUBPIXEL_PRECISE = 0x01000000UL
 The view draws with sub-pixel precision.
 
const uint32 B_SUPPORTS_LAYOUT = 0x00100000UL
 The view supports the layout APIs, i.e. it doesn't require an frame rectangle to be specified.
 
const uint32 B_WILL_DRAW = 0x20000000UL
 Indicates that the view will do its own drawing.
 

Detailed Description

BView class definition and support data structures.

Since
BeOS R5

Macro Definition Documentation

◆ _RESIZE_MASK_

_RESIZE_MASK_   (0xffff)

Resize mask. Do not use.

Since
Haiku R1

◆ B_MOUSE_BUTTON

B_MOUSE_BUTTON (   n)    (1 << ((n) - 1))

Compute mouse button mask for button n.

Buttons are numbered from 1 to 32.

Some mice may not have more than 2 buttons, so the extra buttons should only be used as shortcuts for actions that can be done in alternative ways.

Since
Haiku R1

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
B_PRIMARY_MOUSE_BUTTON 

Primary mouse button mask parameter.

The primary mouse button should be used for main operations (selecting, dragging, or opening objects).

This maps to B_MOUSE_BUTTON(1).

Since
BeOS R3
B_SECONDARY_MOUSE_BUTTON 

Secondary mouse button mask parameter.

The secondary button should be used for additional operations on the pointed objects, such as popup menus.

This maps to B_MOUSE_BUTTON(2).

Since
BeOS R3
B_TERTIARY_MOUSE_BUTTON 

Tertiary mouse button mask parameter.

The tertiary button should be used for clipboard paste.

This maps to B_MOUSE_BUTTON(3).

Since
BeOS R3

◆ anonymous enum

anonymous enum
Enumerator
B_ENTERED_VIEW 

Mouse transit entered view.

Since
BeOS R3
B_INSIDE_VIEW 

Mouse transit inside view.

Since
BeOS R3
B_EXITED_VIEW 

Mouse transit exited view.

Since
BeOS R3
B_OUTSIDE_VIEW 

Mouse transit outside view.

Since
BeOS R5

◆ anonymous enum

anonymous enum
Enumerator
B_POINTER_EVENTS 

Mouse pointer events mask parameter.

Since
BeOS R5
B_KEYBOARD_EVENTS 

Keyboard events mask parameter.

Since
BeOS R5

◆ anonymous enum

anonymous enum
Enumerator
B_LOCK_WINDOW_FOCUS 

Prevents the attached window from losing its focused state while the mouse is held down.

Since
BeOS R5
B_SUSPEND_VIEW_FOCUS 

Events normally sent to the focus view are suppressed.

Since
BeOS R5
B_NO_POINTER_HISTORY 

Send only the most recent MouseMoved() event to the view.

Note
New in Haiku: unless this flag is specified, both BWindow and BView::GetMouse() will filter out older mouse moved messages.
Since
BeOS R5
B_FULL_POINTER_HISTORY 

Send all MouseMoved() events to the view.

Since
Haiku R1

◆ coordinate_space

A coordinate or drawing space.

See also
Coordinate spaces
Since
Haiku R1
Enumerator
B_CURRENT_STATE_COORDINATES 

The current drawing space.

Since
Haiku R1
B_PREVIOUS_STATE_COORDINATES 

The drawing space of the parent state in the stack.

Since
Haiku R1
B_VIEW_COORDINATES 

The base coordinate space of the view.

Since
Haiku R1
B_PARENT_VIEW_DRAW_COORDINATES 

The current drawing space of the parent view.

Since
Haiku R1
B_PARENT_VIEW_COORDINATES 

The base coordinate space of the parent view.

Since
Haiku R1
B_WINDOW_COORDINATES 

The coordinate space of the owning window.

Since
Haiku R1
B_SCREEN_COORDINATES 

The coordinate space of the screen.

Since
Haiku R1

◆ rect_tracking_style

Enumerator
B_TRACK_WHOLE_RECT 

The whole rectangle moves with the cursor.

Since
BeOS R3
B_TRACK_RECT_CORNER 

The left top corner is fixed while the right and bottom edges move with the cursor.

Since
BeOS R3

◆ set_font_mask

Enumerator
B_FONT_FAMILY_AND_STYLE 

Font family and style mask parameter.

Since
BeOS R3
B_FONT_SIZE 

Font size mask parameter.

Since
BeOS R3
B_FONT_SHEAR 

Font shear mask parameter.

Since
BeOS R3
B_FONT_ROTATION 

Font rotation mask parameter.

Since
BeOS R3
B_FONT_SPACING 

Font spacing mask parameter.

Since
BeOS R3
B_FONT_ENCODING 

Font encoding mask parameter.

Since
BeOS R3
B_FONT_FACE 

Font face mask parameter.

Since
BeOS R3
B_FONT_FLAGS 

Font flags mask parameter.

Since
BeOS R3
B_FONT_FALSE_BOLD_WIDTH 

Font false bold width mask parameter.

Since
Haiku R1
B_FONT_ALL 

Font all properties mask parameter.

Since
BeOS R3

Variable Documentation

◆ _B_RESERVED1_

_B_RESERVED1_ = 0x40000000UL

Reserved for future use.

Since
Haiku R1

◆ _VIEW_BOTTOM_

_VIEW_BOTTOM_ = 3UL

View bottom mask variable. Do not use.

Since
Haiku R1

◆ _VIEW_CENTER_

_VIEW_CENTER_ = 5UL

View center mask variable. Do not use.

Since
Haiku R1

◆ _VIEW_LEFT_

_VIEW_LEFT_ = 2UL

View left mask variable. Do not use.

Since
Haiku R1

◆ _VIEW_RIGHT_

_VIEW_RIGHT_ = 4UL

View right mask variable. Do not use.

Since
Haiku R1

◆ _VIEW_TOP_

_VIEW_TOP_ = 1UL

View top mask variable. Do not use.

Since
Haiku R1

◆ B_DRAW_ON_CHILDREN

B_DRAW_ON_CHILDREN = 0x00800000UL

Indicates that the view responds to the DrawAfterChildren() hook method.

Since
BeOS R5

◆ B_FOLLOW_ALL

B_FOLLOW_ALL = B_FOLLOW_ALL_SIDES

Equivalent to B_FOLLOW_ALL_SIDES.

Since
BeOS R3

◆ B_FOLLOW_ALL_SIDES

B_FOLLOW_ALL_SIDES
Initial value:
const uint32 _VIEW_BOTTOM_
View bottom mask variable. Do not use.
Definition: View.h:103
const uint32 _VIEW_LEFT_
View left mask variable. Do not use.
Definition: View.h:102
const uint32 _VIEW_TOP_
View top mask variable. Do not use.
Definition: View.h:101
const uint32 _VIEW_RIGHT_
View right mask variable. Do not use.
Definition: View.h:104

Follow all sides resize mask parameter. Equivalent to B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP_BOTTOM. The view will be resized with its parent view both horizontally and vertically.

Since
BeOS R3

◆ B_FOLLOW_BOTTOM

B_FOLLOW_BOTTOM = _rule_(_VIEW_BOTTOM_, 0, _VIEW_BOTTOM_, 0)

The margin between the bottom of the view and the bottom of its parent remains constant.

Since
BeOS R3

◆ B_FOLLOW_H_CENTER

B_FOLLOW_H_CENTER = _rule_(0, _VIEW_CENTER_, 0, _VIEW_CENTER_)

The view maintains a constant relationship to the horizontal center of its parent view.

Since
BeOS R3

◆ B_FOLLOW_LEFT

B_FOLLOW_LEFT = _rule_(0, _VIEW_LEFT_, 0, _VIEW_LEFT_)

The margin between the left side of the view and the left side of its parent remains constant.

Since
BeOS R3

◆ B_FOLLOW_LEFT_RIGHT

B_FOLLOW_LEFT_RIGHT = _rule_(0, _VIEW_LEFT_, 0, _VIEW_RIGHT_)

The margin between the left and right sides of the view and the left and right sides of its parent both remain constant.

Since
BeOS R3

◆ B_FOLLOW_LEFT_TOP

B_FOLLOW_LEFT_TOP = B_FOLLOW_TOP | B_FOLLOW_LEFT

The margins between the left and top sides of the view and the left and top sides of its parent remain constant.

Since
Haiku R1

◆ B_FOLLOW_NONE

B_FOLLOW_NONE = 0

Follow none resize mask parameter. Equivalent to B_FOLLOW_LEFT | B_FOLLOW_TOP. The view maintains its position in its parent's coordinate system but not in the screen coordinate system.

Since
BeOS R3

◆ B_FOLLOW_RIGHT

B_FOLLOW_RIGHT = _rule_(0, _VIEW_RIGHT_, 0, _VIEW_RIGHT_)

The margin between the right side of the view and the right side of its parent remains constant.

Since
BeOS R3

◆ B_FOLLOW_TOP

B_FOLLOW_TOP = _rule_(_VIEW_TOP_, 0, _VIEW_TOP_, 0)

The margin between the top of the view and the top of its parent remains constant.

Since
BeOS R3

◆ B_FOLLOW_TOP_BOTTOM

B_FOLLOW_TOP_BOTTOM = _rule_(_VIEW_TOP_, 0, _VIEW_BOTTOM_, 0)

The margin between the top and bottom sides of the view and the top and bottom sides of its parent both remain constant.

Since
BeOS R3

◆ B_FOLLOW_V_CENTER

B_FOLLOW_V_CENTER = _rule_(_VIEW_CENTER_, 0, _VIEW_CENTER_, 0)

The view maintains a constant relationship to the vertical center of its parent view.

Since
BeOS R3

◆ B_FRAME_EVENTS

B_FRAME_EVENTS = 0x04000000UL

View responds to frame move and resize events.

Since
BeOS R3

◆ B_FULL_UPDATE_ON_RESIZE

B_FULL_UPDATE_ON_RESIZE = 0x80000000UL

Redraw the entire view on resize.

Since
BeOS R3

◆ B_INPUT_METHOD_AWARE

B_INPUT_METHOD_AWARE = 0x00400000UL

Indicates the view understands input method add-ons, as used for complex text input in CJK and other languages.

Since
BeOS R5

◆ B_INVALIDATE_AFTER_LAYOUT

B_INVALIDATE_AFTER_LAYOUT = 0x00080000UL

Indicates that the view should be redraw after being added to a layout.

Since
Haiku R1

◆ B_NAVIGABLE

B_NAVIGABLE = 0x02000000UL

The view is able to receive focus for keyboard navigation. Typically focus is indicated by drawing a blue rectangle around the view.

Since
BeOS R3

◆ B_NAVIGABLE_JUMP

B_NAVIGABLE_JUMP = 0x08000000UL

Indicates this is the default keyboard navigation view.

Since
BeOS R3

◆ B_PULSE_NEEDED

B_PULSE_NEEDED = 0x10000000UL

Indicates that the view accepts Pulse() messages.

Since
BeOS R3

◆ B_SCROLL_VIEW_AWARE

B_SCROLL_VIEW_AWARE = 0x00200000UL

Indicates the view will properly manage scrollbars that have been targeted to it, i.e. update their ranges and proportions.

Since
Haiku R1

◆ B_SUBPIXEL_PRECISE

B_SUBPIXEL_PRECISE = 0x01000000UL

The view draws with sub-pixel precision.

If this flag is not specified, drawing coordinates will be rounded to the nearest integer.

Since
BeOS R5

◆ B_SUPPORTS_LAYOUT

B_SUPPORTS_LAYOUT = 0x00100000UL

The view supports the layout APIs, i.e. it doesn't require an frame rectangle to be specified.

Since
Haiku R1

◆ B_WILL_DRAW

B_WILL_DRAW = 0x20000000UL

Indicates that the view will do its own drawing.

Since
BeOS R3