00001
00002
00003 #ifndef __OS_CLASS_H
00004 #define __OS_CLASS_H
00005
00006 typedef BApplication OsApplication;
00007 typedef BView *OsPainter;
00008 typedef BMenuItem *OsMenuItem;
00009
00010 class GView;
00011
00012 class LgiClass BViewRedir : public BView
00013 {
00014 void AttachedToWindow();
00015 void DetachedFromWindow();
00016 void Draw(BRect UpdateRect);
00017 void FrameResized(float width, float height);
00018 void Pulse();
00019 void MessageReceived(BMessage *message);
00020 void MakeFocus(bool f = true);
00021 void KeyDown(const char *bytes, int32 numBytes);
00022 void KeyUp(const char *bytes, int32 numBytes);
00023 void MouseDown(BPoint point);
00024 void MouseUp(BPoint point);
00025 void MouseMoved(BPoint point, uint32 transit, const BMessage *message);
00026 bool QuitRequested();
00027
00028 GView *Wnd;
00029 uint32 WndBtn;
00030
00031 public:
00032 BViewRedir(GView *Wnd, uint32 Resize = B_FOLLOW_LEFT | B_FOLLOW_TOP);
00033 ~BViewRedir();
00034
00035 GView *WindowHandle() { return Wnd; }
00036 };
00037
00038 typedef BViewRedir DefaultOsView;
00039
00040 class LgiClass GWnd : public BWindow
00041 {
00042 friend class GWindow;
00043
00044 GView *Notify;
00045
00046 public:
00047 GWnd(GView *notify);
00048 GWnd(GView *notify, BRect frame, char *title, window_type type, uint32 flags, uint32 workspaces = B_CURRENT_WORKSPACE);
00049 ~GWnd();
00050
00051 bool QuitRequested();
00052 void MessageReceived(BMessage *Msg);
00053 void FrameMoved(BPoint origin);
00054 void FrameResized(float width, float height);
00055 };
00056
00057 #endif