many updates
This commit is contained in:
@@ -84,11 +84,21 @@ void BPControl::AttachedToWindow(void)
|
||||
}
|
||||
|
||||
void BPControl::SetEnabled(bool enabled)
|
||||
{
|
||||
SetEnabled_hookCall(enabled);
|
||||
}
|
||||
|
||||
void BPControl::SetEnabled_hookCall(bool enabled)
|
||||
{
|
||||
Control_SetEnabled_hook(GetPasObject(), enabled);
|
||||
}
|
||||
|
||||
void BPControl::SetValue(int32 value)
|
||||
{
|
||||
SetValue_hookCall(value);
|
||||
}
|
||||
|
||||
void BPControl::SetValue_hookCall(int32 value)
|
||||
{
|
||||
Control_SetValue_hook(GetPasObject(), value);
|
||||
}
|
||||
|
||||
@@ -31,8 +31,6 @@ BPMenu::BPMenu(TPasObject PasObject, const char *name, float width, float height
|
||||
BPHandler(PasObject),
|
||||
BPasObject(PasObject)
|
||||
{
|
||||
BMenuItem *item = new BMenuItem("Bonjour", new BMessage(7887));
|
||||
AddItem(item);
|
||||
}
|
||||
|
||||
BPMenu::BPMenu(TPasObject PasObject, BMessage *archive)
|
||||
@@ -51,6 +49,117 @@ BPMenu::BPMenu(TPasObject PasObject, BRect frame, const char *name, uint32 resiz
|
||||
{
|
||||
}
|
||||
|
||||
void BPMenu::MessageReceived(BMessage *message)
|
||||
{
|
||||
MessageReceived_hookCall(message);
|
||||
BMenu::MessageReceived(message);
|
||||
}
|
||||
|
||||
void BPMenu::AllAttached(void)
|
||||
{
|
||||
// AllAttached_hookCall(message);
|
||||
}
|
||||
|
||||
void BPMenu::AttachedToWindow(void)
|
||||
{
|
||||
BMenu::AttachedToWindow();
|
||||
// AttachedToWindow_hookCall();
|
||||
}
|
||||
|
||||
void BPMenu::AllDetached(void)
|
||||
{
|
||||
// View_AllDetached_hook(GetPasObject());
|
||||
}
|
||||
|
||||
void BPMenu::DetachedFromWindow(void)
|
||||
{
|
||||
// View_DetachedFromWindow_hook(GetPasObject());
|
||||
}
|
||||
|
||||
void BPMenu::Draw(BRect updateRect)
|
||||
{
|
||||
BMenu::Draw(updateRect);
|
||||
Draw_hookCall(updateRect);
|
||||
}
|
||||
|
||||
void BPMenu::DrawAfterChildren(BRect updateRect)
|
||||
{
|
||||
// View_DrawAfterChildren_hook(GetPasObject(), &updateRect);
|
||||
}
|
||||
|
||||
void BPMenu::FrameMoved(BPoint parentPoint)
|
||||
{
|
||||
// View_FrameMoved_hook(GetPasObject(), &parentPoint);
|
||||
}
|
||||
|
||||
void BPMenu::FrameResized(float width, float height)
|
||||
{
|
||||
// View_FrameResized_hook(GetPasObject(), width, height);
|
||||
}
|
||||
|
||||
void BPMenu::GetPreferredSize(float *width, float *height)
|
||||
{
|
||||
// View_GetPreferredSize_hook(GetPasObject(), width, height);
|
||||
}
|
||||
|
||||
void BPMenu::ResizeToPreferred(void)
|
||||
{
|
||||
// View_ResizeToPreferred_hook(GetPasObject());
|
||||
}
|
||||
|
||||
void BPMenu::KeyDown(const char *bytes, int32 numBytes)
|
||||
{
|
||||
// View_KeyDown_hook(GetPasObject(), bytes, numBytes);
|
||||
}
|
||||
|
||||
void BPMenu::KeyUp(const char *bytes, int32 numBytes)
|
||||
{
|
||||
// View_KeyUp_hook(GetPasObject(), bytes, numBytes);
|
||||
}
|
||||
|
||||
void BPMenu::MouseDown(BPoint point)
|
||||
{
|
||||
// View_MouseDown_hook(GetPasObject(), &point);
|
||||
}
|
||||
|
||||
void BPMenu::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
|
||||
{
|
||||
// View_MouseMoved_hook(GetPasObject(), &point, transit, &message);
|
||||
}
|
||||
|
||||
void BPMenu::MouseUp(BPoint point)
|
||||
{
|
||||
// View_MouseUp_hook(GetPasObject(), &point);
|
||||
}
|
||||
|
||||
void BPMenu::Pulse(void)
|
||||
{
|
||||
// View_Pulse_hook(GetPasObject());
|
||||
}
|
||||
|
||||
//void BPMenu::TargetedByScrollView(BScrollView *scroller)
|
||||
//{
|
||||
// View_TargetedByScrollView(GetPasObject(), scroller);
|
||||
//}
|
||||
|
||||
void BPMenu::WindowActivated(bool active)
|
||||
{
|
||||
// View_WindowActivated_hook(GetPasObject(), active);
|
||||
}
|
||||
|
||||
void BPMenu::SetEnabled(bool enabled)
|
||||
{
|
||||
}
|
||||
|
||||
void BPMenu::SetValue(int32 value)
|
||||
{
|
||||
}
|
||||
|
||||
void BPMenu::MakeDefault(bool)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -25,6 +25,117 @@ BPMenuBar::BPMenuBar(TPasObject PasObject, BMessage *archive)
|
||||
{
|
||||
}
|
||||
|
||||
void BPMenuBar::MessageReceived(BMessage *message)
|
||||
{
|
||||
MessageReceived_hookCall(message);
|
||||
BMenuBar::MessageReceived(message);
|
||||
}
|
||||
|
||||
void BPMenuBar::AllAttached(void)
|
||||
{
|
||||
// AllAttached_hookCall(message);
|
||||
}
|
||||
|
||||
void BPMenuBar::AttachedToWindow(void)
|
||||
{
|
||||
BMenuBar::AttachedToWindow();
|
||||
// AttachedToWindow_hookCall();
|
||||
}
|
||||
|
||||
void BPMenuBar::AllDetached(void)
|
||||
{
|
||||
// View_AllDetached_hook(GetPasObject());
|
||||
}
|
||||
|
||||
void BPMenuBar::DetachedFromWindow(void)
|
||||
{
|
||||
// View_DetachedFromWindow_hook(GetPasObject());
|
||||
}
|
||||
|
||||
void BPMenuBar::Draw(BRect updateRect)
|
||||
{
|
||||
BMenuBar::Draw(updateRect);
|
||||
Draw_hookCall(updateRect);
|
||||
}
|
||||
|
||||
void BPMenuBar::DrawAfterChildren(BRect updateRect)
|
||||
{
|
||||
// View_DrawAfterChildren_hook(GetPasObject(), &updateRect);
|
||||
}
|
||||
|
||||
void BPMenuBar::FrameMoved(BPoint parentPoint)
|
||||
{
|
||||
// View_FrameMoved_hook(GetPasObject(), &parentPoint);
|
||||
}
|
||||
|
||||
void BPMenuBar::FrameResized(float width, float height)
|
||||
{
|
||||
// View_FrameResized_hook(GetPasObject(), width, height);
|
||||
}
|
||||
|
||||
void BPMenuBar::GetPreferredSize(float *width, float *height)
|
||||
{
|
||||
// View_GetPreferredSize_hook(GetPasObject(), width, height);
|
||||
}
|
||||
|
||||
void BPMenuBar::ResizeToPreferred(void)
|
||||
{
|
||||
// View_ResizeToPreferred_hook(GetPasObject());
|
||||
}
|
||||
|
||||
void BPMenuBar::KeyDown(const char *bytes, int32 numBytes)
|
||||
{
|
||||
// View_KeyDown_hook(GetPasObject(), bytes, numBytes);
|
||||
}
|
||||
|
||||
void BPMenuBar::KeyUp(const char *bytes, int32 numBytes)
|
||||
{
|
||||
// View_KeyUp_hook(GetPasObject(), bytes, numBytes);
|
||||
}
|
||||
|
||||
void BPMenuBar::MouseDown(BPoint point)
|
||||
{
|
||||
// View_MouseDown_hook(GetPasObject(), &point);
|
||||
}
|
||||
|
||||
void BPMenuBar::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
|
||||
{
|
||||
// View_MouseMoved_hook(GetPasObject(), &point, transit, &message);
|
||||
}
|
||||
|
||||
void BPMenuBar::MouseUp(BPoint point)
|
||||
{
|
||||
// View_MouseUp_hook(GetPasObject(), &point);
|
||||
}
|
||||
|
||||
void BPMenuBar::Pulse(void)
|
||||
{
|
||||
// View_Pulse_hook(GetPasObject());
|
||||
}
|
||||
|
||||
//void BPMenu::TargetedByScrollView(BScrollView *scroller)
|
||||
//{
|
||||
// View_TargetedByScrollView(GetPasObject(), scroller);
|
||||
//}
|
||||
|
||||
void BPMenuBar::WindowActivated(bool active)
|
||||
{
|
||||
// View_WindowActivated_hook(GetPasObject(), active);
|
||||
}
|
||||
|
||||
void BPMenuBar::SetEnabled(bool enabled)
|
||||
{
|
||||
}
|
||||
|
||||
void BPMenuBar::SetValue(int32 value)
|
||||
{
|
||||
}
|
||||
|
||||
void BPMenuBar::MakeDefault(bool flag)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -47,6 +47,11 @@ BPMenuItem::BPMenuItem(TPasObject PasObject, BMessage *data)
|
||||
{
|
||||
}
|
||||
|
||||
void BPMenuItem::Draw(void)
|
||||
{
|
||||
BMenuItem::Draw();
|
||||
}
|
||||
|
||||
BPSeparatorItem::BPSeparatorItem(TPasObject PasObject)
|
||||
:BSeparatorItem(),
|
||||
BPMenuItem(PasObject, "", NULL),
|
||||
@@ -61,6 +66,12 @@ BPSeparatorItem::BPSeparatorItem(TPasObject PasObject, BMessage *data)
|
||||
{
|
||||
}
|
||||
|
||||
void BPSeparatorItem::Draw(void)
|
||||
{
|
||||
BSeparatorItem::Draw();
|
||||
}
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -108,11 +108,16 @@ BPView::BPView(TPasObject PasObject, BMessage *archive)
|
||||
|
||||
void BPView::MessageReceived(BMessage *message)
|
||||
{
|
||||
MessageReceived_hookCall(message);
|
||||
BPHandler::MessageReceived_hookCall(message);
|
||||
BView::MessageReceived(message);
|
||||
}
|
||||
|
||||
void BPView::AllAttached(void)
|
||||
{
|
||||
AllAttached_hookCall();
|
||||
}
|
||||
|
||||
void BPView::AllAttached_hookCall(void)
|
||||
{
|
||||
View_AllAttached_hook(GetPasObject());
|
||||
}
|
||||
@@ -129,11 +134,21 @@ void BPView::AttachedToWindow_hookCall(void)
|
||||
}
|
||||
|
||||
void BPView::AllDetached(void)
|
||||
{
|
||||
AllDetached_hookCall();
|
||||
}
|
||||
|
||||
void BPView::AllDetached_hookCall(void)
|
||||
{
|
||||
View_AllDetached_hook(GetPasObject());
|
||||
}
|
||||
|
||||
void BPView::DetachedFromWindow(void)
|
||||
{
|
||||
DetachedFromWindow_hookCall();
|
||||
}
|
||||
|
||||
void BPView::DetachedFromWindow_hookCall(void)
|
||||
{
|
||||
View_DetachedFromWindow_hook(GetPasObject());
|
||||
}
|
||||
@@ -150,56 +165,111 @@ void BPView::Draw_hookCall(BRect updateRect)
|
||||
}
|
||||
|
||||
void BPView::DrawAfterChildren(BRect updateRect)
|
||||
{
|
||||
DrawAfterChildren_hookCall(updateRect);
|
||||
}
|
||||
|
||||
void BPView::DrawAfterChildren_hookCall(BRect updateRect)
|
||||
{
|
||||
View_DrawAfterChildren_hook(GetPasObject(), &updateRect);
|
||||
}
|
||||
|
||||
void BPView::FrameMoved(BPoint parentPoint)
|
||||
{
|
||||
FrameMoved_hookCall(parentPoint);
|
||||
}
|
||||
|
||||
void BPView::FrameMoved_hookCall(BPoint parentPoint)
|
||||
{
|
||||
View_FrameMoved_hook(GetPasObject(), &parentPoint);
|
||||
}
|
||||
|
||||
void BPView::FrameResized(float width, float height)
|
||||
{
|
||||
FrameResized_hookCall(width, height);
|
||||
}
|
||||
|
||||
void BPView::FrameResized_hookCall(float width, float height)
|
||||
{
|
||||
View_FrameResized_hook(GetPasObject(), width, height);
|
||||
}
|
||||
|
||||
void BPView::GetPreferredSize(float *width, float *height)
|
||||
{
|
||||
GetPreferredSize_hookCall(width, height);
|
||||
}
|
||||
|
||||
void BPView::GetPreferredSize_hookCall(float *width, float *height)
|
||||
{
|
||||
View_GetPreferredSize_hook(GetPasObject(), width, height);
|
||||
}
|
||||
|
||||
void BPView::ResizeToPreferred(void)
|
||||
{
|
||||
ResizeToPreferred_hookCall();
|
||||
}
|
||||
|
||||
void BPView::ResizeToPreferred_hookCall(void)
|
||||
{
|
||||
View_ResizeToPreferred_hook(GetPasObject());
|
||||
}
|
||||
|
||||
void BPView::KeyDown(const char *bytes, int32 numBytes)
|
||||
{
|
||||
KeyDown_hookCall(bytes, numBytes);
|
||||
}
|
||||
|
||||
void BPView::KeyDown_hookCall(const char *bytes, int32 numBytes)
|
||||
{
|
||||
View_KeyDown_hook(GetPasObject(), bytes, numBytes);
|
||||
}
|
||||
|
||||
void BPView::KeyUp(const char *bytes, int32 numBytes)
|
||||
{
|
||||
KeyUp_hookCall(bytes, numBytes);
|
||||
}
|
||||
|
||||
void BPView::KeyUp_hookCall(const char *bytes, int32 numBytes)
|
||||
{
|
||||
View_KeyUp_hook(GetPasObject(), bytes, numBytes);
|
||||
}
|
||||
|
||||
void BPView::MouseDown(BPoint point)
|
||||
{
|
||||
MouseDown_hookCall(point);
|
||||
}
|
||||
|
||||
void BPView::MouseDown_hookCall(BPoint point)
|
||||
{
|
||||
View_MouseDown_hook(GetPasObject(), &point);
|
||||
}
|
||||
|
||||
void BPView::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
|
||||
{
|
||||
MouseMoved_hookCall(point, transit, message);
|
||||
}
|
||||
|
||||
void BPView::MouseMoved_hookCall(BPoint point, uint32 transit, const BMessage *message)
|
||||
{
|
||||
View_MouseMoved_hook(GetPasObject(), &point, transit, &message);
|
||||
}
|
||||
|
||||
void BPView::MouseUp(BPoint point)
|
||||
{
|
||||
MouseUp_hookCall(point);
|
||||
}
|
||||
|
||||
void BPView::MouseUp_hookCall(BPoint point)
|
||||
{
|
||||
View_MouseUp_hook(GetPasObject(), &point);
|
||||
}
|
||||
|
||||
void BPView::Pulse(void)
|
||||
{
|
||||
Pulse_hookCall();
|
||||
}
|
||||
|
||||
void BPView::Pulse_hookCall(void)
|
||||
{
|
||||
View_Pulse_hook(GetPasObject());
|
||||
}
|
||||
@@ -210,6 +280,11 @@ void BPView::Pulse(void)
|
||||
//}
|
||||
|
||||
void BPView::WindowActivated(bool active)
|
||||
{
|
||||
WindowActivated_hookCall(active);
|
||||
}
|
||||
|
||||
void BPView::WindowActivated_hookCall(bool active)
|
||||
{
|
||||
View_WindowActivated_hook(GetPasObject(), active);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ class BPControl : public BControl, virtual public BPView
|
||||
virtual void AttachedToWindow(void);
|
||||
virtual void SetEnabled(bool enabled);
|
||||
virtual void SetValue(int32 value);
|
||||
virtual void SetEnabled_hookCall(bool enabled);
|
||||
virtual void SetValue_hookCall(int32 value);
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
@@ -38,6 +38,14 @@ type
|
||||
B_KEYBOARD_NAVIGATION_COLOR ,
|
||||
B_DESKTOP_COLOR );
|
||||
|
||||
Torientation =(
|
||||
B_HORIZONTAL,
|
||||
B_VERTICAL);
|
||||
|
||||
Tborder_style =(
|
||||
B_PLAIN_BORDER,
|
||||
B_FANCY_BORDER,
|
||||
B_NO_BORDER);
|
||||
|
||||
function ui_color(which : Tcolor_which) : Trgb_color; cdecl; external 'be' name 'ui_color__F11color_which';
|
||||
function Ttint_color(color : Trgb_color; which :Tcolor_which) : Trgb_color;cdecl; external 'be' name 'tint_color__FG9rgb_colorf';
|
||||
|
||||
@@ -14,7 +14,7 @@ class BPMenu : public BMenu, virtual public BPView
|
||||
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 MessageReceived(BMessage *message);
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void AttachedToWindow(void);
|
||||
virtual void MakeDefault(bool flag);
|
||||
@@ -36,7 +36,7 @@ class BPMenu : public BMenu, virtual public BPView
|
||||
virtual void Pulse(void);
|
||||
// virtual void TargetedByScrollView(BScrollView *scroller);
|
||||
virtual void SetEnabled(bool enabled);
|
||||
virtual void SetValue(int32 value);*/
|
||||
virtual void SetValue(int32 value);
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ type
|
||||
type
|
||||
TMenu_Tracking_Hook = function() : TStatus_t; cdecl;
|
||||
type
|
||||
TMenuItem = class(TBeObject);
|
||||
TMenuItem = class;
|
||||
type
|
||||
TMenu = class(TView)
|
||||
private
|
||||
@@ -55,12 +55,12 @@ type
|
||||
function Archive(data : TMessage; deep : boolean) : TStatus_t;
|
||||
procedure AttachedToWindow; override;
|
||||
procedure DetachedFromWindow; override;
|
||||
function AddItem(item : TMenuItem) : boolean;
|
||||
function AddItem(item : TMenuItem; index : integer) : boolean;
|
||||
function AddItem(item : TMenuItem; frame : TRect) : boolean;
|
||||
function AddItem(menu : TMenu) : boolean;
|
||||
function AddItem(menu : TMenu; index : integer) : boolean;
|
||||
function AddItem(menu : TMenu; frame : TRect) : boolean;
|
||||
function AddItem(item : TMenuItem; index : integer) : boolean; virtual;
|
||||
function AddItem(item : TMenuItem; frame : TRect) : boolean; virtual;
|
||||
function AddItem(menu : TMenu) : boolean; virtual;
|
||||
function AddItem(menu : TMenu; index : integer) : boolean; virtual;
|
||||
function AddItem(menu : TMenu; frame : TRect) : boolean; virtual;
|
||||
function AddItem(item : TMenuItem) : boolean; virtual;
|
||||
function AddList(list : TList; index : integer) : boolean;
|
||||
function AddSeparatorItem : boolean;
|
||||
function RemoveItem(item : TMenuItem) : boolean;
|
||||
@@ -221,12 +221,12 @@ function BMenu_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchi
|
||||
function BMenu_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BMenu_Archive';
|
||||
procedure BMenu_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenu_AttachedToWindow';
|
||||
procedure BMenu_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenu_DetachedFromWindow';
|
||||
function BMenu_AddItem(AObject : TCPlusObject; item : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMenu_AddItem_3';
|
||||
function BMenu_AddItem(AObject : TCPlusObject; item : TCPlusObject; index : integer) : boolean; cdecl; external BePascalLibName name 'BMenu_AddItem';
|
||||
function BMenu_AddItem(AObject : TCPlusObject; item : TCPlusObject; frame : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMenu_AddItem';
|
||||
//function BMenu_AddItem(AObject : TCPlusObject; menu : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMenu_AddItem';
|
||||
//function BMenu_AddItem(AObject : TCPlusObject; menu : TCPlusObject; index : integer) : boolean; cdecl; external BePascalLibName name 'BMenu_AddItem';
|
||||
//function BMenu_AddItem(AObject : TCPlusObject; menu : TCPlusObject; frame : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMenu_AddItem';
|
||||
function BMenu_AddItem(AObject : TCPlusObject; item : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMenu_AddItem';
|
||||
function BMenu_AddItem(AObject : TCPlusObject; item : TCPlusObject; index : integer) : boolean; cdecl; external BePascalLibName name 'BMenu_AddItem_1';
|
||||
function BMenu_AddItem(AObject : TCPlusObject; item : TCPlusObject; frame : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMenu_AddItem_2';
|
||||
function BMenu_AddItem_2(AObject : TCPlusObject; menu : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMenu_AddItem';
|
||||
function BMenu_AddItem_2(AObject : TCPlusObject; menu : TCPlusObject; index : integer) : boolean; cdecl; external BePascalLibName name 'BMenu_AddItem';
|
||||
function BMenu_AddItem_2(AObject : TCPlusObject; menu : TCPlusObject; frame : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMenu_AddItem';
|
||||
function BMenu_AddList(AObject : TCPlusObject; list : TCPlusObject; index : integer) : boolean; cdecl; external BePascalLibName name 'BMenu_AddList';
|
||||
function BMenu_AddSeparatorItem(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMenu_AddSeparatorItem';
|
||||
function BMenu_RemoveItem(AObject : TCPlusObject; item : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMenu_RemoveItem';
|
||||
@@ -537,6 +537,164 @@ procedure BMenu_bool fRedrawAfterSticky(AObject : TCPlusObject); cdecl; external
|
||||
procedure BMenu_bool fAttachAborted(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenu_bool fAttachAborted';
|
||||
}
|
||||
|
||||
type
|
||||
TMenuItem = class(TBeObject)
|
||||
private
|
||||
public
|
||||
constructor Create; override;
|
||||
constructor Create(aMenu : TMenu; message : TMessage); virtual;
|
||||
constructor Create(data : TMessage); virtual;
|
||||
constructor Create(aLabel : PChar; message : TMessage; aShortcut : Char; modifiers : Cardinal); virtual;
|
||||
destructor Destroy; override;
|
||||
function Instantiate(data : TMessage) : TArchivable;
|
||||
function Archive(data : TMessage; deep : boolean) : TStatus_t;
|
||||
procedure SetLabel(name : PChar);
|
||||
procedure SetEnabled(state : boolean);
|
||||
procedure SetMarked(state : boolean);
|
||||
procedure SetTrigger(ch : Char);
|
||||
procedure SetShortcut(ch : Char; modifiers : Cardinal);
|
||||
// function aLabel : PChar;
|
||||
function IsEnabled : boolean;
|
||||
function IsMarked : boolean;
|
||||
function Trigger : Char;
|
||||
// function Shortcut(modifiers : Cardinal) : Char;
|
||||
function Submenu : TMenu;
|
||||
function Menu : TMenu;
|
||||
function Frame : TRect;
|
||||
{ procedure GetContentSize(width : double; height : double);
|
||||
procedure TruncateLabel(max : double; new_label : PChar);
|
||||
procedure DrawContent;
|
||||
procedure Draw;
|
||||
procedure Highlight(aOn : boolean);
|
||||
function IsSelected : boolean;
|
||||
function ContentLocation : TPoint;
|
||||
procedure _ReservedMenuItem2;
|
||||
procedure _ReservedMenuItem3;
|
||||
procedure _ReservedMenuItem4;
|
||||
constructor Create(MenuItem : TMenuItem);
|
||||
function operator=(MenuItem : TMenuItem) : TMenuItem;
|
||||
procedure InitData;
|
||||
procedure InitMenuData(menu : TMenu);
|
||||
procedure Install(window : TWindow);
|
||||
function Invoke(msg : TMessage) : TStatus_t;
|
||||
procedure Uninstall;
|
||||
procedure SetSuper(super : TMenu);
|
||||
procedure Select(on : boolean);
|
||||
procedure DrawMarkSymbol;
|
||||
procedure DrawShortcutSymbol;
|
||||
procedure DrawSubmenuSymbol;
|
||||
procedure DrawControlChar(control : PChar);
|
||||
procedure SetSysTrigger(ch : Char);
|
||||
procedure char *fLabel;
|
||||
procedure BMenu *fSubmenu;
|
||||
procedure BWindow *fWindow;
|
||||
procedure BMenu *fSuper;
|
||||
procedure BRect fBounds;
|
||||
procedure uint32 fModifiers;
|
||||
procedure float fCachedWidth;
|
||||
procedure int16 fTriggerIndex;
|
||||
procedure char fUserTrigger;
|
||||
procedure char fSysTrigger;
|
||||
procedure char fShortcutChar;
|
||||
procedure bool fMark;
|
||||
procedure bool fEnabled;
|
||||
procedure bool fSelected;
|
||||
procedure uint32 _reserved[4];
|
||||
}
|
||||
end;
|
||||
type
|
||||
TSeparatorItem = class(TMenuItem)
|
||||
private
|
||||
public
|
||||
constructor Create; override;
|
||||
constructor Create(data : TMessage); override;
|
||||
destructor Destroy; override;
|
||||
function Archive(data : TMessage; deep : boolean) : TStatus_t;
|
||||
function Instantiate(data : TMessage) : TArchivable;
|
||||
procedure SetEnabled(state : boolean);
|
||||
{ procedure GetContentSize(width : double; height : double);
|
||||
procedure Draw;
|
||||
procedure _ReservedSeparatorItem1;
|
||||
procedure _ReservedSeparatorItem2;
|
||||
function operator=( : TSeparatorItem) : TSeparatorItem;
|
||||
procedure uint32 _reserved[1];
|
||||
}
|
||||
end;
|
||||
|
||||
function BMenuItem_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BMenuItem_Create';
|
||||
function BMenuItem_Create(AObject : TBeObject; menu : TCPlusObject; message : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BMenuItem_Create_1';
|
||||
function BMenuItem_Create(AObject : TBeObject; data : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BMenuItem_Create_2';
|
||||
function BMenuItem_Create(AObject : TBeObject; aLabel : PChar; message : TCPlusObject; shortcut : Char; modifiers : Cardinal) : TCPlusObject; cdecl; external BePascalLibName name 'BMenuItem_Create';
|
||||
procedure BMenuItem_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_Free';
|
||||
function BMenuItem_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BMenuItem_Instantiate';
|
||||
function BMenuItem_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BMenuItem_Archive';
|
||||
procedure BMenuItem_SetLabel(AObject : TCPlusObject; name : PChar); cdecl; external BePascalLibName name 'BMenuItem_SetLabel';
|
||||
procedure BMenuItem_SetEnabled(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BMenuItem_SetEnabled';
|
||||
procedure BMenuItem_SetMarked(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BMenuItem_SetMarked';
|
||||
procedure BMenuItem_SetTrigger(AObject : TCPlusObject; ch : Char); cdecl; external BePascalLibName name 'BMenuItem_SetTrigger';
|
||||
procedure BMenuItem_SetShortcut(AObject : TCPlusObject; ch : Char; modifiers : Cardinal); cdecl; external BePascalLibName name 'BMenuItem_SetShortcut';
|
||||
function BMenuItem_Label(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BMenuItem_Label';
|
||||
function BMenuItem_IsEnabled(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMenuItem_IsEnabled';
|
||||
function BMenuItem_IsMarked(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMenuItem_IsMarked';
|
||||
function BMenuItem_Trigger(AObject : TCPlusObject) : Char; cdecl; external BePascalLibName name 'BMenuItem_Trigger';
|
||||
function BMenuItem_Shortcut(AObject : TCPlusObject; modifiers : Cardinal) : Char; cdecl; external BePascalLibName name 'BMenuItem_Shortcut';
|
||||
function BMenuItem_Submenu(AObject : TCPlusObject) : TMenu; cdecl; external BePascalLibName name 'BMenuItem_Submenu';
|
||||
function BMenuItem_Menu(AObject : TCPlusObject) : TMenu; cdecl; external BePascalLibName name 'BMenuItem_Menu';
|
||||
function BMenuItem_Frame(AObject : TCPlusObject) : TRect; cdecl; external BePascalLibName name 'BMenuItem_Frame';
|
||||
{procedure BMenuItem_GetContentSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BMenuItem_GetContentSize';
|
||||
procedure BMenuItem_TruncateLabel(AObject : TCPlusObject; max : double; new_label : PChar); cdecl; external BePascalLibName name 'BMenuItem_TruncateLabel';
|
||||
procedure BMenuItem_DrawContent(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_DrawContent';
|
||||
procedure BMenuItem_Draw(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_Draw';
|
||||
procedure BMenuItem_Highlight(AObject : TCPlusObject; aOn : boolean); cdecl; external BePascalLibName name 'BMenuItem_Highlight';
|
||||
function BMenuItem_IsSelected(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMenuItem_IsSelected';
|
||||
function BMenuItem_ContentLocation(AObject : TCPlusObject) : TPoint; cdecl; external BePascalLibName name 'BMenuItem_ContentLocation';
|
||||
procedure BMenuItem__ReservedMenuItem2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem__ReservedMenuItem2';
|
||||
procedure BMenuItem__ReservedMenuItem3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem__ReservedMenuItem3';
|
||||
procedure BMenuItem__ReservedMenuItem4(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem__ReservedMenuItem4';
|
||||
function BMenuItem_Create(AObject : TBeObject; : TMenuItem) : TCPlusObject; cdecl; external BePascalLibName name 'BMenuItem_Create';
|
||||
function BMenuItem_operator=(AObject : TCPlusObject; : TMenuItem) : TMenuItem; cdecl; external BePascalLibName name 'BMenuItem_operator=';
|
||||
procedure BMenuItem_InitData(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_InitData';
|
||||
procedure BMenuItem_InitMenuData(AObject : TCPlusObject; menu : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_InitMenuData';
|
||||
procedure BMenuItem_Install(AObject : TCPlusObject; window : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_Install';
|
||||
function BMenuItem_Invoke(AObject : TCPlusObject; msg : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BMenuItem_Invoke';
|
||||
procedure BMenuItem_Uninstall(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_Uninstall';
|
||||
procedure BMenuItem_SetSuper(AObject : TCPlusObject; super : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_SetSuper';
|
||||
procedure BMenuItem_Select(AObject : TCPlusObject; on : boolean); cdecl; external BePascalLibName name 'BMenuItem_Select';
|
||||
procedure BMenuItem_DrawMarkSymbol(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_DrawMarkSymbol';
|
||||
procedure BMenuItem_DrawShortcutSymbol(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_DrawShortcutSymbol';
|
||||
procedure BMenuItem_DrawSubmenuSymbol(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_DrawSubmenuSymbol';
|
||||
procedure BMenuItem_DrawControlChar(AObject : TCPlusObject; control : PChar); cdecl; external BePascalLibName name 'BMenuItem_DrawControlChar';
|
||||
procedure BMenuItem_SetSysTrigger(AObject : TCPlusObject; ch : Char); cdecl; external BePascalLibName name 'BMenuItem_SetSysTrigger';
|
||||
procedure BMenuItem_char *fLabel(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_char *fLabel';
|
||||
procedure BMenuItem_BMenu *fSubmenu(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_BMenu *fSubmenu';
|
||||
procedure BMenuItem_BWindow *fWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_BWindow *fWindow';
|
||||
procedure BMenuItem_BMenu *fSuper(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_BMenu *fSuper';
|
||||
procedure BMenuItem_BRect fBounds(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_BRect fBounds';
|
||||
procedure BMenuItem_uint32 fModifiers(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_uint32 fModifiers';
|
||||
procedure BMenuItem_float fCachedWidth(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_float fCachedWidth';
|
||||
procedure BMenuItem_int16 fTriggerIndex(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_int16 fTriggerIndex';
|
||||
procedure BMenuItem_char fUserTrigger(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_char fUserTrigger';
|
||||
procedure BMenuItem_char fSysTrigger(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_char fSysTrigger';
|
||||
procedure BMenuItem_char fShortcutChar(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_char fShortcutChar';
|
||||
procedure BMenuItem_bool fMark(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_bool fMark';
|
||||
procedure BMenuItem_bool fEnabled(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_bool fEnabled';
|
||||
procedure BMenuItem_bool fSelected(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_bool fSelected';
|
||||
procedure BMenuItem_uint32 _reserved[4](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuItem_uint32 _reserved[4]';
|
||||
}
|
||||
function BSeparatorItem_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BSeparatorItem_Create';
|
||||
function BSeparatorItem_Create(AObject : TBeObject; data : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BSeparatorItem_Create_1';
|
||||
procedure BSeparatorItem_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSeparatorItem_Free';
|
||||
function BSeparatorItem_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BSeparatorItem_Archive';
|
||||
function BSeparatorItem_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BSeparatorItem_Instantiate';
|
||||
procedure BSeparatorItem_SetEnabled(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BSeparatorItem_SetEnabled';
|
||||
procedure BSeparatorItem_GetContentSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BSeparatorItem_GetContentSize';
|
||||
//procedure BSeparatorItem_Draw(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSeparatorItem_Draw';
|
||||
{procedure BSeparatorItem__ReservedSeparatorItem1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSeparatorItem__ReservedSeparatorItem1';
|
||||
procedure BSeparatorItem__ReservedSeparatorItem2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSeparatorItem__ReservedSeparatorItem2';
|
||||
function BSeparatorItem_operator=(AObject : TCPlusObject; : TSeparatorItem) : TSeparatorItem; cdecl; external BePascalLibName name 'BSeparatorItem_operator=';
|
||||
procedure BSeparatorItem_uint32 _reserved[1](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSeparatorItem_uint32 _reserved[1]';
|
||||
}
|
||||
|
||||
implementation
|
||||
|
||||
{procedure PMenu_Info.float font_size;
|
||||
@@ -606,42 +764,49 @@ end;
|
||||
|
||||
procedure TMenu.AttachedToWindow;
|
||||
begin
|
||||
BMenu_AttachedToWindow(CPlusObject);
|
||||
// BMenu_AttachedToWindow(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenu.DetachedFromWindow;
|
||||
begin
|
||||
BMenu_DetachedFromWindow(CPlusObject);
|
||||
// BMenu_DetachedFromWindow(CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenu.AddItem(item : TMenuItem) : boolean;
|
||||
begin
|
||||
WriteLn('function TMenu.AddItem(item : TMenuItem) : boolean;');
|
||||
Result := BMenu_AddItem(CPlusObject, item.CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenu.AddItem(item : TMenuItem; index : integer) : boolean;
|
||||
begin
|
||||
WriteLn('function TMenu.AddItem(item : TMenuItem; index : integer) : boolean;');
|
||||
Result := BMenu_AddItem(CPlusObject, item.CPlusObject, index);
|
||||
end;
|
||||
|
||||
function TMenu.AddItem(item : TMenuItem; frame : TRect) : boolean;
|
||||
begin
|
||||
WriteLn('ici');
|
||||
WriteLn('function TMenu.AddItem(item : TMenuItem; frame : TRect) : boolean;');
|
||||
Result := BMenu_AddItem(CPlusObject, item.CPlusObject, frame.CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenu.AddItem(menu : TMenu) : boolean;
|
||||
begin
|
||||
Result := BMenu_AddItem(CPlusObject, menu.CPlusObject);
|
||||
WriteLn('function TMenu.AddItem(menu : TMenu) : boolean;');
|
||||
Result := BMenu_AddItem_2(CPlusObject, menu.CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenu.AddItem(menu : TMenu; index : integer) : boolean;
|
||||
begin
|
||||
Result := BMenu_AddItem(CPlusObject, menu.CPlusObject, index);
|
||||
WriteLn('function TMenu.AddItem(menu : TMenu; index : integer) : boolean;');
|
||||
Result := BMenu_AddItem_2(CPlusObject, menu.CPlusObject, index);
|
||||
end;
|
||||
|
||||
function TMenu.AddItem(menu : TMenu; frame : TRect) : boolean;
|
||||
begin
|
||||
Result := BMenu_AddItem(CPlusObject, menu.CPlusObject, frame.CPlusObject);
|
||||
WriteLn('function TMenu.AddItem(menu : TMenu; frame : TRect) : boolean;');
|
||||
Result := BMenu_AddItem_2(CPlusObject, menu.CPlusObject, frame.CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenu.AddList(list : TList; index : integer) : boolean;
|
||||
@@ -721,7 +886,7 @@ end;
|
||||
|
||||
procedure TMenu.SetEnabled(state : boolean);
|
||||
begin
|
||||
BMenu_SetEnabled(CPlusObject, state);
|
||||
// BMenu_SetEnabled(CPlusObject, state);
|
||||
end;
|
||||
|
||||
procedure TMenu.SetRadioMode(state : boolean);
|
||||
@@ -791,37 +956,37 @@ end;
|
||||
|
||||
procedure TMenu.MessageReceived(msg : TMessage);
|
||||
begin
|
||||
BMenu_MessageReceived(CPlusObject, msg.CPlusObject);
|
||||
// BMenu_MessageReceived(CPlusObject, msg.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenu.KeyDown(bytes : PChar; numBytes : integer);
|
||||
begin
|
||||
BMenu_KeyDown(CPlusObject, bytes, numBytes);
|
||||
// BMenu_KeyDown(CPlusObject, bytes, numBytes);
|
||||
end;
|
||||
|
||||
procedure TMenu.Draw(updateRect : TRect);
|
||||
begin
|
||||
BMenu_Draw(CPlusObject, updateRect.CPlusObject);
|
||||
// BMenu_Draw(CPlusObject, updateRect.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenu.GetPreferredSize(width : double; height : double);
|
||||
begin
|
||||
BMenu_GetPreferredSize(CPlusObject, width, height);
|
||||
// BMenu_GetPreferredSize(CPlusObject, width, height);
|
||||
end;
|
||||
|
||||
procedure TMenu.ResizeToPreferred;
|
||||
begin
|
||||
BMenu_ResizeToPreferred(CPlusObject);
|
||||
// BMenu_ResizeToPreferred(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenu.FrameMoved(new_position : TPoint);
|
||||
begin
|
||||
BMenu_FrameMoved(CPlusObject, new_position.CPlusObject);
|
||||
// BMenu_FrameMoved(CPlusObject, new_position.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenu.FrameResized(new_width : double; new_height : double);
|
||||
begin
|
||||
BMenu_FrameResized(CPlusObject, new_width, new_height);
|
||||
// BMenu_FrameResized(CPlusObject, new_width, new_height);
|
||||
end;
|
||||
|
||||
procedure TMenu.InvalidateLayout;
|
||||
@@ -846,17 +1011,17 @@ end;
|
||||
|
||||
procedure TMenu.MakeFocus(state : boolean);
|
||||
begin
|
||||
BMenu_MakeFocus(CPlusObject, state);
|
||||
// BMenu_MakeFocus(CPlusObject, state);
|
||||
end;
|
||||
|
||||
procedure TMenu.AllAttached;
|
||||
begin
|
||||
BMenu_AllAttached(CPlusObject);
|
||||
// BMenu_AllAttached(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenu.AllDetached;
|
||||
begin
|
||||
BMenu_AllDetached(CPlusObject);
|
||||
// BMenu_AllDetached(CPlusObject);
|
||||
end;
|
||||
|
||||
{
|
||||
@@ -1353,4 +1518,366 @@ begin
|
||||
end;
|
||||
}
|
||||
|
||||
constructor TMenuItem.Create;
|
||||
begin
|
||||
CPlusObject := BMenuItem_Create(Self);
|
||||
end;
|
||||
|
||||
constructor TMenuItem.Create(aMenu : TMenu; message : TMessage);
|
||||
begin
|
||||
CPlusObject := BMenuItem_Create(Self, menu.CPlusObject, message.CPlusObject);
|
||||
end;
|
||||
|
||||
constructor TMenuItem.Create(data : TMessage);
|
||||
begin
|
||||
CPlusObject := BMenuItem_Create(Self, data.CPlusObject);
|
||||
end;
|
||||
|
||||
constructor TMenuItem.Create(aLabel : PChar; message : TMessage; aShortcut : Char; modifiers : Cardinal);
|
||||
begin
|
||||
CPlusObject := BMenuItem_Create(Self, aLabel, message.CPlusObject, aShortcut, modifiers);
|
||||
end;
|
||||
|
||||
destructor TMenuItem.Destroy;
|
||||
begin
|
||||
BMenuItem_Free(CPlusObject);
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TMenuItem.Instantiate(data : TMessage) : TArchivable;
|
||||
begin
|
||||
Result := BMenuItem_Instantiate(CPlusObject, data.CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenuItem.Archive(data : TMessage; deep : boolean) : TStatus_t;
|
||||
begin
|
||||
Result := BMenuItem_Archive(CPlusObject, data.CPlusObject, deep);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.SetLabel(name : PChar);
|
||||
begin
|
||||
BMenuItem_SetLabel(CPlusObject, name);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.SetEnabled(state : boolean);
|
||||
begin
|
||||
// BMenuItem_SetEnabled(CPlusObject, state);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.SetMarked(state : boolean);
|
||||
begin
|
||||
BMenuItem_SetMarked(CPlusObject, state);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.SetTrigger(ch : Char);
|
||||
begin
|
||||
BMenuItem_SetTrigger(CPlusObject, ch);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.SetShortcut(ch : Char; modifiers : Cardinal);
|
||||
begin
|
||||
BMenuItem_SetShortcut(CPlusObject, ch, modifiers);
|
||||
end;
|
||||
|
||||
{function TMenuItem.aLabel : PChar;
|
||||
begin
|
||||
Result := BMenuItem_Label(CPlusObject);
|
||||
end;
|
||||
}
|
||||
|
||||
function TMenuItem.IsEnabled : boolean;
|
||||
begin
|
||||
Result := BMenuItem_IsEnabled(CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenuItem.IsMarked : boolean;
|
||||
begin
|
||||
Result := BMenuItem_IsMarked(CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenuItem.Trigger : Char;
|
||||
begin
|
||||
Result := BMenuItem_Trigger(CPlusObject);
|
||||
end;
|
||||
|
||||
{function TMenuItem.Shortcut(modifiers : Cardinal) : Char;
|
||||
begin
|
||||
Result := BMenuItem_Shortcut(CPlusObject, modifiers);
|
||||
end;}
|
||||
|
||||
function TMenuItem.Submenu : TMenu;
|
||||
begin
|
||||
Result := BMenuItem_Submenu(CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenuItem.Menu : TMenu;
|
||||
begin
|
||||
Result := BMenuItem_Menu(CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenuItem.Frame : TRect;
|
||||
begin
|
||||
Result := BMenuItem_Frame(CPlusObject);
|
||||
end;
|
||||
|
||||
{
|
||||
procedure TMenuItem.GetContentSize(width : double; height : double);
|
||||
begin
|
||||
BMenuItem_GetContentSize(CPlusObject, width, height);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.TruncateLabel(max : double; new_label : PChar);
|
||||
begin
|
||||
BMenuItem_TruncateLabel(CPlusObject, max, new_label);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.DrawContent;
|
||||
begin
|
||||
// BMenuItem_DrawContent(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.Draw;
|
||||
begin
|
||||
// BMenuItem_Draw(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.Highlight(aOn : boolean);
|
||||
begin
|
||||
BMenuItem_Highlight(CPlusObject, aOn);
|
||||
end;
|
||||
|
||||
function TMenuItem.IsSelected : boolean;
|
||||
begin
|
||||
Result := BMenuItem_IsSelected(CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenuItem.ContentLocation : TPoint;
|
||||
begin
|
||||
Result := BMenuItem_ContentLocation(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem._ReservedMenuItem2;
|
||||
begin
|
||||
BMenuItem__ReservedMenuItem2(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem._ReservedMenuItem3;
|
||||
begin
|
||||
BMenuItem__ReservedMenuItem3(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem._ReservedMenuItem4;
|
||||
begin
|
||||
BMenuItem__ReservedMenuItem4(CPlusObject);
|
||||
end;
|
||||
|
||||
constructor TMenuItem.Create( : TMenuItem) : TCPlusObject;
|
||||
begin
|
||||
CPlusObject := BMenuItem_Create(Self, );
|
||||
end;
|
||||
|
||||
function TMenuItem.operator=( : TMenuItem) : TMenuItem;
|
||||
begin
|
||||
Result := BMenuItem_operator=(CPlusObject, );
|
||||
end;
|
||||
|
||||
procedure TMenuItem.InitData;
|
||||
begin
|
||||
BMenuItem_InitData(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.InitMenuData(menu : TMenu);
|
||||
begin
|
||||
BMenuItem_InitMenuData(CPlusObject, menu.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.Install(window : TWindow);
|
||||
begin
|
||||
BMenuItem_Install(CPlusObject, window.CPlusObject);
|
||||
end;
|
||||
|
||||
function TMenuItem.Invoke(msg : TMessage) : TStatus_t;
|
||||
begin
|
||||
Result := BMenuItem_Invoke(CPlusObject, msg.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.Uninstall;
|
||||
begin
|
||||
BMenuItem_Uninstall(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.SetSuper(super : TMenu);
|
||||
begin
|
||||
BMenuItem_SetSuper(CPlusObject, super.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.Select(on : boolean);
|
||||
begin
|
||||
BMenuItem_Select(CPlusObject, on);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.DrawMarkSymbol;
|
||||
begin
|
||||
BMenuItem_DrawMarkSymbol(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.DrawShortcutSymbol;
|
||||
begin
|
||||
BMenuItem_DrawShortcutSymbol(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.DrawSubmenuSymbol;
|
||||
begin
|
||||
BMenuItem_DrawSubmenuSymbol(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.DrawControlChar(control : PChar);
|
||||
begin
|
||||
BMenuItem_DrawControlChar(CPlusObject, control);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.SetSysTrigger(ch : Char);
|
||||
begin
|
||||
BMenuItem_SetSysTrigger(CPlusObject, ch);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.char *fLabel;
|
||||
begin
|
||||
BMenuItem_char *fLabel(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.BMenu *fSubmenu;
|
||||
begin
|
||||
BMenuItem_BMenu *fSubmenu(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.BWindow *fWindow;
|
||||
begin
|
||||
BMenuItem_BWindow *fWindow(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.BMenu *fSuper;
|
||||
begin
|
||||
BMenuItem_BMenu *fSuper(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.BRect fBounds;
|
||||
begin
|
||||
BMenuItem_BRect fBounds(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.uint32 fModifiers;
|
||||
begin
|
||||
BMenuItem_uint32 fModifiers(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.float fCachedWidth;
|
||||
begin
|
||||
BMenuItem_float fCachedWidth(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.int16 fTriggerIndex;
|
||||
begin
|
||||
BMenuItem_int16 fTriggerIndex(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.char fUserTrigger;
|
||||
begin
|
||||
BMenuItem_char fUserTrigger(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.char fSysTrigger;
|
||||
begin
|
||||
BMenuItem_char fSysTrigger(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.char fShortcutChar;
|
||||
begin
|
||||
BMenuItem_char fShortcutChar(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.bool fMark;
|
||||
begin
|
||||
BMenuItem_bool fMark(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.bool fEnabled;
|
||||
begin
|
||||
BMenuItem_bool fEnabled(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.bool fSelected;
|
||||
begin
|
||||
BMenuItem_bool fSelected(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuItem.uint32 _reserved[4];
|
||||
begin
|
||||
BMenuItem_uint32 _reserved[4](CPlusObject);
|
||||
end;
|
||||
}
|
||||
|
||||
constructor TSeparatorItem.Create;
|
||||
begin
|
||||
CPlusObject := BSeparatorItem_Create(Self);
|
||||
end;
|
||||
|
||||
constructor TSeparatorItem.Create(data : TMessage);
|
||||
begin
|
||||
CPlusObject := BSeparatorItem_Create(Self, data.CPlusObject);
|
||||
end;
|
||||
|
||||
destructor TSeparatorItem.Destroy;
|
||||
begin
|
||||
BSeparatorItem_Free(CPlusObject);
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TSeparatorItem.Archive(data : TMessage; deep : boolean) : TStatus_t;
|
||||
begin
|
||||
Result := BSeparatorItem_Archive(CPlusObject, data.CPlusObject, deep);
|
||||
end;
|
||||
|
||||
function TSeparatorItem.Instantiate(data : TMessage) : TArchivable;
|
||||
begin
|
||||
Result := BSeparatorItem_Instantiate(CPlusObject, data.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TSeparatorItem.SetEnabled(state : boolean);
|
||||
begin
|
||||
// BSeparatorItem_SetEnabled(CPlusObject, state);
|
||||
end;
|
||||
|
||||
{
|
||||
procedure TSeparatorItem.GetContentSize(width : double; height : double);
|
||||
begin
|
||||
BSeparatorItem_GetContentSize(CPlusObject, width, height);
|
||||
end;
|
||||
|
||||
procedure TSeparatorItem.Draw;
|
||||
begin
|
||||
// BSeparatorItem_Draw(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TSeparatorItem._ReservedSeparatorItem1;
|
||||
begin
|
||||
BSeparatorItem__ReservedSeparatorItem1(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TSeparatorItem._ReservedSeparatorItem2;
|
||||
begin
|
||||
BSeparatorItem__ReservedSeparatorItem2(CPlusObject);
|
||||
end;
|
||||
|
||||
function TSeparatorItem.operator=( : TSeparatorItem) : TSeparatorItem;
|
||||
begin
|
||||
Result := BSeparatorItem_operator=(CPlusObject, );
|
||||
end;
|
||||
|
||||
procedure TSeparatorItem.uint32 _reserved[1];
|
||||
begin
|
||||
BSeparatorItem_uint32 _reserved[1](CPlusObject);
|
||||
end;
|
||||
}
|
||||
|
||||
end.
|
||||
|
||||
@@ -14,7 +14,7 @@ class BPMenuBar : public BMenuBar, virtual public BPMenu
|
||||
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 MessageReceived(BMessage *message);
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void AttachedToWindow(void);
|
||||
virtual void MakeDefault(bool flag);
|
||||
@@ -36,7 +36,7 @@ class BPMenuBar : public BMenuBar, virtual public BPMenu
|
||||
virtual void Pulse(void);
|
||||
// virtual void TargetedByScrollView(BScrollView *scroller);
|
||||
virtual void SetEnabled(bool enabled);
|
||||
virtual void SetValue(int32 value);*/
|
||||
virtual void SetValue(int32 value);
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
@@ -163,47 +163,47 @@ end;
|
||||
|
||||
procedure TMenuBar.Draw(updateRect : TRect);
|
||||
begin
|
||||
BMenuBar_Draw(CPlusObject, updateRect.CPlusObject);
|
||||
// BMenuBar_Draw(CPlusObject, updateRect.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.AttachedToWindow;
|
||||
begin
|
||||
BMenuBar_AttachedToWindow(CPlusObject);
|
||||
// BMenuBar_AttachedToWindow(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.DetachedFromWindow;
|
||||
begin
|
||||
BMenuBar_DetachedFromWindow(CPlusObject);
|
||||
// BMenuBar_DetachedFromWindow(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.MessageReceived(msg : TMessage);
|
||||
begin
|
||||
BMenuBar_MessageReceived(CPlusObject, msg.CPlusObject);
|
||||
// BMenuBar_MessageReceived(CPlusObject, msg.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.MouseDown(where : TPoint);
|
||||
begin
|
||||
BMenuBar_MouseDown(CPlusObject, where.CPlusObject);
|
||||
// BMenuBar_MouseDown(CPlusObject, where.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.WindowActivated(state : boolean);
|
||||
begin
|
||||
BMenuBar_WindowActivated(CPlusObject, state);
|
||||
// BMenuBar_WindowActivated(CPlusObject, state);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.MouseUp(where : TPoint);
|
||||
begin
|
||||
BMenuBar_MouseUp(CPlusObject, where.CPlusObject);
|
||||
// BMenuBar_MouseUp(CPlusObject, where.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.FrameMoved(new_position : TPoint);
|
||||
begin
|
||||
BMenuBar_FrameMoved(CPlusObject, new_position.CPlusObject);
|
||||
// BMenuBar_FrameMoved(CPlusObject, new_position.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.FrameResized(new_width : double; new_height : double);
|
||||
begin
|
||||
BMenuBar_FrameResized(CPlusObject, new_width, new_height);
|
||||
// BMenuBar_FrameResized(CPlusObject, new_width, new_height);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.Show;
|
||||
@@ -228,27 +228,27 @@ end;
|
||||
|
||||
procedure TMenuBar.ResizeToPreferred;
|
||||
begin
|
||||
BMenuBar_ResizeToPreferred(CPlusObject);
|
||||
// BMenuBar_ResizeToPreferred(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.GetPreferredSize(width : double; height : double);
|
||||
begin
|
||||
BMenuBar_GetPreferredSize(CPlusObject, width, height);
|
||||
// BMenuBar_GetPreferredSize(CPlusObject, width, height);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.MakeFocus(state : boolean);
|
||||
begin
|
||||
BMenuBar_MakeFocus(CPlusObject, state);
|
||||
// BMenuBar_MakeFocus(CPlusObject, state);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.AllAttached;
|
||||
begin
|
||||
BMenuBar_AllAttached(CPlusObject);
|
||||
// BMenuBar_AllAttached(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TMenuBar.AllDetached;
|
||||
begin
|
||||
BMenuBar_AllDetached(CPlusObject);
|
||||
// BMenuBar_AllDetached(CPlusObject);
|
||||
end;
|
||||
|
||||
{function TMenuBar.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
|
||||
|
||||
@@ -29,29 +29,7 @@ class BPMenuItem : public BMenuItem, virtual public BPasObject
|
||||
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);*/
|
||||
virtual void Draw(void);
|
||||
private:
|
||||
};
|
||||
|
||||
@@ -60,6 +38,7 @@ class BPSeparatorItem : public BSeparatorItem, virtual public BPMenuItem
|
||||
public:
|
||||
BPSeparatorItem(TPasObject PasObject);
|
||||
BPSeparatorItem(TPasObject PasObject, BMessage *data);
|
||||
virtual void Draw(void);
|
||||
};
|
||||
|
||||
#endif /* _MENUITEM_H_ */
|
||||
@@ -21,21 +21,21 @@ unit textview;
|
||||
interface
|
||||
|
||||
uses
|
||||
beobj, interfacedefs,view,Message, Archivable, SupportDefs, Rect, Handler;
|
||||
|
||||
{type
|
||||
beobj, view, message, archivable, SupportDefs, rect, list,
|
||||
handler, messenger,interfacedefs,font,graphicdefs;
|
||||
type
|
||||
Ttext_run = Record
|
||||
offset : Integer;
|
||||
font TFont;
|
||||
offset : LongInt;
|
||||
font : TFont;
|
||||
color : Trgb_color;
|
||||
end;
|
||||
|
||||
type
|
||||
Ttext_run_array = Record
|
||||
count : Integer;
|
||||
runs : Ttext_run runs;
|
||||
count : LongInt;
|
||||
runs : Array[1..1] of Ttext_run ;
|
||||
end;
|
||||
}
|
||||
|
||||
type
|
||||
Tundo_state =(undo_state_nil,
|
||||
B_UNDO_UNAVAILABLE,
|
||||
@@ -70,15 +70,15 @@ type
|
||||
function ResolveSpecifier(message : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
|
||||
function GetSupportedSuites(data : TMessage) : TStatus_t;
|
||||
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
|
||||
{ procedure SetText(inText : PChar; inRuns : Ttext_tun_array);
|
||||
procedure SetText(inText : PChar; inLength : integer; inRuns : Ttext_tun_array);
|
||||
procedure SetText(inFile : TFile; startOffset : integer; inLength : integer; inRuns : Ttext_tun_array);
|
||||
procedure Insert(inText : PChar; inRuns : Ttext_tun_array);
|
||||
procedure Insert(inText : PChar; inLength : integer; inRuns : Ttext_tun_array);
|
||||
procedure Insert(startOffset : integer; inText : PChar; inLength : integer; inRuns : Ttext_tun_array);
|
||||
} procedure Delete;
|
||||
procedure SetText(inText : PChar; var inRuns : Ttext_run_array);
|
||||
procedure SetText(inText : PChar; inLength : integer; var inRuns : Ttext_run_array);
|
||||
// procedure SetText(inFile : TFile; startOffset : integer; inLength : integer; var inRuns : Ttext_run_array);
|
||||
procedure Insert(inText : PChar; var inRuns : Ttext_run_array);
|
||||
procedure Insert(inText : PChar; inLength : integer; var inRuns : Ttext_run_array);
|
||||
procedure Insert(startOffset : integer; inText : PChar; inLength : integer;var inRuns : Ttext_run_array);
|
||||
procedure Delete;
|
||||
procedure Delete(startOffset : integer; endOffset : integer);
|
||||
function Text : PChar;
|
||||
function aText : PChar;
|
||||
function TextLength : integer;
|
||||
procedure GetText(offset : integer; length : integer; buffer : PChar);
|
||||
function ByteAt(offset : integer) : PChar;
|
||||
@@ -94,11 +94,13 @@ type
|
||||
procedure Select(startOffset : integer; endOffset : integer);
|
||||
procedure SelectAll;
|
||||
// procedure GetSelection(outStart : integer; outEnd : integer);
|
||||
{ procedure SetFontAndColor(inFont : TFont; inMode : Cardinal; inColor : Trgb_color);
|
||||
procedure SetFontAndColor(startOffset : integer; endOffset : integer; inFont : TFont; inMode : Cardinal; inColor : Trgb_color);
|
||||
procedure SetFontAndColor(inFont : TFont; inMode : Cardinal; var inColor : TRGB_color);
|
||||
procedure SetFontAndColor(inFont : TFont; inMode : Cardinal);
|
||||
procedure SetFontAndColor(inFont : TFont);
|
||||
procedure SetFontAndColor(startOffset : Cardinal; endOffset : Cardinal; inFont : TFont; inMode : Cardinal; var inColor : Trgb_color);
|
||||
procedure GetFontAndColor(inOffset : integer; outFont : TFont; outColor : Trgb_color);
|
||||
procedure GetFontAndColor(outFont : TFont; outMode : integer; outColor : Trgb_color; outEqColor : boolean);
|
||||
procedure SetRunArray(startOffset : integer; endOffset : integer; inRuns : Ttext_tun_array);
|
||||
{ procedure SetRunArray(startOffset : integer; endOffset : integer; inRuns : Ttext_tun_array);
|
||||
function RunArray(startOffset : integer; endOffset : integer; outSize : ^integer) : Ttext_run_array;
|
||||
} function LineAt(offset : integer) : integer;
|
||||
function LineAt(point : TPoint) : integer;
|
||||
@@ -176,12 +178,12 @@ procedure BTextView_MessageReceived(AObject : TCPlusObject; message : TCPlusObje
|
||||
function BTextView_ResolveSpecifier(AObject : TCPlusObject; message : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BTextView_ResolveSpecifier';
|
||||
function BTextView_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BTextView_GetSupportedSuites';
|
||||
function BTextView_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BTextView_Perform';
|
||||
//procedure BTextView_SetText(AObject : TCPlusObject; inText : PChar; inRuns : Ttext_tun_array); cdecl; external BePascalLibName name 'BTextView_SetText';
|
||||
//procedure BTextView_SetText(AObject : TCPlusObject; inText : PChar; inLength : integer; inRuns : Ttext_tun_array); cdecl; external BePascalLibName name 'BTextView_SetText';
|
||||
procedure BTextView_SetText(AObject : TCPlusObject; inText : PChar;var inRuns : Ttext_run_array); cdecl; external BePascalLibName name 'BTextView_SetText';
|
||||
procedure BTextView_SetText(AObject : TCPlusObject; inText : PChar; inLength : integer;var inRuns : Ttext_run_array); cdecl; external BePascalLibName name 'BTextView_SetText_1';
|
||||
//procedure BTextView_SetText(AObject : TCPlusObject; inFile : TFile; startOffset : integer; inLength : integer; inRuns : Ttext_tun_array); cdecl; external BePascalLibName name 'BTextView_SetText';
|
||||
//procedure BTextView_Insert(AObject : TCPlusObject; inText : PChar; inRuns : Ttext_tun_array); cdecl; external BePascalLibName name 'BTextView_Insert';
|
||||
//procedure BTextView_Insert(AObject : TCPlusObject; inText : PChar; inLength : integer; inRuns : Ttext_tun_array); cdecl; external BePascalLibName name 'BTextView_Insert';
|
||||
//procedure BTextView_Insert(AObject : TCPlusObject; startOffset : integer; inText : PChar; inLength : integer; inRuns : Ttext_tun_array); cdecl; external BePascalLibName name 'BTextView_Insert';
|
||||
procedure BTextView_Insert(AObject : TCPlusObject; inText : PChar;var inRuns : Ttext_run_array); cdecl; external BePascalLibName name 'BTextView_Insert';
|
||||
procedure BTextView_Insert(AObject : TCPlusObject; inText : PChar; inLength : integer;var inRuns : Ttext_run_array); cdecl; external BePascalLibName name 'BTextView_Insert_1';
|
||||
procedure BTextView_Insert(AObject : TCPlusObject; startOffset : integer; inText : PChar; inLength : integer;var inRuns : Ttext_run_array); cdecl; external BePascalLibName name 'BTextView_Insert_2';
|
||||
procedure BTextView_Delete(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_Delete';
|
||||
procedure BTextView_Delete(AObject : TCPlusObject; startOffset : integer; endOffset : integer); cdecl; external BePascalLibName name 'BTextView_Delete';
|
||||
function BTextView_Text(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BTextView_Text';
|
||||
@@ -200,10 +202,12 @@ function BTextView_AcceptsDrop(AObject : TCPlusObject; inMessage : TCPlusObject)
|
||||
procedure BTextView_Select(AObject : TCPlusObject; startOffset : integer; endOffset : integer); cdecl; external BePascalLibName name 'BTextView_Select';
|
||||
procedure BTextView_SelectAll(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_SelectAll';
|
||||
//procedure BTextView_GetSelection(AObject : TCPlusObject; outStart : ^integer; outEnd : ^integer); cdecl; external BePascalLibName name 'BTextView_GetSelection';
|
||||
//procedure BTextView_SetFontAndColor(AObject : TCPlusObject; inFont : TFont; inMode : Cardinal; inColor : Trgb_color); cdecl; external BePascalLibName name 'BTextView_SetFontAndColor';
|
||||
//procedure BTextView_SetFontAndColor(AObject : TCPlusObject; startOffset : integer; endOffset : integer; inFont : TFont; inMode : Cardinal; inColor : Trgb_color); cdecl; external BePascalLibName name 'BTextView_SetFontAndColor';
|
||||
//procedure BTextView_GetFontAndColor(AObject : TCPlusObject; inOffset : integer; outFont : TFont; outColor : Trgb_color); cdecl; external BePascalLibName name 'BTextView_GetFontAndColor';
|
||||
//procedure BTextView_GetFontAndColor(AObject : TCPlusObject; outFont : TFont; outMode : integer; outColor : Trgb_color; outEqColor : boolean); cdecl; external BePascalLibName name 'BTextView_GetFontAndColor';
|
||||
procedure BTextView_SetFontAndColor(AObject : TCPlusObject; inFont : TCPlusObject; inMode : Cardinal; var inColor : Trgb_color); cdecl; external BePascalLibName name 'BTextView_SetFontAndColor';
|
||||
procedure BTextView_SetFontAndColor(AObject : TCPlusObject; inFont : TCPlusObject; inMode : Cardinal); cdecl; external BePascalLibName name 'BTextView_SetFontAndColor';
|
||||
procedure BTextView_SetFontAndColor(AObject : TCPlusObject; inFont : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_SetFontAndColor';
|
||||
procedure BTextView_SetFontAndColor(AObject : TCPlusObject; startOffset : cardinal; endOffset : cardinal; inFont : TCPlusObject; inMode : Cardinal; var inColor : Trgb_color); cdecl; external BePascalLibName name 'BTextView_SetFontAndColor_1';
|
||||
procedure BTextView_GetFontAndColor(AObject : TCPlusObject; inOffset : cardinal; outFont : TCPlusObject; outColor : Trgb_color); cdecl; external BePascalLibName name 'BTextView_GetFontAndColor';
|
||||
procedure BTextView_GetFontAndColor(AObject : TCPlusObject; outFont : TCPlusObject; outMode : integer; outColor : Trgb_color; outEqColor : boolean); cdecl; external BePascalLibName name 'BTextView_GetFontAndColor';
|
||||
//procedure BTextView_SetRunArray(AObject : TCPlusObject; startOffset : integer; endOffset : integer; inRuns : Ttext_tun_array); cdecl; external BePascalLibName name 'BTextView_SetRunArray';
|
||||
//function BTextView_RunArray(AObject : TCPlusObject; startOffset : integer; endOffset : integer; outSize : ^integer) : Ttext_run_array; cdecl; external BePascalLibName name 'BTextView_RunArray';
|
||||
function BTextView_LineAt(AObject : TCPlusObject; offset : integer) : integer; cdecl; external BePascalLibName name 'BTextView_LineAt';
|
||||
@@ -379,7 +383,6 @@ end;
|
||||
|
||||
procedure TTextView.KeyDown(bytes : PChar; numBytes : integer);
|
||||
begin
|
||||
writeln(self.countlines);
|
||||
//BTextView_KeyDown(CPlusObject, bytes, numBytes);
|
||||
end;
|
||||
|
||||
@@ -400,12 +403,14 @@ end;
|
||||
|
||||
procedure TTextView.MessageReceived(message : TMessage);
|
||||
begin
|
||||
inherited;
|
||||
// BTextView_MessageReceived(CPlusObject, message.CPlusObject);
|
||||
end;
|
||||
|
||||
function TTextView.ResolveSpecifier(message : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
|
||||
begin
|
||||
//Result := BTextView_ResolveSpecifier(CPlusObject, message.CPlusObject, index, specifier.CPlusObject, form, properti);
|
||||
|
||||
end;
|
||||
|
||||
function TTextView.GetSupportedSuites(data : TMessage) : TStatus_t;
|
||||
@@ -418,36 +423,36 @@ begin
|
||||
Result := BTextView_Perform(CPlusObject, d, arg);
|
||||
end;
|
||||
|
||||
{procedure TTextView.SetText(inText : PChar; inRuns : Ttext_tun_array);
|
||||
procedure TTextView.SetText(inText : PChar; var inRuns : Ttext_run_array);
|
||||
begin
|
||||
BTextView_SetText(CPlusObject, inText, inRuns);
|
||||
end;
|
||||
|
||||
procedure TTextView.SetText(inText : PChar; inLength : integer; inRuns : Ttext_tun_array);
|
||||
procedure TTextView.SetText(inText : PChar; inLength : integer; var inRuns : Ttext_run_array);
|
||||
begin
|
||||
BTextView_SetText(CPlusObject, inText, inLength, inRuns);
|
||||
end;
|
||||
|
||||
procedure TTextView.SetText(inFile : TFile; startOffset : integer; inLength : integer; inRuns : Ttext_tun_array);
|
||||
{procedure TTextView.SetText(inFile : TFile; startOffset : integer; inLength : integer; inRuns : Ttext_run_array);
|
||||
begin
|
||||
BTextView_SetText(CPlusObject, inFile.CPlusObject, startOffset, inLength, inRuns);
|
||||
end;
|
||||
|
||||
procedure TTextView.Insert(inText : PChar; inRuns : Ttext_tun_array);
|
||||
}
|
||||
procedure TTextView.Insert(inText : PChar;var inRuns : Ttext_run_array);
|
||||
begin
|
||||
BTextView_Insert(CPlusObject, inText, inRuns);
|
||||
end;
|
||||
|
||||
procedure TTextView.Insert(inText : PChar; inLength : integer; inRuns : Ttext_tun_array);
|
||||
procedure TTextView.Insert(inText : PChar; inLength : integer; var inRuns : Ttext_run_array);
|
||||
begin
|
||||
BTextView_Insert(CPlusObject, inText, inLength, inRuns);
|
||||
end;
|
||||
|
||||
procedure TTextView.Insert(startOffset : integer; inText : PChar; inLength : integer; inRuns : Ttext_tun_array);
|
||||
procedure TTextView.Insert(startOffset : integer; inText : PChar; inLength : integer; var inRuns : Ttext_run_array);
|
||||
begin
|
||||
BTextView_Insert(CPlusObject, startOffset, inText, inLength, inRuns);
|
||||
end;
|
||||
}
|
||||
|
||||
procedure TTextView.Delete;
|
||||
begin
|
||||
BTextView_Delete(CPlusObject);
|
||||
@@ -458,7 +463,7 @@ begin
|
||||
BTextView_Delete(CPlusObject, startOffset, endOffset);
|
||||
end;
|
||||
|
||||
function TTextView.Text : PChar;
|
||||
function TTextView.aText : PChar;
|
||||
begin
|
||||
Result := BTextView_Text(CPlusObject);
|
||||
end;
|
||||
@@ -537,15 +542,25 @@ end;
|
||||
begin
|
||||
BTextView_GetSelection(CPlusObject, outStart, outEnd);
|
||||
end;
|
||||
|
||||
procedure TTextView.SetFontAndColor(inFont : TFont; inMode : Cardinal; inColor : Trgb_color);
|
||||
}
|
||||
procedure TTextView.SetFontAndColor(inFont : TFont; inMode : Cardinal; var inColor : Trgb_color);
|
||||
begin
|
||||
BTextView_SetFontAndColor(CPlusObject, inFont, inMode, inColor);
|
||||
BTextView_SetFontAndColor(CPlusObject, inFont.CPlusObject, inMode, inColor);
|
||||
end;
|
||||
|
||||
procedure TTextView.SetFontAndColor(startOffset : integer; endOffset : integer; inFont : TFont; inMode : Cardinal; inColor : Trgb_color);
|
||||
procedure TTextView.SetFontAndColor(inFont : TFont; inMode : Cardinal);
|
||||
begin
|
||||
BTextView_SetFontAndColor(CPlusObject, startOffset, endOffset, inFont, inMode, inColor);
|
||||
BTextView_SetFontAndColor(CPlusObject, inFont.CPlusObject, inMode);
|
||||
end;
|
||||
|
||||
procedure TTextView.SetFontAndColor(inFont : TFont);
|
||||
begin
|
||||
BTextView_SetFontAndColor(CPlusObject, inFont.CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TTextView.SetFontAndColor(startOffset : cardinal; endOffset : cardinal; inFont : TFont; inMode : Cardinal; var inColor : Trgb_color);
|
||||
begin
|
||||
BTextView_SetFontAndColor(CPlusObject, startOffset, endOffset, inFont.CPlusObject, inMode, inColor);
|
||||
end;
|
||||
|
||||
procedure TTextView.GetFontAndColor(inOffset : integer; outFont : TFont; outColor : Trgb_color);
|
||||
@@ -557,7 +572,7 @@ procedure TTextView.GetFontAndColor(outFont : TFont; outMode : integer; outCo
|
||||
begin
|
||||
BTextView_GetFontAndColor(CPlusObject, outFont.CPlusObject, outMode, outColor, outEqColor);
|
||||
end;
|
||||
|
||||
{
|
||||
procedure TTextView.SetRunArray(startOffset : integer; endOffset : integer; inRuns : Ttext_tun_array);
|
||||
begin
|
||||
BTextView_SetRunArray(CPlusObject, startOffset, endOffset, inRuns);
|
||||
|
||||
@@ -56,6 +56,22 @@ class BPView : public BView, public virtual BPHandler
|
||||
virtual void WindowActivated(bool active);
|
||||
virtual void Draw_hookCall(BRect updateRect);
|
||||
virtual void AttachedToWindow_hookCall(void);
|
||||
virtual void AllAttached_hookCall(void);
|
||||
virtual void AllDetached_hookCall(void);
|
||||
virtual void DetachedFromWindow_hookCall(void);
|
||||
virtual void DrawAfterChildren_hookCall(BRect updateRect);
|
||||
virtual void FrameMoved_hookCall(BPoint parentPoint);
|
||||
virtual void FrameResized_hookCall(float width, float height);
|
||||
virtual void GetPreferredSize_hookCall(float *width, float *height);
|
||||
virtual void ResizeToPreferred_hookCall(void);
|
||||
virtual void KeyDown_hookCall(const char *bytes, int32 numBytes);
|
||||
virtual void KeyUp_hookCall(const char *bytes, int32 numBytes);
|
||||
virtual void MouseDown_hookCall(BPoint point);
|
||||
virtual void MouseMoved_hookCall(BPoint point, uint32 transit, const BMessage *message);
|
||||
virtual void MouseUp_hookCall(BPoint point);
|
||||
virtual void Pulse_hookCall(void);
|
||||
// virtual void TargetedByScrollView_hookCall(BScrollView *scroller);
|
||||
virtual void WindowActivated_hookCall(bool active);
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
@@ -106,6 +106,16 @@ const
|
||||
B_DRAW_ON_CHILDREN : Cardinal = $00400000;//23;
|
||||
_B_RESERVED7_ : Cardinal = $00200000;//22;
|
||||
|
||||
B_FONT_FAMILY_AND_STYLE = 1;
|
||||
B_FONT_SIZE = 2;
|
||||
B_FONT_SHEAR = 4;
|
||||
B_FONT_ROTATION = 8;
|
||||
B_FONT_SPACING = 16;
|
||||
B_FONT_ENCODING = 32;
|
||||
B_FONT_FACE = 64;
|
||||
B_FONT_FLAGS = 128;
|
||||
B_FONT_ALL = 255;
|
||||
|
||||
implementation
|
||||
|
||||
var
|
||||
|
||||
Reference in New Issue
Block a user