Haiku API Bindings
MenuBar
Not logged in

Documentation | InterfaceKit | MenuBar

SYNOPSIS

Perl

use HaikuR1::MenuBar qw(B_BORDER_FRAME B_BORDER_CONTENTS B_BORDER_EACH_ITEM);

my $menubar = HaikuR1::MenuBar->new(
    frame        => $frame,
    name         => $name,
    resizingMode => $resizingMode,
    layout       => $layout,
    resizeToFit  => $resizeToFit,
    flags        => $flags,
);
$menubar->AddChild($item);

Python

from HaikuR1.InterfaceKit import MenuBar, B_BORDER_FRAME, B_BORDER_CONTENTS, B_BORDER_EACH_ITEM

menubar = MenuBar(
    frame        = frame,
    name         = name,
    resizingMode = resizingMode,
    layout       = layout,
    resizeToFit  = resizeToFit,
    flags        = flags,
)
menubar.AddChild(item)

DESCRIPTION

Exposes the BMenuBar object.

For more information on MenuBar, see the Be Book class description, the Be Book overview, and the Haiku Book class description.

METHODS

Constructor

Creates a MenuBar.

Perl

HaikuR1::MenuBar->new(
    frame        => $frame,
    name         => $name,
    resizingMode => $resizingMode,
    layout       => $layout,
    resizeToFit  => $resizeToFit,
);
HaikuR1::MenuBar->new(
    name         => $name,
    layout       => $layout,
    flags        => $flags,
);
HaikuR1::MenuBar->new($archive);

Python

MenuBar(
    frame        = frame,
    name         = name,
    resizingMode = resizingMode,
    layout       = layout,
    resizeToFit  = resizeToFit,
)
MenuBar(
    name         = name,
    layout       = layout,
    flags        = flags,
)
MenuBar(archive)

Border

SetBorder

Gets or sets the border for the MenuBar.

Perl

$menubar->Border();
$menubar->SetBorder($border);

Python

menubar.Border()
menubar.SetBorder(border)

Borders

SetBorders

Gets or sets the borders for the MenuBar; this method is used with Layout-enabled B_ITEMS_IN_ROW.

Perl

$menubar->Borders();
$menubar->SetBorders($borders);

Python

menubar.Borders()
menubar.SetBorders(borders)

ARCHIVABLE INTERFACE

MenuBar inherits the methods and hooks of Archivable.

HANDLER INTERFACE

MenuBar inherits the methods and hooks of Handler.

VIEW INTERFACE

MenuBar inherits the methods and hooks of View.

MENU INTERFACE

MenuBar inherits the methods and hooks of Menu.

CONSTANTS

MenuBar border

Perl

use HaikuR1::MenuBar qw(:menu_bar_border)

Python

Python does not support export tags.

SCRIPTING SUITE

MenuBar inherits the following suites: