BButton is now wrapped ! Be GUI apps in pascal are comming soon.

This commit is contained in:
ocoursiere
2003-01-10 19:59:31 +00:00
parent 73d044331a
commit aeec287775
22 changed files with 3595 additions and 78 deletions

View File

@@ -73,23 +73,44 @@ BPApplication::BPApplication(TPasObject PasObject, const char *signature,
}
void BPApplication::AppActivated(bool active)
{
AppActivated_hookCall(active);
BApplication::AppActivated(active);
}
void BPApplication::AppActivated_hookCall(bool active)
{
Application_AppActivated_hook(GetPasObject(), active);
}
void BPApplication::ReadyToRun(void)
{
ReadyToRun_hookCall();
BApplication::ReadyToRun();
}
void BPApplication::ReadyToRun_hookCall(void)
{
Application_ReadyToRun_hook(GetPasObject());
}
bool BPApplication::QuitRequested(void)
{
return BPLooper::QuitRequested();
return QuitRequested_hookCall();
// return BApplication::QuitRequested();
}
void BPApplication::MessageReceived(BMessage *message)
{
BPHandler::MessageReceived(message);
MessageReceived_hookCall(message);
BApplication::MessageReceived(message);
}
void BPApplication::DispatchMessage(BMessage *message, BHandler *target)
{
DispatchMessage_hookCall(message, target);
// message->PrintToStream();
BApplication::DispatchMessage(message, target);
}
#if defined(__cplusplus)

View File

@@ -24,10 +24,6 @@
#include <handler.h>
#include <beobj.h>
// definition of callback function in BHandler
typedef void (*BHandler_MessageReceived_hook) (TPasObject PasObject, TCPlusObject message);
#if defined(__cplusplus)
extern "C" {
#endif
@@ -43,6 +39,7 @@ BPHandler::BPHandler(TPasObject PasObject, const char *name)
{
}
BPHandler::BPHandler(TPasObject PasObject, BMessage *archive)
: BHandler(archive), BPasObject(PasObject)
{
@@ -55,7 +52,13 @@ BPHandler::~BPHandler()
void BPHandler::MessageReceived(BMessage *message)
{
Handler_MessageReceived_hook(GetPasObject(), message);
MessageReceived_hookCall(message);
BHandler::MessageReceived(message);
}
void BPHandler::MessageReceived_hookCall(BMessage *message)
{
Handler_MessageReceived_hook(GetPasObject(), message);
}

View File

@@ -61,15 +61,33 @@ BPLooper::~BPLooper()
}
void BPLooper::DispatchMessage(BMessage *message, BHandler *target)
{
DispatchMessage_hookCall(message, target);
BLooper::DispatchMessage(message, target);
}
void BPLooper::DispatchMessage_hookCall(BMessage *message, BHandler *target)
{
Looper_DispatchMessage_hook(GetPasObject(), message, target);
}
bool BPLooper::QuitRequested(void)
{
QuitRequested_hookCall();
return Looper_QuitRequested_hook(GetPasObject());
}
bool BPLooper::QuitRequested_hookCall(void)
{
return Looper_QuitRequested_hook(GetPasObject());
}
void BPLooper::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BLooper::MessageReceived(message);
}
#if defined(__cplusplus)
extern "C" {
#endif

View File

@@ -46,7 +46,10 @@ class BPApplication : public BApplication, public virtual BPLooper
virtual void AppActivated(bool active);
virtual void ReadyToRun(void);
virtual bool QuitRequested(void);
virtual void MessageReceived(BMessage *message);
virtual void MessageReceived(BMessage *message);
virtual void DispatchMessage(BMessage *message, BHandler *target);
virtual void AppActivated_hookCall(bool active);
virtual void ReadyToRun_hookCall(void);
private:
};

View File

