BCheckBox support and start of BMenu and BMenuBar support
This commit is contained in:
627
bepascal/bepascal/be/interface/CheckBox.cpp
Normal file
627
bepascal/bepascal/be/interface/CheckBox.cpp
Normal file
@@ -0,0 +1,627 @@
|
||||
/* BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2002 Olivier Coursiere
|
||||
Eric Jourde
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _CHECKBOX_CPP_
|
||||
#define _CHECKBOX_CPP_
|
||||
|
||||
/***********************************************************************
|
||||
* AUTHOR: nobody <baron>
|
||||
* FILE: Button.cpp
|
||||
* DATE: Tue Dec 3 00:28:35 2002
|
||||
* DESCR:
|
||||
***********************************************************************/
|
||||
#include "CheckBox.h"
|
||||
|
||||
#include "control.h"
|
||||
#include <beobj.h>
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
class BPCheckBox : public BCheckBox, virtual public BPControl {
|
||||
|
||||
public:
|
||||
BPCheckBox(TPasObject PasObject, BRect frame,
|
||||
const char *name,
|
||||
const char *label,
|
||||
BMessage *message,
|
||||
uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
||||
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
|
||||
//virtual ~BCheckBox();
|
||||
|
||||
/* Archiving */
|
||||
BPCheckBox(TPasObject PasObject, BMessage *data);
|
||||
//static BArchivable *Instantiate(BMessage *data);
|
||||
//virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void AttachedToWindow();
|
||||
virtual void MouseDown(BPoint where);
|
||||
|
||||
virtual void MessageReceived(BMessage *msg);
|
||||
virtual void WindowActivated(bool state);
|
||||
virtual void KeyDown(const char *bytes, int32 numBytes);
|
||||
virtual void MouseUp(BPoint pt);
|
||||
virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg);
|
||||
virtual void DetachedFromWindow();
|
||||
virtual void SetValue(int32 value);
|
||||
virtual void GetPreferredSize(float *width, float *height);
|
||||
virtual void ResizeToPreferred();
|
||||
//virtual status_t Invoke(BMessage *msg = NULL);
|
||||
virtual void FrameMoved(BPoint new_position);
|
||||
virtual void FrameResized(float new_width, float new_height);
|
||||
|
||||
/*virtual BHandler *ResolveSpecifier(BMessage *msg,
|
||||
int32 index,
|
||||
BMessage *specifier,
|
||||
int32 form,
|
||||
const char *property);
|
||||
*/
|
||||
//virtual status_t GetSupportedSuites(BMessage *data);
|
||||
|
||||
//virtual void MakeFocus(bool state = true);
|
||||
virtual void AllAttached();
|
||||
virtual void AllDetached();
|
||||
|
||||
|
||||
/*----- Private or reserved -----------------------------------------*/
|
||||
//virtual status_t Perform(perform_code d, void *arg);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
BPCheckBox::BPCheckBox(TPasObject PasObject,
|
||||
BRect frame,
|
||||
const char *name,
|
||||
const char *label,
|
||||
BMessage *message,
|
||||
uint32 rmask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
||||
uint32 flags = B_WILL_DRAW | B_NAVIGABLE)
|
||||
:
|
||||
BCheckBox(frame,name,label,
|
||||
message,rmask,flags),
|
||||
BPControl(PasObject, frame, name, label, message,
|
||||
rmask, flags),
|
||||
BPView(PasObject, frame, name, rmask, flags),
|
||||
BPHandler(PasObject, name),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BPCheckBox::BPCheckBox(TPasObject PasObject, BMessage *archive)
|
||||
:BCheckBox(archive),
|
||||
BPControl(PasObject, archive),
|
||||
BPView(PasObject, archive),
|
||||
BPHandler(PasObject, archive),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void BPCheckBox::MessageReceived(BMessage *message)
|
||||
{
|
||||
MessageReceived_hookCall(message);
|
||||
BCheckBox::MessageReceived(message);
|
||||
}
|
||||
|
||||
void BPCheckBox::Draw(BRect updateRect)
|
||||
{
|
||||
BCheckBox::Draw(updateRect);
|
||||
Draw_hookCall(updateRect);
|
||||
}
|
||||
|
||||
void BPCheckBox::AttachedToWindow(void)
|
||||
{
|
||||
BCheckBox::AttachedToWindow();
|
||||
AttachedToWindow_hookCall();
|
||||
}
|
||||
|
||||
|
||||
void BPCheckBox::WindowActivated(bool active)
|
||||
{
|
||||
BCheckBox::WindowActivated(active);
|
||||
}
|
||||
|
||||
void BPCheckBox::KeyDown(const char *bytes, int32 numBytes)
|
||||
{
|
||||
BCheckBox::KeyDown(bytes, numBytes);
|
||||
}
|
||||
|
||||
|
||||
void BPCheckBox::AllAttached(void)
|
||||
{
|
||||
BCheckBox::AllAttached();
|
||||
}
|
||||
|
||||
void BPCheckBox::AllDetached(void)
|
||||
{
|
||||
BCheckBox::AllDetached();
|
||||
}
|
||||
|
||||
void BPCheckBox::DetachedFromWindow(void)
|
||||
{
|
||||
BCheckBox::DetachedFromWindow();
|
||||
}
|
||||
|
||||
|
||||
void BPCheckBox::FrameMoved(BPoint parentPoint)
|
||||
{
|
||||
BCheckBox::FrameMoved(parentPoint);
|
||||
}
|
||||
|
||||
void BPCheckBox::FrameResized(float width, float height)
|
||||
{
|
||||
BCheckBox::FrameResized(width, height);
|
||||
}
|
||||
|
||||
void BPCheckBox::GetPreferredSize(float *width, float *height)
|
||||
{
|
||||
BCheckBox::GetPreferredSize(width, height);
|
||||
}
|
||||
|
||||
void BPCheckBox::ResizeToPreferred(void)
|
||||
{
|
||||
BCheckBox::ResizeToPreferred();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BPCheckBox::MouseDown(BPoint point)
|
||||
{
|
||||
BCheckBox::MouseDown(point);
|
||||
}
|
||||
|
||||
void BPCheckBox::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
|
||||
{
|
||||
BCheckBox::MouseMoved(point, transit, message);
|
||||
}
|
||||
|
||||
void BPCheckBox::MouseUp(BPoint point)
|
||||
{
|
||||
BCheckBox::MouseUp(point);
|
||||
}
|
||||
|
||||
|
||||
//void BPButton::TargetedByScrollView(BScrollView *scroller)
|
||||
//{
|
||||
// BButton::TargetedByScrollView(scroller);
|
||||
//}
|
||||
|
||||
|
||||
void BPCheckBox::SetValue(int32 value)
|
||||
{
|
||||
BCheckBox::SetValue(value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* AUTHOR: nobody <baron>
|
||||
* FILE: CheckBox.cpp
|
||||
* DATE: Thu Jan 16 20:29:31 2003
|
||||
* DESCR:
|
||||
***********************************************************************/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::~BCheckBox
|
||||
* Params:
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void BCheckBox_FREE(BCheckBox *CheckBox)
|
||||
{
|
||||
delete CheckBox;
|
||||
}
|
||||
|
||||
TCPlusObject BCheckBox_Create(TPasObject PasObject, BRect frame,
|
||||
const char *name,
|
||||
const char *label,
|
||||
BMessage *message,
|
||||
uint32 resizeMask ,
|
||||
uint32 flags )
|
||||
{
|
||||
return new BPCheckBox( PasObject, frame,
|
||||
name,
|
||||
label,
|
||||
message,
|
||||
resizeMask ,
|
||||
flags );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::BCheckBox
|
||||
* Params: BMessage *data
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BCheckBox_Create_1(TPasObject PasObject, BMessage *data)
|
||||
{
|
||||
return new BPCheckBox(PasObject, data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::Instantiate
|
||||
* Params: BMessage *data
|
||||
* Returns: BArchivable *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BArchivable *
|
||||
BCheckBox_Instantiate(BCheckBox *CheckBox, BMessage *data)
|
||||
{
|
||||
return CheckBox->Instantiate(data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::Archive
|
||||
* Params: BMessage *data, bool deep
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BCheckBox_Archive(BCheckBox *CheckBox, BMessage *data, bool deep)
|
||||
{
|
||||
return CheckBox->Archive(data, deep);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::Draw
|
||||
* Params: BRect updateRect
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_Draw(BCheckBox *CheckBox, BRect updateRect)
|
||||
{
|
||||
CheckBox->Draw(updateRect);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::AttachedToWindow
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_AttachedToWindow(BCheckBox *CheckBox)
|
||||
{
|
||||
CheckBox->AttachedToWindow();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::MouseDown
|
||||
* Params: BPoint where
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_MouseDown(BCheckBox *CheckBox, BPoint where)
|
||||
{
|
||||
CheckBox->MouseDown(where);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::MessageReceived
|
||||
* Params: BMessage *msg
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_MessageReceived(BCheckBox *CheckBox, BMessage *msg)
|
||||
{
|
||||
CheckBox->MessageReceived(msg);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::WindowActivated
|
||||
* Params: bool state
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_WindowActivated(BCheckBox *CheckBox, bool state)
|
||||
{
|
||||
CheckBox->WindowActivated(state);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::KeyDown
|
||||
* Params: const char *bytes, int32 numBytes
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_KeyDown(BCheckBox *CheckBox, const char *bytes, int32 numBytes)
|
||||
{
|
||||
CheckBox->KeyDown(bytes, numBytes);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::MouseUp
|
||||
* Params: BPoint pt
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_MouseUp(BCheckBox *CheckBox, BPoint pt)
|
||||
{
|
||||
CheckBox->MouseUp(pt);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::MouseMoved
|
||||
* Params: BPoint pt, uint32 code, const BMessage *msg
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_MouseMoved(BCheckBox *CheckBox, BPoint pt, uint32 code, const BMessage *msg)
|
||||
{
|
||||
CheckBox->MouseMoved(pt, code, msg);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::DetachedFromWindow
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_DetachedFromWindow(BCheckBox *CheckBox)
|
||||
{
|
||||
CheckBox->DetachedFromWindow();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::SetValue
|
||||
* Params: int32 value
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_SetValue(BCheckBox *CheckBox, int32 value)
|
||||
{
|
||||
CheckBox->SetValue(value);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::GetPreferredSize
|
||||
* Params: float *width, float *height
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_GetPreferredSize(BCheckBox *CheckBox, float *width, float *height)
|
||||
{
|
||||
CheckBox->GetPreferredSize(width, height);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::ResizeToPreferred
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_ResizeToPreferred(BCheckBox *CheckBox)
|
||||
{
|
||||
CheckBox->ResizeToPreferred();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::Invoke
|
||||
* Params: BMessage *msg
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BCheckBox_Invoke(BCheckBox *CheckBox, BMessage *msg)
|
||||
{
|
||||
return CheckBox->Invoke(msg);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::FrameMoved
|
||||
* Params: BPoint new_position
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_FrameMoved(BCheckBox *CheckBox, BPoint new_position)
|
||||
{
|
||||
CheckBox->FrameMoved(new_position);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::FrameResized
|
||||
* Params: float new_width, float new_height
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_FrameResized(BCheckBox *CheckBox, float new_width, float new_height)
|
||||
{
|
||||
CheckBox->FrameResized(new_width, new_height);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::ResolveSpecifier
|
||||
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
|
||||
* Returns: BHandler *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BHandler *
|
||||
BCheckBox_ResolveSpecifier(BCheckBox *CheckBox, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
|
||||
{
|
||||
return CheckBox->ResolveSpecifier(msg, index, specifier, form, property);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::GetSupportedSuites
|
||||
* Params: BMessage *data
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BCheckBox_GetSupportedSuites(BCheckBox *CheckBox, BMessage *data)
|
||||
{
|
||||
return CheckBox->GetSupportedSuites(data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::MakeFocus
|
||||
* Params: bool state
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_MakeFocus(BCheckBox *CheckBox, bool state)
|
||||
{
|
||||
CheckBox->MakeFocus(state);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::AllAttached
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_AllAttached(BCheckBox *CheckBox)
|
||||
{
|
||||
CheckBox->AllAttached();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::AllDetached
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BCheckBox_AllDetached(BCheckBox *CheckBox)
|
||||
{
|
||||
CheckBox->AllDetached();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::Perform
|
||||
* Params: perform_code d, void *arg
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BCheckBox_Perform(BCheckBox *CheckBox, perform_code d, void *arg)
|
||||
{
|
||||
return CheckBox->Perform(d, arg);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::_ReservedCheckBox1
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*void
|
||||
BCheckBox__ReservedCheckBox1(BCheckBox *CheckBox)
|
||||
{
|
||||
CheckBox->_ReservedCheckBox1();
|
||||
}
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::_ReservedCheckBox2
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*void
|
||||
BCheckBox__ReservedCheckBox2(BCheckBox *CheckBox)
|
||||
{
|
||||
CheckBox->_ReservedCheckBox2();
|
||||
}
|
||||
|
||||
*/
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::_ReservedCheckBox3
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*void
|
||||
BCheckBox__ReservedCheckBox3(BCheckBox *CheckBox)
|
||||
{
|
||||
CheckBox->_ReservedCheckBox3();
|
||||
}
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BCheckBox::operator=
|
||||
* Params: const BCheckBox &
|
||||
* Returns: BCheckBox &
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*BCheckBox &
|
||||
BCheckBox_operator=(BCheckBox *CheckBox, const BCheckBox &)
|
||||
{
|
||||
return CheckBox->operator=();
|
||||
}
|
||||
*/
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _CHECKBOX_CPP_ */
|
||||
|
||||
816
bepascal/bepascal/be/interface/Menu.cpp
Normal file
816
bepascal/bepascal/be/interface/Menu.cpp
Normal file
@@ -0,0 +1,816 @@
|
||||
#ifndef _MENU_CPP_
|
||||
#define _MENU_CPP_
|
||||
|
||||
/***********************************************************************
|
||||
* AUTHOR: nobody <baron>
|
||||
* FILE: Menu.cpp
|
||||
* DATE: Sat Jan 11 16:55:14 2003
|
||||
* DESCR:
|
||||
***********************************************************************/
|
||||
|
||||
#include "Menu.h"
|
||||
#include "menu.h"
|
||||
#include "Messenger.h"
|
||||
#include "view.h"
|
||||
#include <beobj.h>
|
||||
|
||||
#include "MenuItem.h"
|
||||
|
||||
|
||||
BPMenu::BPMenu(TPasObject PasObject, const char *name, menu_layout layout = B_ITEMS_IN_COLUMN)
|
||||
:BMenu(name, layout),
|
||||
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
|
||||
BPHandler(PasObject),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
}
|
||||
|
||||
BPMenu::BPMenu(TPasObject PasObject, const char *name, float width, float height)
|
||||
:BMenu(name, width, height),
|
||||
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
|
||||
BPHandler(PasObject),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
BMenuItem *item = new BMenuItem("Bonjour", new BMessage(7887));
|
||||
AddItem(item);
|
||||
}
|
||||
|
||||
BPMenu::BPMenu(TPasObject PasObject, BMessage *archive)
|
||||
:BMenu(archive),
|
||||
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
|
||||
BPHandler(PasObject),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
}
|
||||
|
||||
BPMenu::BPMenu(TPasObject PasObject, BRect frame, const char *name, uint32 resizingMode, uint32 flags, menu_layout layout, bool resizeToFit)
|
||||
:BMenu(frame, name, resizingMode, flags, layout, resizeToFit),
|
||||
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
|
||||
BPHandler(PasObject),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::BMenu
|
||||
* Params: const char *title, menu_layout layout
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BMenu_Create(TPasObject PasObject, const char *title, menu_layout layout)
|
||||
{
|
||||
return new BPMenu(PasObject, title, layout);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::BMenu
|
||||
* Params: const char *title, float width, float height
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BMenu_Create_1
|
||||
(TPasObject PasObject, const char *title, float width, float height)
|
||||
{
|
||||
return new BPMenu(PasObject, title, width, height);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::~BMenu
|
||||
* Params:
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void BMenu_Free(BMenu *Menu)
|
||||
{
|
||||
delete Menu;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::BMenu
|
||||
* Params: BMessage *data
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BMenu_Create_2(TPasObject PasObject, BMessage *data)
|
||||
{
|
||||
return new BPMenu(PasObject, data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::Instantiate
|
||||
* Params: BMessage *data
|
||||
* Returns: BArchivable *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BArchivable *
|
||||
BMenu_Instantiate(BMenu *Menu, BMessage *data)
|
||||
{
|
||||
return Menu->Instantiate(data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::Archive
|
||||
* Params: BMessage *data, bool deep
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BMenu_Archive(BMenu *Menu, BMessage *data, bool deep)
|
||||
{
|
||||
return Menu->Archive(data, deep);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::AttachedToWindow
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_AttachedToWindow(BMenu *Menu)
|
||||
{
|
||||
Menu->AttachedToWindow();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::DetachedFromWindow
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_DetachedFromWindow(BMenu *Menu)
|
||||
{
|
||||
Menu->DetachedFromWindow();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::AddItem
|
||||
* Params: BMenuItem *item
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_AddItem(BMenu *Menu, BMenuItem *item)
|
||||
{
|
||||
return Menu->AddItem(item);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::AddItem
|
||||
* Params: BMenuItem *item, int32 index
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_AddItem_1
|
||||
(BMenu *Menu, BMenuItem *item, int32 index)
|
||||
{
|
||||
return Menu->AddItem(item, index);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::AddItem
|
||||
* Params: BMenuItem *item, BRect frame
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_AddItem_2
|
||||
(BMenu *Menu, BMenuItem *item, BRect frame)
|
||||
{
|
||||
return Menu->AddItem(item, frame);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::AddItem
|
||||
* Params: BMenu *menu
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_AddItem_3
|
||||
(BMenu *Menu, BMenu *menu)
|
||||
{
|
||||
return Menu->AddItem(menu);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::AddItem
|
||||
* Params: BMenu *menu, int32 index
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_AddItem_4
|
||||
(BMenu *Menu, BMenu *menu, int32 index)
|
||||
{
|
||||
return Menu->AddItem(menu, index);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::AddItem
|
||||
* Params: BMenu *menu, BRect frame
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_AddItem_5
|
||||
(BMenu *Menu, BMenu *menu, BRect frame)
|
||||
{
|
||||
return Menu->AddItem(menu, frame);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::AddList
|
||||
* Params: BList *list, int32 index
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_AddList(BMenu *Menu, BList *list, int32 index)
|
||||
{
|
||||
return Menu->AddList(list, index);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::AddSeparatorItem
|
||||
* Params:
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_AddSeparatorItem(BMenu *Menu)
|
||||
{
|
||||
return Menu->AddSeparatorItem();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::RemoveItem
|
||||
* Params: BMenuItem *item
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_RemoveItem(BMenu *Menu, BMenuItem *item)
|
||||
{
|
||||
return Menu->RemoveItem(item);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::RemoveItem
|
||||
* Params: int32 index
|
||||
* Returns: BMenuItem *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BMenuItem *
|
||||
BMenu_RemoveItem_1
|
||||
(BMenu *Menu, int32 index)
|
||||
{
|
||||
return Menu->RemoveItem(index);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::RemoveItems
|
||||
* Params: int32 index, int32 count, bool del
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_RemoveItems_2
|
||||
(BMenu *Menu, int32 index, int32 count, bool del)
|
||||
{
|
||||
return Menu->RemoveItems(index, count, del);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::RemoveItem
|
||||
* Params: BMenu *menu
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_RemoveItem_2(BMenu *Menu, BMenu *menu)
|
||||
{
|
||||
return Menu->RemoveItem(menu);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::ItemAt
|
||||
* Params: int32 index
|
||||
* Returns: BMenuItem *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BMenuItem *
|
||||
BMenu_ItemAt(BMenu *Menu, int32 index)
|
||||
{
|
||||
return Menu->ItemAt(index);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::SubmenuAt
|
||||
* Params: int32 index
|
||||
* Returns: BMenu *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BMenu *
|
||||
BMenu_SubmenuAt(BMenu *Menu, int32 index)
|
||||
{
|
||||
return Menu->SubmenuAt(index);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::CountItems
|
||||
* Params:
|
||||
* Returns: int32
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
int32
|
||||
BMenu_CountItems(BMenu *Menu)
|
||||
{
|
||||
return Menu->CountItems();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::IndexOf
|
||||
* Params: BMenuItem *item
|
||||
* Returns: int32
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
int32
|
||||
BMenu_IndexOf(BMenu *Menu, BMenuItem *item)
|
||||
{
|
||||
return Menu->IndexOf(item);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::IndexOf
|
||||
* Params: BMenu *menu
|
||||
* Returns: int32
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
int32
|
||||
BMenu_IndexOf_1
|
||||
(BMenu *Menu, BMenu *menu)
|
||||
{
|
||||
return Menu->IndexOf(menu);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::FindItem
|
||||
* Params: uint32 command
|
||||
* Returns: BMenuItem *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BMenuItem *
|
||||
BMenu_FindItem(BMenu *Menu, uint32 command)
|
||||
{
|
||||
return Menu->FindItem(command);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::FindItem
|
||||
* Params: const char *name
|
||||
* Returns: BMenuItem *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BMenuItem *
|
||||
BMenu_FindItem_1
|
||||
(BMenu *Menu, const char *name)
|
||||
{
|
||||
return Menu->FindItem(name);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::SetTargetForItems
|
||||
* Params: BHandler *target
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BMenu_SetTargetForItems(BMenu *Menu, BHandler *target)
|
||||
{
|
||||
return Menu->SetTargetForItems(target);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::SetTargetForItems
|
||||
* Params: BMessenger messenger
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BMenu_SetTargetForItems_1
|
||||
(BMenu *Menu, BMessenger messenger)
|
||||
{
|
||||
return Menu->SetTargetForItems(messenger);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::SetEnabled
|
||||
* Params: bool state
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_SetEnabled(BMenu *Menu, bool state)
|
||||
{
|
||||
Menu->SetEnabled(state);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::SetRadioMode
|
||||
* Params: bool state
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_SetRadioMode(BMenu *Menu, bool state)
|
||||
{
|
||||
Menu->SetRadioMode(state);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::SetTriggersEnabled
|
||||
* Params: bool state
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_SetTriggersEnabled(BMenu *Menu, bool state)
|
||||
{
|
||||
Menu->SetTriggersEnabled(state);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::SetMaxContentWidth
|
||||
* Params: float max
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_SetMaxContentWidth(BMenu *Menu, float max)
|
||||
{
|
||||
Menu->SetMaxContentWidth(max);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::SetLabelFromMarked
|
||||
* Params: bool on
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_SetLabelFromMarked(BMenu *Menu, bool on)
|
||||
{
|
||||
Menu->SetLabelFromMarked(on);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::IsLabelFromMarked
|
||||
* Params:
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_IsLabelFromMarked(BMenu *Menu)
|
||||
{
|
||||
return Menu->IsLabelFromMarked();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::IsEnabled
|
||||
* Params:
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_IsEnabled(BMenu *Menu)
|
||||
{
|
||||
return Menu->IsEnabled();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::IsRadioMode
|
||||
* Params:
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_IsRadioMode(BMenu *Menu)
|
||||
{
|
||||
return Menu->IsRadioMode();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::AreTriggersEnabled
|
||||
* Params:
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_AreTriggersEnabled(BMenu *Menu)
|
||||
{
|
||||
return Menu->AreTriggersEnabled();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::IsRedrawAfterSticky
|
||||
* Params:
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenu_IsRedrawAfterSticky(BMenu *Menu)
|
||||
{
|
||||
return Menu->IsRedrawAfterSticky();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::MaxContentWidth
|
||||
* Params:
|
||||
* Returns: float
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
float
|
||||
BMenu_MaxContentWidth(BMenu *Menu)
|
||||
{
|
||||
return Menu->MaxContentWidth();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::FindMarked
|
||||
* Params:
|
||||
* Returns: BMenuItem *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BMenuItem *
|
||||
BMenu_FindMarked(BMenu *Menu)
|
||||
{
|
||||
return Menu->FindMarked();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::Supermenu
|
||||
* Params:
|
||||
* Returns: BMenu *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BMenu *
|
||||
BMenu_Supermenu(BMenu *Menu)
|
||||
{
|
||||
return Menu->Supermenu();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::Superitem
|
||||
* Params:
|
||||
* Returns: BMenuItem *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BMenuItem *
|
||||
BMenu_Superitem(BMenu *Menu)
|
||||
{
|
||||
return Menu->Superitem();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::MessageReceived
|
||||
* Params: BMessage *msg
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_MessageReceived(BMenu *Menu, BMessage *msg)
|
||||
{
|
||||
Menu->MessageReceived(msg);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::KeyDown
|
||||
* Params: const char *bytes, int32 numBytes
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_KeyDown(BMenu *Menu, const char *bytes, int32 numBytes)
|
||||
{
|
||||
Menu->KeyDown(bytes, numBytes);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::Draw
|
||||
* Params: BRect updateRect
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_Draw(BMenu *Menu, BRect updateRect)
|
||||
{
|
||||
Menu->Draw(updateRect);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::GetPreferredSize
|
||||
* Params: float *width, float *height
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_GetPreferredSize(BMenu *Menu, float *width, float *height)
|
||||
{
|
||||
Menu->GetPreferredSize(width, height);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::ResizeToPreferred
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_ResizeToPreferred(BMenu *Menu)
|
||||
{
|
||||
Menu->ResizeToPreferred();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::FrameMoved
|
||||
* Params: BPoint new_position
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_FrameMoved(BMenu *Menu, BPoint new_position)
|
||||
{
|
||||
Menu->FrameMoved(new_position);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::FrameResized
|
||||
* Params: float new_width, float new_height
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_FrameResized(BMenu *Menu, float new_width, float new_height)
|
||||
{
|
||||
Menu->FrameResized(new_width, new_height);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::InvalidateLayout
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_InvalidateLayout(BMenu *Menu)
|
||||
{
|
||||
Menu->InvalidateLayout();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::ResolveSpecifier
|
||||
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
|
||||
* Returns: BHandler *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BHandler *
|
||||
BMenu_ResolveSpecifier(BMenu *Menu, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
|
||||
{
|
||||
return Menu->ResolveSpecifier(msg, index, specifier, form, property);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::GetSupportedSuites
|
||||
* Params: BMessage *data
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BMenu_GetSupportedSuites(BMenu *Menu, BMessage *data)
|
||||
{
|
||||
return Menu->GetSupportedSuites(data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::Perform
|
||||
* Params: perform_code d, void *arg
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BMenu_Perform(BMenu *Menu, perform_code d, void *arg)
|
||||
{
|
||||
return Menu->Perform(d, arg);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::MakeFocus
|
||||
* Params: bool state
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_MakeFocus(BMenu *Menu, bool state)
|
||||
{
|
||||
Menu->MakeFocus(state);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::AllAttached
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_AllAttached(BMenu *Menu)
|
||||
{
|
||||
Menu->AllAttached();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::AllDetached
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenu_AllDetached(BMenu *Menu)
|
||||
{
|
||||
Menu->AllDetached();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenu::BMenu
|
||||
* Params: BRect frame, const char *viewName, uint32 resizeMask, uint32 flags, menu_layout layout, bool resizeToFit
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BMenu_Create_3(TPasObject PasObject, BRect frame, const char *viewName, uint32 resizeMask, uint32 flags, menu_layout layout, bool resizeToFit)
|
||||
{
|
||||
return new BPMenu(PasObject, frame, viewName, resizeMask, flags, layout, resizeToFit);
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _MENU_CPP_ */
|
||||
514
bepascal/bepascal/be/interface/MenuBar.cpp
Normal file
514
bepascal/bepascal/be/interface/MenuBar.cpp
Normal file
@@ -0,0 +1,514 @@
|
||||
#ifndef _MENUBAR_CPP_
|
||||
#define _MENUBAR_CPP_
|
||||
|
||||
#include "MenuBar.h"
|
||||
#include "menubar.h"
|
||||
#include <beobj.h>
|
||||
|
||||
BPMenuBar::BPMenuBar(TPasObject PasObject, BRect frame, const char *name,
|
||||
uint32 resizingMode = B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP,
|
||||
menu_layout layout = B_ITEMS_IN_COLUMN, bool resizeToFit = true)
|
||||
:BMenuBar(frame, name, resizingMode, layout, resizeToFit),
|
||||
BPMenu(PasObject, name, layout),
|
||||
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
|
||||
BPHandler(PasObject),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
}
|
||||
|
||||
BPMenuBar::BPMenuBar(TPasObject PasObject, BMessage *archive)
|
||||
:BMenuBar(archive),
|
||||
BPMenu(PasObject, archive),
|
||||
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
|
||||
BPHandler(PasObject),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
* AUTHOR: nobody <baron>
|
||||
* FILE: MenuBar.cpp
|
||||
* DATE: Sun Jan 12 01:25:37 2003
|
||||
* DESCR:
|
||||
***********************************************************************/
|
||||
|
||||
TCPlusObject BMenuBar_Create(TPasObject PasObject, BRect frame, const char *name,
|
||||
uint32 resizingMode = B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP,
|
||||
menu_layout layout = B_ITEMS_IN_COLUMN, bool resizeToFit = true)
|
||||
{
|
||||
return new BPMenuBar(PasObject, frame, name, resizingMode, layout, resizeToFit);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::BMenuBar
|
||||
* Params: BMessage *data
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BMenuBar_Create_2(TPasObject PasObject, BMessage *data)
|
||||
{
|
||||
return new BPMenuBar(PasObject, data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::~BMenuBar
|
||||
* Params:
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void BMenuBar_Free(BMenuBar *MenuBar)
|
||||
{
|
||||
delete MenuBar;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::Instantiate
|
||||
* Params: BMessage *data
|
||||
* Returns: BArchivable *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BArchivable *
|
||||
BMenuBar_Instantiate(BMenuBar *MenuBar, BMessage *data)
|
||||
{
|
||||
return MenuBar->Instantiate(data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::Archive
|
||||
* Params: BMessage *data, bool deep
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BMenuBar_Archive(BMenuBar *MenuBar, BMessage *data, bool deep)
|
||||
{
|
||||
return MenuBar->Archive(data, deep);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::SetBorder
|
||||
* Params: menu_bar_border border
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_SetBorder(BMenuBar *MenuBar, menu_bar_border border)
|
||||
{
|
||||
MenuBar->SetBorder(border);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::Border
|
||||
* Params:
|
||||
* Returns: menu_bar_border
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
menu_bar_border
|
||||
BMenuBar_Border(BMenuBar *MenuBar)
|
||||
{
|
||||
return MenuBar->Border();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::Draw
|
||||
* Params: BRect updateRect
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_Draw(BMenuBar *MenuBar, BRect updateRect)
|
||||
{
|
||||
MenuBar->Draw(updateRect);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::AttachedToWindow
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_AttachedToWindow(BMenuBar *MenuBar)
|
||||
{
|
||||
MenuBar->AttachedToWindow();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::DetachedFromWindow
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_DetachedFromWindow(BMenuBar *MenuBar)
|
||||
{
|
||||
MenuBar->DetachedFromWindow();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::MessageReceived
|
||||
* Params: BMessage *msg
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_MessageReceived(BMenuBar *MenuBar, BMessage *msg)
|
||||
{
|
||||
MenuBar->MessageReceived(msg);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::MouseDown
|
||||
* Params: BPoint where
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_MouseDown(BMenuBar *MenuBar, BPoint where)
|
||||
{
|
||||
MenuBar->MouseDown(where);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::WindowActivated
|
||||
* Params: bool state
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_WindowActivated(BMenuBar *MenuBar, bool state)
|
||||
{
|
||||
MenuBar->WindowActivated(state);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::MouseUp
|
||||
* Params: BPoint where
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_MouseUp(BMenuBar *MenuBar, BPoint where)
|
||||
{
|
||||
MenuBar->MouseUp(where);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::FrameMoved
|
||||
* Params: BPoint new_position
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_FrameMoved(BMenuBar *MenuBar, BPoint new_position)
|
||||
{
|
||||
MenuBar->FrameMoved(new_position);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::FrameResized
|
||||
* Params: float new_width, float new_height
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_FrameResized(BMenuBar *MenuBar, float new_width, float new_height)
|
||||
{
|
||||
MenuBar->FrameResized(new_width, new_height);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::Show
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_Show(BMenuBar *MenuBar)
|
||||
{
|
||||
MenuBar->Show();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::Hide
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_Hide(BMenuBar *MenuBar)
|
||||
{
|
||||
MenuBar->Hide();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::ResolveSpecifier
|
||||
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
|
||||
* Returns: BHandler *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BHandler *
|
||||
BMenuBar_ResolveSpecifier(BMenuBar *MenuBar, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
|
||||
{
|
||||
return MenuBar->ResolveSpecifier(msg, index, specifier, form, property);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::GetSupportedSuites
|
||||
* Params: BMessage *data
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BMenuBar_GetSupportedSuites(BMenuBar *MenuBar, BMessage *data)
|
||||
{
|
||||
return MenuBar->GetSupportedSuites(data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::ResizeToPreferred
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_ResizeToPreferred(BMenuBar *MenuBar)
|
||||
{
|
||||
MenuBar->ResizeToPreferred();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::GetPreferredSize
|
||||
* Params: float *width, float *height
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_GetPreferredSize(BMenuBar *MenuBar, float *width, float *height)
|
||||
{
|
||||
MenuBar->GetPreferredSize(width, height);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::MakeFocus
|
||||
* Params: bool state
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_MakeFocus(BMenuBar *MenuBar, bool state)
|
||||
{
|
||||
MenuBar->MakeFocus(state);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::AllAttached
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_AllAttached(BMenuBar *MenuBar)
|
||||
{
|
||||
MenuBar->AllAttached();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::AllDetached
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuBar_AllDetached(BMenuBar *MenuBar)
|
||||
{
|
||||
MenuBar->AllDetached();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::Perform
|
||||
* Params: perform_code d, void *arg
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BMenuBar_Perform(BMenuBar *MenuBar, perform_code d, void *arg)
|
||||
{
|
||||
return MenuBar->Perform(d, arg);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::_ReservedMenuBar1
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*void
|
||||
BMenuBar__ReservedMenuBar1(BMenuBar *MenuBar)
|
||||
{
|
||||
MenuBar->_ReservedMenuBar1();
|
||||
}
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::_ReservedMenuBar2
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*void
|
||||
BMenuBar__ReservedMenuBar2(BMenuBar *MenuBar)
|
||||
{
|
||||
MenuBar->_ReservedMenuBar2();
|
||||
}
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::_ReservedMenuBar3
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*void
|
||||
BMenuBar__ReservedMenuBar3(BMenuBar *MenuBar)
|
||||
{
|
||||
MenuBar->_ReservedMenuBar3();
|
||||
}
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::_ReservedMenuBar4
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*void
|
||||
BMenuBar__ReservedMenuBar4(BMenuBar *MenuBar)
|
||||
{
|
||||
MenuBar->_ReservedMenuBar4();
|
||||
}
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::operator=
|
||||
* Params: const BMenuBar &
|
||||
* Returns: BMenuBar &
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*BMenuBar &
|
||||
BMenuBar_operator=(BMenuBar *MenuBar, const BMenuBar &)
|
||||
{
|
||||
return MenuBar->operator=();
|
||||
}
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::StartMenuBar
|
||||
* Params: int32 menuIndex, bool sticky, bool show_menu, BRect *special_rect
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*void
|
||||
BMenuBar_StartMenuBar(BMenuBar *MenuBar, int32 menuIndex, bool sticky, bool show_menu, BRect *special_rect)
|
||||
{
|
||||
MenuBar->StartMenuBar(menuIndex, sticky, show_menu, special_rect);
|
||||
}
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::TrackTask
|
||||
* Params: void *arg
|
||||
* Returns: long
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*long
|
||||
BMenuBar_TrackTask(BMenuBar *MenuBar, void *arg)
|
||||
{
|
||||
return MenuBar->TrackTask(arg);
|
||||
}
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::Track
|
||||
* Params: int32 *action, int32 startIndex, bool showMenu
|
||||
* Returns: BMenuItem *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*BMenuItem *
|
||||
BMenuBar_Track(BMenuBar *MenuBar, int32 *action, int32 startIndex, bool showMenu)
|
||||
{
|
||||
return MenuBar->Track(action, startIndex, showMenu);
|
||||
}
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::StealFocus
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*void
|
||||
BMenuBar_StealFocus(BMenuBar *MenuBar)
|
||||
{
|
||||
MenuBar->StealFocus();
|
||||
}
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::RestoreFocus
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*void
|
||||
BMenuBar_RestoreFocus(BMenuBar *MenuBar)
|
||||
{
|
||||
MenuBar->RestoreFocus();
|
||||
}
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuBar::InitData
|
||||
* Params: menu_layout layout
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*void
|
||||
BMenuBar_InitData(BMenuBar *MenuBar, menu_layout layout)
|
||||
{
|
||||
MenuBar->InitData(layout);
|
||||
}
|
||||
*/
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _MENUBAR_CPP_ */
|
||||
387
bepascal/bepascal/be/interface/MenuItem.cpp
Normal file
387
bepascal/bepascal/be/interface/MenuItem.cpp
Normal file
@@ -0,0 +1,387 @@
|
||||
/* BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2002 Olivier Coursiere
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _MENUITEM_CPP_
|
||||
#define _MENUITEM_CPP_
|
||||
|
||||
/***********************************************************************
|
||||
* AUTHOR: nobody <baron>
|
||||
* FILE: MenuItem.cpp
|
||||
* DATE: Sat Jan 11 18:24:08 2003
|
||||
* DESCR:
|
||||
***********************************************************************/
|
||||
#include "MenuItem.h"
|
||||
#include "menuitem.h"
|
||||
#include <beobj.h>
|
||||
|
||||
BPMenuItem::BPMenuItem(TPasObject PasObject, const char *label, BMessage *message, char shortcut = 0, uint32 modifiers = 0)
|
||||
:BMenuItem(label, message, shortcut, modifiers),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
}
|
||||
|
||||
BPMenuItem::BPMenuItem(TPasObject PasObject, BMenu *submenu, BMessage *message = NULL)
|
||||
:BMenuItem(submenu, message),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
}
|
||||
|
||||
BPMenuItem::BPMenuItem(TPasObject PasObject, BMessage *data)
|
||||
:BMenuItem(data),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
}
|
||||
|
||||
BPSeparatorItem::BPSeparatorItem(TPasObject PasObject)
|
||||
:BSeparatorItem(),
|
||||
BPMenuItem(PasObject, "", NULL),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
}
|
||||
|
||||
BPSeparatorItem::BPSeparatorItem(TPasObject PasObject, BMessage *data)
|
||||
:BSeparatorItem(data),
|
||||
BPMenuItem(PasObject, data),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::BMenuItem
|
||||
* Params: const char *label, BMessage *message, char shortcut, uint32 modifiers
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BMenuItem_Create(TPasObject PasObject, const char *label, BMessage *message, char shortcut, uint32 modifiers)
|
||||
{
|
||||
return new BPMenuItem(PasObject, label, message, shortcut, modifiers);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::BMenuItem
|
||||
* Params: BMenu *menu, BMessage *message
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BMenuItem_Create_1
|
||||
(TPasObject PasObject, BMenu *menu, BMessage *message)
|
||||
{
|
||||
return new BPMenuItem(PasObject, menu, message);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::BMenuItem
|
||||
* Params: BMessage *data
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BMenuItem_Create_2
|
||||
(TPasObject PasObject, BMessage *data)
|
||||
{
|
||||
return new BPMenuItem(PasObject, data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::~BMenuItem
|
||||
* Params:
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void BMenuItem_Free(BMenuItem *MenuItem)
|
||||
{
|
||||
return MenuItem->~BMenuItem();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::Instantiate
|
||||
* Params: BMessage *data
|
||||
* Returns: BArchivable *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BArchivable *
|
||||
BMenuItem_Instantiate(BMenuItem *MenuItem, BMessage *data)
|
||||
{
|
||||
return MenuItem->Instantiate(data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::Archive
|
||||
* Params: BMessage *data, bool deep
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BMenuItem_Archive(BMenuItem *MenuItem, BMessage *data, bool deep)
|
||||
{
|
||||
return MenuItem->Archive(data, deep);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::SetLabel
|
||||
* Params: const char *name
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuItem_SetLabel(BMenuItem *MenuItem, const char *name)
|
||||
{
|
||||
MenuItem->SetLabel(name);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::SetEnabled
|
||||
* Params: bool state
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuItem_SetEnabled(BMenuItem *MenuItem, bool state)
|
||||
{
|
||||
MenuItem->SetEnabled(state);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::SetMarked
|
||||
* Params: bool state
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuItem_SetMarked(BMenuItem *MenuItem, bool state)
|
||||
{
|
||||
MenuItem->SetMarked(state);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::SetTrigger
|
||||
* Params: char ch
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuItem_SetTrigger(BMenuItem *MenuItem, char ch)
|
||||
{
|
||||
MenuItem->SetTrigger(ch);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::SetShortcut
|
||||
* Params: char ch, uint32 modifiers
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BMenuItem_SetShortcut(BMenuItem *MenuItem, char ch, uint32 modifiers)
|
||||
{
|
||||
MenuItem->SetShortcut(ch, modifiers);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::Label
|
||||
* Params:
|
||||
* Returns: const char *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
const char *
|
||||
BMenuItem_Label(BMenuItem *MenuItem)
|
||||
{
|
||||
return MenuItem->Label();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::IsEnabled
|
||||
* Params:
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenuItem_IsEnabled(BMenuItem *MenuItem)
|
||||
{
|
||||
return MenuItem->IsEnabled();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::IsMarked
|
||||
* Params:
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BMenuItem_IsMarked(BMenuItem *MenuItem)
|
||||
{
|
||||
return MenuItem->IsMarked();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::Trigger
|
||||
* Params:
|
||||
* Returns: char
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
char
|
||||
BMenuItem_Trigger(BMenuItem *MenuItem)
|
||||
{
|
||||
return MenuItem->Trigger();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::Shortcut
|
||||
* Params: uint32 *modifiers
|
||||
* Returns: char
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
char
|
||||
BMenuItem_Shortcut(BMenuItem *MenuItem, uint32 *modifiers)
|
||||
{
|
||||
return MenuItem->Shortcut(modifiers);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::Submenu
|
||||
* Params:
|
||||
* Returns: BMenu *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BMenu *
|
||||
BMenuItem_Submenu(BMenuItem *MenuItem)
|
||||
{
|
||||
return MenuItem->Submenu();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::Menu
|
||||
* Params:
|
||||
* Returns: BMenu *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BMenu *
|
||||
BMenuItem_Menu(BMenuItem *MenuItem)
|
||||
{
|
||||
return MenuItem->Menu();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMenuItem::Frame
|
||||
* Params:
|
||||
* Returns: BRect
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BRect
|
||||
BMenuItem_Frame(BMenuItem *MenuItem)
|
||||
{
|
||||
return MenuItem->Frame();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BSeparatorItem::BSeparatorItem
|
||||
* Params:
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BSeparatorItem_Create(TPasObject PasObject)
|
||||
{
|
||||
return new BPSeparatorItem(PasObject);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BSeparatorItem::BSeparatorItem
|
||||
* Params: BMessage *data
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BSeparatorItem_Create_1
|
||||
(TPasObject PasObject, BMessage *data)
|
||||
{
|
||||
return new BPSeparatorItem(PasObject, data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BSeparatorItem::~BSeparatorItem
|
||||
* Params:
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void BSeparatorItem_Free(BSeparatorItem *SeparatorItem)
|
||||
{
|
||||
return SeparatorItem->~BSeparatorItem();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BSeparatorItem::Archive
|
||||
* Params: BMessage *data, bool deep
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BSeparatorItem_Archive(BSeparatorItem *SeparatorItem, BMessage *data, bool deep)
|
||||
{
|
||||
return SeparatorItem->Archive(data, deep);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BSeparatorItem::Instantiate
|
||||
* Params: BMessage *data
|
||||
* Returns: BArchivable *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BArchivable *
|
||||
BSeparatorItem_Instantiate(BSeparatorItem *SeparatorItem, BMessage *data)
|
||||
{
|
||||
return SeparatorItem->Instantiate(data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BSeparatorItem::SetEnabled
|
||||
* Params: bool state
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BSeparatorItem_SetEnabled(BSeparatorItem *SeparatorItem, bool state)
|
||||
{
|
||||
SeparatorItem->SetEnabled(state);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _MENUITEM_CPP_ */
|
||||
262
bepascal/bepascal/be/interface/checkbox.pp
Normal file
262
bepascal/bepascal/be/interface/checkbox.pp
Normal file
@@ -0,0 +1,262 @@
|
||||
{ BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2002 Olivier Coursiere
|
||||
Eric Jourde
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
}
|
||||
unit checkbox;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
beobj, Control, Message, Archivable, SupportDefs, Rect, Handler;
|
||||
|
||||
type TCheckBox = class(TControl)
|
||||
private
|
||||
public
|
||||
destructor Destroy;override;
|
||||
constructor Create(frame : TRect; name, aLabel : PChar; message : TMessage; resizingMode, flags : Cardinal); virtual;
|
||||
constructor Create(data : TMessage) ;override;
|
||||
function Instantiate(data : TMessage) : TArchivable;
|
||||
function Archive(data : TMessage; deep : boolean) : TStatus_t;
|
||||
procedure Draw(updateRect : TRect);override;
|
||||
procedure AttachedToWindow;override;
|
||||
procedure MouseDown(where : TPoint);override;
|
||||
procedure MessageReceived(msg : TMessage);override;
|
||||
procedure WindowActivated(state : boolean);override;
|
||||
procedure KeyDown(bytes : PChar; numBytes : integer);override;
|
||||
procedure MouseUp(pt : TPoint);override;
|
||||
procedure MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);override;
|
||||
procedure DetachedFromWindow;override;
|
||||
procedure SetValue(avalue : integer);
|
||||
procedure GetPreferredSize(width : double; height : double);
|
||||
procedure ResizeToPreferred;override;
|
||||
function Invoke(msg : TMessage) : TStatus_t;
|
||||
procedure FrameMoved(new_position : TPoint);override;
|
||||
procedure FrameResized(new_width : double; new_height : double);override;
|
||||
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
|
||||
function GetSupportedSuites(data : TMessage) : TStatus_t;
|
||||
procedure MakeFocus(state : boolean);override;
|
||||
procedure AllAttached;override;
|
||||
procedure AllDetached;override;
|
||||
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
|
||||
// procedure _ReservedCheckBox1;
|
||||
//procedure _ReservedCheckBox2;
|
||||
//procedure _ReservedCheckBox3;
|
||||
//function operator=( : ) : ;
|
||||
// procedure bool fOutlined;
|
||||
//procedure uint32 _reserved[2];
|
||||
end;
|
||||
|
||||
procedure BCheckBox_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_FREE';
|
||||
function BCheckBox_Create(AObject : TBeObject; frame : TCPlusObject; name, aLabel : PChar; message : TCPlusObject; resizingMode, flags : Cardinal) : TCPlusObject; cdecl; external BePascalLibName name 'BCheckBox_Create';
|
||||
function BCheckBox_Create_1(AObject : TBeObject; data : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BCheckBox_Create_1';
|
||||
function BCheckBox_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BCheckBox_Instantiate';
|
||||
function BCheckBox_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BCheckBox_Archive';
|
||||
procedure BCheckBox_Draw(AObject : TCPlusObject; updateRect : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_Draw';
|
||||
procedure BCheckBox_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_AttachedToWindow';
|
||||
procedure BCheckBox_MouseDown(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_MouseDown';
|
||||
procedure BCheckBox_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_MessageReceived';
|
||||
procedure BCheckBox_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BCheckBox_WindowActivated';
|
||||
procedure BCheckBox_KeyDown(AObject : TCPlusObject; bytes : PChar; numBytes : integer); cdecl; external BePascalLibName name 'BCheckBox_KeyDown';
|
||||
procedure BCheckBox_MouseUp(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_MouseUp';
|
||||
procedure BCheckBox_MouseMoved(AObject : TCPlusObject; pt : TCPlusObject; code : Cardinal; msg : TMessage); cdecl; external BePascalLibName name 'BCheckBox_MouseMoved';
|
||||
procedure BCheckBox_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_DetachedFromWindow';
|
||||
procedure BCheckBox_SetValue(AObject : TCPlusObject; value : integer); cdecl; external BePascalLibName name 'BCheckBox_SetValue';
|
||||
procedure BCheckBox_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BCheckBox_GetPreferredSize';
|
||||
procedure BCheckBox_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_ResizeToPreferred';
|
||||
function BCheckBox_Invoke(AObject : TCPlusObject; msg : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BCheckBox_Invoke';
|
||||
procedure BCheckBox_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_FrameMoved';
|
||||
procedure BCheckBox_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BCheckBox_FrameResized';
|
||||
function BCheckBox_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BCheckBox_ResolveSpecifier';
|
||||
function BCheckBox_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BCheckBox_GetSupportedSuites';
|
||||
procedure BCheckBox_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BCheckBox_MakeFocus';
|
||||
procedure BCheckBox_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_AllAttached';
|
||||
procedure BCheckBox_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_AllDetached';
|
||||
function BCheckBox_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BCheckBox_Perform';
|
||||
//procedure BCheckBox__ReservedCheckBox1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox__ReservedCheckBox1';
|
||||
//procedure BCheckBox__ReservedCheckBox2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox__ReservedCheckBox2';
|
||||
//procedure BCheckBox__ReservedCheckBox3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox__ReservedCheckBox3';
|
||||
//function BCheckBox_operator=(AObject : TCPlusObject; : ) : ; cdecl; external BePascalLibName name 'BCheckBox_operator=';
|
||||
//procedure BCheckBox_bool fOutlined(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_bool fOutlined';
|
||||
//procedure BCheckBox_uint32 _reserved[2](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_uint32 _reserved[2]';
|
||||
|
||||
implementation
|
||||
|
||||
destructor TCheckBox.Destroy;
|
||||
begin
|
||||
BCheckBox_Free(CPlusObject);
|
||||
inherited;
|
||||
end;
|
||||
|
||||
constructor TCheckBox.Create(frame : TRect; name, aLabel : PChar; message : TMessage; resizingMode, flags : Cardinal);
|
||||
begin
|
||||
CreatePas;
|
||||
CPlusObject := BCheckBox_Create(Self, frame.CPlusObject, name, aLabel, message.CPlusObject, resizingMode, flags);
|
||||
end;
|
||||
|
||||
constructor TCheckBox.Create(data : TMessage) ;
|
||||
begin
|
||||
CreatePas;
|
||||
CPlusObject := BCheckBox_Create_1(Self, data.CPlusObject);
|
||||
end;
|
||||
|
||||
function TCheckBox.Instantiate(data : TMessage) : TArchivable;
|
||||
begin
|
||||
Result := BCheckBox_Instantiate(CPlusObject, data.CPlusObject);
|
||||
end;
|
||||
|
||||
function TCheckBox.Archive(data : TMessage; deep : boolean) : TStatus_t;
|
||||
begin
|
||||
Result := BCheckBox_Archive(CPlusObject, data.CPlusObject, deep);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.Draw(updateRect : TRect);
|
||||
begin
|
||||
//BCheckBox_Draw(CPlusObject, updateRect.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.AttachedToWindow;
|
||||
begin
|
||||
//BCheckBox_AttachedToWindow(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.MouseDown(where : TPoint);
|
||||
begin
|
||||
//BCheckBox_MouseDown(CPlusObject, where.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.MessageReceived(msg : TMessage);
|
||||
begin
|
||||
//BCheckBox_MessageReceived(CPlusObject, msg.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.WindowActivated(state : boolean);
|
||||
begin
|
||||
// BCheckBox_WindowActivated(CPlusObject, state);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.KeyDown(bytes : PChar; numBytes : integer);
|
||||
begin
|
||||
//BCheckBox_KeyDown(CPlusObject, bytes, numBytes);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.MouseUp(pt : TPoint);
|
||||
begin
|
||||
//BCheckBox_MouseUp(CPlusObject, pt.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
|
||||
begin
|
||||
//BCheckBox_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.DetachedFromWindow;
|
||||
begin
|
||||
//BCheckBox_DetachedFromWindow(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.SetValue(avalue : integer);
|
||||
begin
|
||||
BCheckBox_SetValue(CPlusObject, avalue);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.GetPreferredSize(width : double; height : double);
|
||||
begin
|
||||
BCheckBox_GetPreferredSize(CPlusObject, width, height);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.ResizeToPreferred;
|
||||
begin
|
||||
BCheckBox_ResizeToPreferred(CPlusObject);
|
||||
end;
|
||||
|
||||
function TCheckBox.Invoke(msg : TMessage) : TStatus_t;
|
||||
begin
|
||||
Result := BCheckBox_Invoke(CPlusObject, msg.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.FrameMoved(new_position : TPoint);
|
||||
begin
|
||||
BCheckBox_FrameMoved(CPlusObject, new_position.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.FrameResized(new_width : double; new_height : double);
|
||||
begin
|
||||
BCheckBox_FrameResized(CPlusObject, new_width, new_height);
|
||||
end;
|
||||
|
||||
function TCheckBox.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
|
||||
begin
|
||||
Result := BCheckBox_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
|
||||
end;
|
||||
|
||||
function TCheckBox.GetSupportedSuites(data : TMessage) : TStatus_t;
|
||||
begin
|
||||
Result := BCheckBox_GetSupportedSuites(CPlusObject, data.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.MakeFocus(state : boolean);
|
||||
begin
|
||||
BCheckBox_MakeFocus(CPlusObject, state);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.AllAttached;
|
||||
begin
|
||||
BCheckBox_AllAttached(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TCheckBox.AllDetached;
|
||||
begin
|
||||
BCheckBox_AllDetached(CPlusObject);
|
||||
end;
|
||||
|
||||
function TCheckBox.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
|
||||
begin
|
||||
Result := BCheckBox_Perform(CPlusObject, d, arg);
|
||||
end;
|
||||
|
||||
{procedure ._ReservedCheckBox1;
|
||||
begin
|
||||
BCheckBox__ReservedCheckBox1(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure ._ReservedCheckBox2;
|
||||
begin
|
||||
BCheckBox__ReservedCheckBox2(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure ._ReservedCheckBox3;
|
||||
begin
|
||||
BCheckBox__ReservedCheckBox3(CPlusObject);
|
||||
end;
|
||||
|
||||
function .operator=( : ) : ;
|
||||
begin
|
||||
Result := BCheckBox_operator=(CPlusObject, );
|
||||
end;
|
||||
|
||||
procedure .bool fOutlined;
|
||||
begin
|
||||
BCheckBox_bool fOutlined(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure .uint32 _reserved[2];
|
||||
begin
|
||||
BCheckBox_uint32 _reserved[2](CPlusObject);
|
||||
end;
|
||||
|
||||
}
|
||||
end.
|
||||
43
bepascal/bepascal/be/interface/menu.h
Normal file
43
bepascal/bepascal/be/interface/menu.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef _MENU_H_
|
||||
#define _MENU_H_
|
||||
|
||||
#include "Menu.h"
|
||||
#include "menu.h"
|
||||
#include "Messenger.h"
|
||||
#include "view.h"
|
||||
#include <beobj.h>
|
||||
|
||||
class BPMenu : public BMenu, virtual public BPView
|
||||
{
|
||||
public:
|
||||
BPMenu(TPasObject PasObject, const char *name, menu_layout layout = B_ITEMS_IN_COLUMN);
|
||||
BPMenu(TPasObject PasObject, const char *name, float width, float height);
|
||||
BPMenu(TPasObject PasObject, BMessage *archive);
|
||||
BPMenu(TPasObject PasObject, BRect frame, const char *name, uint32 resizingMode, uint32 flags, menu_layout layout, bool resizeToFit);
|
||||
/* virtual void MessageReceived(BMessage *message);
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void AttachedToWindow(void);
|
||||
virtual void MakeDefault(bool flag);
|
||||
virtual void WindowActivated(bool active);
|
||||
|
||||
virtual void AllAttached(void);
|
||||
virtual void AllDetached(void);
|
||||
virtual void DetachedFromWindow(void);
|
||||
virtual void DrawAfterChildren(BRect updateRect);
|
||||
virtual void FrameMoved(BPoint parentPoint);
|
||||
virtual void FrameResized(float width, float height);
|
||||
virtual void GetPreferredSize(float *width, float *height);
|
||||
virtual void ResizeToPreferred(void);
|
||||
virtual void KeyDown(const char *bytes, int32 numBytes);
|
||||
virtual void KeyUp(const char *bytes, int32 numBytes);
|
||||
virtual void MouseDown(BPoint point);
|
||||
virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message);
|
||||
virtual void MouseUp(BPoint point);
|
||||
virtual void Pulse(void);
|
||||
// virtual void TargetedByScrollView(BScrollView *scroller);
|
||||
virtual void SetEnabled(bool enabled);
|
||||
virtual void SetValue(int32 value);*/
|
||||
private:
|
||||
};
|
||||
|
||||
#endif /* _MENU_H_ */
|
||||
1356
bepascal/bepascal/be/interface/menu.pp
Normal file
1356
bepascal/bepascal/be/interface/menu.pp
Normal file
File diff suppressed because it is too large
Load Diff
43
bepascal/bepascal/be/interface/menubar.h
Normal file
43
bepascal/bepascal/be/interface/menubar.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef _MENUBAR_H_
|
||||
#define _MENUBAR_H_
|
||||
|
||||
#include "MenuBar.h"
|
||||
#include "menu.h"
|
||||
#include <beobj.h>
|
||||
|
||||
class BPMenuBar : public BMenuBar, virtual public BPMenu
|
||||
{
|
||||
public:
|
||||
BPMenuBar(TPasObject PasObject, BRect frame, const char *name,
|
||||
uint32 resizingMode = B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP,
|
||||
menu_layout layout = B_ITEMS_IN_COLUMN, bool resizeToFit = true);
|
||||
BPMenuBar(TPasObject PasObject, const char *name, float width, float height);
|
||||
BPMenuBar(TPasObject PasObject, BMessage *archive);
|
||||
BPMenuBar(TPasObject PasObject, BRect frame, const char *name, uint32 resizingMode, uint32 flags, menu_layout layout, bool resizeToFit);
|
||||
/* virtual void MessageReceived(BMessage *message);
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void AttachedToWindow(void);
|
||||
virtual void MakeDefault(bool flag);
|
||||
virtual void WindowActivated(bool active);
|
||||
|
||||
virtual void AllAttached(void);
|
||||
virtual void AllDetached(void);
|
||||
virtual void DetachedFromWindow(void);
|
||||
virtual void DrawAfterChildren(BRect updateRect);
|
||||
virtual void FrameMoved(BPoint parentPoint);
|
||||
virtual void FrameResized(float width, float height);
|
||||
virtual void GetPreferredSize(float *width, float *height);
|
||||
virtual void ResizeToPreferred(void);
|
||||
virtual void KeyDown(const char *bytes, int32 numBytes);
|
||||
virtual void KeyUp(const char *bytes, int32 numBytes);
|
||||
virtual void MouseDown(BPoint point);
|
||||
virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message);
|
||||
virtual void MouseUp(BPoint point);
|
||||
virtual void Pulse(void);
|
||||
// virtual void TargetedByScrollView(BScrollView *scroller);
|
||||
virtual void SetEnabled(bool enabled);
|
||||
virtual void SetValue(int32 value);*/
|
||||
private:
|
||||
};
|
||||
|
||||
#endif /* _MENU_H_ */
|
||||
350
bepascal/bepascal/be/interface/menubar.pp
Normal file
350
bepascal/bepascal/be/interface/menubar.pp
Normal file
@@ -0,0 +1,350 @@
|
||||
{ BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2002 Olivier Coursiere
|
||||
Eric Jourde
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
}
|
||||
unit menubar;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
beobj, menu, SupportDefs, Message, Rect, archivable, handler;
|
||||
|
||||
type
|
||||
TMenu_Bar_Border = (B_BORDER_FRAME,
|
||||
B_BORDER_CONTENTS,
|
||||
B_BORDER_EACH_ITEM);
|
||||
TMenuBar = class(TMenu)
|
||||
private
|
||||
public
|
||||
constructor Create(frame : TRect; viewName : PChar; resizingMode : Cardinal; layout : TMenu_Layout; resizeToFit : boolean);
|
||||
constructor Create; override;
|
||||
destructor Destroy; override;
|
||||
function Instantiate(data : TMessage) : TArchivable;
|
||||
function Archive(data : TMessage; deep : boolean) : TStatus_t;
|
||||
procedure SetBorder(aBorder : TMenu_Bar_Border);
|
||||
function Border : TMenu_Bar_Border;
|
||||
procedure Draw(updateRect : TRect); override;
|
||||
procedure AttachedToWindow; override;
|
||||
procedure DetachedFromWindow; override;
|
||||
procedure MessageReceived(msg : TMessage); override;
|
||||
procedure MouseDown(where : TPoint); override;
|
||||
procedure WindowActivated(state : boolean); override;
|
||||
procedure MouseUp(where : TPoint); override;
|
||||
procedure FrameMoved(new_position : TPoint); override;
|
||||
procedure FrameResized(new_width : double; new_height : double); override;
|
||||
procedure Show;
|
||||
procedure Hide;
|
||||
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; aProperty : PChar) : THandler;
|
||||
function GetSupportedSuites(data : TMessage) : TStatus_t;
|
||||
procedure ResizeToPreferred; override;
|
||||
procedure GetPreferredSize(width : double; height : double);
|
||||
procedure MakeFocus(state : boolean);
|
||||
procedure AllAttached; override;
|
||||
procedure AllDetached; override;
|
||||
{ function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
|
||||
procedure _ReservedMenuBar1;
|
||||
procedure _ReservedMenuBar2;
|
||||
procedure _ReservedMenuBar3;
|
||||
procedure _ReservedMenuBar4;
|
||||
function operator=( : TMenuBar) : TMenuBar;
|
||||
procedure StartMenuBar(menuIndex : integer; sticky : boolean; show_menu : boolean; special_rect : TRect);
|
||||
function TrackTask(arg : Pointer) : integer;
|
||||
function Track(action : ^integer; startIndex : integer; showMenu : boolean) : TMenuItem;
|
||||
procedure StealFocus;
|
||||
procedure RestoreFocus;
|
||||
procedure InitData(layout : TMenu_Layout);
|
||||
procedure menu_bar_border fBorder;
|
||||
procedure thread_id fTrackingPID;
|
||||
procedure int32 fPrevFocusToken;
|
||||
procedure sem_id fMenuSem;
|
||||
procedure BRect *fLastBounds;
|
||||
procedure uint32 _reserved[2];
|
||||
procedure bool fTracking;
|
||||
}
|
||||
end;
|
||||
|
||||
function BMenuBar_Create(AObject : TBeObject; frame : TCPlusObject; viewName : PChar; resizingMode : Cardinal; layout : TMenu_Layout; resizeToFit : boolean) : TCPlusObject; cdecl; external BePascalLibName name 'BMenuBar_Create';
|
||||
function BMenuBar_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BMenuBar_Create';
|
||||
procedure BMenuBar_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_Free';
|
||||
function BMenuBar_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BMenuBar_Instantiate';
|
||||
function BMenuBar_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BMenuBar_Archive';
|
||||
procedure BMenuBar_SetBorder(AObject : TCPlusObject; aBorder : TMenu_Bar_Border); cdecl; external BePascalLibName name 'BMenuBar_SetBorder';
|
||||
function BMenuBar_Border(AObject : TCPlusObject) : TMenu_Bar_Border; cdecl; external BePascalLibName name 'BMenuBar_Border';
|
||||
procedure BMenuBar_Draw(AObject : TCPlusObject; updateRect : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_Draw';
|
||||
procedure BMenuBar_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_AttachedToWindow';
|
||||
procedure BMenuBar_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_DetachedFromWindow';
|
||||
procedure BMenuBar_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_MessageReceived';
|
||||
procedure BMenuBar_MouseDown(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_MouseDown';
|
||||
procedure BMenuBar_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BMenuBar_WindowActivated';
|
||||
procedure BMenuBar_MouseUp(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_MouseUp';
|
||||
procedure BMenuBar_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_FrameMoved';
|
||||
procedure BMenuBar_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BMenuBar_FrameResized';
|
||||
procedure BMenuBar_Show(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_Show';
|
||||
procedure BMenuBar_Hide(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_Hide';
|
||||
function BMenuBar_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; aProperty : PChar) : THandler; cdecl; external BePascalLibName name 'BMenuBar_ResolveSpecifier';
|
||||
function BMenuBar_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BMenuBar_GetSupportedSuites';
|
||||
procedure BMenuBar_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_ResizeToPreferred';
|
||||
procedure BMenuBar_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BMenuBar_GetPreferredSize';
|
||||
procedure BMenuBar_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BMenuBar_MakeFocus';
|
||||
procedure BMenuBar_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_AllAttached';
|
||||
procedure BMenuBar_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_AllDetached';
|
||||
{function BMenuBar_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BMenuBar_Perform';
|
||||
procedure BMenuBar__ReservedMenuBar1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar__ReservedMenuBar1';
|
||||
procedure BMenuBar__ReservedMenuBar2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar__ReservedMenuBar2';
|
||||
procedure BMenuBar__ReservedMenuBar3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar__ReservedMenuBar3';
|
||||
procedure BMenuBar__ReservedMenuBar4(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar__ReservedMenuBar4';
|
||||
function BMenuBar_operator=(AObject : TCPlusObject; : TMenuBar) : TMenuBar; cdecl; external BePascalLibName name 'BMenuBar_operator=';
|
||||
procedure BMenuBar_StartMenuBar(AObject : TCPlusObject; menuIndex : integer; sticky : boolean; show_menu : boolean; special_rect : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_StartMenuBar';
|
||||
function BMenuBar_TrackTask(AObject : TCPlusObject; arg : Pointer) : integer; cdecl; external BePascalLibName name 'BMenuBar_TrackTask';
|
||||
function BMenuBar_Track(AObject : TCPlusObject; action : ^integer; startIndex : integer; showMenu : boolean) : TMenuItem; cdecl; external BePascalLibName name 'BMenuBar_Track';
|
||||
procedure BMenuBar_StealFocus(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_StealFocus';
|
||||
procedure BMenuBar_RestoreFocus(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_RestoreFocus';
|
||||
procedure BMenuBar_InitData(AObject : TCPlusObject; layout : TMenu_Layout); cdecl; external BePascalLibName name 'BMenuBar_InitData';
|
||||
procedure BMenuBar_menu_bar_border fBorder(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_menu_bar_border fBorder';
|
||||
procedure BMenuBar_thread_id fTrackingPID(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_thread_id fTrackingPID';
|
||||
procedure BMenuBar_int32 fPrevFocusToken(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_int32 fPrevFocusToken';
|
||||
procedure BMenuBar_sem_id fMenuSem(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_sem_id fMenuSem';
|
||||
procedure BMenuBar_BRect *fLastBounds(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_BRect *fLastBounds';
|
||||
procedure BMenuBar_uint32 _reserved[2](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_uint32 _reserved[2]';
|
||||
procedure BMenuBar_bool fTracking(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_bool fTracking';
|
||||
}
|
||||
|
||||
implementation
|
||||
|
||||
constructor TMenuBar.Create(frame : TRect; viewName : PChar; resizingMode : Cardinal; layout : TMenu_Layout; resizeToFit : boolean);
|
||||
begin
|
||||
CPlusObject := BMenuBar_Create(Self, frame.CPlusObject, viewName, resizingMode, layout, resizeToFit);
|
||||
end;
|
||||
|
||||
constructor TMenuBar.Create;
|
||||
begin
|
||||
CreatePas;
|
||||
CPlusObject := BMenuBar_Create(Self);
|
||||
end;
|
||||
|
||||
destructor TMenuBar.Destroy;
|
||||
begin
|
||||
BMenuBar_Free(CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenuBar.Instantiate(data : TMessage) : TArchivable;
|
||||
begin
|
||||
Result := BMenuBar_Instantiate(CPlusObject, data.CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenuBar.Archive(data : TMessage; deep : boolean) : TStatus_t;
|
||||
begin
|
||||
Result := BMenuBar_Archive(CPlusObject, data.CPlusObject, deep);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.SetBorder(aBorder : TMenu_Bar_Border);
|
||||
begin
|
||||
BMenuBar_SetBorder(CPlusObject, aBorder);
|
||||
end;
|
||||
|
||||
function TMenuBar.Border : TMenu_Bar_Border;
|
||||
begin
|
||||
Result := BMenuBar_Border(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.Draw(updateRect : TRect);
|
||||
begin
|
||||
BMenuBar_Draw(CPlusObject, updateRect.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.AttachedToWindow;
|
||||
begin
|
||||
BMenuBar_AttachedToWindow(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.DetachedFromWindow;
|
||||
begin
|
||||
BMenuBar_DetachedFromWindow(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.MessageReceived(msg : TMessage);
|
||||
begin
|
||||
BMenuBar_MessageReceived(CPlusObject, msg.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.MouseDown(where : TPoint);
|
||||
begin
|
||||
BMenuBar_MouseDown(CPlusObject, where.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.WindowActivated(state : boolean);
|
||||
begin
|
||||
BMenuBar_WindowActivated(CPlusObject, state);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.MouseUp(where : TPoint);
|
||||
begin
|
||||
BMenuBar_MouseUp(CPlusObject, where.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.FrameMoved(new_position : TPoint);
|
||||
begin
|
||||
BMenuBar_FrameMoved(CPlusObject, new_position.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.FrameResized(new_width : double; new_height : double);
|
||||
begin
|
||||
BMenuBar_FrameResized(CPlusObject, new_width, new_height);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.Show;
|
||||
begin
|
||||
BMenuBar_Show(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.Hide;
|
||||
begin
|
||||
BMenuBar_Hide(CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenuBar.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; aProperty : PChar) : THandler;
|
||||
begin
|
||||
Result := BMenuBar_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, aProperty);
|
||||
end;
|
||||
|
||||
function TMenuBar.GetSupportedSuites(data : TMessage) : TStatus_t;
|
||||
begin
|
||||
Result := BMenuBar_GetSupportedSuites(CPlusObject, data.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.ResizeToPreferred;
|
||||
begin
|
||||
BMenuBar_ResizeToPreferred(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.GetPreferredSize(width : double; height : double);
|
||||
begin
|
||||
BMenuBar_GetPreferredSize(CPlusObject, width, height);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.MakeFocus(state : boolean);
|
||||
begin
|
||||
BMenuBar_MakeFocus(CPlusObject, state);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.AllAttached;
|
||||
begin
|
||||
BMenuBar_AllAttached(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.AllDetached;
|
||||
begin
|
||||
BMenuBar_AllDetached(CPlusObject);
|
||||
end;
|
||||
|
||||
{function TMenuBar.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
|
||||
begin
|
||||
Result := BMenuBar_Perform(CPlusObject, d, arg);
|
||||
end;
|
||||
|
||||
procedure TMenuBar._ReservedMenuBar1;
|
||||
begin
|
||||
BMenuBar__ReservedMenuBar1(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar._ReservedMenuBar2;
|
||||
begin
|
||||
BMenuBar__ReservedMenuBar2(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar._ReservedMenuBar3;
|
||||
begin
|
||||
BMenuBar__ReservedMenuBar3(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar._ReservedMenuBar4;
|
||||
begin
|
||||
BMenuBar__ReservedMenuBar4(CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenuBar.operator=( : TMenuBar) : TMenuBar;
|
||||
begin
|
||||
Result := BMenuBar_operator=(CPlusObject, );
|
||||
end;
|
||||
|
||||
procedure TMenuBar.StartMenuBar(menuIndex : integer; sticky : boolean; show_menu : boolean; special_rect : TRect);
|
||||
begin
|
||||
BMenuBar_StartMenuBar(CPlusObject, menuIndex, sticky, show_menu, special_rect.CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenuBar.TrackTask(arg : Pointer) : integer;
|
||||
begin
|
||||
Result := BMenuBar_TrackTask(CPlusObject, arg);
|
||||
end;
|
||||
|
||||
function TMenuBar.Track(action : ^integer; startIndex : integer; showMenu : boolean) : TMenuItem;
|
||||
begin
|
||||
Result := BMenuBar_Track(CPlusObject, action, startIndex, showMenu);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.StealFocus;
|
||||
begin
|
||||
BMenuBar_StealFocus(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.RestoreFocus;
|
||||
begin
|
||||
BMenuBar_RestoreFocus(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.InitData(layout : TMenu_Layout);
|
||||
begin
|
||||
BMenuBar_InitData(CPlusObject, layout);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.menu_bar_border fBorder;
|
||||
begin
|
||||
BMenuBar_menu_bar_border fBorder(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.thread_id fTrackingPID;
|
||||
begin
|
||||
BMenuBar_thread_id fTrackingPID(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.int32 fPrevFocusToken;
|
||||
begin
|
||||
BMenuBar_int32 fPrevFocusToken(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.sem_id fMenuSem;
|
||||
begin
|
||||
BMenuBar_sem_id fMenuSem(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.BRect *fLastBounds;
|
||||
begin
|
||||
BMenuBar_BRect *fLastBounds(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.uint32 _reserved[2];
|
||||
begin
|
||||
BMenuBar_uint32 _reserved[2](CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.bool fTracking;
|
||||
begin
|
||||
BMenuBar_bool fTracking(CPlusObject);
|
||||
end;
|
||||
}
|
||||
|
||||
end.
|
||||
65
bepascal/bepascal/be/interface/menuitem.h
Normal file
65
bepascal/bepascal/be/interface/menuitem.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/* BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2002 Olivier Coursiere
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _MENUITEM_H_
|
||||
#define _MENUITEM_H_
|
||||
|
||||
#include <Menu.h>
|
||||
#include <MenuItem.h>
|
||||
#include <beobj.h>
|
||||
|
||||
class BPMenuItem : public BMenuItem, virtual public BPasObject
|
||||
{
|
||||
public:
|
||||
BPMenuItem(TPasObject PasObject, const char *label, BMessage *message, char shortcut = 0, uint32 modifiers = 0);
|
||||
BPMenuItem(TPasObject PasObject, BMenu *submenu, BMessage *message = NULL);
|
||||
BPMenuItem(TPasObject PasObejct, BMessage *data);
|
||||
/* virtual void MessageReceived(BMessage *message);
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void AttachedToWindow(void);
|
||||
virtual void MakeDefault(bool flag);
|
||||
virtual void WindowActivated(bool active);
|
||||
|
||||
virtual void AllAttached(void);
|
||||
virtual void AllDetached(void);
|
||||
virtual void DetachedFromWindow(void);
|
||||
virtual void DrawAfterChildren(BRect updateRect);
|
||||
virtual void FrameMoved(BPoint parentPoint);
|
||||
virtual void FrameResized(float width, float height);
|
||||
virtual void GetPreferredSize(float *width, float *height);
|
||||
virtual void ResizeToPreferred(void);
|
||||
virtual void KeyDown(const char *bytes, int32 numBytes);
|
||||
virtual void KeyUp(const char *bytes, int32 numBytes);
|
||||
virtual void MouseDown(BPoint point);
|
||||
virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message);
|
||||
virtual void MouseUp(BPoint point);
|
||||
virtual void Pulse(void);
|
||||
// virtual void TargetedByScrollView(BScrollView *scroller);
|
||||
virtual void SetEnabled(bool enabled);
|
||||
virtual void SetValue(int32 value);*/
|
||||
private:
|
||||
};
|
||||
|
||||
class BPSeparatorItem : public BSeparatorItem, virtual public BPMenuItem
|
||||
{
|
||||
public:
|
||||
BPSeparatorItem(TPasObject PasObject);
|
||||
BPSeparatorItem(TPasObject PasObject, BMessage *data);
|
||||
};
|
||||
|
||||
#endif /* _MENUITEM_H_ */
|
||||
Reference in New Issue
Block a user