Updates from Baldur
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -227,6 +227,11 @@ bool BMessage_WasDropped(TCPlusObject message)
|
||||
return reinterpret_cast<BMessage*>(message)->WasDropped();
|
||||
}
|
||||
|
||||
status_t BMessage_Unflatten(TCPlusObject message,BDataIO *stream)
|
||||
{
|
||||
return reinterpret_cast<BMessage*>(message)->Unflatten(stream);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BMessage::operator=
|
||||
* Params: const BMessage &msg
|
||||
|
||||
@@ -76,6 +76,16 @@ void BPoint_Set(TCPlusObject Point, float x, float y)
|
||||
reinterpret_cast<BPoint*>(Point)->Set(x, y);
|
||||
}
|
||||
|
||||
float BPoint_Get_X(TCPlusObject Point)
|
||||
{
|
||||
return reinterpret_cast<BPoint*>(Point)->x;
|
||||
}
|
||||
|
||||
float BPoint_Get_Y(TCPlusObject Point)
|
||||
{
|
||||
return reinterpret_cast<BPoint*>(Point)->y;
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -75,6 +75,359 @@ void BRect_PrintToStream(TCPlusObject rect)
|
||||
reinterpret_cast<BRect*>(rect)->PrintToStream();
|
||||
}
|
||||
|
||||
float BRect_left(TCPlusObject rect)
|
||||
{
|
||||
return reinterpret_cast<BRect*>(rect)->left;
|
||||
}
|
||||
|
||||
float BRect_top(TCPlusObject rect)
|
||||
{
|
||||
return reinterpret_cast<BRect*>(rect)->top;
|
||||
}
|
||||
float BRect_right(TCPlusObject rect)
|
||||
{
|
||||
return reinterpret_cast<BRect*>(rect)->right;
|
||||
}
|
||||
float BRect_bottom(TCPlusObject rect)
|
||||
{
|
||||
return reinterpret_cast<BRect*>(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)
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) ;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,6 +562,7 @@ const
|
||||
B_8_BIT_640x400 = $80000000;
|
||||
|
||||
(*---------------------------------------------------------------------------*)
|
||||
}
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Initialization
|
||||
B_ROUND_CAP:=B_ROUND_JOIN;
|
||||
B_BUTT_CAP:=B_BUTT_JOIN;
|
||||
B_SQUARE_CAP:=B_SQUARE_JOIN;
|
||||
|
||||
end.
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{ BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2003 Olivier Coursiere
|
||||
Copyright (C) 2002 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
|
||||
@@ -17,89 +16,87 @@
|
||||
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);
|
||||
end;
|
||||
constructor BPicture.Create(data : BMessage);
|
||||
begin
|
||||
CreatePas;
|
||||
CPlusObject := BPicture_Create(Self,data);
|
||||
CreatePas;
|
||||
CPlusObject := BPolygon_Create(Self);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
destructor BPicture.Destroy;
|
||||
{constructor BPolygon.Create;
|
||||
begin
|
||||
BPicture_Free(CPlusObject);
|
||||
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;
|
||||
|
||||
function BPicture.Instantiate(data :BMessage) : BArchivable;
|
||||
|
||||
function BPolygon.Frame : BRect;
|
||||
begin
|
||||
Result := BPicture_Instantiate(CPlusObject, data.CPlusObject);
|
||||
Result := BPolygon_Frame(CPlusObject);
|
||||
end;
|
||||
|
||||
function BPicture.Archive(data : BMessage; deep : boolean) : Status_t;
|
||||
{procedure BPolygon.AddPoints(ptArray : ; numPoints : integer);
|
||||
begin
|
||||
Result := BPicture_Archive(CPlusObject, data.CPlusObject, deep);
|
||||
BPolygon_AddPoints(CPlusObject, ptArray, numPoints);
|
||||
end;
|
||||
}
|
||||
function BPolygon.CountPoints : integer;
|
||||
begin
|
||||
Result := BPolygon_CountPoints(CPlusObject);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
function BPicture.Perform(d : Perform_code; arg : Pointer) : Status_t;
|
||||
procedure BPolygon.MapTo(srcRect : BRect; dstRect : BRect);
|
||||
begin
|
||||
Result := BPicture_Perform(CPlusObject, d, arg);
|
||||
BPolygon_MapTo(CPlusObject, srcRect.CPlusObject, dstRect.CPlusObject);
|
||||
end;
|
||||
|
||||
function BPicture.Flatten(var stream : BDataIO) : Status_t;
|
||||
procedure BPolygon.PrintToStream;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
@@ -55,6 +37,95 @@ type
|
||||
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';
|
||||
function BPoint_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BPoint_Create_3';
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user