@@ -23,6 +23,10 @@
#include <beobj.h>
// definition of callback function in BHandler
typedef void (*BHandler_MessageReceived_hook) (TPasObject PasObject, TCPlusObject message);
class BPHandler : public BHandler, public virtual BPasObject
{
public:
@@ -30,6 +34,7 @@ class BPHandler : public BHandler, public virtual BPasObject
BPHandler(TPasObject PasObject, BMessage *archive);
virtual ~BPHandler(void);
virtual void MessageReceived(BMessage *message);
virtual void MessageReceived_hookCall(BMessage *message);
private:
};

View File

@@ -39,7 +39,9 @@ var
procedure THandler.MessageReceived(aMessage : TMessage);
begin
WriteLn(ClassName + '.MessageReceived');
WriteLn('Message reçue');
aMessage.PrintToStream;
end;
procedure Handler_MessageReceived_hook_func(Handler : THandler; aMessage : TCPlusObject); cdecl;

View File

@@ -37,6 +37,9 @@ class BPLooper : public BLooper, public virtual BPHandler
virtual ~BPLooper();
virtual void DispatchMessage(BMessage *message, BHandler *target);
virtual bool QuitRequested(void);
virtual void MessageReceived(BMessage *message);
virtual void DispatchMessage_hookCall(BMessage *message, BHandler *target);
virtual bool QuitRequested_hookCall(void);
private:
};

View File

