From b4b152c846e7d58a41bfb4e6fff116a540add46c Mon Sep 17 00:00:00 2001 From: ocoursiere Date: Thu, 18 Dec 2003 22:19:10 +0000 Subject: [PATCH] Updates from Baldur --- bepascal/source/bepascal/cpp/Jamfile | 5 + .../bepascal/cpp/src/be/app/Message.cpp | 5 + .../bepascal/cpp/src/be/interface/Point.cpp | 10 + .../bepascal/cpp/src/be/interface/Rect.cpp | 355 ++- .../bepascal/cpp/src/be/interface/View.cpp | 2052 ++++++++++++++++- .../source/bepascal/pas/src/be/app/invoker.pp | 19 +- .../source/bepascal/pas/src/be/app/message.pp | 10 +- .../bepascal/pas/src/be/app/messenger.pp | 15 +- .../bepascal/pas/src/be/interface/bitmap.pp | 12 +- .../bepascal/pas/src/be/interface/box.pp | 6 +- .../bepascal/pas/src/be/interface/button.pp | 10 +- .../bepascal/pas/src/be/interface/checkbox.pp | 8 +- .../bepascal/pas/src/be/interface/control.pp | 8 +- .../pas/src/be/interface/graphicdefs.pp | 305 ++- .../pas/src/be/interface/interfacedefs.pp | 20 +- .../bepascal/pas/src/be/interface/listview.pp | 6 +- .../bepascal/pas/src/be/interface/menu.pp | 12 +- .../bepascal/pas/src/be/interface/menubar.pp | 6 +- .../pas/src/be/interface/outlinelistview.pp | 6 +- .../bepascal/pas/src/be/interface/polygon.pp | 137 +- .../pas/src/be/interface/radiobutton.pp | 8 +- .../bepascal/pas/src/be/interface/rect.pp | 259 ++- .../pas/src/be/interface/scrollbar.pp | 6 +- .../pas/src/be/interface/scrollview.pp | 6 +- .../pas/src/be/interface/statusbar.pp | 6 +- .../pas/src/be/interface/stringview.pp | 12 +- .../bepascal/pas/src/be/interface/tabview.pp | 12 +- .../pas/src/be/interface/textcontrol.pp | 10 +- .../bepascal/pas/src/be/interface/textview.pp | 8 +- .../bepascal/pas/src/be/interface/view.pp | 1115 ++++++++- .../bepascal/pas/src/be/storage/entry.pp | 5 + bepascal/source/tools/codegen/pas/codegen.pp | 33 +- 32 files changed, 4259 insertions(+), 228 deletions(-) diff --git a/bepascal/source/bepascal/cpp/Jamfile b/bepascal/source/bepascal/cpp/Jamfile index 66625d4..1a026ba 100644 --- a/bepascal/source/bepascal/cpp/Jamfile +++ b/bepascal/source/bepascal/cpp/Jamfile @@ -178,6 +178,7 @@ DRIVER_PATH on $(NAME) = ; BeMain libbepascal.so : src/be/bepas_kernel/beobj.cpp src/be/app/Application.cpp src/be/app/Clipboard.cpp + src/be/app/Cursor.cpp src/be/app/Handler.cpp src/be/app/Invoker.cpp src/be/app/Looper.cpp @@ -208,6 +209,7 @@ BeMain libbepascal.so : src/be/bepas_kernel/beobj.cpp src/be/interface/Screen.cpp src/be/interface/ScrollBar.cpp src/be/interface/ScrollView.cpp + src/be/interface/Shape.cpp src/be/interface/StatusBar.cpp src/be/interface/StringView.cpp src/be/interface/TabView.cpp @@ -217,8 +219,11 @@ BeMain libbepascal.so : src/be/bepas_kernel/beobj.cpp src/be/interface/Window.cpp src/be/mail/E-mail.cpp src/be/storage/Entry.cpp + src/be/storage/File.cpp src/be/storage/FilePanel.cpp + src/be/storage/Node.cpp src/be/storage/Path.cpp + src/be/storage/Resources.cpp src/be/storage/Volume.cpp src/be/storage/VolumeRoster.cpp src/be/support/Archivable.cpp diff --git a/bepascal/source/bepascal/cpp/src/be/app/Message.cpp b/bepascal/source/bepascal/cpp/src/be/app/Message.cpp index 0a53f94..188b1dc 100644 --- a/bepascal/source/bepascal/cpp/src/be/app/Message.cpp +++ b/bepascal/source/bepascal/cpp/src/be/app/Message.cpp @@ -227,6 +227,11 @@ bool BMessage_WasDropped(TCPlusObject message) return reinterpret_cast(message)->WasDropped(); } +status_t BMessage_Unflatten(TCPlusObject message,BDataIO *stream) +{ + return reinterpret_cast(message)->Unflatten(stream); +} + /*********************************************************************** * Method: BMessage::operator= * Params: const BMessage &msg diff --git a/bepascal/source/bepascal/cpp/src/be/interface/Point.cpp b/bepascal/source/bepascal/cpp/src/be/interface/Point.cpp index b29469a..4868b8f 100644 --- a/bepascal/source/bepascal/cpp/src/be/interface/Point.cpp +++ b/bepascal/source/bepascal/cpp/src/be/interface/Point.cpp @@ -76,6 +76,16 @@ void BPoint_Set(TCPlusObject Point, float x, float y) reinterpret_cast(Point)->Set(x, y); } +float BPoint_Get_X(TCPlusObject Point) +{ + return reinterpret_cast(Point)->x; +} + +float BPoint_Get_Y(TCPlusObject Point) +{ + return reinterpret_cast(Point)->y; +} + #if defined(__cplusplus) } #endif diff --git a/bepascal/source/bepascal/cpp/src/be/interface/Rect.cpp b/bepascal/source/bepascal/cpp/src/be/interface/Rect.cpp index cbe8ded..faab55f 100644 --- a/bepascal/source/bepascal/cpp/src/be/interface/Rect.cpp +++ b/bepascal/source/bepascal/cpp/src/be/interface/Rect.cpp @@ -75,10 +75,363 @@ void BRect_PrintToStream(TCPlusObject rect) reinterpret_cast(rect)->PrintToStream(); } +float BRect_left(TCPlusObject rect) +{ + return reinterpret_cast(rect)->left; +} + +float BRect_top(TCPlusObject rect) +{ + return reinterpret_cast(rect)->top; +} +float BRect_right(TCPlusObject rect) +{ + return reinterpret_cast(rect)->right; +} +float BRect_bottom(TCPlusObject rect) +{ + return reinterpret_cast(rect)->bottom; +} + +/*********************************************************************** + * Method: BRect::SetLeftTop + * Params: const BPoint + * Returns: void + * Effects: + ***********************************************************************/ +void +BRect_SetLeftTop(BRect *Rect, const BPoint p) +{ + Rect->SetLeftTop(p); +} + + +/*********************************************************************** + * Method: BRect::SetRightBottom + * Params: const BPoint + * Returns: void + * Effects: + ***********************************************************************/ +void +BRect_SetRightBottom(BRect *Rect, const BPoint p) +{ + Rect->SetRightBottom(p); +} + + +/*********************************************************************** + * Method: BRect::SetLeftBottom + * Params: const BPoint + * Returns: void + * Effects: + ***********************************************************************/ +void +BRect_SetLeftBottom(BRect *Rect, const BPoint p) +{ + Rect->SetLeftBottom(p); +} + + +/*********************************************************************** + * Method: BRect::SetRightTop + * Params: const BPoint + * Returns: void + * Effects: + ***********************************************************************/ +void +BRect_SetRightTop(BRect *Rect, const BPoint p) +{ + Rect->SetRightTop(p); +} + + +/*********************************************************************** + * Method: BRect::InsetBy + * Params: BPoint + * Returns: void + * Effects: + ***********************************************************************/ +void +BRect_InsetBy(BRect *Rect, BPoint p) +{ + Rect->InsetBy(p); +} + + +/*********************************************************************** + * Method: BRect::InsetBy + * Params: float dx, float dy + * Returns: void + * Effects: + ***********************************************************************/ +void +BRect_InsetBy_1 +(BRect *Rect, float dx, float dy) +{ + Rect->InsetBy(dx, dy); +} + + +/*********************************************************************** + * Method: BRect::OffsetBy + * Params: BPoint + * Returns: void + * Effects: + ***********************************************************************/ +void +BRect_OffsetBy(BRect *Rect, BPoint p) +{ + Rect->OffsetBy(p); +} + + +/*********************************************************************** + * Method: BRect::OffsetBy + * Params: float dx, float dy + * Returns: void + * Effects: + ***********************************************************************/ +void +BRect_OffsetBy_1 +(BRect *Rect, float dx, float dy) +{ + Rect->OffsetBy(dx, dy); +} + + +/*********************************************************************** + * Method: BRect::OffsetTo + * Params: BPoint + * Returns: void + * Effects: + ***********************************************************************/ +void +BRect_OffsetTo(BRect *Rect, BPoint p) +{ + Rect->OffsetTo(p); +} + + +/*********************************************************************** + * Method: BRect::OffsetTo + * Params: float x, float y + * Returns: void + * Effects: + ***********************************************************************/ +void +BRect_OffsetTo_1 +(BRect *Rect, float x, float y) +{ + Rect->OffsetTo(x, y); +} + + +/*********************************************************************** + * Method: BRect::InsetBySelf + * Params: BPoint + * Returns: BRect & + * Effects: + ***********************************************************************/ +BRect & +BRect_InsetBySelf(BRect *Rect, BPoint p) +{ + return Rect->InsetBySelf(p); +} + + +/*********************************************************************** + * Method: BRect::InsetBySelf + * Params: float dx, float dy + * Returns: BRect & + * Effects: + ***********************************************************************/ +BRect & +BRect_InsetBySelf_1 +(BRect *Rect, float dx, float dy) +{ + return Rect->InsetBySelf(dx, dy); +} + + +/*********************************************************************** + * Method: BRect::InsetByCopy + * Params: BPoint + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BRect_InsetByCopy(BRect *Rect, BPoint p) +{ + return Rect->InsetByCopy(p); +} + + +/*********************************************************************** + * Method: BRect::InsetByCopy + * Params: float dx, float dy + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BRect_InsetByCopy_1 +(BRect *Rect, float dx, float dy) +{ + return Rect->InsetByCopy(dx, dy); +} + + +/*********************************************************************** + * Method: BRect::OffsetBySelf + * Params: BPoint + * Returns: BRect & + * Effects: + ***********************************************************************/ +BRect & +BRect_OffsetBySelf(BRect *Rect, BPoint p) +{ + return Rect->OffsetBySelf(p); +} + + +/*********************************************************************** + * Method: BRect::OffsetBySelf + * Params: float dx, float dy + * Returns: BRect & + * Effects: + ***********************************************************************/ +BRect & +BRect_OffsetBySelf_1 +(BRect *Rect, float dx, float dy) +{ + return Rect->OffsetBySelf(dx, dy); +} + + +/*********************************************************************** + * Method: BRect::OffsetByCopy + * Params: BPoint + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BRect_OffsetByCopy(BRect *Rect, BPoint p) +{ + return Rect->OffsetByCopy(p); +} + + +/*********************************************************************** + * Method: BRect::OffsetByCopy + * Params: float dx, float dy + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BRect_OffsetByCopy_1 +(BRect *Rect, float dx, float dy) +{ + return Rect->OffsetByCopy(dx, dy); +} + + +/*********************************************************************** + * Method: BRect::OffsetToSelf + * Params: BPoint + * Returns: BRect & + * Effects: + ***********************************************************************/ +BRect & +BRect_OffsetToSelf(BRect *Rect, BPoint p) +{ + return Rect->OffsetToSelf(p); +} + + +/*********************************************************************** + * Method: BRect::OffsetToSelf + * Params: float dx, float dy + * Returns: BRect & + * Effects: + ***********************************************************************/ +BRect & +BRect_OffsetToSelf_1 +(BRect *Rect, float dx, float dy) +{ + return Rect->OffsetToSelf(dx, dy); +} + + +/*********************************************************************** + * Method: BRect::OffsetToCopy + * Params: BPoint + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BRect_OffsetToCopy(BRect *Rect, BPoint p) +{ + return Rect->OffsetToCopy(p); +} + + +/*********************************************************************** + * Method: BRect::OffsetToCopy + * Params: float dx, float dy + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BRect_OffsetToCopy_1 +(BRect *Rect, float dx, float dy) +{ + return Rect->OffsetToCopy(dx, dy); +} + + + + +/*********************************************************************** + * Method: BRect::Intersects + * Params: BRect r + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BRect_Intersects(BRect *Rect, BRect r) +{ + return Rect->Intersects(r); +} + + +/*********************************************************************** + * Method: BRect::Contains + * Params: BPoint + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BRect_Contains(BRect *Rect, BPoint p) +{ + return Rect->Contains(p); +} + + +/*********************************************************************** + * Method: BRect::Contains + * Params: BRect + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BRect_Contains_1 +(BRect *Rect, BRect p) +{ + return Rect->Contains(p); +} #if defined(__cplusplus) } #endif -#endif _RECT_CPP_ /* _RECT_CPP_ */ +#endif _RECT_CPP_ /* _RECT_CPP_ */ \ No newline at end of file diff --git a/bepascal/source/bepascal/cpp/src/be/interface/View.cpp b/bepascal/source/bepascal/cpp/src/be/interface/View.cpp index ad6688f..452a263 100644 --- a/bepascal/source/bepascal/cpp/src/be/interface/View.cpp +++ b/bepascal/source/bepascal/cpp/src/be/interface/View.cpp @@ -105,7 +105,6 @@ BPView::BPView(TPasObject PasObject, BMessage *archive) // BPasObject(PasObject) { } - void BPView::MessageReceived(BMessage *message) { BPHandler::MessageReceived_hookCall(message); @@ -573,6 +572,2057 @@ BView_IsHidden(BView *View) return View->IsHidden(); } +/*********************************************************************** + * Method: BView::ConvertToScreen + * Params: BPoint *pt + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ConvertToScreen(BView *View, BPoint *pt) +{ + View->ConvertToScreen(pt); +} + + +/*********************************************************************** + * Method: BView::ConvertToScreen + * Params: BPoint pt + * Returns: BPoint + * Effects: + ***********************************************************************/ +BPoint +BView_ConvertToScreen_1 +(BView *View, BPoint pt) +{ + return View->ConvertToScreen(pt); +} + + +/*********************************************************************** + * Method: BView::ConvertFromScreen + * Params: BPoint *pt + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ConvertFromScreen(BView *View, BPoint *pt) +{ + View->ConvertFromScreen(pt); +} + + +/*********************************************************************** + * Method: BView::ConvertFromScreen + * Params: BPoint pt + * Returns: BPoint + * Effects: + ***********************************************************************/ +BPoint +BView_ConvertFromScreen_1 +(BView *View, BPoint pt) +{ + return View->ConvertFromScreen(pt); +} + + +/*********************************************************************** + * Method: BView::ConvertToScreen + * Params: BRect *r + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ConvertToScreen_r(BView *View, BRect *r) +{ + View->ConvertToScreen(r); +} + + +/*********************************************************************** + * Method: BView::ConvertToScreen + * Params: BRect r + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BView_ConvertToScreen_r_1 +(BView *View, BRect r) +{ + return View->ConvertToScreen(r); +} + + +/*********************************************************************** + * Method: BView::ConvertFromScreen + * Params: BRect *r + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ConvertFromScreen_r(BView *View, BRect *r) +{ + View->ConvertFromScreen(r); +} + + +/*********************************************************************** + * Method: BView::ConvertFromScreen + * Params: BRect r + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BView_ConvertFromScreen_r_1 +(BView *View, BRect r) +{ + return View->ConvertFromScreen(r); +} + + +/*********************************************************************** + * Method: BView::ConvertToParent + * Params: BPoint *pt + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ConvertToParent(BView *View, BPoint *pt) +{ + View->ConvertToParent(pt); +} + + +/*********************************************************************** + * Method: BView::ConvertToParent + * Params: BPoint pt + * Returns: BPoint + * Effects: + ***********************************************************************/ +BPoint +BView_ConvertToParent_1 +(BView *View, BPoint pt) +{ + return View->ConvertToParent(pt); +} + + +/*********************************************************************** + * Method: BView::ConvertFromParent + * Params: BPoint *pt + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ConvertFromParent(BView *View, BPoint *pt) +{ + View->ConvertFromParent(pt); +} + + +/*********************************************************************** + * Method: BView::ConvertFromParent + * Params: BPoint pt + * Returns: BPoint + * Effects: + ***********************************************************************/ +BPoint +BView_ConvertFromParent_1 +(BView *View, BPoint pt) +{ + return View->ConvertFromParent(pt); +} + + +/*********************************************************************** + * Method: BView::ConvertToParent + * Params: BRect *r + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ConvertToParent_r(BView *View, BRect *r) +{ + View->ConvertToParent(r); +} + + +/*********************************************************************** + * Method: BView::ConvertToParent + * Params: BRect r + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BView_ConvertToParent_r_1 +(BView *View, BRect r) +{ + return View->ConvertToParent(r); +} + + +/*********************************************************************** + * Method: BView::ConvertFromParent + * Params: BRect *r + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ConvertFromParent_r(BView *View, BRect *r) +{ + View->ConvertFromParent(r); +} + + +/*********************************************************************** + * Method: BView::ConvertFromParent + * Params: BRect r + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BView_ConvertFromParent_r_1 +(BView *View, BRect r) +{ + return View->ConvertFromParent(r); +} + + +/*********************************************************************** + * Method: BView::LeftTop + * Params: + * Returns: BPoint + * Effects: + ***********************************************************************/ +BPoint +BView_LeftTop(BView *View) +{ + return View->LeftTop(); +} + +void +BView_ConstrainClippingRegion(BView *View, BRegion *region) +{ + View->ConstrainClippingRegion(region); +} + + +/*********************************************************************** + * Method: BView::BeginRectTracking + * Params: BRect startRect, uint32 style + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_BeginRectTracking(BView *View, BRect startRect, uint32 style) +{ + View->BeginRectTracking(startRect, style); +} + + +/*********************************************************************** + * Method: BView::EndRectTracking + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_EndRectTracking(BView *View) +{ + View->EndRectTracking(); +} + + +/*********************************************************************** + * Method: BView::GetMouse + * Params: BPoint *location, uint32 *buttons, bool checkMessageQueue + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_GetMouse(BView *View, BPoint *location, uint32 *buttons, bool checkMessageQueue) +{ + View->GetMouse(location, buttons, checkMessageQueue); +} + + +/*********************************************************************** + * Method: BView::DragMessage + * Params: BMessage *aMessage, BRect dragRect, BHandler *reply_to + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DragMessage(BView *View, BMessage *aMessage, BRect dragRect, BHandler *reply_to) +{ + View->DragMessage(aMessage, dragRect, reply_to); +} + + +/*********************************************************************** + * Method: BView::DragMessage + * Params: BMessage *aMessage, BBitmap *anImage, BPoint offset, BHandler *reply_to + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DragMessage_1 +(BView *View, BMessage *aMessage, BBitmap *anImage, BPoint offset, BHandler *reply_to) +{ + View->DragMessage(aMessage, anImage, offset, reply_to); +} + + +/*********************************************************************** + * Method: BView::DragMessage + * Params: BMessage *aMessage, BBitmap *anImage, drawing_mode dragMode, BPoint offset, BHandler *reply_to + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DragMessage_2 +(BView *View, BMessage *aMessage, BBitmap *anImage, drawing_mode dragMode, BPoint offset, BHandler *reply_to) +{ + View->DragMessage(aMessage, anImage, dragMode, offset, reply_to); +} + + +/*********************************************************************** + * Method: BView::FindView + * Params: const char *name + * Returns: BView * + * Effects: + ***********************************************************************/ +BView * +BView_FindView(BView *View, const char *name) +{ + return View->FindView(name); +} + + +/*********************************************************************** + * Method: BView::Parent + * Params: + * Returns: BView * + * Effects: + ***********************************************************************/ +BView * +BView_Parent(BView *View) +{ + return View->Parent(); +} + + +/*********************************************************************** + * Method: BView::Bounds + * Params: + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BView_Bounds(BView *View) +{ + return View->Bounds(); +} + + +/*********************************************************************** + * Method: BView::Frame + * Params: + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BView_Frame(BView *View) +{ + return View->Frame(); +} + + + + +/*********************************************************************** + * Method: BView::GetClippingRegion + * Params: BRegion *region + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_GetClippingRegion(BView *View, BRegion *region) +{ + View->GetClippingRegion(region); +} + + + +/*********************************************************************** + * Method: BView::ClipToPicture + * Params: BPicture *picture, BPoint where, bool sync + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ClipToPicture(BView *View, BPicture *picture, BPoint where, bool sync) +{ + View->ClipToPicture(picture, where, sync); +} + + +/*********************************************************************** + * Method: BView::ClipToInversePicture + * Params: BPicture *picture, BPoint where, bool sync + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ClipToInversePicture(BView *View, BPicture *picture, BPoint where, bool sync) +{ + View->ClipToInversePicture(picture, where, sync); +} + + +/*********************************************************************** + * Method: BView::SetDrawingMode + * Params: drawing_mode mode + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetDrawingMode(BView *View, drawing_mode mode) +{ + View->SetDrawingMode(mode); +} + + +/*********************************************************************** + * Method: BView::DrawingMode + * Params: + * Returns: drawing_mode + * Effects: + ***********************************************************************/ +drawing_mode +BView_DrawingMode(BView *View) +{ + return View->DrawingMode(); +} + + +/*********************************************************************** + * Method: BView::SetBlendingMode + * Params: source_alpha srcAlpha, alpha_function alphaFunc + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetBlendingMode(BView *View, source_alpha srcAlpha, alpha_function alphaFunc) +{ + View->SetBlendingMode(srcAlpha, alphaFunc); +} + + +/*********************************************************************** + * Method: BView::GetBlendingMode + * Params: source_alpha *srcAlpha, alpha_function *alphaFunc + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_GetBlendingMode(BView *View, source_alpha *srcAlpha, alpha_function *alphaFunc) +{ + View->GetBlendingMode(srcAlpha, alphaFunc); +} + + +/*********************************************************************** + * Method: BView::SetPenSize + * Params: float size + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetPenSize(BView *View, float size) +{ + View->SetPenSize(size); +} + + +/*********************************************************************** + * Method: BView::PenSize + * Params: + * Returns: float + * Effects: + ***********************************************************************/ +float +BView_PenSize(BView *View) +{ + return View->PenSize(); +} + + +/*********************************************************************** + * Method: BView::SetViewCursor + * Params: const BCursor *cursor, bool sync + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetViewCursor(BView *View, const BCursor *cursor, bool sync) +{ + View->SetViewCursor(cursor, sync); +} + + + + + + + +/*********************************************************************** + * Method: BView::ClearViewBitmap + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ClearViewBitmap(BView *View) +{ + View->ClearViewBitmap(); +} + + +/*********************************************************************** + * Method: BView::ClearViewOverlay + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ClearViewOverlay(BView *View) +{ + View->ClearViewOverlay(); +} + + +/*********************************************************************** + * Method: BView::SetHighColor + * Params: rgb_color a_color + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetHighColor(BView *View, rgb_color a_color) +{ + View->SetHighColor(a_color); +} + + +/*********************************************************************** + * Method: BView::HighColor + * Params: + * Returns: rgb_color + * Effects: + ***********************************************************************/ +rgb_color +BView_HighColor(BView *View) +{ + return View->HighColor(); +} + + +/*********************************************************************** + * Method: BView::SetLowColor + * Params: rgb_color a_color + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetLowColor(BView *View, rgb_color a_color) +{ + View->SetLowColor(a_color); +} + + +/*********************************************************************** + * Method: BView::LowColor + * Params: + * Returns: rgb_color + * Effects: + ***********************************************************************/ +rgb_color +BView_LowColor(BView *View) +{ + return View->LowColor(); +} + + +/*********************************************************************** + * Method: BView::SetLineMode + * Params: cap_mode lineCap, join_mode lineJoin, float miterLimit + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetLineMode(BView *View, cap_mode lineCap, join_mode lineJoin, float miterLimit) +{ + View->SetLineMode(lineCap, lineJoin, miterLimit); +} + + +/*********************************************************************** + * Method: BView::LineJoinMode + * Params: + * Returns: join_mode + * Effects: + ***********************************************************************/ +join_mode +BView_LineJoinMode(BView *View) +{ + return View->LineJoinMode(); +} + + +/*********************************************************************** + * Method: BView::LineCapMode + * Params: + * Returns: cap_mode + * Effects: + ***********************************************************************/ +cap_mode +BView_LineCapMode(BView *View) +{ + return View->LineCapMode(); +} + + +/*********************************************************************** + * Method: BView::LineMiterLimit + * Params: + * Returns: float + * Effects: + ***********************************************************************/ +float +BView_LineMiterLimit(BView *View) +{ + return View->LineMiterLimit(); +} + + +/*********************************************************************** + * Method: BView::SetOrigin + * Params: BPoint pt + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetOrigin(BView *View, BPoint pt) +{ + View->SetOrigin(pt); +} + + +/*********************************************************************** + * Method: BView::SetOrigin + * Params: float x, float y + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetOrigin_1 +(BView *View, float x, float y) +{ + View->SetOrigin(x, y); +} + + +/*********************************************************************** + * Method: BView::Origin + * Params: + * Returns: BPoint + * Effects: + ***********************************************************************/ +BPoint +BView_Origin(BView *View) +{ + return View->Origin(); +} + + +/*********************************************************************** + * Method: BView::PushState + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_PushState(BView *View) +{ + View->PushState(); +} + + +/*********************************************************************** + * Method: BView::PopState + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_PopState(BView *View) +{ + View->PopState(); +} + + +/*********************************************************************** + * Method: BView::MovePenTo + * Params: BPoint pt + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_MovePenTo(BView *View, BPoint pt) +{ + View->MovePenTo(pt); +} + + +/*********************************************************************** + * Method: BView::MovePenTo + * Params: float x, float y + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_MovePenTo_1 +(BView *View, float x, float y) +{ + View->MovePenTo(x, y); +} + + +/*********************************************************************** + * Method: BView::MovePenBy + * Params: float x, float y + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_MovePenBy(BView *View, float x, float y) +{ + View->MovePenBy(x, y); +} + + +/*********************************************************************** + * Method: BView::PenLocation + * Params: + * Returns: BPoint + * Effects: + ***********************************************************************/ +BPoint +BView_PenLocation(BView *View) +{ + return View->PenLocation(); +} + + +/*********************************************************************** + * Method: BView::StrokeLine + * Params: BPoint toPt, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokeLine(BView *View, BPoint toPt, pattern p) +{ + View->StrokeLine(toPt, p); +} + + +/*********************************************************************** + * Method: BView::StrokeLine + * Params: BPoint pt0, BPoint pt1, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokeLine_1 +(BView *View, BPoint pt0, BPoint pt1, pattern p) +{ + View->StrokeLine(pt0, pt1, p); +} + + +/*********************************************************************** + * Method: BView::BeginLineArray + * Params: int32 count + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_BeginLineArray(BView *View, int32 count) +{ + View->BeginLineArray(count); +} + + +/*********************************************************************** + * Method: BView::AddLine + * Params: BPoint pt0, BPoint pt1, rgb_color col + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_AddLine(BView *View, BPoint pt0, BPoint pt1, rgb_color col) +{ + View->AddLine(pt0, pt1, col); +} + + +/*********************************************************************** + * Method: BView::EndLineArray + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_EndLineArray(BView *View) +{ + View->EndLineArray(); +} + + +/*********************************************************************** + * Method: BView::StrokePolygon + * Params: const BPolygon *aPolygon, bool closed, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokePolygon(BView *View, const BPolygon *aPolygon, bool closed, pattern p) +{ + View->StrokePolygon(aPolygon, closed, p); +} + + +/*********************************************************************** + * Method: BView::StrokePolygon + * Params: const BPoint *ptArray, int32 numPts, bool closed, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokePolygon_1 +(BView *View, const BPoint *ptArray, int32 numPts, bool closed, pattern p) +{ + View->StrokePolygon(ptArray, numPts, closed, p); +} + + +/*********************************************************************** + * Method: BView::StrokePolygon + * Params: const BPoint *ptArray, int32 numPts, BRect bounds, bool closed, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokePolygon_2 +(BView *View, const BPoint *ptArray, int32 numPts, BRect bounds, bool closed, pattern p) +{ + View->StrokePolygon(ptArray, numPts, bounds, closed, p); +} + + +/*********************************************************************** + * Method: BView::FillPolygon + * Params: const BPolygon *aPolygon, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillPolygon(BView *View, const BPolygon *aPolygon, pattern p) +{ + View->FillPolygon(aPolygon, p); +} + + +/*********************************************************************** + * Method: BView::FillPolygon + * Params: const BPoint *ptArray, int32 numPts, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillPolygon_1 +(BView *View, const BPoint *ptArray, int32 numPts, pattern p) +{ + View->FillPolygon(ptArray, numPts, p); +} + + +/*********************************************************************** + * Method: BView::FillPolygon + * Params: const BPoint *ptArray, int32 numPts, BRect bounds, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillPolygon_2 +(BView *View, const BPoint *ptArray, int32 numPts, BRect bounds, pattern p) +{ + View->FillPolygon(ptArray, numPts, bounds, p); +} + + +/*********************************************************************** + * Method: BView::StrokeTriangle + * Params: BPoint pt1, BPoint pt2, BPoint pt3, BRect bounds, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokeTriangle(BView *View, BPoint pt1, BPoint pt2, BPoint pt3, BRect bounds, pattern p) +{ + View->StrokeTriangle(pt1, pt2, pt3, bounds, p); +} + + +/*********************************************************************** + * Method: BView::StrokeTriangle + * Params: BPoint pt1, BPoint pt2, BPoint pt3, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokeTriangle_1 +(BView *View, BPoint pt1, BPoint pt2, BPoint pt3, pattern p) +{ + View->StrokeTriangle(pt1, pt2, pt3, p); +} + + +/*********************************************************************** + * Method: BView::FillTriangle + * Params: BPoint pt1, BPoint pt2, BPoint pt3, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillTriangle(BView *View, BPoint pt1, BPoint pt2, BPoint pt3, pattern p) +{ + View->FillTriangle(pt1, pt2, pt3, p); +} + + +/*********************************************************************** + * Method: BView::FillTriangle + * Params: BPoint pt1, BPoint pt2, BPoint pt3, BRect bounds, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillTriangle_1 +(BView *View, BPoint pt1, BPoint pt2, BPoint pt3, BRect bounds, pattern p) +{ + View->FillTriangle(pt1, pt2, pt3, bounds, p); +} + + +/*********************************************************************** + * Method: BView::StrokeRect + * Params: BRect r, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokeRect(BView *View, BRect r, pattern p) +{ + View->StrokeRect(r, p); +} + + +/*********************************************************************** + * Method: BView::FillRect + * Params: BRect r, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillRect(BView *View, BRect r, pattern p) +{ + View->FillRect(r, p); +} + + +/*********************************************************************** + * Method: BView::FillRegion + * Params: BRegion *a_region, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillRegion(BView *View, BRegion *a_region, pattern p) +{ + View->FillRegion(a_region, p); +} + + +/*********************************************************************** + * Method: BView::InvertRect + * Params: BRect r + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_InvertRect(BView *View, BRect r) +{ + View->InvertRect(r); +} + + +/*********************************************************************** + * Method: BView::StrokeRoundRect + * Params: BRect r, float xRadius, float yRadius, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokeRoundRect(BView *View, BRect r, float xRadius, float yRadius, pattern p) +{ + View->StrokeRoundRect(r, xRadius, yRadius, p); +} + + +/*********************************************************************** + * Method: BView::FillRoundRect + * Params: BRect r, float xRadius, float yRadius, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillRoundRect(BView *View, BRect r, float xRadius, float yRadius, pattern p) +{ + View->FillRoundRect(r, xRadius, yRadius, p); +} + + +/*********************************************************************** + * Method: BView::StrokeEllipse + * Params: BPoint center, float xRadius, float yRadius, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokeEllipse(BView *View, BPoint center, float xRadius, float yRadius, pattern p) +{ + View->StrokeEllipse(center, xRadius, yRadius, p); +} + + +/*********************************************************************** + * Method: BView::StrokeEllipse + * Params: BRect r, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokeEllipse_1 +(BView *View, BRect r, pattern p) +{ + View->StrokeEllipse(r, p); +} + + +/*********************************************************************** + * Method: BView::FillEllipse + * Params: BPoint center, float xRadius, float yRadius, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillEllipse(BView *View, BPoint center, float xRadius, float yRadius, pattern p) +{ + View->FillEllipse(center, xRadius, yRadius, p); +} + + +/*********************************************************************** + * Method: BView::FillEllipse + * Params: BRect r, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillEllipse_1 +(BView *View, BRect r, pattern p) +{ + View->FillEllipse(r, p); +} + + +/*********************************************************************** + * Method: BView::StrokeArc + * Params: BPoint center, float xRadius, float yRadius, float start_angle, float arc_angle, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokeArc(BView *View, BPoint center, float xRadius, float yRadius, float start_angle, float arc_angle, pattern p) +{ + View->StrokeArc(center, xRadius, yRadius, start_angle, arc_angle, p); +} + + +/*********************************************************************** + * Method: BView::StrokeArc + * Params: BRect r, float start_angle, float arc_angle, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokeArc_1 +(BView *View, BRect r, float start_angle, float arc_angle, pattern p) +{ + View->StrokeArc(r, start_angle, arc_angle, p); +} + + +/*********************************************************************** + * Method: BView::FillArc + * Params: BPoint center, float xRadius, float yRadius, float start_angle, float arc_angle, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillArc(BView *View, BPoint center, float xRadius, float yRadius, float start_angle, float arc_angle, pattern p) +{ + View->FillArc(center, xRadius, yRadius, start_angle, arc_angle, p); +} + + +/*********************************************************************** + * Method: BView::FillArc + * Params: BRect r, float start_angle, float arc_angle, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillArc_1 +(BView *View, BRect r, float start_angle, float arc_angle, pattern p) +{ + View->FillArc(r, start_angle, arc_angle, p); +} + + +/*********************************************************************** + * Method: BView::StrokeBezier + * Params: BPoint *controlPoints, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokeBezier(BView *View, BPoint *controlPoints, pattern p) +{ + View->StrokeBezier(controlPoints, p); +} + + +/*********************************************************************** + * Method: BView::FillBezier + * Params: BPoint *controlPoints, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillBezier(BView *View, BPoint *controlPoints, pattern p) +{ + View->FillBezier(controlPoints, p); +} + + +/*********************************************************************** + * Method: BView::StrokeShape + * Params: BShape *shape, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_StrokeShape(BView *View, BShape *shape, pattern p) +{ + View->StrokeShape(shape, p); +} + + +/*********************************************************************** + * Method: BView::FillShape + * Params: BShape *shape, pattern p + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_FillShape(BView *View, BShape *shape, pattern p) +{ + View->FillShape(shape, p); +} + + +/*********************************************************************** + * Method: BView::CopyBits + * Params: BRect src, BRect dst + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_CopyBits(BView *View, BRect src, BRect dst) +{ + View->CopyBits(src, dst); +} + + +/*********************************************************************** + * Method: BView::DrawBitmapAsync + * Params: const BBitmap *aBitmap, BRect srcRect, BRect dstRect + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawBitmapAsync(BView *View, const BBitmap *aBitmap, BRect srcRect, BRect dstRect) +{ + View->DrawBitmapAsync(aBitmap, srcRect, dstRect); +} + + +/*********************************************************************** + * Method: BView::DrawBitmapAsync + * Params: const BBitmap *aBitmap + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawBitmapAsync_1 +(BView *View, const BBitmap *aBitmap) +{ + View->DrawBitmapAsync(aBitmap); +} + + +/*********************************************************************** + * Method: BView::DrawBitmapAsync + * Params: const BBitmap *aBitmap, BPoint where + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawBitmapAsync_2 +(BView *View, const BBitmap *aBitmap, BPoint where) +{ + View->DrawBitmapAsync(aBitmap, where); +} + + +/*********************************************************************** + * Method: BView::DrawBitmapAsync + * Params: const BBitmap *aBitmap, BRect dstRect + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawBitmapAsync_3 +(BView *View, const BBitmap *aBitmap, BRect dstRect) +{ + View->DrawBitmapAsync(aBitmap, dstRect); +} + + +/*********************************************************************** + * Method: BView::DrawBitmap + * Params: const BBitmap *aBitmap, BRect srcRect, BRect dstRect + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawBitmap(BView *View, const BBitmap *aBitmap, BRect srcRect, BRect dstRect) +{ + View->DrawBitmap(aBitmap, srcRect, dstRect); +} + + +/*********************************************************************** + * Method: BView::DrawBitmap + * Params: const BBitmap *aBitmap + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawBitmap_1 +(BView *View, const BBitmap *aBitmap) +{ + View->DrawBitmap(aBitmap); +} + + +/*********************************************************************** + * Method: BView::DrawBitmap + * Params: const BBitmap *aBitmap, BPoint where + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawBitmap_2 +(BView *View, const BBitmap *aBitmap, BPoint where) +{ + View->DrawBitmap(aBitmap, where); +} + + +/*********************************************************************** + * Method: BView::DrawBitmap + * Params: const BBitmap *aBitmap, BRect dstRect + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawBitmap_3 +(BView *View, const BBitmap *aBitmap, BRect dstRect) +{ + View->DrawBitmap(aBitmap, dstRect); +} + + +/*********************************************************************** + * Method: BView::DrawChar + * Params: char aChar + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawChar(BView *View, char aChar) +{ + View->DrawChar(aChar); +} + + +/*********************************************************************** + * Method: BView::DrawChar + * Params: char aChar, BPoint location + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawChar_1 +(BView *View, char aChar, BPoint location) +{ + View->DrawChar(aChar, location); +} + + +/*********************************************************************** + * Method: BView::DrawString + * Params: const char *aString, escapement_delta *delta + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawString(BView *View, const char *aString, escapement_delta *delta) +{ + View->DrawString(aString, delta); +} + + +/*********************************************************************** + * Method: BView::DrawString + * Params: const char *aString, BPoint location, escapement_delta *delta + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawString_1 +(BView *View, const char *aString, BPoint location, escapement_delta *delta) +{ + View->DrawString(aString, location, delta); +} + + +/*********************************************************************** + * Method: BView::DrawString + * Params: const char *aString, int32 length, escapement_delta *delta + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawString_2 +(BView *View, const char *aString, int32 length, escapement_delta *delta) +{ + View->DrawString(aString, length, delta); +} + + +/*********************************************************************** + * Method: BView::DrawString + * Params: const char *aString, int32 length, BPoint location, escapement_delta *delta + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawString_3 +(BView *View, const char *aString, int32 length, BPoint location, escapement_delta *delta) +{ + View->DrawString(aString, length, location, delta); +} + + +/*********************************************************************** + * Method: BView::SetFont + * Params: const BFont *font, uint32 mask + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetFont(BView *View, const BFont *font, uint32 mask) +{ + View->SetFont(font, mask); +} + + +/*********************************************************************** + * Method: BView::GetFont + * Params: BFont *font + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_GetFont(BView *View, BFont *font) +{ + View->GetFont(font); +} + + +/*********************************************************************** + * Method: BView::GetFont + * Params: BFont *font + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_GetFont_1 +(BView *View, BFont *font) +{ + View->GetFont(font); +} + + +/*********************************************************************** + * Method: BView::TruncateString + * Params: BString *in_out, uint32 mode, float width + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_TruncateString(BView *View, BString *in_out, uint32 mode, float width) +{ + View->TruncateString(in_out, mode, width); +} + + +/*********************************************************************** + * Method: BView::StringWidth + * Params: const char *string + * Returns: float + * Effects: + ***********************************************************************/ +float +BView_StringWidth(BView *View, const char *string) +{ + return View->StringWidth(string); +} + + +/*********************************************************************** + * Method: BView::StringWidth + * Params: const char *string, int32 length + * Returns: float + * Effects: + ***********************************************************************/ +float +BView_StringWidth_1 +(BView *View, const char *string, int32 length) +{ + return View->StringWidth(string, length); +} + + +/*********************************************************************** + * Method: BView::GetStringWidths + * Params: char *stringArray[], int32 lengthArray[], int32 numStrings, float widthArray[] + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_GetStringWidths(BView *View, char *stringArray[], int32 lengthArray[], int32 numStrings, float widthArray[]) +{ + View->GetStringWidths(stringArray, lengthArray, numStrings, widthArray); +} + + +/*********************************************************************** + * Method: BView::SetFontSize + * Params: float size + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetFontSize(BView *View, float size) +{ + View->SetFontSize(size); +} + + +/*********************************************************************** + * Method: BView::ForceFontAliasing + * Params: bool enable + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ForceFontAliasing(BView *View, bool enable) +{ + View->ForceFontAliasing(enable); +} + + +/*********************************************************************** + * Method: BView::GetFontHeight + * Params: font_height *height + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_GetFontHeight(BView *View, font_height *height) +{ + View->GetFontHeight(height); +} + + +/*********************************************************************** + * Method: BView::Invalidate + * Params: BRect invalRect + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_Invalidate(BView *View, BRect invalRect) +{ + View->Invalidate(invalRect); +} + + +/*********************************************************************** + * Method: BView::Invalidate + * Params: const BRegion *invalRegion + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_Invalidate_1 +(BView *View, const BRegion *invalRegion) +{ + View->Invalidate(invalRegion); +} + + +/*********************************************************************** + * Method: BView::Invalidate + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_Invalidate_2 +(BView *View) +{ + View->Invalidate(); +} + + +/*********************************************************************** + * Method: BView::SetDiskMode + * Params: char *filename, long offset + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetDiskMode(BView *View, char *filename, long offset) +{ + View->SetDiskMode(filename, offset); +} + + +/*********************************************************************** + * Method: BView::BeginPicture + * Params: BPicture *a_picture + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_BeginPicture(BView *View, BPicture *a_picture) +{ + View->BeginPicture(a_picture); +} + + +/*********************************************************************** + * Method: BView::AppendToPicture + * Params: BPicture *a_picture + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_AppendToPicture(BView *View, BPicture *a_picture) +{ + View->AppendToPicture(a_picture); +} + + +/*********************************************************************** + * Method: BView::EndPicture + * Params: + * Returns: BPicture * + * Effects: + ***********************************************************************/ +BPicture * +BView_EndPicture(BView *View) +{ + return View->EndPicture(); +} + + +/*********************************************************************** + * Method: BView::DrawPicture + * Params: const BPicture *a_picture + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawPicture(BView *View, const BPicture *a_picture) +{ + View->DrawPicture(a_picture); +} + + +/*********************************************************************** + * Method: BView::DrawPicture + * Params: const BPicture *a_picture, BPoint where + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawPicture_1 +(BView *View, const BPicture *a_picture, BPoint where) +{ + View->DrawPicture(a_picture, where); +} + + +/*********************************************************************** + * Method: BView::DrawPicture + * Params: const char *filename, long offset, BPoint where + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawPicture_2 +(BView *View, const char *filename, long offset, BPoint where) +{ + View->DrawPicture(filename, offset, where); +} + + +/*********************************************************************** + * Method: BView::DrawPictureAsync + * Params: const BPicture *a_picture + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawPictureAsync_3 +(BView *View, const BPicture *a_picture) +{ + View->DrawPictureAsync(a_picture); +} + + +/*********************************************************************** + * Method: BView::DrawPictureAsync + * Params: const BPicture *a_picture, BPoint where + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawPictureAsync_4 +(BView *View, const BPicture *a_picture, BPoint where) +{ + View->DrawPictureAsync(a_picture, where); +} + + +/*********************************************************************** + * Method: BView::DrawPictureAsync + * Params: const char *filename, long offset, BPoint where + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_DrawPictureAsync_5 +(BView *View, const char *filename, long offset, BPoint where) +{ + View->DrawPictureAsync(filename, offset, where); +} + + +/*********************************************************************** + * Method: BView::SetEventMask + * Params: uint32 mask, uint32 options + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BView_SetEventMask(BView *View, uint32 mask, uint32 options) +{ + return View->SetEventMask(mask, options); +} + + +/*********************************************************************** + * Method: BView::EventMask + * Params: + * Returns: uint32 + * Effects: + ***********************************************************************/ +uint32 +BView_EventMask(BView *View) +{ + return View->EventMask(); +} + + +/*********************************************************************** + * Method: BView::SetMouseEventMask + * Params: uint32 mask, uint32 options + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BView_SetMouseEventMask(BView *View, uint32 mask, uint32 options) +{ + return View->SetMouseEventMask(mask, options); +} + + +/*********************************************************************** + * Method: BView::SetFlags + * Params: uint32 flags + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetFlags(BView *View, uint32 flags) +{ + View->SetFlags(flags); +} + + +/*********************************************************************** + * Method: BView::Flags + * Params: + * Returns: uint32 + * Effects: + ***********************************************************************/ +uint32 +BView_Flags(BView *View) +{ + return View->Flags(); +} + + +/*********************************************************************** + * Method: BView::SetResizingMode + * Params: uint32 mode + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetResizingMode(BView *View, uint32 mode) +{ + View->SetResizingMode(mode); +} + + +/*********************************************************************** + * Method: BView::ResizingMode + * Params: + * Returns: uint32 + * Effects: + ***********************************************************************/ +uint32 +BView_ResizingMode(BView *View) +{ + return View->ResizingMode(); +} + + +/*********************************************************************** + * Method: BView::MoveBy + * Params: float dh, float dv + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_MoveBy(BView *View, float dh, float dv) +{ + View->MoveBy(dh, dv); +} + + +/*********************************************************************** + * Method: BView::MoveTo + * Params: BPoint where + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_MoveTo(BView *View, BPoint where) +{ + View->MoveTo(where); +} + + +/*********************************************************************** + * Method: BView::MoveTo + * Params: float x, float y + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_MoveTo_1 +(BView *View, float x, float y) +{ + View->MoveTo(x, y); +} + + +/*********************************************************************** + * Method: BView::ResizeBy + * Params: float dh, float dv + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ResizeBy(BView *View, float dh, float dv) +{ + View->ResizeBy(dh, dv); +} + + +/*********************************************************************** + * Method: BView::ResizeTo + * Params: float width, float height + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ResizeTo(BView *View, float width, float height) +{ + View->ResizeTo(width, height); +} + + +/*********************************************************************** + * Method: BView::ScrollBy + * Params: float dh, float dv + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ScrollBy(BView *View, float dh, float dv) +{ + View->ScrollBy(dh, dv); +} + + +/*********************************************************************** + * Method: BView::ScrollTo + * Params: BPoint where + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ScrollTo(BView *View, BPoint where) +{ + View->ScrollTo(where); +} + + +/*********************************************************************** + * Method: BView::MakeFocus + * Params: bool focusState + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_MakeFocus(BView *View, bool focusState) +{ + View->MakeFocus(focusState); +} + + +/*********************************************************************** + * Method: BView::IsFocus + * Params: + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BView_IsFocus(BView *View) +{ + return View->IsFocus(); +} + + + + + +/*********************************************************************** + * Method: BView::IsHidden + * Params: const BView *looking_from + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BView_IsHidden_1 +(BView *View, const BView *looking_from) +{ + return View->IsHidden(looking_from); +} + + +/*********************************************************************** + * Method: BView::Flush + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_Flush(BView *View) +{ + View->Flush(); +} + + +/*********************************************************************** + * Method: BView::Sync + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_Sync(BView *View) +{ + View->Sync(); +} + + +/*********************************************************************** + * Method: BView::GetPreferredSize + * Params: float *width, float *height + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_GetPreferredSize(BView *View, float *width, float *height) +{ + View->GetPreferredSize(width, height); +} + + +/*********************************************************************** + * Method: BView::ResizeToPreferred + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_ResizeToPreferred(BView *View) +{ + View->ResizeToPreferred(); +} + + +/*********************************************************************** + * Method: BView::ScrollBar + * Params: orientation posture + * Returns: BScrollBar * + * Effects: + ***********************************************************************/ +BScrollBar * +BView_ScrollBar(BView *View, orientation posture) +{ + return View->ScrollBar(posture); +} + + +/*********************************************************************** + * Method: BView::ResolveSpecifier + * Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property + * Returns: BHandler * + * Effects: + ***********************************************************************/ +BHandler * +BView_ResolveSpecifier(BView *View, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property) +{ + return View->ResolveSpecifier(msg, index, specifier, form, property); +} + + +/*********************************************************************** + * Method: BView::GetSupportedSuites + * Params: BMessage *data + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BView_GetSupportedSuites(BView *View, BMessage *data) +{ + return View->GetSupportedSuites(data); +} + + +/*********************************************************************** + * Method: BView::IsPrinting + * Params: + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BView_IsPrinting(BView *View) +{ + return View->IsPrinting(); +} + + +/*********************************************************************** + * Method: BView::SetScale + * Params: float scale + * Returns: void + * Effects: + ***********************************************************************/ +void +BView_SetScale(BView *View, float scale) +{ + View->SetScale(scale); +} + + + #if defined(__cplusplus) } #endif diff --git a/bepascal/source/bepascal/pas/src/be/app/invoker.pp b/bepascal/source/bepascal/pas/src/be/app/invoker.pp index ede00c8..b211090 100644 --- a/bepascal/source/bepascal/pas/src/be/app/invoker.pp +++ b/bepascal/source/bepascal/pas/src/be/app/invoker.pp @@ -45,20 +45,7 @@ type // function InvokeNotify(msg : BMessage; kind : Cardinal) : Status_t; function SetTimeout(aTimeout : Bigtime_t) : Status_t; function Timeout : Bigtime_t; -// function InvokeKind(notify : boolean) : Cardinal; -// procedure BeginInvokeNotify(kind : Cardinal); -// procedure EndInvokeNotify; -// procedure _ReservedInvoker1; -// procedure _ReservedInvoker2; -// procedure _ReservedInvoker3; - constructor Create(aInvoker : BInvoker); -// function operator=( : BInvoker) : BInvoker; -// procedure BMessage *fMessage; -// procedure BMessenger fMessenger; -// procedure BHandler *fReplyTo; -// procedure uint32 fTimeout; -// procedure uint32 fNotifyKind; -// procedure uint32 _reserved[2]; + end; function BInvoker_Create(AObject : TBeObject) : TCplusObject; cdecl; external BePascalLibName name 'BInvoker_Create'; @@ -227,10 +214,6 @@ end; // BInvoker__ReservedInvoker3(CPlusObject); //end; -constructor BInvoker.Create(ainvoker : BInvoker); -begin - BInvoker_Create(Self, aInvoker); -end; //function BInvoker.operator=( : BInvoker) : BInvoker; //begin diff --git a/bepascal/source/bepascal/pas/src/be/app/message.pp b/bepascal/source/bepascal/pas/src/be/app/message.pp index ac41465..f7fe99a 100644 --- a/bepascal/source/bepascal/pas/src/be/app/message.pp +++ b/bepascal/source/bepascal/pas/src/be/app/message.pp @@ -21,7 +21,7 @@ unit message; interface uses - beobj, supportdefs, typeconstants; + beobj, supportdefs, typeconstants,dataio; const B_NO_SPECIFIER = 0; @@ -75,6 +75,8 @@ type function Previous : BMessage; function WasDropped : boolean; property What : Cardinal read GetWhat write SetWhat; + function Unflatten( stream : BDataIO ):status_t; + end; function BMessage_Create(AObject : TObject) : TCPlusObject; cdecl; external BePascalLibName name 'BMessage_Create_1'; @@ -109,6 +111,7 @@ function BMessage_IsSourceWaiting(Message : TCPlusObject) : boolean; cdecl; exte function BMessage_IsReply(Message : TCPlusObject) : boolean; cdecl; external BePascalLibName; function BMessage_Previous(Message : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName; function BMessage_WasDropped(Message : TCPlusObject) : boolean; cdecl; external BePascalLibName; +function BMessage_Unflatten(Message : TCPlusObject; stream : BDataIO ):status_t;cdecl; external BePascalLibName name 'BMessage_Unflatten'; implementation @@ -278,4 +281,9 @@ begin result := BMessage_WasDropped(CPlusObject); end; + function BMessage.Unflatten( stream : BDataIO ):status_t; + begin + result:=BMessage_Unflatten(CPlusObject,stream); + end; + end. diff --git a/bepascal/source/bepascal/pas/src/be/app/messenger.pp b/bepascal/source/bepascal/pas/src/be/app/messenger.pp index bb68504..c8117ea 100644 --- a/bepascal/source/bepascal/pas/src/be/app/messenger.pp +++ b/bepascal/source/bepascal/pas/src/be/app/messenger.pp @@ -41,21 +41,10 @@ type function SendMessage(a_message : BMessage; reply_to : BMessenger; timeout : Bigtime_t) : Status_t; function SendMessage(command : Cardinal; reply : BMessage) : Status_t; function SendMessage(a_message : BMessage; reply : BMessage; send_timeout : Bigtime_t; reply_timeout : Bigtime_t) : Status_t; -// function operator=(from : BMessenger) : BMessenger; -// function operator==(other : BMessenger) : boolean; + function IsValid : boolean; function Team : Team_id; -// constructor Create(aTeam : Team_id; port : TPort_id; token : integer; preferred : boolean); -// procedure InitData(mime_sig : PChar; aTeam : Team_id; perr : PStatus_t); -// procedure port_id fPort; -// procedure int32 fHandlerToken; -// procedure team_id fTeam; -// procedure int32 extra0; -// procedure int32 extra1; -// procedure bool fPreferredTarget; -// procedure bool extra2; -// procedure bool extra3; -// procedure bool extra4; + end; function BMessenger_Create(AObject : TBeObject) : TCplusObject; cdecl; external BePascalLibName name 'BMessenger_Create'; diff --git a/bepascal/source/bepascal/pas/src/be/interface/bitmap.pp b/bepascal/source/bepascal/pas/src/be/interface/bitmap.pp index c870fd3..b763ba7 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/bitmap.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/bitmap.pp @@ -23,7 +23,7 @@ unit Bitmap; interface uses - BeObj, Archivable, GraphicDefs, Message, OS, Rect, SupportDefs, View; + BeObj, Archivable, GraphicDefs, Message, OS, Rect, SupportDefs,accelerant; const B_BITMAP_CLEAR_TO_WHITE = $00000001; @@ -161,7 +161,7 @@ function BBitmap_Bits(AObject : TCPlusObject) : Pointer; cdecl; external BePascalLibName name 'BBitmap_Bits'; function BBitmap_BitsLength(AObject : TCPlusObject) : integer; cdecl; - external BePascalLibName name 'BBitmap_BitsLength'; + external BePascalLibName name 'BBitmap_BitsLength_1'; function BBitmap_BytesPerRow(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BBitmap_BytesPerRow'; @@ -255,6 +255,7 @@ implementation constructor BBitmap.Create(frame{bounds} : BRect; flags : Cardinal; depth : Color_Space; bytes_per_row : Integer; screenID : Screen_ID); begin + CreatePas; CPlusObject := BBitmap_Create(Self, frame, flags, depth, bytes_per_row, screenID); end; @@ -264,6 +265,7 @@ end; constructor BBitmap.Create(frame{bounds} : BRect; depth : Color_Space; accepts_views : Boolean; need_contiguous : Boolean); begin + CreatePas; CPlusObject := BBitmap_Create_1(Self, frame.CPlusObject, depth, accepts_views, need_contiguous); end; @@ -273,11 +275,13 @@ end; constructor BBitmap.Create(source : BBitmap; accepts_views : Boolean; need_contiguous : Boolean); begin - CPlusObject := BBitmap_Create_2(Self, source, accepts_views, need_contiguous); + CreatePas; + CPlusObject := BBitmap_Create_2(Self, source, accepts_views, need_contiguous); end; constructor BBitmap.Create(data : BMessage); begin + CreatePas; CPlusObject := BBitmap_Create_3(Self, data.CPlusObject); end; @@ -554,4 +558,4 @@ begin end; } -end. \ No newline at end of file +end. diff --git a/bepascal/source/bepascal/pas/src/be/interface/box.pp b/bepascal/source/bepascal/pas/src/be/interface/box.pp index ea623ca..3c1f360 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/box.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/box.pp @@ -30,7 +30,7 @@ type BBox = class(BView) private public - constructor Create(Frame : BRect; Name : PChar; ResizingMode, Flags : Cardinal; BorderStyle : border_style); + constructor Create(Frame : BRect; Name : PChar; sResizingMode, sFlags : Cardinal; BorderStyle : border_style); constructor Create(data : BMessage); destructor Destroy; override; function Instantiate(data : BMessage) : BArchivable; @@ -106,10 +106,10 @@ function BBox_Perform(AObject : TCPlusObject; d : Perform_code; arg : Pointer) : implementation -constructor BBox.Create(Frame : BRect; Name : PChar; ResizingMode, Flags : Cardinal; BorderStyle : border_style); +constructor BBox.Create(Frame : BRect; Name : PChar; sResizingMode, sFlags : Cardinal; BorderStyle : border_style); begin CreatePas; - CPlusObject := BBox_Create(Self, Frame.CPlusObject, Name, ResizingMode, Flags, BorderStyle); + CPlusObject := BBox_Create(Self, Frame.CPlusObject, Name, sResizingMode, sFlags, BorderStyle); end; constructor BBox.Create(data : BMessage); diff --git a/bepascal/source/bepascal/pas/src/be/interface/button.pp b/bepascal/source/bepascal/pas/src/be/interface/button.pp index a951ec8..c3e2cea 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/button.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/button.pp @@ -28,7 +28,7 @@ type private public destructor Destroy; override; - constructor Create(frame : BRect; name, aLabel : PChar; message : BMessage; resizingMode, flags : Cardinal); virtual; + constructor Create(aframe : BRect; name, aLabel : PChar; message : BMessage; sresizingMode, sflags : Cardinal); virtual; constructor Create(data : BMessage); override; function Instantiate(data : BMessage) : BArchivable; function Archive(data : BMessage; deep : boolean) : Status_t; @@ -37,7 +37,7 @@ type procedure AttachedToWindow; override; procedure KeyDown(bytes : PChar; numBytes : integer); override; // Hook functions - procedure MakeDefault(state : boolean); virtual; + procedure MakeDefault(state : boolean); procedure SetLabel(text : PChar); function IsDefault : boolean; procedure MessageReceived(msg : BMessage); override; @@ -51,7 +51,7 @@ type function Invoke(msg : BMessage) : Status_t; procedure FrameMoved(new_position : BPoint); override; procedure FrameResized(new_width : double; new_height : double); override; - procedure MakeFocus(state : boolean); override; + procedure MakeFocus(state : boolean); procedure AllAttached; override; procedure AllDetached; override; function ResolveSpecifier(msg : BMessage; index : integer; specifier : BMessage; form : integer; properti : PChar) : BHandler; @@ -110,10 +110,10 @@ begin inherited; end; -constructor BButton.Create(frame : BRect; name, aLabel : PChar; message : BMessage; resizingMode, flags : Cardinal); +constructor BButton.Create(aframe : BRect; name, aLabel : PChar; message : BMessage; sresizingMode, sflags : Cardinal); begin CreatePas; - CPlusObject := BButton_Create(Self, frame.CPlusObject, name, aLabel, message.CPlusObject, resizingMode, flags); + CPlusObject := BButton_Create(Self, aframe.CPlusObject, name, aLabel, message.CPlusObject, sresizingMode, sflags); end; constructor BButton.Create(data : BMessage); diff --git a/bepascal/source/bepascal/pas/src/be/interface/checkbox.pp b/bepascal/source/bepascal/pas/src/be/interface/checkbox.pp index 67cf109..23e938d 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/checkbox.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/checkbox.pp @@ -27,7 +27,7 @@ type BCheckBox = class(BControl) private public destructor Destroy;override; - constructor Create(frame : BRect; name, aLabel : PChar; message : BMessage; resizingMode, flags : Cardinal); virtual; + constructor Create(frame : BRect; name, aLabel : PChar; message : BMessage; sresizingMode, sflags : Cardinal); virtual; constructor Create(data : BMessage) ;override; function Instantiate(data : BMessage) : BArchivable; function Archive(data : BMessage; deep : boolean) : Status_t; @@ -48,7 +48,7 @@ type BCheckBox = class(BControl) procedure FrameResized(new_width : double; new_height : double);override; function ResolveSpecifier(msg : BMessage; index : integer; specifier : BMessage; form : integer; properti : PChar) : BHandler; function GetSupportedSuites(data : BMessage) : Status_t; - procedure MakeFocus(state : boolean);override; + procedure MakeFocus(state : boolean); procedure AllAttached;override; procedure AllDetached;override; function Perform(d : Perform_code; arg : Pointer) : Status_t; @@ -89,10 +89,10 @@ begin inherited; end; -constructor BCheckBox.Create(frame : BRect; name, aLabel : PChar; message : BMessage; resizingMode, flags : Cardinal); +constructor BCheckBox.Create(frame : BRect; name, aLabel : PChar; message : BMessage; sresizingMode, sflags : Cardinal); begin CreatePas; - CPlusObject := BCheckBox_Create(Self, frame.CPlusObject, name, aLabel, message.CPlusObject, resizingMode, flags); + CPlusObject := BCheckBox_Create(Self, frame.CPlusObject, name, aLabel, message.CPlusObject, sresizingMode, sflags); end; constructor BCheckBox.Create(data : BMessage) ; diff --git a/bepascal/source/bepascal/pas/src/be/interface/control.pp b/bepascal/source/bepascal/pas/src/be/interface/control.pp index 641d5f4..1c5137c 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/control.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/control.pp @@ -30,7 +30,7 @@ type FInvoker : BInvoker; function GeBInvoker : BInvoker; public - constructor Create(frame : TCPlusObject; name, aLabel : PChar; message : TCPlusObject; resizingMode, flags : Cardinal); virtual; + constructor Create(aframe : TCPlusObject; name, aLabel : PChar; message : TCPlusObject; sresizingMode, sflags : Cardinal); virtual; destructor Destroy; override; constructor Create(data : BMessage); virtual; function Instantiate(data : BMessage) : BArchivable; @@ -38,7 +38,7 @@ type procedure WindowActivated(state : boolean); override; procedure AttachedToWindow; override; procedure MessageReceived(msg : BMessage); override; - procedure MakeFocus(state : boolean); virtual; + procedure MakeFocus(state : boolean); procedure KeyDown(bytes : PChar; numBytes : integer); override; procedure MouseDown(pt : BPoint); override; procedure MouseUp(pt : BPoint); override; @@ -94,9 +94,9 @@ procedure BControl_InitData(AObject : TCPlusObject; data : TCplusObject); cdecl; implementation -constructor BControl.Create(frame : TCPlusObject; name, aLabel : PChar; message : TCPlusObject; resizingMode, flags : Cardinal); +constructor BControl.Create(aframe : TCPlusObject; name, aLabel : PChar; message : TCPlusObject; sresizingMode, sflags : Cardinal); begin - CPlusObject := BControl_Create(Self, frame, name, aLabel, message, resizingMode, flags); + CPlusObject := BControl_Create(Self, aframe, name, aLabel, message, sresizingMode, sflags); end; destructor BControl.Destroy; diff --git a/bepascal/source/bepascal/pas/src/be/interface/graphicdefs.pp b/bepascal/source/bepascal/pas/src/be/interface/graphicdefs.pp index 408d735..c80efe0 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/graphicdefs.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/graphicdefs.pp @@ -20,6 +20,22 @@ } unit GraphicDefs; +{ + (Manual) Translation of Be's GraphicDefs.h + + Ok, if TBitmap doesn't work, the error its most likely to be in this unit. + + What this unit needs? that someone take a look at the points marked with: + +// Check/Confirm This one, please. + + I'm not too sure about how to translate the enums, and also not sure about + the values of the index on a set. Excuse (and fix!) my ignorace :) + + Maybe I also screwed up a little the integer types too, be warned :^P + +-- BiPolar. +} interface uses @@ -27,10 +43,296 @@ uses {$PACKRECORDS C} + type // This one must be find a better place. PCardinal = ^Cardinal; +(*----------------------------------------------------------------*) +type + { TPattern = pattern } + Pattern = record + Data : array [0..7] of Byte; // uint8 + end; + +// How we do 'export' these global const? +// Check/Confirm This one, please. + +var {const} + B_SOLID_HIGH : Pattern; cvar; external; + B_MIXED_COLORS : Pattern; cvar; external; + B_SOLID_LOW : Pattern; cvar; external; + +(*----------------------------------------------------------------*) +type + { I do prefer TRGBColor but... oh well... } + RGB_Color = record + Red, + Green, + Blue, + Alpha : Byte; + end; + +(*----------------------------------------------------------------*) +var +{const} + //extern const rgb_color B_TRANSPARENT_COLOR; + B_TRANSPARENT_COLOR : RGB_Color; cvar; external; + //extern const uint8 B_TRANSPARENT_MAGIC_CMAP8; + B_TRANSPARENT_MAGIC_CMAP8 : Byte; cvar; external; + //extern const uint16 B_TRANSPARENT_MAGIC_RGBA15; + B_TRANSPARENT_MAGIC_RGBA15 : Word; cvar; external; + //extern const uint16 B_TRANSPARENT_MAGIC_RGBA15_BIG; + B_TRANSPARENT_MAGIC_RGBA15_BIG : Word; cvar; external; + //extern const uint32 B_TRANSPARENT_MAGIC_RGBA32; + B_TRANSPARENT_MAGIC_RGBA32 : Cardinal; cvar; external; + //extern const uint32 B_TRANSPARENT_MAGIC_RGBA32_BIG; + B_TRANSPARENT_MAGIC_RGBA32_BIG : Cardinal; cvar; external; + //extern const uint8 B_TRANSPARENT_8_BIT; + B_TRANSPARENT_8_BIT : Byte; cvar; external; + //extern const rgb_color B_TRANSPARENT_32_BIT; + B_TRANSPARENT_32_BIT : RGB_Color; cvar; external; + +(*----------------------------------------------------------------*) +type + + Color_Map = record + ID : Integer; // int32 + ColorList: array [0..255] of RGB_Color; + InversionMap : array [0..255] of Byte; // uint8 + IndexMap : array [0..32767] of Byte; // uint8 + end; + + { TOverlayRectLimits = overlay_rect_limits } + OverlayRectLimits = record + HorizontalAlignment, + VerticalAlignment, + WidthAlignment, + HeightAlignment, + MinWidth, + MaxWidth, + MinHeight, + MaxHeight : Word; // uint16 + Reserved : array [0..7] of Cardinal; // uint32 + end; + + { TOverlayRestrictions = overlay_restrictions } + OverlayRestrictions = record + Source, + Destination : OverlayRectLimits; + MinWidthScale, + MaxWidthScale, + MinHeightScale, + MaxHeightScale : Double; // float + Reserved : array [0..7] of Cardinal; // uint32 + end; + +(*----------------------------------------------------------------*) + +//struct screen_id { int32 id; }; + Screen_ID = record + ID : Integer + end; + +//extern const struct screen_id B_MAIN_SCREEN_ID; +var +{const} + B_MAIN_SCREEN_ID : Screen_ID; cvar; external; + +(*----------------------------------------------------------------*) +type + + Color_Space = Cardinal; // or is just word? + +const + + B_NO_COLOR_SPACE = $0000; // byte in memory order, high bit first + + // linear color space (little endian is the default) + B_RGB32 = $0008; // B[7:0] G[7:0] R[7:0] -[7:0] + B_RGBA32 = $2008; // B[7:0] G[7:0] R[7:0] A[7:0] + B_RGB24 = $0003; // B[7:0] G[7:0] R[7:0] + B_RGB16 = $0005; // G[2:0],B[4:0] R[4:0],G[5:3] + B_RGB15 = $0010; // G[2:0],B[4:0] -[0],R[4:0],G[4:3] + B_RGBA15 = $2010; // G[2:0],B[4:0] A[0],R[4:0],G[4:3] + B_CMAP8 = $0004; // D[7:0] + B_GRAY8 = $0002; // Y[7:0] + B_GRAY1 = $0001; // Y0[0],Y1[0],Y2[0],Y3[0],Y4[0],Y5[0],Y6[0],Y7[0] + + // big endian version, when the encoding is not endianess independant + B_RGB32_BIG = $1008; // -[7:0] R[7:0] G[7:0] B[7:0] + B_RGBA32_BIG = $3008; // A[7:0] R[7:0] G[7:0] B[7:0] + B_RGB24_BIG = $1003; // R[7:0] G[7:0] B[7:0] + B_RGB16_BIG = $1005; // R[4:0],G[5:3] G[2:0],B[4:0] + B_RGB15_BIG = $1010; // -[0],R[4:0],G[4:3] G[2:0],B[4:0] + B_RGBA15_BIG = $3010; // A[0],R[4:0],G[4:3] G[2:0],B[4:0] + + // little-endian declarations, for completness + B_RGB32_LITTLE = B_RGB32; + B_RGBA32_LITTLE = B_RGBA32; + B_RGB24_LITTLE = B_RGB24; + B_RGB16_LITTLE = B_RGB16; + B_RGB15_LITTLE = B_RGB15; + B_RGBA15_LITTLE = B_RGBA15; + + // non linear color space -- note that these are here for exchange purposes; + // a BBitmap or BView may not necessarily support all these color spaces. + + // Loss/Saturation points are Y 16-235 (absoulte); Cb/Cr 16-240 (center 128) + + B_YCbCr422 = $4000; // Y0[7:0] Cb0[7:0] Y1[7:0] Cr0[7:0] Y2[7:0]... + // Cb2[7:0] Y3[7:0] Cr2[7:0] + B_YCbCr411 = $4001; // Cb0[7:0] Y0[7:0] Cr0[7:0] Y1[7:0] Cb4[7:0]... + // Y2[7:0] Cr4[7:0] Y3[7:0] Y4[7:0] Y5[7:0]... + // Y6[7:0] Y7[7:0] + B_YCbCr444 = $4003; // Y0[7:0] Cb0[7:0] Cr0[7:0] + B_YCbCr420 = $4004; // Non-interlaced only, Cb0 Y0 Y1 Cb2 Y2 Y3 on even scan lines ... + // Cr0 Y0 Y1 Cr2 Y2 Y3 on odd scan lines + + // Extrema points are Y 0 - 207 (absolute) U -91 - 91 (offset 128) V -127 - 127 (offset 128) + // note that YUV byte order is different from YCbCr + // USE YCbCr, not YUV, when that's what you mean! + B_YUV422 = $4020; // U0[7:0] Y0[7:0] V0[7:0] Y1[7:0] ... + // U2[7:0] Y2[7:0] V2[7:0] Y3[7:0] + B_YUV411 = $4021; // U0[7:0] Y0[7:0] Y1[7:0] V0[7:0] Y2[7:0] Y3[7:0] + // U4[7:0] Y4[7:0] Y5[7:0] V4[7:0] Y6[7:0] Y7[7:0] + B_YUV444 = $4023; // U0[7:0] Y0[7:0] V0[7:0] U1[7:0] Y1[7:0] V1[7:0] + B_YUV420 = $4024; // Non-interlaced only, U0 Y0 Y1 U2 Y2 Y3 on even scan lines ... + // V0 Y0 Y1 V2 Y2 Y3 on odd scan lines + B_YUV9 = $402C; // planar? 410? + B_YUV12 = $402D; // planar? 420? + + B_UVL24 = $4030; // U0[7:0] V0[7:0] L0[7:0] ... + B_UVL32 = $4031; // U0[7:0] V0[7:0] L0[7:0] X0[7:0]... + B_UVLA32 = $6031; // U0[7:0] V0[7:0] L0[7:0] A0[7:0]... + + B_LAB24 = $4032; // L0[7:0] a0[7:0] b0[7:0] ... (a is not alpha!) + B_LAB32 = $4033; // L0[7:0] a0[7:0] b0[7:0] X0[7:0] ... (b is not alpha!) + B_LABA32 = $6033; // L0[7:0] a0[7:0] b0[7:0] A0[7:0] ... (A is alpha) + + // red is at hue = 0 + B_HSI24 = $4040; // H[7:0] S[7:0] I[7:0] + B_HSI32 = $4041; // H[7:0] S[7:0] I[7:0] X[7:0] + B_HSIA32 = $6041; // H[7:0] S[7:0] I[7:0] A[7:0] + + B_HSV24 = $4042; // H[7:0] S[7:0] V[7:0] + B_HSV32 = $4043; // H[7:0] S[7:0] V[7:0] X[7:0] + B_HSVA32 = $6043; // H[7:0] S[7:0] V[7:0] A[7:0] + + B_HLS24 = $4044; // H[7:0] L[7:0] S[7:0] + B_HLS32 = $4045; // H[7:0] L[7:0] S[7:0] X[7:0] + B_HLSA32 = $6045; // H[7:0] L[7:0] S[7:0] A[7:0] + + B_CMY24 = $C001; // C[7:0] M[7:0] Y[7:0] No gray removal done + B_CMY32 = $C002; // C[7:0] M[7:0] Y[7:0] X[7:0] No gray removal done + B_CMYA32 = $E002; // C[7:0] M[7:0] Y[7:0] A[7:0] No gray removal done + B_CMYK32 = $C003; // C[7:0] M[7:0] Y[7:0] K[7:0] + + // compatibility declarations + B_MONOCHROME_1_BIT = B_GRAY1; + B_GRAYSCALE_8_BIT = B_GRAY8; + B_COLOR_8_BIT = B_CMAP8; + B_RGB_32_BIT = B_RGB32; + B_RGB_16_BIT = B_RGB15; + B_BIG_RGB_32_BIT = B_RGB32_BIG; + B_BIG_RGB_16_BIT = B_RGB15_BIG; + + +// Find out whether a specific color space is supported by BBitmaps. +// Support_flags will be set to what kinds of support are available. +// If support_flags is set to 0, false will be returned. +const + + B_VIEWS_SUPPORT_DRAW_BITMAP = $1; + B_BITMAPS_SUPPORT_ATTACHED_VIEWS = $2; + +// Check/Confirm This one, please. +function BitmapsSupportSpace(space : Color_Space; support_flags : PCardinal) + : boolean; cdecl; external 'be' name 'bitmaps_support_space'; +function GetPixelSizeFor(space : Color_Space; pixel_chunk : Status_t; + row_alignment : Status_t; pixels_per_chunk : Status_t) + : Status_t; cdecl; external 'be' name 'get_pixel_size_for'; + +{ +_IMPEXP_BE bool bitmaps_support_space(color_space space, uint32 * support_flags); + +// "pixel_chunk" is the native increment from one pixel starting on an integral +// byte to the next. +// "row_alignment" is the native alignment for pixel scanline starts. +// "pixels_per_chunk" is the number of pixels in a pixel_chunk. For instance, +// B_GRAY1 sets pixel_chunk to 1, row_alignment to 4 and pixels_per_chunk to 8, +// whereas B_RGB24 sets pixel_chunk to 3, row_alignment to 4 and +// pixels_per_chunk to 1. + +_IMPEXP_BE status_t get_pixel_size_for(color_space space, size_t * pixel_chunk, + size_t * row_alignment, size_t * pixels_per_chunk); +} + +(*----------------------------------------------------------------*) +type + BufferOrientation = (B_BUFFER_TOP_TO_BOTTOM, B_BUFFER_BOTTOM_TO_TOP); + +// Check/Confirm This one, please. + BufferLayout = (B_BUFFER_NONINTERLEAVED); // B_BUFFER_NONINTERLEAVED = 1 + +(*----------------------------------------------------------------*) + + Drawing_Mode = (B_OP_COPY, B_OP_OVER, B_OP_ERASE, B_OP_INVERT, B_OP_ADD, + B_OP_SUBTRACT, B_OP_BLEND, B_OP_MIN, B_OP_MAX, + B_OP_SELECT, B_OP_ALPHA); + + +// Check/Confirm This one, please. + +// this was: +// enum source_alpha { +// B_PIXEL_ALPHA=0, +// B_CONSTANT_ALPHA +// }; +// +// enum alpha_function { +// B_ALPHA_OVERLAY=0, +// B_ALPHA_COMPOSITE +// }; + + Source_Alpha = (B_PIXEL_ALPHA, B_CONSTANT_ALPHA); + Alpha_Function = (B_ALPHA_OVERLAY, B_ALPHA_COMPOSITE); + +const + + B_8_BIT_640x480 = $00000001; + B_8_BIT_800x600 = $00000002; + B_8_BIT_1024x768 = $00000004; + B_8_BIT_1280x1024 = $00000008; + B_8_BIT_1600x1200 = $00000010; + B_16_BIT_640x480 = $00000020; + B_16_BIT_800x600 = $00000040; + B_16_BIT_1024x768 = $00000080; + B_16_BIT_1280x1024 = $00000100; + B_16_BIT_1600x1200 = $00000200; + B_32_BIT_640x480 = $00000400; + B_32_BIT_800x600 = $00000800; + B_32_BIT_1024x768 = $00001000; + B_32_BIT_1280x1024 = $00002000; + B_32_BIT_1600x1200 = $00004000; + B_8_BIT_1152x900 = $00008000; + B_16_BIT_1152x900 = $00010000; + B_32_BIT_1152x900 = $00020000; + B_15_BIT_640x480 = $00040000; + B_15_BIT_800x600 = $00080000; + B_15_BIT_1024x768 = $00100000; + B_15_BIT_1280x1024 = $00200000; + B_15_BIT_1600x1200 = $00400000; + B_15_BIT_1152x900 = $00800000; + + // do not use B_FAKE_DEVICE--it will go away! + B_FAKE_DEVICE = $40000000; + B_8_BIT_640x400 = $80000000; // (int) + +{ + // This one must be find a better place. + PCardinal = ^Cardinal; + (*---------------------------------------------------------------------------*) type @@ -260,7 +562,8 @@ const B_8_BIT_640x400 = $80000000; (*---------------------------------------------------------------------------*) +} implementation -end. \ No newline at end of file +end. diff --git a/bepascal/source/bepascal/pas/src/be/interface/interfacedefs.pp b/bepascal/source/bepascal/pas/src/be/interface/interfacedefs.pp index 42eafdf..35b6863 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/interfacedefs.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/interfacedefs.pp @@ -296,6 +296,19 @@ type B_MENU_ITEM_TEXT_COLOR, // 7 B_MENU_SELECTED_ITEM_TEXT_COLOR); // 8 +join_mode =( + B_ROUND_JOIN, + B_MITER_JOIN, + B_BEVEL_JOIN, + B_BUTT_JOIN, + B_SQUARE_JOIN); + + cap_mode = join_mode; +var + B_ROUND_CAP, + B_BUTT_CAP, + B_SQUARE_CAP : join_mode; + function ui_color(which : color_which) : rgb_color; cdecl; external 'be' name 'ui_color__F11color_which'; function tint_color(color : rgb_color; which : color_which) : rgb_color; cdecl; external 'be' name 'tint_color__FG9rgb_colorf'; @@ -319,4 +332,9 @@ const implementation -end. \ No newline at end of file +Initialization + B_ROUND_CAP:=B_ROUND_JOIN; + B_BUTT_CAP:=B_BUTT_JOIN; + B_SQUARE_CAP:=B_SQUARE_JOIN; + +end. diff --git a/bepascal/source/bepascal/pas/src/be/interface/listview.pp b/bepascal/source/bepascal/pas/src/be/interface/listview.pp index 6755420..7ee4689 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/listview.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/listview.pp @@ -35,7 +35,7 @@ type BListView = class(BView) private public - constructor Create(frame : BRect; name : pchar; atype : list_view_type; resizeMask: longint; flags : longint); virtual; + constructor Create(aframe : BRect; name : pchar; atype : list_view_type; resizeMask: longint; sflags : longint); virtual; constructor Create(data : BMessage); destructor Destroy;override; function Instantiate(data : BMessage) : BArchivable; @@ -188,10 +188,10 @@ var ListItem_SelectionChanged_hook: Pointer; cvar; external; ListString_InitiateDrag_hook: Pointer; cvar; external; -constructor BListView.Create(frame : BRect; name : pchar; atype : list_view_type; resizeMask: longint; flags : longint); +constructor BListView.Create(aframe : BRect; name : pchar; atype : list_view_type; resizeMask: longint; sflags : longint); begin CreatePas; - CPlusObject := BListView_Create(Self,frame.CPlusObject,name,atype,resizeMask,flags); + CPlusObject := BListView_Create(Self,aframe.CPlusObject,name,atype,resizeMask,sflags); end; constructor BListView.Create(data : BMessage); diff --git a/bepascal/source/bepascal/pas/src/be/interface/menu.pp b/bepascal/source/bepascal/pas/src/be/interface/menu.pp index d72f919..808946a 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/menu.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/menu.pp @@ -58,9 +58,9 @@ type function AddItem(item : bMenuItem) : boolean; function AddItem(item : bMenuItem; index : integer) : boolean; - function AddItem(item : bMenuItem; frame : BRect) : boolean; + function AddItem(item : bMenuItem; aframe : BRect) : boolean; function AddItem(menu : BMenu; index : integer) : boolean; - function AddItem(menu : BMenu; frame : BRect) : boolean; + function AddItem(menu : BMenu; aframe : BRect) : boolean; function AddItem(menu : BMenu) : boolean; function AddList(list : BList; index : integer) : boolean; @@ -801,13 +801,13 @@ begin Result := BMenu_AddItem_2(CPlusObject, item.CPlusObject, index); end; -function BMenu.AddItem(item : bMenuItem; frame : BRect) : boolean; +function BMenu.AddItem(item : bMenuItem; aframe : BRect) : boolean; begin SendText('ici'); SendText('function BMenu.AddItem(item : bMenuItem; frame : BRect) : boolean;'); frame.PrintToStream; SendText('toto'); - Result := BMenu_AddItem_3(CPlusObject, item.CPlusObject, frame.CPlusObject); + Result := BMenu_AddItem_3(CPlusObject, item.CPlusObject, aframe.CPlusObject); end; function BMenu.AddItem(menu : BMenu) : boolean; @@ -823,10 +823,10 @@ begin Result := BMenu_AddItem_5(CPlusObject, menu.CPlusObject, index); end; -function BMenu.AddItem(menu : BMenu; frame : BRect) : boolean; +function BMenu.AddItem(menu : BMenu; aframe : BRect) : boolean; begin SendText('function BMenu.AddItem(menu : BMenu; frame : BRect) : boolean;'); - Result := BMenu_AddItem_6(CPlusObject, menu.CPlusObject, frame.CPlusObject); + Result := BMenu_AddItem_6(CPlusObject, menu.CPlusObject, aframe.CPlusObject); end; diff --git a/bepascal/source/bepascal/pas/src/be/interface/menubar.pp b/bepascal/source/bepascal/pas/src/be/interface/menubar.pp index 5f790be..e03de24 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/menubar.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/menubar.pp @@ -30,7 +30,7 @@ type BMenuBar = class(BMenu) private public - constructor Create(frame : BRect; viewName : PChar; resizingMode : Cardinal; layout : Menu_Layout; resizeToFit : boolean); + constructor Create(aframe : BRect; viewName : PChar; sresizingMode : Cardinal; layout : Menu_Layout; resizeToFit : boolean); constructor Create; override; destructor Destroy; override; function Instantiate(data : BMessage) : BArchivable; @@ -85,9 +85,9 @@ procedure BMenuBar_AllDetached(AObject : TCPlusObject); cdecl; external BePascal implementation -constructor BMenuBar.Create(frame : BRect; viewName : PChar; resizingMode : Cardinal; layout : Menu_Layout; resizeToFit : boolean); +constructor BMenuBar.Create(aframe : BRect; viewName : PChar; sresizingMode : Cardinal; layout : Menu_Layout; resizeToFit : boolean); begin - CPlusObject := BMenuBar_Create(Self, frame.CPlusObject, viewName, resizingMode, 0, resizeToFit); + CPlusObject := BMenuBar_Create(Self, aframe.CPlusObject, viewName, sresizingMode, 0, resizeToFit); end; constructor BMenuBar.Create; diff --git a/bepascal/source/bepascal/pas/src/be/interface/outlinelistview.pp b/bepascal/source/bepascal/pas/src/be/interface/outlinelistview.pp index ed215b3..81828ba 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/outlinelistview.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/outlinelistview.pp @@ -28,7 +28,7 @@ type BOutlineListView = class(BListView) private public - constructor Create(frame : BRect; name : pchar; atype : List_view_type; resizeMask: longint; flags : longint); override; + constructor Create(aframe : BRect; name : pchar; atype : List_view_type; resizeMask: longint; aflags : longint); override; constructor Create(data : BMessage); destructor Destroy;override; function Instantiate(data : BMessage) : BArchivable; @@ -124,10 +124,10 @@ function BOutlineListView_ItemUnderAt(AObject : TCPlusObject; underItem : TCPlus implementation -constructor BOutlineListView.Create(frame : BRect; name : pchar; atype : list_view_type; resizeMask: longint; flags : longint); +constructor BOutlineListView.Create(aframe : BRect; name : pchar; atype : list_view_type; resizeMask: longint; aflags : longint); begin CreatePas; - CPlusObject := BOutlineListView_Create(Self,frame.CPlusObject,name,atype,resizeMask,flags); + CPlusObject := BOutlineListView_Create(Self,aframe.CPlusObject,name,atype,resizeMask,aflags); end; constructor BOutlineListView.Create(data : BMessage); diff --git a/bepascal/source/bepascal/pas/src/be/interface/polygon.pp b/bepascal/source/bepascal/pas/src/be/interface/polygon.pp index 46ed908..329c1c3 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/polygon.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/polygon.pp @@ -1,105 +1,102 @@ -{ BePascal - A pascal wrapper around the BeOS API - Copyright (C) 2003 Olivier Coursiere - Eric Jourde - Oscar Lesta - - 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 -} - +{ 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 polygon; interface uses - BeObj, Archivable, GraphicDefs, Message, OS, Rect, SupportDefs,dataio; + beobj,rect; type - - BPolygon = class(TBeObject) + BPolygon = class(TBeObject) private public - constructor Create;override; +// constructor Create; constructor Create(poly : BPolygon); -// constructor Create(data : BMessage); - - destructor Destroy; override; - + destructor Destroy;override; + function Frame : BRect; +// procedure AddPoints(ptArray : ; numPoints : integer); + function CountPoints : integer; + procedure MapTo(srcRect : BRect; dstRect : BRect); + procedure PrintToStream; end; -function BPicture_Create(AObject : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BPicture_Create'; -function BPicture_Create(AObject : TCPlusObject;data : BMessage) : TCPlusObject; cdecl; external BePascalLibName name 'BPicture_Create_2'; - - -procedure BPicture_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BPicture_Free'; -function BPicture_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : BArchivable; cdecl; external BePascalLibName name 'BPicture_Instantiate'; -function BPicture_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : Status_t; cdecl; external BePascalLibName name 'BPicture_Archive'; -function BPicture_Perform(AObject : TCPlusObject; d : Perform_code; arg : Pointer) : Status_t; cdecl; external BePascalLibName name 'BPicture_Perform'; -function BPicture_Flatten(AObject : TCPlusObject; stream : TCPlusObject) : Status_t; cdecl; external BePascalLibName name 'BPicture_Flatten'; -function BPicture_Unflatten(AObject : TCPlusObject; stream : TCPlusObject) : Status_t; cdecl; external BePascalLibName name 'BPicture_Unflatten'; - - +function BPolygon_Create(AObject : TBeObject):TCPlusObject; cdecl; external BePascalLibName name 'BPolygon_Create'; +//function BPolygon_Create(AObject : TBeObject); cdecl; external BePascalLibName name 'BPolygon_Create_1'; +function BPolygon_Create(AObject : TBeObject; poly : TCPlusObject):TCPlusObject; cdecl; external BePascalLibName name 'BPolygon_Create_2'; +procedure BPolygon_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BPolygon_Free'; +function BPolygon_Frame(AObject : TCPlusObject) : BRect; cdecl; external BePascalLibName name 'BPolygon_Frame'; +//procedure BPolygon_AddPoints(AObject : TCPlusObject; ptArray : ; numPoints : integer); cdecl; external BePascalLibName name 'BPolygon_AddPoints'; +function BPolygon_CountPoints(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BPolygon_CountPoints'; +procedure BPolygon_MapTo(AObject : TCPlusObject; srcRect : TCPlusObject; dstRect : TCPlusObject); cdecl; external BePascalLibName name 'BPolygon_MapTo'; +procedure BPolygon_PrintToStream(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BPolygon_PrintToStream'; implementation - - -constructor BPicture.Create; +constructor BPolygon.Create; begin - CreatePas; - CPlusObject := BPicture_Create(Self); +CreatePas; + CPlusObject := BPolygon_Create(Self); end; -constructor BPicture.Create(data : BMessage); + +{constructor BPolygon.Create; begin - CreatePas; - CPlusObject := BPicture_Create(Self,data); +CreatePas; + CPlusObject := BPolygon_Create(Self); +end; +} +constructor BPolygon.Create(poly : BPolygon); +begin +CreatePas; CPlusObject := BPolygon_Create(Self, poly); +end; + +destructor BPolygon.Destroy; +begin + BPolygon_Free(CPlusObject); + inherited; end; - -destructor BPicture.Destroy; +function BPolygon.Frame : BRect; begin - BPicture_Free(CPlusObject); - inherited; + Result := BPolygon_Frame(CPlusObject); end; -function BPicture.Instantiate(data :BMessage) : BArchivable; +{procedure BPolygon.AddPoints(ptArray : ; numPoints : integer); begin - Result := BPicture_Instantiate(CPlusObject, data.CPlusObject); + BPolygon_AddPoints(CPlusObject, ptArray, numPoints); +end; +} +function BPolygon.CountPoints : integer; +begin + Result := BPolygon_CountPoints(CPlusObject); end; -function BPicture.Archive(data : BMessage; deep : boolean) : Status_t; +procedure BPolygon.MapTo(srcRect : BRect; dstRect : BRect); begin - Result := BPicture_Archive(CPlusObject, data.CPlusObject, deep); + BPolygon_MapTo(CPlusObject, srcRect.CPlusObject, dstRect.CPlusObject); end; - - -function BPicture.Perform(d : Perform_code; arg : Pointer) : Status_t; +procedure BPolygon.PrintToStream; begin - Result := BPicture_Perform(CPlusObject, d, arg); -end; - -function BPicture.Flatten(var stream : BDataIO) : Status_t; -begin - Result:=BPicture_Flatten(CPlusObject,stream.CPlusObject); -end; - -function BPicture.Unflatten(var stream : BDataIO) : Status_t; -begin - Result:=BPicture_Unflatten(CPlusObject,stream.CPlusObject); + BPolygon_PrintToStream(CPlusObject); end; diff --git a/bepascal/source/bepascal/pas/src/be/interface/radiobutton.pp b/bepascal/source/bepascal/pas/src/be/interface/radiobutton.pp index 0ffb90b..c4053c9 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/radiobutton.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/radiobutton.pp @@ -28,7 +28,7 @@ type BRadioButton = class(BControl) private public - constructor Create(frame : BRect; name, aLabel : PChar; message : BMessage; resizingMode, flags : Cardinal); virtual; + constructor Create(frame : BRect; name, aLabel : PChar; message : BMessage; sresizingMode, sflags : Cardinal); virtual; constructor Create(data : BMessage); override; destructor Destroy; override; function Instantiate(data : BMessage) : BArchivable; @@ -49,7 +49,7 @@ type procedure FrameMoved(new_position : BPoint); override; procedure FrameResized(new_width : double; new_height : double); override; function ResolveSpecifier(msg : BMessage; index : integer; specifier : BMessage; form : integer; properti : PChar) : BHandler; - procedure MakeFocus(state : boolean); override; + procedure MakeFocus(state : boolean); procedure AllAttached; override; procedure AllDetached; override; function GetSupportedSuites(data : BMessage) : Status_t; @@ -102,10 +102,10 @@ function BRadioButton_Perform(AObject : TCPlusObject; d : Perform_code; arg : Po implementation -constructor BRadioButton.Create(frame : BRect; name, aLabel : PChar; message : BMessage; resizingMode, flags : Cardinal); +constructor BRadioButton.Create(frame : BRect; name, aLabel : PChar; message : BMessage; sresizingMode, sflags : Cardinal); begin CreatePas; - CPlusObject := BRadioButton_Create(Self, frame.CPlusObject, name, aLabel, message.CPlusObject, resizingMode, flags); + CPlusObject := BRadioButton_Create(Self, frame.CPlusObject, name, aLabel, message.CPlusObject, sresizingMode, sflags); end; constructor BRadioButton.Create(data : BMessage); diff --git a/bepascal/source/bepascal/pas/src/be/interface/rect.pp b/bepascal/source/bepascal/pas/src/be/interface/rect.pp index 231d7f4..d1d7060 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/rect.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/rect.pp @@ -24,26 +24,8 @@ uses beobj; type - // BPoint and BRect are defined in the same unit to avoid circular reference - BPoint = class; - BRect = class(TBeObject) - public - constructor Create; override; - constructor Create(rect : BRect); virtual; // Problème de référence circulaire avec BPoint - constructor Create(l, t, r, b : single); virtual; - constructor Create(leftTop, rightBottom : BPoint); virtual; - destructor Destroy; override; - procedure PrintToStream; - end; + BRect =class; -function BRect_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BRect_Create_1'; -function BRect_Create(AObject : TBeObject; rect : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BRect_Create_2'; -function BRect_Create(AObject : TBeObject; l, t, r, b : single) : TCPlusObject; cdecl; external BePascalLibName name 'BRect_Create_3'; -function BRect_Create(AObject : TBeObject; leftTop, rightBottom : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BRect_Create_4'; -procedure BRect_Free(rect : TCPlusObject); cdecl; external BePascalLibName name 'BRect_Free'; -procedure BRect_PrintToStream(Rect : TCPlusObject); cdecl; external bePascalLibName name 'BRect_PrintToStream'; - -type BPoint = class(TBeObject) public constructor Create; override; @@ -54,6 +36,95 @@ type procedure PrintToStream; procedure Sept(x, y : single); end; + + +type + // BPoint and BRect are defined in the same unit to avoid circular reference + BRect = class(TBeObject) + private + function Get_Left : single; + function Get_Right : single; + function Get_bottom : single; + function Get_top : single; + public + constructor Create; override; + constructor Create(rect : BRect); virtual; // Problème de référence circulaire avec BPoint + constructor Create(l, t, r, b : single); + constructor Create(leftTop, rightBottom : BPoint); virtual; + destructor Destroy; override; + procedure PrintToStream; + + procedure SetLeftTop(Rect : TCPlusObject; p : BPoint); + procedure SetRightBottom(Rect : TCPlusObject; p : BPoint); + procedure SetLeftBottom(Rect : TCPlusObject; p : BPoint); + procedure SetRightTop(Rect : TCPlusObject; p : BPoint); + procedure InsetBy(Rect : TCPlusObject; p : BPoint); + procedure InsetBy(Rect : TCPlusObject; dx,dy : single); + procedure OffsetBy(Rect : TCPlusObject; p : BPoint); + procedure OffSetBy(Rect : TCPlusObject; dx,dy : single); + procedure OffsetTo(Rect : TCPlusObject; p : BPoint); + procedure OffSetTo(Rect : TCPlusObject; dx,dy : single); + function InsetBySelf(Rect : TCPlusObject; p : BPoint): BRect; + function InsetBySelf(Rect : TCPlusObject; dx,dy :single): BRect; + function InsetByCopy(Rect : TCPlusObject; p : BPoint): BRect; + function InsetByCopy(Rect : TCPlusObject; dx,dy :single): BRect; + function OffSetBySelf(Rect : TCPlusObject; p : BPoint): BRect; + function OffSetBySelf(Rect : TCPlusObject; dx,dy :single): BRect; + function OffSetByCopy(Rect : TCPlusObject; p : BPoint): BRect; + function OffSetByCopy(Rect : TCPlusObject; dx,dy :single): BRect; + function OffSetToSelf(Rect : TCPlusObject; p : BPoint): BRect; + function OffSetToSelf(Rect : TCPlusObject; dx,dy :single): BRect; + function OffSetToCopy(Rect : TCPlusObject; p : BPoint): BRect; + function OffSetToCopy(Rect : TCPlusObject; dx,dy :single): BRect; + function Intersects(Rect : TCPlusObject; p : Brect): boolean; + function Contains(Rect : TCPlusObject; p : BPoint): boolean; + function Contains(Rect : TCPlusObject; p : Brect): boolean; + + + property left : single read Get_left; + property right : single read Get_right; + property bottom : single read Get_bottom; + property top : single read Get_top; + end; + +function BRect_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BRect_Create_1'; +function BRect_Create(AObject : TBeObject; rect : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BRect_Create_2'; +function BRect_Create(AObject : TBeObject; l, t, r, b : single) : TCPlusObject; cdecl; external BePascalLibName name 'BRect_Create_3'; +function BRect_Create(AObject : TBeObject; leftTop, rightBottom : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BRect_Create_4'; +procedure BRect_Free(rect : TCPlusObject); cdecl; external BePascalLibName name 'BRect_Free'; +procedure BRect_PrintToStream(Rect : TCPlusObject); cdecl; external bePascalLibName name 'BRect_PrintToStream'; +function BRect_left(Rect : TCPlusObject): single; cdecl; external bePascalLibName name 'BRect_left'; +function BRect_right(Rect : TCPlusObject): single; cdecl; external bePascalLibName name 'BRect_right'; +function BRect_bottom(Rect : TCPlusObject): single; cdecl; external bePascalLibName name 'BRect_bottom'; +function BRect_top(Rect : TCPlusObject): single; cdecl; external bePascalLibName name 'BRect_top'; + +procedure BRect_SetLeftTop(Rect : TCPlusObject; p : BPoint); cdecl; external bePascalLibName name 'BRect_SetLeftTop'; +procedure BRect_SetRightBottom(Rect : TCPlusObject; p : BPoint); cdecl; external bePascalLibName name 'BRect_SetRightBottom'; +procedure BRect_SetLeftBottom(Rect : TCPlusObject; p : BPoint); cdecl; external bePascalLibName name 'BRect_SetLeftBottom'; +procedure BRect_SetRightTop(Rect : TCPlusObject; p : BPoint); cdecl; external bePascalLibName name 'BRect_SetRightTop'; +procedure BRect_InsetBy(Rect : TCPlusObject; p : BPoint); cdecl; external bePascalLibName name 'BRect_InsetBy'; +procedure BRect_InsetBy(Rect : TCPlusObject; dx,dy : single); cdecl; external bePascalLibName name 'BRect_InsetBy_1'; +procedure BRect_OffsetBy(Rect : TCPlusObject; p : BPoint); cdecl; external bePascalLibName name 'BRect_OffsetBy'; +procedure BRect_OffSetBy(Rect : TCPlusObject; dx,dy : single); cdecl; external bePascalLibName name 'BRect_OffsetBy_1'; +procedure BRect_OffsetTo(Rect : TCPlusObject; p : BPoint); cdecl; external bePascalLibName name 'BRect_OffsetTo'; +procedure BRect_OffSetTo(Rect : TCPlusObject; dx,dy : single); cdecl; external bePascalLibName name 'BRect_OffsetTo_1'; +function BRect_InsetBySelf(Rect : TCPlusObject; p : BPoint): BRect; cdecl; external bePascalLibName name 'BRect_InsetBySelf'; +function BRect_InsetBySelf(Rect : TCPlusObject; dx,dy :single): BRect; cdecl; external bePascalLibName name 'BRect_InsetBySelf_1'; +function BRect_InsetByCopy(Rect : TCPlusObject; p : BPoint): BRect; cdecl; external bePascalLibName name 'BRect_InsetByCopy'; +function BRect_InsetByCopy(Rect : TCPlusObject; dx,dy :single): BRect; cdecl; external bePascalLibName name 'BRect_InsetByCopy_1'; +function BRect_OffSetBySelf(Rect : TCPlusObject; p : BPoint): BRect; cdecl; external bePascalLibName name 'BRect_OffsetBySelf'; +function BRect_OffSetBySelf(Rect : TCPlusObject; dx,dy :single): BRect; cdecl; external bePascalLibName name 'BRect_OffsetBySelf_1'; +function BRect_OffSetByCopy(Rect : TCPlusObject; p : BPoint): BRect; cdecl; external bePascalLibName name 'BRect_OffsetByCopy'; +function BRect_OffSetByCopy(Rect : TCPlusObject; dx,dy :single): BRect; cdecl; external bePascalLibName name 'BRect_OffsetByCopy_1'; +function BRect_OffSetToSelf(Rect : TCPlusObject; p : BPoint): BRect; cdecl; external bePascalLibName name 'BRect_OffsetToSelf'; +function BRect_OffSetToSelf(Rect : TCPlusObject; dx,dy :single): BRect; cdecl; external bePascalLibName name 'BRect_OffsetToSelf_1'; +function BRect_OffSetToCopy(Rect : TCPlusObject; p : BPoint): BRect; cdecl; external bePascalLibName name 'BRect_OffsetToCopy'; +function BRect_OffSetToCopy(Rect : TCPlusObject; dx,dy :single): BRect; cdecl; external bePascalLibName name 'BRect_OffsetToCopy_1'; +function BRect_Intersects(Rect : TCPlusObject; p : Brect): boolean; cdecl; external bePascalLibName name 'BRect_Intersects'; +function BRect_Contains(Rect : TCPlusObject; p : BPoint): boolean; cdecl; external bePascalLibName name 'BRect_Contains'; +function BRect_Contains(Rect : TCPlusObject; p : Brect): boolean; cdecl; external bePascalLibName name 'BRect_Contains_1'; + + function BPoint_Create(AObject : TBeObject; x, y : single) : TCPlusObject; cdecl; external BePascalLibName name 'BPoint_Create_1'; function BPoint_Create(AObject : TBeObject; point : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BPoint_Create_2'; @@ -100,6 +171,154 @@ begin BRect_PrintToStream(CPlusObject); end; +function Brect.Get_Left : single; +begin + result:=BRect_left(CPlusObject); +end; +function Brect.Get_right : single; +begin + result:=BRect_right(CPlusObject); +end; +function Brect.Get_bottom : single; +begin + result:=BRect_bottom(CPlusObject); +end; +function Brect.Get_top : single; +begin + result:=BRect_top(CPlusObject); +end; + + +procedure Brect.SetLeftTop(Rect : TCPlusObject; p : BPoint); +begin + BRect_SetLeftTop(CPlusObject,p); +end; + +procedure Brect.SetRightBottom(Rect : TCPlusObject; p : BPoint); +begin + BRect_SetRightBottom(CPlusObject,p); +end; + +procedure Brect.SetLeftBottom(Rect : TCPlusObject; p : BPoint); +begin + BRect_SetLeftBottom(CPlusObject,p); +end; + +procedure Brect.SetRightTop(Rect : TCPlusObject; p : BPoint); +begin + BRect_SetRightTop(CPlusObject,p); +end; + +procedure Brect.InsetBy(Rect : TCPlusObject; p : BPoint); +begin + BRect_InsetBy(CPlusObject,p); +end; + +procedure Brect.InsetBy(Rect : TCPlusObject; dx,dy : single); +begin + BRect_InsetBy(CPlusObject,dx,dy); +end; + +procedure Brect.OffsetBy(Rect : TCPlusObject; p : BPoint); +begin + BRect_OffsetBy(CPlusObject,p); +end; + +procedure Brect.OffSetBy(Rect : TCPlusObject; dx,dy : single); +begin + BRect_OffSetBy(CPlusObject,dx,dy); +end; + +procedure Brect.OffsetTo(Rect : TCPlusObject; p : BPoint); +begin + BRect_OffsetTo(CPlusObject,p); +end; + +procedure Brect.OffSetTo(Rect : TCPlusObject; dx,dy : single); +begin + BRect_OffSetTo(CPlusObject,dx,dy); +end; + +function Brect.InsetBySelf(Rect : TCPlusObject; p : BPoint): BRect; +begin + result:=BRect_InsetBySelf(CPlusObject,p); +end; + +function Brect.InsetBySelf(Rect : TCPlusObject; dx,dy :single): BRect; +begin + result:=BRect_InsetBySelf(CPlusObject,dx,dy); +end; + +function Brect.InsetByCopy(Rect : TCPlusObject; p : BPoint): BRect; +begin + result:=BRect_InsetByCopy(CPlusObject,p); +end; + +function Brect.InsetByCopy(Rect : TCPlusObject; dx,dy :single): BRect; +begin + result:=BRect_InsetByCopy(CPlusObject,dx,dy); +end; + +function Brect.OffSetBySelf(Rect : TCPlusObject; p : BPoint): BRect; +begin + result:=BRect_OffSetBySelf(CPlusObject,p); +end; + +function Brect.OffSetBySelf(Rect : TCPlusObject; dx,dy :single): BRect; +begin + result:=BRect_OffSetBySelf(CPlusObject,dx,dy); +end; + +function Brect.OffSetByCopy(Rect : TCPlusObject; p : BPoint): BRect; +begin + result:=BRect_OffSetByCopy(CPlusObject,p); +end; + +function Brect.OffSetByCopy(Rect : TCPlusObject; dx,dy :single): BRect; +begin + result:=BRect_OffSetByCopy(CPlusObject,dx,dy); +end; + +function Brect.OffSetToSelf(Rect : TCPlusObject; p : BPoint): BRect; +begin + result:=BRect_OffSetToSelf(CPlusObject,p); +end; + +function Brect.OffSetToSelf(Rect : TCPlusObject; dx,dy :single): BRect; +begin + result:=BRect_OffSetToSelf(CPlusObject,dx,dy); +end; + +function Brect.OffSetToCopy(Rect : TCPlusObject; p : BPoint): BRect; +begin + result:=BRect_OffSetToCopy(CPlusObject,p); +end; + +function Brect.OffSetToCopy(Rect : TCPlusObject; dx,dy :single): BRect; +begin + result:=BRect_OffSetToCopy(CPlusObject,dx,dy); +end; + +function Brect.Intersects(Rect : TCPlusObject; p : Brect): boolean; +begin + result:=BRect_Intersects(CPlusObject,p); +end; + +function Brect.Contains(Rect : TCPlusObject; p : BPoint): boolean; +begin + result:=BRect_Contains(CPlusObject,p); +end; + +function Brect.Contains(Rect : TCPlusObject; p : Brect): boolean; +begin + result:=BRect_Contains(CPlusObject,p); +end; + + + + +// BPoint + constructor BPoint.Create(x, y : single); begin inherited Create; @@ -139,6 +358,8 @@ begin BPoint_Set(CPlusObject, x, y); end; + + initialization end. diff --git a/bepascal/source/bepascal/pas/src/be/interface/scrollbar.pp b/bepascal/source/bepascal/pas/src/be/interface/scrollbar.pp index fb9caac..0d08c79 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/scrollbar.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/scrollbar.pp @@ -27,7 +27,7 @@ type BScrollBar = class(BView) private public - constructor Create(frame : BRect; name : pchar; atarget : BView; min,max : real; direction : orientation); + constructor Create(aframe : BRect; name : pchar; atarget : BView; min,max : real; direction : orientation); constructor Create_1(data : BMessage); destructor Destroy;override; function Instantiate(data : BMessage) : BArchivable; @@ -102,10 +102,10 @@ function BScrollBar_Perform(AObject : TCPlusObject; d : Perform_code; arg : Poin implementation -constructor BScrollBar.Create(frame : BRect; name : pchar; atarget : BView; min,max : real; direction : Orientation); +constructor BScrollBar.Create(aframe : BRect; name : pchar; atarget : BView; min,max : real; direction : Orientation); begin CreatePas; - CPlusObject := BScrollBar_Create(Self,frame.CPlusObject, name, target.CPlusObject,min,max, direction ); + CPlusObject := BScrollBar_Create(Self,aframe.CPlusObject, name, target.CPlusObject,min,max, direction ); end; constructor BScrollBar.Create_1(data : BMessage); diff --git a/bepascal/source/bepascal/pas/src/be/interface/scrollview.pp b/bepascal/source/bepascal/pas/src/be/interface/scrollview.pp index 89e525d..7638405 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/scrollview.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/scrollview.pp @@ -31,7 +31,7 @@ type constructor Create(name : pchar; atarget :BView; resizeMask : longint; - flags : longint; + sflags : longint; horizontal, vertical : boolean; aborder :border_style ); virtual; @@ -101,13 +101,13 @@ implementation constructor BScrollView.Create(name : pchar; atarget :BView; resizeMask : longint; - flags : longint; + sflags : longint; horizontal, vertical : boolean; aborder :border_style ); begin CreatePas; - CPlusObject := BScrollView_Create(Self,name,atarget.CplusObject,resizeMask,flags,horizontal,vertical,aborder); + CPlusObject := BScrollView_Create(Self,name,atarget.CplusObject,resizeMask,sflags,horizontal,vertical,aborder); end; diff --git a/bepascal/source/bepascal/pas/src/be/interface/statusbar.pp b/bepascal/source/bepascal/pas/src/be/interface/statusbar.pp index 9a295a8..f7c808e 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/statusbar.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/statusbar.pp @@ -28,7 +28,7 @@ type BStatusBar = class(BView) private public - constructor Create( frame : BRect; + constructor Create( aframe : BRect; name : pchar; alabel : Pchar; trailing_label : Pchar);virtual; @@ -113,13 +113,13 @@ function BStatusBar_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObje implementation -constructor BStatusBar.Create(frame : BRect; +constructor BStatusBar.Create(aframe : BRect; name : pchar; alabel : Pchar; trailing_label : Pchar); begin CreatePas; - CPlusObject := BStatusBar_Create(Self, frame.CPlusObject, name, alabel, trailing_label); + CPlusObject := BStatusBar_Create(Self, aframe.CPlusObject, name, alabel, trailing_label); end; constructor BStatusBar.Create(data : BMessage); diff --git a/bepascal/source/bepascal/pas/src/be/interface/stringview.pp b/bepascal/source/bepascal/pas/src/be/interface/stringview.pp index d792c10..f5e2927 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/stringview.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/stringview.pp @@ -27,7 +27,7 @@ type BStringView = class(BView) private public - constructor Create(bounds : BRect; name : pchar; texte : pchar; resizeflags, flags : cardinal); virtual; + constructor Create(abounds : BRect; name : pchar; texte : pchar; resizeflags, sflags : cardinal); virtual; destructor Destroy; override; function Instantiate(data : BMessage) : BArchivable; function Archive(data : BMessage; deep : boolean) : Status_t; @@ -36,7 +36,7 @@ type procedure SeAlignment(flag : Alignment); function GetAlignment : Alignment; procedure AttachedToWindow; override; - procedure Draw(bounds : BRect); override; + procedure Draw(abounds : BRect); override; procedure MessageReceived(msg : BMessage);override; procedure MouseDown(pt : BPoint);override; procedure MouseUp(pt : BPoint);override; @@ -96,10 +96,10 @@ function BStringView_Perform(AObject : TCPlusObject; d : Perform_code; arg : Poi implementation -constructor BStringView.Create(bounds : BRect; name : pchar; texte : pchar; resizeflags, flags : cardinal); +constructor BStringView.Create(abounds : BRect; name : pchar; texte : pchar; resizeflags, sflags : cardinal); begin CreatePas; - CPlusObject := BStringView_Create(Self,bounds.CPlusObject,name,texte,resizeflags, flags); + CPlusObject := BStringView_Create(Self,abounds.CPlusObject,name,texte,resizeflags, sflags); end; destructor BStringView.Destroy; @@ -143,9 +143,9 @@ begin // BStringView_AttachedToWindow(CPlusObject); end; -procedure BStringView.Draw(bounds : BRect); +procedure BStringView.Draw(abounds : BRect); begin - // BStringView_Draw(CPlusObject, bounds.CPlusObject); + // BStringView_Draw(CPlusObject, abounds.CPlusObject); end; procedure BStringView.MessageReceived(msg : BMessage); diff --git a/bepascal/source/bepascal/pas/src/be/interface/tabview.pp b/bepascal/source/bepascal/pas/src/be/interface/tabview.pp index c0055d0..0c19aa3 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/tabview.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/tabview.pp @@ -59,7 +59,7 @@ type private public destructor Destroy;override; - constructor Create(frame : BRect; name : Pchar; width : button_width; resizingMode : cardinal; flags : cardinal);virtual; + constructor Create(aframe : BRect; name : Pchar; width : button_width; sresizingMode : cardinal; sflags : cardinal);virtual; constructor Create(msg : BMessage);virtual; function Instantiate( msg: BMessage) : BArchivable; function Archive( msg : BMessage; deep : boolean) : Status_t; @@ -86,7 +86,7 @@ type function DrawTabs : BRect; procedure DrawBox(selectedTabFrame : BRect); function TabFrame(tabIndex : integer) : BRect; - procedure SetFlags(flags : Cardinal); + procedure SetFlags(sflags : Cardinal); procedure SetResizingMode(mode : Cardinal); procedure GetPreferredSize(width : double; height : double); procedure ResizeToPreferred;override; @@ -299,10 +299,10 @@ begin inherited; end; -constructor BTabView.Create( frame : BRect; name : Pchar; width : button_width; resizingMode : cardinal; flags : cardinal); +constructor BTabView.Create( aframe : BRect; name : Pchar; width : button_width; sresizingMode : cardinal; sflags : cardinal); begin createPas; - CPlusObject := BTabView_Create(Self, frame.CPlusObject, name, Integer(width),resizingMode,flags); + CPlusObject := BTabView_Create(Self, aframe.CPlusObject, name, Integer(width),sresizingMode,sflags); end; @@ -437,9 +437,9 @@ begin Result := BTabView_TabFrame(CPlusObject, tabIndex); end; -procedure BTabView.SetFlags(flags : Cardinal); +procedure BTabView.SetFlags(sflags : Cardinal); begin - BTabView_SetFlags(CPlusObject, flags); + BTabView_SetFlags(CPlusObject, sflags); end; procedure BTabView.SetResizingMode(mode : Cardinal); diff --git a/bepascal/source/bepascal/pas/src/be/interface/textcontrol.pp b/bepascal/source/bepascal/pas/src/be/interface/textcontrol.pp index ad4dd92..377c1fa 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/textcontrol.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/textcontrol.pp @@ -29,7 +29,7 @@ type private public destructor Destroy;override; - constructor Create(frame : BRect; name, aLabel,initial : PChar; message : BMessage; resizingMode, flags : Cardinal); virtual; + constructor Create(frame : BRect; name, aLabel,initial : PChar; message : BMessage; sresizingMode, sflags : Cardinal); virtual; constructor Create(data : BMessage);override; function Instantiate(data : BMessage) : BArchivable; function Archive(data : BMessage; deep : boolean) : Status_t; @@ -47,7 +47,7 @@ type procedure Draw(updateRect : BRect);override; procedure MouseDown(where : BPoint);override; procedure AttachedToWindow;override; - procedure MakeFocus(focusState : boolean);override; + procedure MakeFocus(focusState : boolean); procedure SetEnabled(state : boolean); procedure FrameMoved(new_position : BPoint);override; procedure FrameResized(new_width : double; new_height : double);override; @@ -88,7 +88,7 @@ type end; procedure BTextControl_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_Free'; -function BTextControl_Create(AObject : TBeObject; frame : TCPlusObject; name, aLabel ,initial: PChar; message : TCPlusObject; resizingMode, flags : Cardinal): TCPlusObject; cdecl; external BePascalLibName name 'BTextControl_Create'; +function BTextControl_Create(AObject : TBeObject; frame : TCPlusObject; name, aLabel ,initial: PChar; message : TCPlusObject; sresizingMode, flags : Cardinal): TCPlusObject; cdecl; external BePascalLibName name 'BTextControl_Create'; function BTextControl_Create(AObject : TBeObject; data : TCPlusObject): TCPlusObject; cdecl; external BePascalLibName name 'BTextControl_Create_1'; function BTextControl_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : BArchivable; cdecl; external BePascalLibName name 'BTextControl_Instantiate'; function BTextControl_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : Status_t; cdecl; external BePascalLibName name 'BTextControl_Archive'; @@ -155,10 +155,10 @@ begin inherited; end; -constructor BTextControl.Create(frame : BRect; name, aLabel,initial : PChar; message : BMessage; resizingMode, flags : Cardinal); +constructor BTextControl.Create(frame : BRect; name, aLabel,initial : PChar; message : BMessage; sresizingMode, sflags : Cardinal); begin CreatePas; - CPlusObject := BTextControl_Create(Self, frame.CPlusObject, name, aLabel,initial, message.CPlusObject, resizingMode, flags); + CPlusObject := BTextControl_Create(Self, frame.CPlusObject, name, aLabel,initial, message.CPlusObject, sresizingMode, sflags); end; diff --git a/bepascal/source/bepascal/pas/src/be/interface/textview.pp b/bepascal/source/bepascal/pas/src/be/interface/textview.pp index ce828b5..cf2d488 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/textview.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/textview.pp @@ -49,8 +49,8 @@ type BTextView = class(BView) private public - constructor Create(frame : BRect; name : pchar;atexBRect: BRect ; resizeMask, flags : cardinal); virtual; -// constructor Create(bounds : BRect; name : pchar; texte : pchar; resizeflags, flags : cardinal); virtual; + constructor Create(aframe : BRect; name : pchar;atexBRect: BRect ; resizeMask, sflags : cardinal); virtual; +// constructor Create(bounds : BRect; name : pchar; texte : pchar; resizeflags, sflags : cardinal); virtual; constructor Create(data : BMessage);virtual; destructor Destroy;override; function Instantiate(data : BMessage) : BArchivable; @@ -318,10 +318,10 @@ procedure BTextView_UnlockWidthBuffer(AObject : TCPlusObject); cdecl; external B implementation -constructor BTextView.Create(frame : BRect; name : pchar;atexBRect: BRect ; resizeMask, flags : cardinal); +constructor BTextView.Create(aframe : BRect; name : pchar;atexBRect: BRect ; resizeMask, sflags : cardinal); begin CreatePas; - CPlusObject := BTextView_Create(Self, frame.CplusObject,name,atexBRect.CPlusObject,resizeMask,flags); + CPlusObject := BTextView_Create(Self, aframe.CplusObject,name,atexBRect.CPlusObject,resizeMask,sflags); end; constructor BTextView.Create(data : BMessage); diff --git a/bepascal/source/bepascal/pas/src/be/interface/view.pp b/bepascal/source/bepascal/pas/src/be/interface/view.pp index ab28507..2a49972 100644 --- a/bepascal/source/bepascal/pas/src/be/interface/view.pp +++ b/bepascal/source/bepascal/pas/src/be/interface/view.pp @@ -23,14 +23,14 @@ unit View; interface uses - beobj, handler, rect, os, application, appdefs, message, - graphicdefs; + beobj, handler, rect, os, application, appdefs, message,font,SupportDefs, + graphicdefs,bitmap,region,picture,cursor,interfacedefs,polygon,shape; type -// TWindow = class(TBeObject); + BView = class(BHandler) public - constructor Create(frame : BRect; name : PChar; resizingMode, flags : Cardinal); + constructor Create(frame1 : BRect; name : PChar; resizingMode1, flags1 : Cardinal); destructor Destroy; override; // hook functions procedure AllAttached; virtual; @@ -41,8 +41,6 @@ type procedure DrawAfterChildren(updateRect : BRect); virtual; procedure FrameMoved(parenBPoint : BPoint); virtual; procedure FrameResized(width, height : double); virtual; - procedure GetPreferredSize(var width : double; var height : double); virtual; - procedure ResizeToPreferred; virtual; procedure KeyDown(bytes : PChar; numBytes : integer); virtual; procedure KeyUp(bytes : PChar; numBytes : integer); virtual; procedure MouseDown(point : BPoint); virtual; @@ -53,6 +51,7 @@ type procedure WindowActivated(active : boolean); virtual; procedure MessageReceived(aMessage : BMessage); override; // End hook functions + function RemoveSelf : boolean; procedure AddChild(aView, before : BView); function RemoveChild(aView : BView) : boolean; @@ -62,9 +61,166 @@ type function PreviousSibling : BView; // function Window : TWindow; procedure SetViewColor(rgb_color : RGB_color); + procedure SetOrigin(pt : BPoint); + procedure SetOrigin(x : double; y : double); + + // I can't write a function and a procedure with the same name so i decide just to write function ! why not + function ConvertToScreen(pt :BPoint ) : BPoint; + function ConvertFromScreen(pt :BPoint) : BPoint; + function ConvertToScreen(r :BRect) : BRect; + function ConvertFromScreen( r :BRect) :Brect; + function ConvertToParent(pt :BPoint) :BPoint; + function ConvertFromParent(pt :BPoint ) :Bpoint; + function ConvertToParent(r:BRect ) :Brect; + function ConvertFromParent( r : BRect) :BRect; + function LeftTop :BPoint; + + procedure BeginRectTracking(startRect : BRect; style : Integer); + procedure EndRectTracking; + procedure GetMouse(var location : BPoint; var buttons : Integer; checkMessageQueue : boolean); + procedure DragMessage( aMessage : BMessage; dragRect : BRect; reply_to : BHandler); + procedure DragMessage( aMessage : BMessage; anImage : BBitmap; offset : BPoint; reply_to : BHandler); + procedure DragMessage(aMessage : BMessage; anImage : BBitmap; dragMode : Drawing_Mode; offset : BPoint; reply_to : BHandler); + function FindView(name : PChar) : BView; + function Parent : BView; + function Bounds : BRect; + function Frame : BRect; + procedure GetClippingRegion(region : BRegion); + procedure ConstrainClippingRegion(region : BRegion); + + procedure ClipToPicture(picture : BPicture; where : BPoint; ssync : boolean); + procedure ClipToInversePicture(picture : BPicture; where : BPoint; ssync : boolean); + procedure SetDrawingMode(mode : Drawing_Mode); + function DrawingMode : Drawing_Mode; + procedure SetBlendingMode(srcAlpha : source_alpha; alphaFunc : alpha_function ); + procedure GetBlendingMode(srcAlpha : source_alpha; alphaFunc : alpha_function); + procedure SetPenSize(size : double); + function PenSize : double; + procedure SetViewCursor(cursor : BCursor; ssync : boolean); + // procedure SetViewColor(r : byte ; g : byte ; b :byte ; a :byte ); + function ViewColor : rgb_color; + procedure ClearViewBitmap; + procedure ClearViewOverlay; + procedure SetHighColor(a_color : rgb_color); + procedure SetHighColor(r : byte; g : byte; b : byte; a : byte); + function HighColor : rgb_color; + procedure SetLowColor(a_color : rgb_color); + procedure SetLowColor(r :byte ; g :byte ; b : byte; a : byte); + function LowColor : rgb_color; + procedure SetLineMode(lineCap : cap_mode; lineJoin : join_mode; miterLimit : double); + function LineJoinMode : join_mode; + function LineCapMode : cap_mode; + function LineMiterLimit : double; + + function Origin : BPoint; + procedure PushState; + procedure PopState; + procedure MovePenTo(pt : BPoint); + procedure MovePenTo(x : double; y : double); + procedure MovePenBy(x : double; y : double); + function PenLocation : BPoint; + procedure StrokeLine(toPt : BPoint; p : pattern); + procedure StrokeLine(pt0 : BPoint; pt1 : BPoint; p : pattern); + procedure BeginLineArray(count : integer); + procedure AddLine(pt0 : BPoint; pt1 : BPoint; col : rgb_color); + procedure EndLineArray; + procedure StrokePolygon(aPolygon : BPolygon; closed : boolean; p : pattern); + procedure StrokePolygon(ptArray : BPoint; numPts : integer; closed : boolean; p : pattern); + procedure StrokePolygon(ptArray : BPoint; numPts : integer; sbounds : BRect; closed : boolean; p : pattern); + procedure FillPolygon(aPolygon : BPolygon; p : pattern); + procedure FillPolygon(ptArray : BPoint; numPts : integer; p : pattern); + procedure FillPolygon(ptArray : BPoint; numPts : integer; sbounds : BRect; p : pattern); + procedure StrokeTriangle(pt1 : BPoint; pt2 : BPoint; pt3 : BPoint; sbounds : BRect; p : pattern); + procedure StrokeTriangle(pt1 : BPoint; pt2 : BPoint; pt3 : BPoint; p : pattern); + procedure FillTriangle(pt1 : BPoint; pt2 : BPoint; pt3 : BPoint; p : pattern); + procedure FillTriangle(pt1 : BPoint; pt2 : BPoint; pt3 : BPoint; sbounds : BRect; p : pattern); + procedure StrokeRect(r : BRect; p : pattern); + procedure FillRect(r : BRect; p : pattern); + procedure FillRegion(a_region : BRegion; p : pattern); + procedure InvertRect(r : BRect); + procedure StrokeRoundRect(r : BRect; xRadius : double; yRadius : double; p : pattern); + procedure FillRoundRect(r : BRect; xRadius : double; yRadius : double; p : pattern); + procedure StrokeEllipse(center : BPoint; xRadius : double; yRadius : double; p : pattern); + procedure StrokeEllipse(r : BRect; p : pattern); + procedure FillEllipse(center : BPoint; xRadius : double; yRadius : double; p : pattern); + procedure FillEllipse(r : BRect; p : pattern); + procedure StrokeArc(center : BPoint; xRadius : double; yRadius : double; start_angle : double; arc_angle : double; p : pattern); + procedure StrokeArc(r : BRect; start_angle : double; arc_angle : double; p : pattern); + procedure FillArc(center : BPoint; xRadius : double; yRadius : double; start_angle : double; arc_angle : double; p : pattern); + procedure FillArc(r : BRect; start_angle : double; arc_angle : double; p : pattern); + procedure StrokeBezier(controlPoints : BPoint; p : pattern); + procedure FillBezier(controlPoints : BPoint; p : pattern); + procedure StrokeShape(shape : BShape; p : pattern); + procedure FillShape(shape : BShape; p : pattern); + procedure CopyBits(src : BRect; dst : BRect); + procedure DrawBitmapAsync(aBitmap : BBitmap; srcRect : BRect; dstRect : BRect); + procedure DrawBitmapAsync(aBitmap : BBitmap); + procedure DrawBitmapAsync(aBitmap : BBitmap; where : BPoint); + procedure DrawBitmapAsync(aBitmap : BBitmap; dstRect : BRect); + procedure DrawBitmap(aBitmap : BBitmap; srcRect : BRect; dstRect : BRect); + procedure DrawBitmap(aBitmap : BBitmap); + procedure DrawBitmap(aBitmap : BBitmap; where : BPoint); + procedure DrawBitmap(aBitmap : BBitmap; dstRect : BRect); + procedure DrawChar(aChar : char); + procedure DrawChar(aChar : char ; location : BPoint); + procedure DrawString(aString : PChar; delta : escapement_delta); + procedure DrawString(aString : PChar; location : BPoint; delta : escapement_delta); + procedure DrawString(aString : PChar; length : integer; delta : escapement_delta); + procedure DrawString(aString : PChar; length : integer; location : BPoint; delta : escapement_delta); + + procedure SetFont(font : BFont; mask : Integer); + procedure GetFont(var font : BFont); + function StringWidth(string1 : PChar) : double; + function StringWidth(string1 : PChar; length : integer) : double; + procedure GetStringWidths(stringArray : PChar; lengthArray : integer; numStrings : integer; widthArray : double); + + procedure SetFontSize(size : double); + procedure ForceFontAliasing(enable : boolean); + procedure GetFontHeight(height : font_height); + procedure Invalidate(invalRect : BRect); + procedure Invalidate(invalRegion : BRegion); + procedure Invalidate; + + procedure SetDiskMode(filename : PChar; offset : integer); + procedure BeginPicture(a_picture : BPicture); + procedure AppendToPicture(a_picture : BPicture); + function EndPicture : BPicture; + procedure DrawPicture(a_picture : BPicture); + procedure DrawPicture(a_picture : BPicture; where : BPoint); + procedure DrawPicture(filename : PChar; offset : integer; where : BPoint); + procedure DrawPictureAsync(a_picture : BPicture); + procedure DrawPictureAsync(a_picture : BPicture; where : BPoint); + procedure DrawPictureAsync(filename : PChar; offset : integer; where : BPoint); + function SetEventMask(mask : Integer; options : Integer) : status_t; + function EventMask : Integer; + function SetMouseEventMask(mask : Integer; options :Integer ) : status_t; + procedure SetFlags(flags1 :Integer ); + function GetFlags : Integer; + procedure SetResizingMode(mode : Integer); + function ResizingMode : Integer; + procedure MoveBy(dh : double; dv : double); + procedure MoveTo(where : BPoint); + procedure MoveTo(x : double; y : double); + procedure ResizeBy(dh : double; dv : double); + procedure ResizeTo(width : double; height : double); + procedure ScrollBy(dh : double; dv : double); +// procedure ScrollTo(x : double; y : double); + procedure ScrollTo(where : BPoint); + procedure MakeFocus(focusState : boolean); + function IsFocus : boolean; procedure Show; procedure Hide; - function IsHidden : Boolean; + function IsHidden : boolean; + function IsHidden(looking_from : BView) : boolean; + procedure Flush; + procedure Sync; + procedure GetPreferredSize(width : double; height : double); virtual; + procedure ResizeToPreferred; virtual; +// function ScrollBar(posture : orientation) : BScrollBar; + function ResolveSpecifier(msg : BMessage; index : integer; specifier : BMessage; form : integer; properti : PChar) : BHandler; + function GetSupportedSuites(data : BMessage) : status_t; + function IsPrinting : boolean; + procedure SetScale(scale : double); end; function BView_Create(AObject : TObject; frame : TCPlusObject; name : PChar; @@ -80,9 +236,175 @@ function BView_ChildAt(CPlusObject : TCPlusObject; index : integer) : TCPlusObje function BView_Window(CPlusObject : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BView_Window'; procedure BView_Draw(CPlusObject : TCPlusObject; aRect : TCPlusObject); cdecl; external BePascalLibName name 'BView_Draw'; procedure BView_SeBViewColor(CPlusObject : TCPlusObject; c : RGB_color); cdecl; external BePascalLibName name 'BView_SetViewColor'; -procedure BView_Show(CPlusObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_Show'; -procedure BView_Hide(CPlusObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_Hide'; -function BView_IsHidden(CPlusObject : TCPlusObject) : Boolean; cdecl; external BePascalLibName name 'BView_IsHidden'; + +procedure BView_ConvertToScreen(CPlusObject : TCPlusObject; var pt :BPoint) ; cdecl; external BePascalLibName name 'BView_ConvertToScreen'; +function BView_ConvertToScreen_1(CPlusObject : TCPlusObject; pt :BPoint ) : BPoint; cdecl; external BePascalLibName name 'BView_ConvertToScreen_1'; +procedure BView_ConvertFromScreen(CPlusObject : TCPlusObject; var pt :BPoint) ; cdecl; external BePascalLibName name 'BView_ConvertFromScreen'; +function BView_ConvertFromScreen_1(CPlusObject : TCPlusObject; pt :BPoint) : BPoint; cdecl; external BePascalLibName name 'BView_ConvertFromScreen_1'; +procedure BView_ConvertToScreen(CPlusObject : TCPlusObject; var r :BRect) ; cdecl; external BePascalLibName name 'BView_ConvertToScreen_r'; +function BView_ConvertToScreen_1(CPlusObject : TCPlusObject; r :BRect) : BRect; cdecl; external BePascalLibName name 'BView_ConvertToScreen_r_1'; +procedure BView_ConvertFromScreen(CPlusObject : TCPlusObject; var r :BRect) ; cdecl; external BePascalLibName name 'BView_ConvertFromScreen'; +function BView_ConvertFromScreen_1(CPlusObject : TCPlusObject; r :BRect) :Brect; cdecl; external BePascalLibName name 'BView_ConvertFromScreen_1'; +procedure BView_ConvertToParent(CPlusObject : TCPlusObject; var pt :BPoint) ; cdecl; external BePascalLibName name 'BView_ConvertToParent'; +function BView_ConvertToParent_1(CPlusObject : TCPlusObject; pt :BPoint) :BPoint; cdecl; external BePascalLibName name 'BView_ConvertToParent_1'; +procedure BView_ConvertFromParent(CPlusObject : TCPlusObject; var pt :BPoint) ; cdecl; external BePascalLibName name 'BView_ConvertFromParent'; +function BView_ConvertFromParent_1(CPlusObject : TCPlusObject; pt :BPoint ) :Bpoint; cdecl; external BePascalLibName name 'BView_ConvertFromParent_1'; +procedure BView_ConvertToParent(CPlusObject : TCPlusObject; var r :BRect) ; cdecl; external BePascalLibName name 'BView_ConvertToParent_r'; +function BView_ConvertToParent_1(CPlusObject : TCPlusObject; r:BRect ) :Brect; cdecl; external BePascalLibName name 'BView_ConvertToParent_r_1'; +procedure BView_ConvertFromParent(CPlusObject : TCPlusObject; var r :BRect ) ; cdecl; external BePascalLibName name 'BView_ConvertFromParent_r'; +function BView_ConvertFromParent_1(CPlusObject : TCPlusObject; r : BRect) :BRect; cdecl; external BePascalLibName name 'BView_ConvertFromParent_r_1'; +function BView_LeftTop(CPlusObject : TCPlusObject) :BPoint; cdecl; external BePascalLibName name 'BView_LeftTop'; + +procedure BView_BeginRectTracking(AObject : TCPlusObject; startRect : TCPlusObject; style : Integer); cdecl; external BePascalLibName name 'BView_BeginRectTracking'; +procedure BView_EndRectTracking(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_EndRectTracking'; +procedure BView_GetMouse( AObject : TCPlusObject; var location : TCPlusObject; var buttons : Integer ; checkMessageQueue : boolean); cdecl; external BePascalLibName name 'BView_GetMouse'; +procedure BView_DragMessage(AObject : TCPlusObject; aMessage : TCPlusObject; dragRect : TCPlusObject; reply_to : TCPlusObject); cdecl; external BePascalLibName name 'BView_DragMessage'; +procedure BView_DragMessage(AObject : TCPlusObject; aMessage : TCPlusObject; anImage : TCPlusObject; offset : TCPlusObject; reply_to : TCPlusObject); cdecl; external BePascalLibName name 'BView_DragMessage'; +procedure BView_DragMessage(AObject : TCPlusObject; aMessage : TCPlusObject; anImage : TCPlusObject; dragMode : Drawing_Mode; offset : TCPlusObject; reply_to : TCPlusObject); cdecl; external BePascalLibName name 'BView_DragMessage'; +function BView_FindView(AObject : TCPlusObject; name : PChar) : BView; cdecl; external BePascalLibName name 'BView_FindView'; +function BView_Parent(AObject : TCPlusObject) : BView; cdecl; external BePascalLibName name 'BView_Parent'; +function BView_Bounds(AObject : TCPlusObject) : BRect; cdecl; external BePascalLibName name 'BView_Bounds'; +function BView_Frame(AObject : TCPlusObject) : BRect; cdecl; external BePascalLibName name 'BView_Frame'; +procedure BView_GetClippingRegion(AObject : TCPlusObject; region : TCPlusObject); cdecl; external BePascalLibName name 'BView_GetClippingRegion'; +procedure BView_ConstrainClippingRegion(AObject : TCPlusObject; region : TCPlusObject); cdecl; external BePascalLibName name 'BView_ConstrainClippingRegion'; + +procedure BView_ClipToPicture(AObject : TCPlusObject; picture : TCPlusObject; where : TCPlusObject; sync : boolean); cdecl; external BePascalLibName name 'BView_ClipToPicture'; +procedure BView_ClipToInversePicture(AObject : TCPlusObject; picture : TCPlusObject; where : TCPlusObject; sync : boolean); cdecl; external BePascalLibName name 'BView_ClipToInversePicture'; +procedure BView_SetDrawingMode(AObject : TCPlusObject; mode : Drawing_Mode); cdecl; external BePascalLibName name 'BView_SetDrawingMode'; +function BView_DrawingMode(AObject : TCPlusObject) : Drawing_Mode; cdecl; external BePascalLibName name 'BView_DrawingMode'; +procedure BView_SetBlendingMode(AObject : TCPlusObject; srcAlpha : source_alpha; alphaFunc : Alpha_Function); cdecl; external BePascalLibName name 'BView_SetBlendingMode'; +procedure BView_GetBlendingMode(AObject : TCPlusObject; srcAlpha : source_alpha; alphaFunc : Alpha_Function); cdecl; external BePascalLibName name 'BView_GetBlendingMode'; +procedure BView_SetPenSize(AObject : TCPlusObject; size : double); cdecl; external BePascalLibName name 'BView_SetPenSize'; +function BView_PenSize(AObject : TCPlusObject) : double; cdecl; external BePascalLibName name 'BView_PenSize'; +procedure BView_SetViewCursor(AObject : TCPlusObject; cursor : BCursor; sync : boolean); cdecl; external BePascalLibName name 'BView_SetViewCursor'; +procedure BView_SetViewColor(AObject : TCPlusObject; c : rgb_color); cdecl; external BePascalLibName name 'BView_SetViewColor'; +//procedure BView_SetViewColor(AObject : TCPlusObject; r : byte; g :byte ; b :byte ; a :byte ); cdecl; external BePascalLibName name 'BView_SetViewColor_1'; +function BView_ViewColor(AObject : TCPlusObject) : rgb_color; cdecl; external BePascalLibName name 'BView_ViewColor'; +procedure BView_ClearViewBitmap(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_ClearViewBitmap'; +procedure BView_ClearViewOverlay(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_ClearViewOverlay'; +procedure BView_SetHighColor(AObject : TCPlusObject; a_color : rgb_color); cdecl; external BePascalLibName name 'BView_SetHighColor'; +procedure BView_SetHighColor(AObject : TCPlusObject; r : byte; g : byte; b : byte; a : byte); cdecl; external BePascalLibName name 'BView_SetHighColor'; +function BView_HighColor(AObject : TCPlusObject) : rgb_color; cdecl; external BePascalLibName name 'BView_HighColor'; +procedure BView_SetLowColor(AObject : TCPlusObject; a_color : rgb_color); cdecl; external BePascalLibName name 'BView_SetLowColor'; +procedure BView_SetLowColor(AObject : TCPlusObject; r : byte; g :byte ; b : byte; a : byte); cdecl; external BePascalLibName name 'BView_SetLowColor'; +function BView_LowColor(AObject : TCPlusObject) : rgb_color; cdecl; external BePascalLibName name 'BView_LowColor'; +procedure BView_SetLineMode(AObject : TCPlusObject; lineCap : cap_mode; lineJoin : join_mode; miterLimit : double); cdecl; external BePascalLibName name 'BView_SetLineMode'; +function BView_LineJoinMode(AObject : TCPlusObject) : join_mode; cdecl; external BePascalLibName name 'BView_LineJoinMode'; +function BView_LineCapMode(AObject : TCPlusObject) : cap_mode; cdecl; external BePascalLibName name 'BView_LineCapMode'; +function BView_LineMiterLimit(AObject : TCPlusObject) : double; cdecl; external BePascalLibName name 'BView_LineMiterLimit'; +procedure BView_SetOrigin(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BView_SetOrigin'; +procedure BView_SetOrigin(AObject : TCPlusObject; x : double; y : double); cdecl; external BePascalLibName name 'BView_SetOrigin_1'; +function BView_Origin(AObject : TCPlusObject) : BPoint; cdecl; external BePascalLibName name 'BView_Origin'; +procedure BView_PushState(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_PushState'; +procedure BView_PopState(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_PopState'; +procedure BView_MovePenTo(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BView_MovePenTo'; +procedure BView_MovePenTo(AObject : TCPlusObject; x : double; y : double); cdecl; external BePascalLibName name 'BView_MovePenTo_1'; +procedure BView_MovePenBy(AObject : TCPlusObject; x : double; y : double); cdecl; external BePascalLibName name 'BView_MovePenBy'; +function BView_PenLocation(AObject : TCPlusObject) : BPoint; cdecl; external BePascalLibName name 'BView_PenLocation'; +procedure BView_StrokeLine(AObject : TCPlusObject; toPt : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_StrokeLine'; +procedure BView_StrokeLine(AObject : TCPlusObject; pt0 : TCPlusObject; pt1 : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_StrokeLine_1'; +procedure BView_BeginLineArray(AObject : TCPlusObject; count : integer); cdecl; external BePascalLibName name 'BView_BeginLineArray'; +procedure BView_AddLine(AObject : TCPlusObject; pt0 : TCPlusObject; pt1 : TCPlusObject; col : rgb_color); cdecl; external BePascalLibName name 'BView_AddLine'; +procedure BView_EndLineArray(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_EndLineArray'; +procedure BView_StrokePolygon(AObject : TCPlusObject; aPolygon : BPolygon; closed : boolean; p : pattern); cdecl; external BePascalLibName name 'BView_StrokePolygon'; +procedure BView_StrokePolygon(AObject : TCPlusObject; ptArray : BPoint; numPts : integer; closed : boolean; p : pattern); cdecl; external BePascalLibName name 'BView_StrokePolygon_1'; +procedure BView_StrokePolygon(AObject : TCPlusObject; ptArray : BPoint; numPts : integer; bounds : TCPlusObject; closed : boolean; p : pattern); cdecl; external BePascalLibName name 'BView_StrokePolygon_2'; +procedure BView_FillPolygon(AObject : TCPlusObject; aPolygon : BPolygon; p : pattern); cdecl; external BePascalLibName name 'BView_FillPolygon'; +procedure BView_FillPolygon(AObject : TCPlusObject; ptArray : BPoint; numPts : integer; p : pattern); cdecl; external BePascalLibName name 'BView_FillPolygon_1'; +procedure BView_FillPolygon(AObject : TCPlusObject; ptArray : BPoint; numPts : integer; bounds : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_FillPolygon_2'; +procedure BView_StrokeTriangle(AObject : TCPlusObject; pt1 : TCPlusObject; pt2 : TCPlusObject; pt3 : TCPlusObject; bounds : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_StrokeTriangle'; +procedure BView_StrokeTriangle(AObject : TCPlusObject; pt1 : TCPlusObject; pt2 : TCPlusObject; pt3 : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_StrokeTriangle_1'; +procedure BView_FillTriangle(AObject : TCPlusObject; pt1 : TCPlusObject; pt2 : TCPlusObject; pt3 : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_FillTriangle'; +procedure BView_FillTriangle(AObject : TCPlusObject; pt1 : TCPlusObject; pt2 : TCPlusObject; pt3 : TCPlusObject; bounds : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_FillTriangle_1'; +procedure BView_StrokeRect(AObject : TCPlusObject; r : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_StrokeRect'; +procedure BView_FillRect(AObject : TCPlusObject; r : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_FillRect'; +procedure BView_FillRegion(AObject : TCPlusObject; a_region : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_FillRegion'; +procedure BView_InvertRect(AObject : TCPlusObject; r : TCPlusObject); cdecl; external BePascalLibName name 'BView_InvertRect'; +procedure BView_StrokeRoundRect(AObject : TCPlusObject; r : TCPlusObject; xRadius : double; yRadius : double; p : pattern); cdecl; external BePascalLibName name 'BView_StrokeRoundRect'; +procedure BView_FillRoundRect(AObject : TCPlusObject; r : TCPlusObject; xRadius : double; yRadius : double; p : pattern); cdecl; external BePascalLibName name 'BView_FillRoundRect'; +procedure BView_StrokeEllipse(AObject : TCPlusObject; center : TCPlusObject; xRadius : double; yRadius : double; p : pattern); cdecl; external BePascalLibName name 'BView_StrokeEllipse'; +procedure BView_StrokeEllipse(AObject : TCPlusObject; r : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_StrokeEllipse_1'; +procedure BView_FillEllipse(AObject : TCPlusObject; center : TCPlusObject; xRadius : double; yRadius : double; p : pattern); cdecl; external BePascalLibName name 'BView_FillEllipse'; +procedure BView_FillEllipse(AObject : TCPlusObject; r : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_FillEllipse_1'; +procedure BView_StrokeArc(AObject : TCPlusObject; center : TCPlusObject; xRadius : double; yRadius : double; start_angle : double; arc_angle : double; p : pattern); cdecl; external BePascalLibName name 'BView_StrokeArc'; +procedure BView_StrokeArc(AObject : TCPlusObject; r : TCPlusObject; start_angle : double; arc_angle : double; p : pattern); cdecl; external BePascalLibName name 'BView_StrokeArc_1'; +procedure BView_FillArc(AObject : TCPlusObject; center : TCPlusObject; xRadius : double; yRadius : double; start_angle : double; arc_angle : double; p : pattern); cdecl; external BePascalLibName name 'BView_FillArc'; +procedure BView_FillArc(AObject : TCPlusObject; r : TCPlusObject; start_angle : double; arc_angle : double; p : pattern); cdecl; external BePascalLibName name 'BView_FillArc_1'; +procedure BView_StrokeBezier(AObject : TCPlusObject; controlPoints : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_StrokeBezier'; +procedure BView_FillBezier(AObject : TCPlusObject; controlPoints : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_FillBezier'; +procedure BView_StrokeShape(AObject : TCPlusObject; shape : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_StrokeShape'; +procedure BView_FillShape(AObject : TCPlusObject; shape : TCPlusObject; p : pattern); cdecl; external BePascalLibName name 'BView_FillShape'; +procedure BView_CopyBits(AObject : TCPlusObject; src : TCPlusObject; dst : TCPlusObject); cdecl; external BePascalLibName name 'BView_CopyBits'; +procedure BView_DrawBitmapAsync(AObject : TCPlusObject; aBitmap : BBitmap; srcRect : TCPlusObject; dstRect : TCPlusObject); cdecl; external BePascalLibName name 'BView_DrawBitmapAsync'; +procedure BView_DrawBitmapAsync(AObject : TCPlusObject; aBitmap : BBitmap); cdecl; external BePascalLibName name 'BView_DrawBitmapAsync_1'; +procedure BView_DrawBitmapAsync(AObject : TCPlusObject; aBitmap : BBitmap; where : TCPlusObject); cdecl; external BePascalLibName name 'BView_DrawBitmapAsync_2'; +//procedure BView_DrawBitmapAsync(AObject : TCPlusObject; aBitmap : BBitmap; dstRect : TCPlusObject); cdecl; external BePascalLibName name 'BView_DrawBitmapAsync_3'; +procedure BView_DrawBitmap(AObject : TCPlusObject; aBitmap : BBitmap; srcRect : TCPlusObject; dstRect : TCPlusObject); cdecl; external BePascalLibName name 'BView_DrawBitmap'; +procedure BView_DrawBitmap(AObject : TCPlusObject; aBitmap : BBitmap); cdecl; external BePascalLibName name 'BView_DrawBitmap_1'; +procedure BView_DrawBitmap(AObject : TCPlusObject; aBitmap : BBitmap; where : TCPlusObject); cdecl; external BePascalLibName name 'BView_DrawBitmap_2'; +//procedure BView_DrawBitmap(AObject : TCPlusObject; aBitmap : BBitmap; dstRect : TCPlusObject); cdecl; external BePascalLibName name 'BView_DrawBitmap_3'; +procedure BView_DrawChar(AObject : TCPlusObject; aChar : char); cdecl; external BePascalLibName name 'BView_DrawChar'; +procedure BView_DrawChar(AObject : TCPlusObject; aChar : char; location : TCPlusObject); cdecl; external BePascalLibName name 'BView_DrawChar_1'; +procedure BView_DrawString(AObject : TCPlusObject; aString : PChar; delta : escapement_delta); cdecl; external BePascalLibName name 'BView_DrawString'; +procedure BView_DrawString(AObject : TCPlusObject; aString : PChar; location : TCPlusObject; delta : escapement_delta); cdecl; external BePascalLibName name 'BView_DrawString_1'; +procedure BView_DrawString(AObject : TCPlusObject; aString : PChar; length : integer; delta : escapement_delta); cdecl; external BePascalLibName name 'BView_DrawString_2'; +procedure BView_DrawString(AObject : TCPlusObject; aString : PChar; length : integer; location : TCPlusObject; delta : escapement_delta); cdecl; external BePascalLibName name 'BView_DrawString_3'; + +procedure BView_SetFont(AObject : TCPlusObject; font : BFont; mask : Integer); cdecl; external BePascalLibName name 'BView_SetFont'; +procedure BView_GetFont(AObject : TCPlusObject; var font : TCPlusObject); cdecl; external BePascalLibName name 'BView_GetFont'; +//procedure BView_GetFont(AObject : TCPlusObject; font : TCPlusObject); cdecl; external BePascalLibName name 'BView_GetFont_1'; +function BView_StringWidth(AObject : TCPlusObject; string1 : PChar) : double; cdecl; external BePascalLibName name 'BView_StringWidth'; +function BView_StringWidth(AObject : TCPlusObject; string1 : PChar; length : integer) : double; cdecl; external BePascalLibName name 'BView_StringWidth_1'; +procedure BView_GetStringWidths(AObject : TCPlusObject; stringArray : PChar; lengthArray : integer; numStrings : integer; widthArray : double); cdecl; external BePascalLibName name 'BView_GetStringWidths'; +procedure BView_SetFontSize(AObject : TCPlusObject; size : double); cdecl; external BePascalLibName name 'BView_SetFontSize'; +procedure BView_ForceFontAliasing(AObject : TCPlusObject; enable : boolean); cdecl; external BePascalLibName name 'BView_ForceFontAliasing'; +procedure BView_GetFontHeight(AObject : TCPlusObject; height : font_height); cdecl; external BePascalLibName name 'BView_GetFontHeight'; +procedure BView_Invalidate(AObject : TCPlusObject; invalRect : TCPlusObject); cdecl; external BePascalLibName name 'BView_Invalidate'; +procedure BView_Invalidate(AObject : TCPlusObject; invalRegion : BRegion); cdecl; external BePascalLibName name 'BView_Invalidate_1'; +procedure BView_Invalidate(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_Invalidate_2'; + +procedure BView_SetDiskMode(AObject : TCPlusObject; filename : PChar; offset : integer); cdecl; external BePascalLibName name 'BView_SetDiskMode'; +procedure BView_BeginPicture(AObject : TCPlusObject; a_picture : TCPlusObject); cdecl; external BePascalLibName name 'BView_BeginPicture'; +procedure BView_AppendToPicture(AObject : TCPlusObject; a_picture : TCPlusObject); cdecl; external BePascalLibName name 'BView_AppendToPicture'; +function BView_EndPicture(AObject : TCPlusObject) : BPicture; cdecl; external BePascalLibName name 'BView_EndPicture'; +procedure BView_DrawPicture(AObject : TCPlusObject; a_picture : BPicture); cdecl; external BePascalLibName name 'BView_DrawPicture'; +procedure BView_DrawPicture(AObject : TCPlusObject; a_picture : BPicture; where : TCPlusObject); cdecl; external BePascalLibName name 'BView_DrawPicture_1'; +procedure BView_DrawPicture(AObject : TCPlusObject; filename : PChar; offset : integer; where : TCPlusObject); cdecl; external BePascalLibName name 'BView_DrawPicture_2'; +procedure BView_DrawPictureAsync(AObject : TCPlusObject; a_picture : BPicture); cdecl; external BePascalLibName name 'BView_DrawPictureAsync_3'; +procedure BView_DrawPictureAsync(AObject : TCPlusObject; a_picture : BPicture; where : TCPlusObject); cdecl; external BePascalLibName name 'BView_DrawPictureAsync_4'; +procedure BView_DrawPictureAsync(AObject : TCPlusObject; filename : PChar; offset : integer; where : TCPlusObject); cdecl; external BePascalLibName name 'BView_DrawPictureAsync_5'; +function BView_SetEventMask(AObject : TCPlusObject; mask : integer; options : integer) : status_t; cdecl; external BePascalLibName name 'BView_SetEventMask'; +function BView_EventMask(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BView_EventMask'; +function BView_SetMouseEventMask(AObject : TCPlusObject; mask :integer ; options : integer) : status_t; cdecl; external BePascalLibName name 'BView_SetMouseEventMask'; +procedure BView_SetFlags(AObject : TCPlusObject; flags : integer); cdecl; external BePascalLibName name 'BView_SetFlags'; +function BView_Flags(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BView_Flags'; +procedure BView_SetResizingMode(AObject : TCPlusObject; mode : integer); cdecl; external BePascalLibName name 'BView_SetResizingMode'; +function BView_ResizingMode(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BView_ResizingMode'; +procedure BView_MoveBy(AObject : TCPlusObject; dh : double; dv : double); cdecl; external BePascalLibName name 'BView_MoveBy'; +procedure BView_MoveTo(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BView_MoveTo'; +procedure BView_MoveTo(AObject : TCPlusObject; x : double; y : double); cdecl; external BePascalLibName name 'BView_MoveTo_1'; +procedure BView_ResizeBy(AObject : TCPlusObject; dh : double; dv : double); cdecl; external BePascalLibName name 'BView_ResizeBy'; +procedure BView_ResizeTo(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BView_ResizeTo'; +procedure BView_ScrollBy(AObject : TCPlusObject; dh : double; dv : double); cdecl; external BePascalLibName name 'BView_ScrollBy'; +//procedure BView_ScrollTo(AObject : TCPlusObject; x : double; y : double); cdecl; external BePascalLibName name 'BView_ScrollTo'; +procedure BView_ScrollTo(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BView_ScrollTo'; +procedure BView_MakeFocus(AObject : TCPlusObject; focusState : boolean); cdecl; external BePascalLibName name 'BView_MakeFocus'; +function BView_IsFocus(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BView_IsFocus'; +procedure BView_Show(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_Show'; +procedure BView_Hide(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_Hide'; +function BView_IsHidden(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BView_IsHidden'; +function BView_IsHidden(AObject : TCPlusObject; looking_from : BView) : boolean; cdecl; external BePascalLibName name 'BView_IsHidden_1'; +procedure BView_Flush(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_Flush'; +procedure BView_Sync(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_Sync'; +procedure BView_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BView_GetPreferredSize'; +procedure BView_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_ResizeToPreferred'; +//function BView_ScrollBar(AObject : TCPlusObject; posture : orientation) : BScrollBar; cdecl; external BePascalLibName name 'BView_ScrollBar'; +function BView_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : BHandler; cdecl; external BePascalLibName name 'BView_ResolveSpecifier'; +function BView_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : status_t; cdecl; external BePascalLibName name 'BView_GetSupportedSuites'; +function BView_IsPrinting(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BView_IsPrinting'; +procedure BView_SetScale(AObject : TCPlusObject; scale : double); cdecl; external BePascalLibName name 'BView_SetScale'; + + var // resizingMode mask @@ -125,7 +447,6 @@ const B_FONT_ALL = 255; implementation - var View_AllAttached_hook : Pointer; cvar; external; View_AllDetached_hook : Pointer; cvar; external; @@ -168,10 +489,10 @@ var View_WindowActivated_hook} -constructor BView.Create(frame : BRect; name : PChar; resizingMode, flags : Cardinal); +constructor BView.Create(frame1 : BRect; name : PChar; resizingMode1, flags1 : Cardinal); begin inherited Create; - CPlusObject := BView_Create(Self, frame.CPlusObject, name, resizingMode, flags); + CPlusObject := BView_Create(Self, frame1.CPlusObject, name, resizingMode1, flags1); end; destructor BView.Destroy; @@ -215,13 +536,7 @@ procedure BView.FrameResized(width, height : double); begin end; -procedure BView.GetPreferredSize(var width : double; var height : double); -begin -end; -procedure BView.ResizeToPreferred; -begin -end; procedure BView.KeyDown(bytes : PChar; numBytes : integer); begin @@ -308,21 +623,775 @@ begin BView_SeBViewColor(Self.CPlusObject, rgb_color); end; + + +function BView.ConvertToScreen(pt :BPoint ) : BPoint; +begin + result:=BView_ConvertToScreen_1(Self.CPlusObject, pt); +End; + +function BView.ConvertFromScreen(pt :BPoint) : BPoint; +begin + result:=BView_ConvertFromScreen_1(Self.CPlusObject, pt); +End; +function BView.ConvertToScreen(r :BRect) : BRect; +begin + result:=BView_ConvertToScreen_1(Self.CPlusObject, r); +End; +function BView.ConvertFromScreen( r :BRect) :Brect; +begin + result:=BView_ConvertFromScreen_1(Self.CPlusObject, r); +End; +function BView.ConvertToParent(pt :BPoint) :BPoint; +begin + result:=BView_ConvertToParent_1(Self.CPlusObject, pt); +End; +function BView.ConvertFromParent(pt :BPoint ) :Bpoint; +begin + result:=BView_ConvertFromParent_1(Self.CPlusObject, pt); +End; +function BView.ConvertToParent(r:BRect ) :Brect; +begin + result:=BView_ConvertToParent_1(Self.CPlusObject, r); +End; +function BView.ConvertFromParent( r : BRect) :BRect; +begin + result:=BView_ConvertFromParent_1(Self.CPlusObject, r); +End; +function BView.LeftTop :BPoint; +begin + result:=BView_LeftTop(Self.CPlusObject); +End; + + +procedure BView.SetOrigin(pt : BPoint); +begin + BView_SetOrigin(CPlusObject, pt.CPlusObject); +end; + +procedure BView.SetOrigin(x : double; y : double); +begin + BView_SetOrigin(CPlusObject, x, y); +end; + +procedure BView.SetFont(font : BFont; mask : Integer); +begin + BView_SetFont(CPlusObject, font, mask); +end; + +procedure BView.GetFont(var font : BFont); +begin + // BView_GetFont(CPlusObject, font.CPlusObject); +end; + + + + +function BView.StringWidth(string1 : PChar) : double; +begin + Result := BView_StringWidth(CPlusObject, string1); +end; + +function BView.StringWidth(string1 : PChar; length : integer) : double; +begin + Result := BView_StringWidth(CPlusObject, string1, length); +end; + +procedure BView.GetStringWidths(stringArray : PChar; lengthArray : integer; numStrings : integer; widthArray : double); +begin + BView_GetStringWidths(CPlusObject, stringArray, lengthArray, numStrings, widthArray); +end; + +procedure BView.SetFontSize(size : double); +begin + BView_SetFontSize(CPlusObject, size); +end; + +procedure BView.ForceFontAliasing(enable : boolean); +begin + BView_ForceFontAliasing(CPlusObject, enable); +end; + +procedure BView.GetFontHeight(height : font_height); +begin + BView_GetFontHeight(CPlusObject, height); +end; + +procedure BView.Invalidate(invalRect : BRect); +begin + BView_Invalidate(CPlusObject, invalRect.CPlusObject); +end; + +procedure BView.Invalidate(invalRegion : BRegion); +begin + BView_Invalidate(CPlusObject, invalRegion); +end; + +procedure BView.Invalidate; +begin + BView_Invalidate(CPlusObject); +end; + +procedure BView.SetDiskMode(filename : PChar; offset : integer); +begin + BView_SetDiskMode(CPlusObject, filename, offset); +end; + +procedure BView.BeginPicture(a_picture : BPicture); +begin + BView_BeginPicture(CPlusObject, a_picture.CPlusObject); +end; + +procedure BView.AppendToPicture(a_picture : BPicture); +begin + BView_AppendToPicture(CPlusObject, a_picture.CPlusObject); +end; + +function BView.EndPicture : BPicture; +begin + Result := BView_EndPicture(CPlusObject); +end; + +procedure BView.DrawPicture(a_picture : BPicture); +begin + BView_DrawPicture(CPlusObject, a_picture); +end; + +procedure BView.DrawPicture(a_picture : BPicture; where : BPoint); +begin + BView_DrawPicture(CPlusObject, a_picture, where.CPlusObject); +end; + +procedure BView.DrawPicture(filename : PChar; offset : integer; where : BPoint); +begin + BView_DrawPicture(CPlusObject, filename, offset, where.CPlusObject); +end; + +procedure BView.DrawPictureAsync(a_picture : BPicture); +begin + BView_DrawPictureAsync(CPlusObject, a_picture); +end; + +procedure BView.DrawPictureAsync(a_picture : BPicture; where : BPoint); +begin + BView_DrawPictureAsync(CPlusObject, a_picture, where.CPlusObject); +end; + +procedure BView.DrawPictureAsync(filename : PChar; offset : integer; where : BPoint); +begin + BView_DrawPictureAsync(CPlusObject, filename, offset, where.CPlusObject); +end; + +function BView.SetEventMask(mask : integer; options : integer) : status_t; +begin + Result := BView_SetEventMask(CPlusObject, mask, options); +end; + +function BView.EventMask :integer ; +begin + Result := BView_EventMask(CPlusObject); +end; + +function BView.SetMouseEventMask(mask : integer; options : integer) : status_t; +begin + Result := BView_SetMouseEventMask(CPlusObject, mask, options); +end; + +procedure BView.SetFlags(flags1 : integer); +begin + BView_SetFlags(CPlusObject, flags1); +end; + +function BView.getFlags : integer; +begin + // Result := BView_Flags(CPlusObject); +end; + +procedure BView.SetResizingMode(mode :integer ); +begin + BView_SetResizingMode(CPlusObject, mode); +end; + +function BView.ResizingMode : integer; +begin + Result := BView_ResizingMode(CPlusObject); +end; + +procedure BView.MoveBy(dh : double; dv : double); +begin + BView_MoveBy(CPlusObject, dh, dv); +end; + +procedure BView.MoveTo(where : BPoint); +begin + BView_MoveTo(CPlusObject, where.CPlusObject); +end; + +procedure BView.MoveTo(x : double; y : double); +begin + BView_MoveTo(CPlusObject, x, y); +end; + +procedure BView.ResizeBy(dh : double; dv : double); +begin + BView_ResizeBy(CPlusObject, dh, dv); +end; + +procedure BView.ResizeTo(width : double; height : double); +begin + BView_ResizeTo(CPlusObject, width, height); +end; + +procedure BView.ScrollBy(dh : double; dv : double); +begin + BView_ScrollBy(CPlusObject, dh, dv); +end; + +{procedure BView.ScrollTo(x : double; y : double); +begin + BView_ScrollTo(CPlusObject, x, y); +end; +} +procedure BView.ScrollTo(where : BPoint); +begin + BView_ScrollTo(CPlusObject, where.CPlusObject); +end; + +procedure BView.MakeFocus(focusState : boolean); +begin + BView_MakeFocus(CPlusObject, focusState); +end; + +function BView.IsFocus : boolean; +begin + Result := BView_IsFocus(CPlusObject); +end; + procedure BView.Show; begin - BView_Show(Self.CPlusObject); + BView_Show(CPlusObject); end; procedure BView.Hide; begin - BView_Hide(Self.CPlusObject); + BView_Hide(CPlusObject); end; -function BView.IsHidden : Boolean; +function BView.IsHidden : boolean; begin - Result:=BView_IsHidden(Self.CPlusObject); + Result := BView_IsHidden(CPlusObject); end; +function BView.IsHidden(looking_from : BView) : boolean; +begin + Result := BView_IsHidden(CPlusObject, looking_from); +end; + +procedure BView.Flush; +begin + BView_Flush(CPlusObject); +end; + +procedure BView.Sync; +begin + BView_Sync(CPlusObject); +end; + +procedure BView.GetPreferredSize(width : double; height : double); +begin + BView_GetPreferredSize(CPlusObject, width, height); +end; + +procedure BView.ResizeToPreferred; +begin + BView_ResizeToPreferred(CPlusObject); +end; + +{function BView.ScrollBar(posture : orientation) : BScrollBar; +begin + Result := BView_ScrollBar(CPlusObject, posture); +end; +} +function BView.ResolveSpecifier(msg : BMessage; index : integer; specifier : BMessage; form : integer; properti : PChar) : BHandler; +begin + Result := BView_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti); +end; + +function BView.GetSupportedSuites(data : BMessage) : status_t; +begin + Result := BView_GetSupportedSuites(CPlusObject, data.CPlusObject); +end; + +function BView.IsPrinting : boolean; +begin + Result := BView_IsPrinting(CPlusObject); +end; + +procedure BView.SetScale(scale : double); +begin + BView_SetScale(CPlusObject, scale); +end; + +procedure BView.BeginRectTracking(startRect : BRect; style : Integer); +begin + BView_BeginRectTracking(CPlusObject, startRect.CPlusObject, style); +end; + +procedure BView.EndRectTracking; +begin + BView_EndRectTracking(CPlusObject); +end; + +procedure BView.GetMouse(var location : BPoint; var buttons : Integer ; checkMessageQueue : boolean); +begin +// BView_GetMouse(CPlusObject, location.CPlusObject, buttons, checkMessageQueue); +end; + +procedure BView.DragMessage(aMessage : BMessage; dragRect : BRect; reply_to : BHandler); +begin + BView_DragMessage(CPlusObject, aMessage.CPlusObject, dragRect.CPlusObject, reply_to.CPlusObject); +end; + +procedure BView.DragMessage(aMessage : BMessage; anImage : BBitmap; offset : BPoint; reply_to : BHandler); +begin + BView_DragMessage(CPlusObject, aMessage.CPlusObject, anImage.CPlusObject, offset.CPlusObject, reply_to.CPlusObject); +end; + +procedure BView.DragMessage(aMessage : BMessage; anImage : BBitmap; dragMode : Drawing_Mode; offset : BPoint; reply_to : BHandler); +begin + BView_DragMessage(CPlusObject, aMessage.CPlusObject, anImage.CPlusObject, dragMode, offset.CPlusObject, reply_to.CPlusObject); +end; + +function BView.FindView(name : PChar) : BView; +begin + Result := BView_FindView(CPlusObject, name); +end; + +function BView.Parent : BView; +begin + Result := BView_Parent(CPlusObject); +end; + +function BView.Bounds : BRect; +begin + Result := BView_Bounds(CPlusObject); +end; + +function BView.Frame : BRect; +begin + Result := BView_Frame(CPlusObject); +end; + + + + +procedure BView.GetClippingRegion(region : BRegion); +begin + BView_GetClippingRegion(CPlusObject, region.CPlusObject); +end; + +procedure BView.ConstrainClippingRegion(region : BRegion); +begin + BView_ConstrainClippingRegion(CPlusObject, region.CPlusObject); +end; + +procedure BView.ClipToPicture(picture : BPicture; where : BPoint; ssync : boolean); +begin + BView_ClipToPicture(CPlusObject, picture.CPlusObject, where.CPlusObject, ssync); +end; + +procedure BView.ClipToInversePicture(picture : BPicture; where : BPoint; ssync : boolean); +begin + BView_ClipToInversePicture(CPlusObject, picture.CPlusObject, where.CPlusObject, ssync); +end; + +procedure BView.SetDrawingMode(mode : Drawing_Mode); +begin + BView_SetDrawingMode(CPlusObject, mode); +end; + +function BView.DrawingMode : Drawing_Mode; +begin + Result := BView_DrawingMode(CPlusObject); +end; + +procedure BView.SetBlendingMode(srcAlpha : source_alpha; alphaFunc : alpha_function ); +begin + BView_SetBlendingMode(CPlusObject, srcAlpha, alphaFunc); +end; + +procedure BView.GetBlendingMode(srcAlpha : source_alpha; alphaFunc : alpha_function); +begin + BView_GetBlendingMode(CPlusObject, srcAlpha, alphaFunc); +end; + +procedure BView.SetPenSize(size : double); +begin + BView_SetPenSize(CPlusObject, size); +end; + +function BView.PenSize : double; +begin + Result := BView_PenSize(CPlusObject); +end; + +procedure BView.SetViewCursor(cursor : BCursor; ssync : boolean); +begin + BView_SetViewCursor(CPlusObject, cursor, ssync); +end; + + +{procedure BView.SetViewColor(r : byte; g : byte; b : byte; a : byte); +begin + BView_SetViewColor(CPlusObject, r, g, b, a); +end; +} +function BView.ViewColor : rgb_color; +begin + Result := BView_ViewColor(CPlusObject); +end; + +procedure BView.ClearViewBitmap; +begin + BView_ClearViewBitmap(CPlusObject); +end; + +procedure BView.ClearViewOverlay; +begin + BView_ClearViewOverlay(CPlusObject); +end; + +procedure BView.SetHighColor(a_color : rgb_color); +begin + BView_SetHighColor(CPlusObject, a_color); +end; + +procedure BView.SetHighColor(r :byte ; g :byte ; b :byte ; a : byte); +begin + BView_SetHighColor(CPlusObject, r, g, b, a); +end; + +function BView.HighColor : rgb_color; +begin + Result := BView_HighColor(CPlusObject); +end; + +procedure BView.SetLowColor(a_color : rgb_color); +begin + BView_SetLowColor(CPlusObject, a_color); +end; + +procedure BView.SetLowColor(r : byte; g :byte ; b : byte; a :byte ); +begin + BView_SetLowColor(CPlusObject, r, g, b, a); +end; + +function BView.LowColor : rgb_color; +begin + Result := BView_LowColor(CPlusObject); +end; + +procedure BView.SetLineMode(lineCap : cap_mode; lineJoin : join_mode; miterLimit : double); +begin + BView_SetLineMode(CPlusObject, lineCap, lineJoin, miterLimit); +end; + +function BView.LineJoinMode : join_mode; +begin + Result := BView_LineJoinMode(CPlusObject); +end; + +function BView.LineCapMode : cap_mode; +begin + Result := BView_LineCapMode(CPlusObject); +end; + +function BView.LineMiterLimit : double; +begin + Result := BView_LineMiterLimit(CPlusObject); +end; + + + + +function BView.Origin : BPoint; +begin + Result := BView_Origin(CPlusObject); +end; + +procedure BView.PushState; +begin + BView_PushState(CPlusObject); +end; + +procedure BView.PopState; +begin + BView_PopState(CPlusObject); +end; + +procedure BView.MovePenTo(pt : BPoint); +begin + BView_MovePenTo(CPlusObject, pt.CPlusObject); +end; + +procedure BView.MovePenTo(x : double; y : double); +begin + BView_MovePenTo(CPlusObject, x, y); +end; + +procedure BView.MovePenBy(x : double; y : double); +begin + BView_MovePenBy(CPlusObject, x, y); +end; + +function BView.PenLocation : BPoint; +begin + Result := BView_PenLocation(CPlusObject); +end; + +procedure BView.StrokeLine(toPt : BPoint; p : pattern); +begin + BView_StrokeLine(CPlusObject, toPt.CPlusObject, p); +end; + +procedure BView.StrokeLine(pt0 : BPoint; pt1 : BPoint; p : pattern); +begin + BView_StrokeLine(CPlusObject, pt0.CPlusObject, pt1.CPlusObject, p); +end; + +procedure BView.BeginLineArray(count : integer); +begin + BView_BeginLineArray(CPlusObject, count); +end; + +procedure BView.AddLine(pt0 : BPoint; pt1 : BPoint; col : rgb_color); +begin + BView_AddLine(CPlusObject, pt0.CPlusObject, pt1.CPlusObject, col); +end; + +procedure BView.EndLineArray; +begin + BView_EndLineArray(CPlusObject); +end; + +procedure BView.StrokePolygon(aPolygon : BPolygon; closed : boolean; p : pattern); +begin + BView_StrokePolygon(CPlusObject, aPolygon, closed, p); +end; + +procedure BView.StrokePolygon(ptArray : BPoint; numPts : integer; closed : boolean; p : pattern); +begin + BView_StrokePolygon(CPlusObject, ptArray, numPts, closed, p); +end; + +procedure BView.StrokePolygon(ptArray : BPoint; numPts : integer; sbounds : BRect; closed : boolean; p : pattern); +begin + BView_StrokePolygon(CPlusObject, ptArray, numPts, sbounds.CPlusObject, closed, p); +end; + +procedure BView.FillPolygon(aPolygon : BPolygon; p : pattern); +begin + BView_FillPolygon(CPlusObject, aPolygon, p); +end; + +procedure BView.FillPolygon(ptArray : BPoint; numPts : integer; p : pattern); +begin + BView_FillPolygon(CPlusObject, ptArray, numPts, p); +end; + +procedure BView.FillPolygon(ptArray : BPoint; numPts : integer; sbounds : BRect; p : pattern); +begin + BView_FillPolygon(CPlusObject, ptArray, numPts, sbounds.CPlusObject, p); +end; + +procedure BView.StrokeTriangle(pt1 : BPoint; pt2 : BPoint; pt3 : BPoint; sbounds : BRect; p : pattern); +begin + BView_StrokeTriangle(CPlusObject, pt1.CPlusObject, pt2.CPlusObject, pt3.CPlusObject, sbounds.CPlusObject, p); +end; + +procedure BView.StrokeTriangle(pt1 : BPoint; pt2 : BPoint; pt3 : BPoint; p : pattern); +begin + BView_StrokeTriangle(CPlusObject, pt1.CPlusObject, pt2.CPlusObject, pt3.CPlusObject, p); +end; + +procedure BView.FillTriangle(pt1 : BPoint; pt2 : BPoint; pt3 : BPoint; p : pattern); +begin + BView_FillTriangle(CPlusObject, pt1.CPlusObject, pt2.CPlusObject, pt3.CPlusObject, p); +end; + +procedure BView.FillTriangle(pt1 : BPoint; pt2 : BPoint; pt3 : BPoint; sbounds : BRect; p : pattern); +begin + BView_FillTriangle(CPlusObject, pt1.CPlusObject, pt2.CPlusObject, pt3.CPlusObject, sbounds.CPlusObject, p); +end; + +procedure BView.StrokeRect(r : BRect; p : pattern); +begin + BView_StrokeRect(CPlusObject, r.CPlusObject, p); +end; + +procedure BView.FillRect(r : BRect; p : pattern); +begin + BView_FillRect(CPlusObject, r.CPlusObject, p); +end; + +procedure BView.FillRegion(a_region : BRegion; p : pattern); +begin + BView_FillRegion(CPlusObject, a_region.CPlusObject, p); +end; + +procedure BView.InvertRect(r : BRect); +begin + BView_InvertRect(CPlusObject, r.CPlusObject); +end; + +procedure BView.StrokeRoundRect(r : BRect; xRadius : double; yRadius : double; p : pattern); +begin + BView_StrokeRoundRect(CPlusObject, r.CPlusObject, xRadius, yRadius, p); +end; + +procedure BView.FillRoundRect(r : BRect; xRadius : double; yRadius : double; p : pattern); +begin + BView_FillRoundRect(CPlusObject, r.CPlusObject, xRadius, yRadius, p); +end; + +procedure BView.StrokeEllipse(center : BPoint; xRadius : double; yRadius : double; p : pattern); +begin + BView_StrokeEllipse(CPlusObject, center.CPlusObject, xRadius, yRadius, p); +end; + +procedure BView.StrokeEllipse(r : BRect; p : pattern); +begin + BView_StrokeEllipse(CPlusObject, r.CPlusObject, p); +end; + +procedure BView.FillEllipse(center : BPoint; xRadius : double; yRadius : double; p : pattern); +begin + BView_FillEllipse(CPlusObject, center.CPlusObject, xRadius, yRadius, p); +end; + +procedure BView.FillEllipse(r : BRect; p : pattern); +begin + BView_FillEllipse(CPlusObject, r.CPlusObject, p); +end; + +procedure BView.StrokeArc(center : BPoint; xRadius : double; yRadius : double; start_angle : double; arc_angle : double; p : pattern); +begin + BView_StrokeArc(CPlusObject, center.CPlusObject, xRadius, yRadius, start_angle, arc_angle, p); +end; + +procedure BView.StrokeArc(r : BRect; start_angle : double; arc_angle : double; p : pattern); +begin + BView_StrokeArc(CPlusObject, r.CPlusObject, start_angle, arc_angle, p); +end; + +procedure BView.FillArc(center : BPoint; xRadius : double; yRadius : double; start_angle : double; arc_angle : double; p : pattern); +begin + BView_FillArc(CPlusObject, center.CPlusObject, xRadius, yRadius, start_angle, arc_angle, p); +end; + +procedure BView.FillArc(r : BRect; start_angle : double; arc_angle : double; p : pattern); +begin + BView_FillArc(CPlusObject, r.CPlusObject, start_angle, arc_angle, p); +end; + +procedure BView.StrokeBezier(controlPoints : BPoint; p : pattern); +begin + BView_StrokeBezier(CPlusObject, controlPoints.CPlusObject, p); +end; + +procedure BView.FillBezier(controlPoints : BPoint; p : pattern); +begin + BView_FillBezier(CPlusObject, controlPoints.CPlusObject, p); +end; + +procedure BView.StrokeShape(shape : BShape; p : pattern); +begin + BView_StrokeShape(CPlusObject, shape.CPlusObject, p); +end; + +procedure BView.FillShape(shape : BShape; p : pattern); +begin + BView_FillShape(CPlusObject, shape.CPlusObject, p); +end; + +procedure BView.CopyBits(src : BRect; dst : BRect); +begin + BView_CopyBits(CPlusObject, src.CPlusObject, dst.CPlusObject); +end; + +procedure BView.DrawBitmapAsync(aBitmap : BBitmap; srcRect : BRect; dstRect : BRect); +begin + BView_DrawBitmapAsync(CPlusObject, aBitmap, srcRect.CPlusObject, dstRect.CPlusObject); +end; + +procedure BView.DrawBitmapAsync(aBitmap : BBitmap); +begin + BView_DrawBitmapAsync(CPlusObject, aBitmap); +end; + +procedure BView.DrawBitmapAsync(aBitmap : BBitmap; where : BPoint); +begin + BView_DrawBitmapAsync(CPlusObject, aBitmap, where.CPlusObject); +end; + +procedure BView.DrawBitmapAsync(aBitmap : BBitmap; dstRect : BRect); +begin + BView_DrawBitmapAsync(CPlusObject, aBitmap, dstRect.CPlusObject); +end; + +procedure BView.DrawBitmap(aBitmap : BBitmap; srcRect : BRect; dstRect : BRect); +begin + BView_DrawBitmap(CPlusObject, aBitmap, srcRect.CPlusObject, dstRect.CPlusObject); +end; + +procedure BView.DrawBitmap(aBitmap : BBitmap); +begin + BView_DrawBitmap(CPlusObject, aBitmap); +end; + +procedure BView.DrawBitmap(aBitmap : BBitmap; where : BPoint); +begin + BView_DrawBitmap(CPlusObject, aBitmap, where.CPlusObject); +end; + +procedure BView.DrawBitmap(aBitmap : BBitmap; dstRect : BRect); +begin + BView_DrawBitmap(CPlusObject, aBitmap, dstRect.CPlusObject); +end; + +procedure BView.DrawChar(aChar : char); +begin + BView_DrawChar(CPlusObject, aChar); +end; + +procedure BView.DrawChar(aChar : char; location : BPoint); +begin + BView_DrawChar(CPlusObject, aChar, location.CPlusObject); +end; + +procedure BView.DrawString(aString : PChar; delta : escapement_delta); +begin + BView_DrawString(CPlusObject, aString, delta); +end; + +procedure BView.DrawString(aString : PChar; location : BPoint; delta : escapement_delta); +begin + BView_DrawString(CPlusObject, aString, location.CPlusObject, delta); +end; + +procedure BView.DrawString(aString : PChar; length : integer; delta : escapement_delta); +begin + BView_DrawString(CPlusObject, aString, length, delta); +end; + +procedure BView.DrawString(aString : PChar; length : integer; location : BPoint; delta : escapement_delta); +begin + BView_DrawString(CPlusObject, aString, length, location.CPlusObject, delta); +end; + + + + //////////////////////////////////////////////////////////////////////// // Hook functions //////////////////////////////////////////////////////////////////////// diff --git a/bepascal/source/bepascal/pas/src/be/storage/entry.pp b/bepascal/source/bepascal/pas/src/be/storage/entry.pp index 192ff84..5b683f3 100644 --- a/bepascal/source/bepascal/pas/src/be/storage/entry.pp +++ b/bepascal/source/bepascal/pas/src/be/storage/entry.pp @@ -24,6 +24,11 @@ uses beobj, storagedefs,SupportDefs; type + Entry_Ref = record + device : dev_t; + directory : ino_t; + name : PChar; + end; EntryRef = record device : dev_t; directory : ino_t; diff --git a/bepascal/source/tools/codegen/pas/codegen.pp b/bepascal/source/tools/codegen/pas/codegen.pp index cb881ea..86ad012 100644 --- a/bepascal/source/tools/codegen/pas/codegen.pp +++ b/bepascal/source/tools/codegen/pas/codegen.pp @@ -20,34 +20,45 @@ program codegen; {$H+} // use AnsiStrings uses - dom, xmlread, apireader, typmap, codewrite, SysUtils; + dom, xmlread, apireader, typmap, codewrite, SysUtils, OptionReader, + getopts; +const + SupportedOptions : array[0..2] of TOption = ((Name : 'aoption'; Has_arg : Optional_Argument; Flag : nil; Value : #0), + (Name : 'boption'; Has_arg : Optional_Argument; Flag : nil; Value : #0), + (Name : ''; Has_arg : NO_Argument; Flag : nil; Value : #0)); var aDoc : TXMLDocument; HooksDoc : TXMLDocument; Classes, Hooks : TDocument; SrcGen : TSourceGen; + Options : TOptions; begin if ParamCount > 0 then begin - ReadXMLFile(aDoc, Paramstr(1)); - ReadXMLFile(HooksDoc, 'hooks.xml'); - Classes := TDocument.Create(aDoc); + Options := TOptions.Create('a::b::', @SupportedOptions[0]); try - Hooks := TDocument.Create(HooksDoc); + ReadXMLFile(aDoc, Paramstr(1)); + ReadXMLFile(HooksDoc, 'hooks.xml'); + Classes := TDocument.Create(aDoc); try - SrcGen := TSourceGen.Create(Classes, Hooks, StringReplace(Paramstr(1), '.xml', '', [])); + Hooks := TDocument.Create(HooksDoc); try - SrcGen.Gen; - WriteLn('After gen'); + SrcGen := TSourceGen.Create(Classes, Hooks, StringReplace(Paramstr(1), '.xml', '', [])); + try + SrcGen.Gen; + WriteLn('After gen'); + finally + SrcGen.Free; + end; finally - SrcGen.Free; + Hooks.Free; end; finally - Hooks.Free; + Classes.Free; end; finally - Classes.Free; + Options.Free; end; end;