@@ -42,7 +42,7 @@ BButton_MakeDefault_hook Button_MakeDefault_hook;
}
#endif
class BPButton : public BButton, virtual public BPControl
class BPButton : public BButton, virtual public BPControl
{
public:
// <BView_Constructor>
@@ -54,7 +54,29 @@ class BPButton : public BButton, virtual public BPControl
uint32 resizeMask,
uint32 flags);
BPButton(TPasObject PasObject, BMessage *archive);
virtual void MessageReceived(BMessage *message);
virtual void Draw(BRect updateRect);
virtual void AttachedToWindow(void);
virtual void MakeDefault(bool flag);
virtual void WindowActivated(bool active);
virtual void AllAttached(void);
virtual void AllDetached(void);
virtual void DetachedFromWindow(void);
virtual void DrawAfterChildren(BRect updateRect);
virtual void FrameMoved(BPoint parentPoint);
virtual void FrameResized(float width, float height);
virtual void GetPreferredSize(float *width, float *height);
virtual void ResizeToPreferred(void);
virtual void KeyDown(const char *bytes, int32 numBytes);
virtual void KeyUp(const char *bytes, int32 numBytes);
virtual void MouseDown(BPoint point);
virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message);
virtual void MouseUp(BPoint point);
virtual void Pulse(void);
// virtual void TargetedByScrollView(BScrollView *scroller);
virtual void SetEnabled(bool enabled);
virtual void SetValue(int32 value);
private:
};
@@ -83,11 +105,120 @@ BPButton::BPButton(TPasObject PasObject, BMessage *archive)
BPHandler(PasObject, archive),
BPasObject(PasObject)
{
}
void BPButton::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BButton::MessageReceived(message);
}
void BPButton::Draw(BRect updateRect)
{
BButton::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPButton::AttachedToWindow(void)
{
BButton::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPButton::MakeDefault(bool flag)
{
Button_MakeDefault_hook(GetPasObject(), flag);
// Button_MakeDefault_hook(GetPasObject(), flag);
}
void BPButton::WindowActivated(bool active)
{
BButton::WindowActivated(active);
}
void BPButton::AllAttached(void)
{
BButton::AllAttached();
}
void BPButton::AllDetached(void)
{
BButton::AllDetached();
}
void BPButton::DetachedFromWindow(void)
{
BButton::DetachedFromWindow();
}
void BPButton::DrawAfterChildren(BRect updateRect)
{
BButton::DrawAfterChildren(updateRect);
}
void BPButton::FrameMoved(BPoint parentPoint)
{
BButton::FrameMoved(parentPoint);
}
void BPButton::FrameResized(float width, float height)
{
BButton::FrameResized(width, height);
}
void BPButton::GetPreferredSize(float *width, float *height)
{
BButton::GetPreferredSize(width, height);
}
void BPButton::ResizeToPreferred(void)
{
BButton::ResizeToPreferred();
}
void BPButton::KeyDown(const char *bytes, int32 numBytes)
{
BButton::KeyDown(bytes, numBytes);
}
void BPButton::KeyUp(const char *bytes, int32 numBytes)
{
BButton::KeyUp(bytes, numBytes);
}
void BPButton::MouseDown(BPoint point)
{
BButton::MouseDown(point);
}
void BPButton::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{
BButton::MouseMoved(point, transit, message);
}
void BPButton::MouseUp(BPoint point)
{
BButton::MouseUp(point);
}
void BPButton::Pulse(void)
{
BButton::Pulse();
}
//void BPButton::TargetedByScrollView(BScrollView *scroller)
//{
// BButton::TargetedByScrollView(scroller);
//}
void BPButton::SetEnabled(bool enabled)
{
BButton::SetEnabled(enabled);
}
void BPButton::SetValue(int32 value)
{
BButton::SetValue(value);
}
#if defined(__cplusplus)

View File

@@ -65,6 +65,24 @@ BPControl::BPControl(TPasObject PasObject, BMessage *message):
{
}
void BPControl::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BControl::MessageReceived(message);
}
void BPControl::Draw(BRect updateRect)
{
BControl::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPControl::AttachedToWindow(void)
{
BControl::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPControl::SetEnabled(bool enabled)
{
Control_SetEnabled_hook(GetPasObject(), enabled);

View File

@@ -106,6 +106,12 @@ BPView::BPView(TPasObject PasObject, BMessage *archive)
{
}
void BPView::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BView::MessageReceived(message);
}
void BPView::AllAttached(void)
{
View_AllAttached_hook(GetPasObject());
@@ -113,7 +119,13 @@ void BPView::AllAttached(void)
void BPView::AttachedToWindow(void)
{
View_AttachedToWindow_hook(GetPasObject());
BView::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPView::AttachedToWindow_hookCall(void)
{
View_AttachedToWindow_hook(GetPasObject());
}
void BPView::AllDetached(void)
@@ -129,6 +141,11 @@ void BPView::DetachedFromWindow(void)
void BPView::Draw(BRect updateRect)
{
BView::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPView::Draw_hookCall(BRect updateRect)
{
View_Draw_hook(GetPasObject(), &updateRect);
}

File diff suppressed because it is too large Load Diff

View File

@@ -147,27 +147,27 @@ end;
procedure TButton.Draw(updateRect : TRect);
begin
BButton_Draw(CPlusObject, updateRect.CPlusObject);
end;
procedure TButton.MouseDown(where : TPoint);
begin
BButton_MouseDown(CPlusObject, where.CPlusObject);
end;
procedure TButton.AttachedToWindow;
begin
BButton_AttachedToWindow(CPlusObject);
end;
procedure TButton.KeyDown(bytes : PChar; numBytes : integer);
begin
BButton_KeyDown(CPlusObject, bytes, numBytes);
end;
procedure TButton.MakeDefault(state : boolean);
begin
BButton_MakeDefault(CPlusObject, state);
end;
procedure TButton.SetLabel(text : PChar);
@@ -188,37 +188,37 @@ end;
procedure TButton.WindowActivated(state : boolean);
begin
BButton_WindowActivated(CPlusObject, state);
// BButton_WindowActivated(CPlusObject, state);
end;
procedure TButton.MouseUp(pt : TPoint);
begin
BButton_MouseUp(CPlusObject, pt.CPlusObject);
// BButton_MouseUp(CPlusObject, pt.CPlusObject);
end;
procedure TButton.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
BButton_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
// BButton_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
end;
procedure TButton.DetachedFromWindow;
begin
BButton_DetachedFromWindow(CPlusObject);
// BButton_DetachedFromWindow(CPlusObject);
end;
procedure TButton.SetValue(aValue : integer);
begin
BButton_SetValue(CPlusObject, aValue);
// BButton_SetValue(CPlusObject, aValue);
end;
procedure TButton.GetPreferredSize(width : double; height : double);
begin
BButton_GetPreferredSize(CPlusObject, width, height);
// BButton_GetPreferredSize(CPlusObject, width, height);
end;
procedure TButton.ResizeToPreferred;
begin
BButton_ResizeToPreferred(CPlusObject);
// BButton_ResizeToPreferred(CPlusObject);
end;
function TButton.Invoke(msg : TMessage) : TStatus_t;
@@ -228,12 +228,12 @@ end;
procedure TButton.FrameMoved(new_position : TPoint);
begin
BButton_FrameMoved(CPlusObject, new_position.CPlusObject);
// BButton_FrameMoved(CPlusObject, new_position.CPlusObject);
end;
procedure TButton.FrameResized(new_width : double; new_height : double);
begin
BButton_FrameResized(CPlusObject, new_width, new_height);
// BButton_FrameResized(CPlusObject, new_width, new_height);
end;
procedure TButton.MakeFocus(state : boolean);
@@ -243,12 +243,12 @@ end;
procedure TButton.AllAttached;
begin
BButton_AllAttached(CPlusObject);
// BButton_AllAttached(CPlusObject);
end;
procedure TButton.AllDetached;
begin
BButton_AllDetached(CPlusObject);
// BButton_AllDetached(CPlusObject);
end;
function TButton.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;

View File

@@ -38,6 +38,9 @@ class BPControl : public BControl, virtual public BPView
uint32 resizeMask,
uint32 flags);
BPControl(TPasObject PasObject, BMessage *message);
virtual void MessageReceived(BMessage *message);
virtual void Draw(BRect updateRect);
virtual void AttachedToWindow(void);
virtual void SetEnabled(bool enabled);
virtual void SetValue(int32 value);
private:

View File

@@ -156,47 +156,47 @@ end;
procedure TControl.WindowActivated(state : boolean);
begin
BControl_WindowActivated(CPlusObject, state);
// BControl_WindowActivated(CPlusObject, state);
end;
procedure TControl.AttachedToWindow;
begin
BControl_AttachedToWindow(CPlusObject);
// BControl_AttachedToWindow(CPlusObject);
end;
procedure TControl.MessageReceived(msg : TMessage);
begin
BControl_MessageReceived(CPlusObject, msg.CPlusObject);
// BControl_MessageReceived(CPlusObject, msg.CPlusObject);
end;
procedure TControl.MakeFocus(state : boolean);
begin
BControl_MakeFocus(CPlusObject, state);
// BControl_MakeFocus(CPlusObject, state);
end;
procedure TControl.KeyDown(bytes : PChar; numBytes : integer);
begin
BControl_KeyDown(CPlusObject, bytes, numBytes);
// BControl_KeyDown(CPlusObject, bytes, numBytes);
end;
procedure TControl.MouseDown(pt : TPoint);
begin
BControl_MouseDown(CPlusObject, pt.CPlusObject);
// BControl_MouseDown(CPlusObject, pt.CPlusObject);
end;
procedure TControl.MouseUp(pt : TPoint);
begin
BControl_MouseUp(CPlusObject, pt.CPlusObject);
// BControl_MouseUp(CPlusObject, pt.CPlusObject);
end;
procedure TControl.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
BControl_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
// BControl_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
end;
procedure TControl.DetachedFromWindow;
begin
BControl_DetachedFromWindow(CPlusObject);
// BControl_DetachedFromWindow(CPlusObject);
end;
procedure TControl.SetLabel(text : PChar);
@@ -231,12 +231,12 @@ end;
procedure TControl.GetPreferredSize(width : double; height : double);
begin
BControl_GetPreferredSize(CPlusObject, width, height);
// BControl_GetPreferredSize(CPlusObject, width, height);
end;
procedure TControl.ResizeToPreferred;
begin
BControl_ResizeToPreferred(CPlusObject);
// BControl_ResizeToPreferred(CPlusObject);
end;
function TControl.Invoke(msg : TMessage) : TStatus_t;
@@ -256,12 +256,12 @@ end;
procedure TControl.AllAttached;
begin
BControl_AllAttached(CPlusObject);
// BControl_AllAttached(CPlusObject);
end;
procedure TControl.AllDetached;
begin
BControl_AllDetached(CPlusObject);
// BControl_AllDetached(CPlusObject);
end;
function TControl.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;

View File

@@ -11,9 +11,10 @@ type
blue : byte;
alpha : byte;
end;
TColor_space = Cardinal;
implementation
initialization
end.
end.

View File

@@ -35,8 +35,7 @@ class BPView : public BView, public virtual BPHandler
uint32 resizingMode,
uint32 flags);
BPView(TPasObject PasObject, BMessage *archive);
// virtual void DispatchMessage(BMessage *message, BHandler *target);
// virtual bool QuitRequested(void);
virtual void MessageReceived(BMessage *message);
virtual void AllAttached(void);
virtual void AttachedToWindow(void);
virtual void AllDetached(void);
@@ -55,6 +54,8 @@ class BPView : public BView, public virtual BPHandler
virtual void Pulse(void);
// virtual void TargetedByScrollView(BScrollView *scroller);
virtual void WindowActivated(bool active);
virtual void Draw_hookCall(BRect updateRect);
virtual void AttachedToWindow_hookCall(void);
private:
};

View File

@@ -49,6 +49,7 @@ type
procedure Pulse; virtual;
// procedure TargetedByScrollView(scroller : TScrollView); virtual; // Need BScrollView
procedure WindowActivated(active : boolean); virtual;
procedure MessageReceived(aMessage : TMessage); override;
// End hook functions
function RemoveSelf : boolean;
procedure AddChild(aView, before : TView);
@@ -94,16 +95,16 @@ var
const
// flags
B_FULL_UPDATE_ON_RESIZE : Cardinal = 31;
_B_RESERVED1_ : Cardinal = 30;
B_WILL_DRAW : Cardinal = 29;
B_PULSE_NEEDED : Cardinal = 28;
B_NAVIGABLE_JUMP : Cardinal = 27;
B_FRAME_EVENTS : Cardinal = 26;
B_NAVIGABLE : Cardinal = 25;
B_SUBPIXEL_PRECISE : Cardinal = 24;
B_DRAW_ON_CHILDREN : Cardinal = 23;
_B_RESERVED7_ : Cardinal = 22;
B_FULL_UPDATE_ON_RESIZE : Cardinal = $80000000;//31;
_B_RESERVED1_ : Cardinal = $40000000;//30;
B_WILL_DRAW : Cardinal = $20000000;//29;
B_PULSE_NEEDED : Cardinal = $10000000;//28;
B_NAVIGABLE_JUMP : Cardinal = $08000000;//27;
B_FRAME_EVENTS : Cardinal = $04000000;//26;
B_NAVIGABLE : Cardinal = $02000000;//25;
B_SUBPIXEL_PRECISE : Cardinal = $00800000;//24;
B_DRAW_ON_CHILDREN : Cardinal = $00400000;//23;
_B_RESERVED7_ : Cardinal = $00200000;//22;
implementation
@@ -234,9 +235,14 @@ end;
procedure TView.WindowActivated(active : boolean);
begin
Writeln('WindowActivated in View');
// WriteLn('WindowActivated in View');
end;
procedure TView.MessageReceived(aMessage : TMessage);
begin
inherited;
WriteLn('View.MessageReceived, PASCAL');
end;
function TView.RemoveSelf : boolean;
begin

View File

@@ -13,7 +13,7 @@
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
Foundation, Inc., s59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _WINDOW_H_
@@ -36,8 +36,10 @@ class BPWindow : public BWindow, public BPLooper
window_type type,
uint32 flags,
uint32 workspaces = B_CURRENT_WORKSPACE);
// virtual void DispatchMessage(BMessage *message, BHandler *target);
// virtual bool QuitRequested(void);
virtual void MessageReceived(BMessage *message);
virtual void DispatchMessage(BMessage *message, BHandler *target);
virtual bool QuitRequested(void);
virtual void WindowActivated(bool active);
private:
};

File diff suppressed because it is too large Load Diff

View File

@@ -20,6 +20,9 @@ unit os;
interface
uses
SupportDefs;
const
B_LOW_LATENCY = 5;
B_LOW_PRIORITY = 5;
@@ -42,6 +45,48 @@ type
TThread_id = Longint;
TTeam_id = Longint;
const
B_NO_LOCK = 0;
B_LAZY_LOCK = 1;
B_FULL_LOCK = 2;
B_CONTIGUOUS = 3;
B_LOMEM = 4;
B_ANY_ADDRESS = 0;
B_EXACT_ADDRESS = 1;
B_BASE_ADDRESS = 2;
B_CLONE_ADDRESS = 3;
B_ANY_KERNEL_ADDRESS = 4;
B_READ_AREA = 1;
B_WRITE_AREA = 2;
// area
type
TArea_Info = record
area : TArea_id;
name : array [0..B_OS_NAME_LENGTH] of char;
size : TSize_t;
lock : Cardinal;
protection : Cardinal;
team : TTeam_id;
ram_size : Cardinal;
copy_count : Cardinal;
in_count : Cardinal;
out_count : Cardinal;
address : Pointer;
end;
// Semaphores
type
TSem_Info = record
sem : TSem_id;
team : TTeam_id;
name : array [0..B_OS_NAME_LENGTH] of char;
count : integer;
latest_holder : TThread_id;
end;
implementation
end.

View File

@@ -36,8 +36,9 @@ type
aView : TView;
aButton : TButton;
public
constructor Create(frame : TRect; title : PChar; atype, flags, workspaces : Cardinal); override;
constructor Create(aFrame : TRect; title : PChar; atype, aFlags, aWorkspaces : Cardinal); override;
destructor Destroy; override;
procedure MessageReceived(amessage : TMessage); override;
end;
TMonObjet = class(TObject)
private
@@ -53,7 +54,7 @@ type
var
MonObj : TMonObjet;
constructor TMyWindow.Create(frame : TRect; title : PChar; atype, flags, workspaces : Cardinal);
constructor TMyWindow.Create(aFrame : TRect; title : PChar; atype, aFlags, aWorkspaces : Cardinal);
var
aRect, aRect2 : TRect;
rgb_color : TRGB_color;
@@ -62,23 +63,24 @@ begin
inherited;
aRect := TRect.Create(20, 20, 100, 100);
try
aRect2 := TRect.Create(120, 120, 300, 300);
aRect2 := TRect.Create(110, 110, 150, 150);
try
aView := TView.Create(aRect, 'Test', B_FOLLOW_NONE, B_WILL_DRAW);
aView := TView.Create(aRect, 'Test', B_FOLLOW_ALL, B_WILL_DRAW);
rgb_color.red := 255;
rgb_color.green := 0;
rgb_color.blue := 0;
rgb_color.alpha := 0;
aView.SetViewColor(rgb_color);
Self.AddChild(aView, nil);
mess := TMessage.Create(100);
aButton := TButton.Create(aRect2, 'Test', 'Test', mess, B_FOLLOW_NONE, B_WILL_DRAW);
mess := TMessage.Create(77777);
aButton := TButton.Create(aRect2, 'Test2', 'Test2', mess, B_FOLLOW_LEFT or B_FOLLOW_TOP, B_WILL_DRAW or B_NAVIGABLE);
aButton.SetViewColor(rgb_color);
WriteLn('before addchild');
Self.AddChild(aButton, nil);
aButton.Invoker.SetTarget(aView, nil);
WriteLn('after addchild');
// aButton.Invoker.SetTarget(aView, nil);
if aButton.IsEnabled then
WriteLn('Actif');
WriteLn('after addchild');
finally
aRect2.Free;
end;
@@ -94,6 +96,13 @@ begin
inherited;
end;
procedure TMyWindow.MessageReceived(aMessage : TMessage);
begin
inherited;
WriteLn('TMyWindow réception');
WriteLn(Self.ClassName + '.MessageReceived');
end;
function TMonApplication.QuitRequested : boolean;
begin
Result := inherited;